Motivation

The advection equation as it is imposed in the non-conservative form

<<latex($u_{t} + v \nabla \cdot (u) = 0$)>>

does only allow constant speeds for the advection (e.g. <<latex($v = 1$)>>. As this might be sufficient for many purposes, it might be necessary to define a more complex advection speed function in some cases. For this reasons the formulation of the equation has to be changed into the conservative form

<<latex($u_{t} + \nabla \cdot (v u) = 0$)>>

An example of the non-conservative form can be found in /examples/advection/advection.py. In the 2D case the advection speed is defined as <<latex($v = \begin{array}{*{1}{c}} 2 \\ 0 \\ \end{array}$)>>, which is a constant advection to the right.

The first step will be a space dependent advection function for the 2D case with <<latex($v = v(x,y) = \begin{array}{*{1}{c}} -y \\ x \\ \end{array}$)>> which is a vortex.

1. Define the advection function based on the discr.interpolate_volume_function(function) method.

2. Build an operator by modifying: (use the allready existing AdvectionOperatorBase class in pde.py)

• the operator interface for the new advection function.
• the RHS to the conservative form.
• the BC's in order to provide a Dirichlet BC on the entire boundary.

The second step will be a time and space dependent advection function for the 2D case with <<latex($v = v(x,y,t) = \begin{array}{*{1}{c}} -y \\ x \\ \end{array} \cdot sin(\pi t)$)>>.