Implement boundary conditions in finite-volume code for conservation laws

132 Views Asked by At

For the numerical solution of scalar hyperbolic conservation laws using finite volume schemes. In order to implement the boundary conditions and the numerical fluxes, make use of Ghost cells. Consider the following flux functions.

  • $f ( u ) = a u$ with parameter $a \in \mathbb { R }$
  • $f ( u ) = \frac { 1 } { 2 } u ^ { 2 }$ and the following numerical fluxes
  • central scheme
  • upwind scheme
  • Lax-Wendroff scheme

How can the two flux functions be written in terms of the following schemes? And the boundary conditions have to be implemented using the ghost cell method.

1

There are 1 best solutions below

0
On

$f := au$

$$\begin{align} F_\text{Central}(u_l, u_r) =& \frac{f(u_l)+ f(u_r)}{2} = \frac{a u_l + au_r}{2} \\ F_\text{Upwind} (u_l, u_r) =& \begin{cases} u_l,& a \geq 0 \\ u_r,& a < 0 \end{cases} \\ F_\text{Lax-Wendroff}(u_l, u_r) =& \frac{f(u_l)+ f(u_r)}{2} - f'\Bigg( \frac{u_l+u_r}{2} \Bigg) \frac{\Delta t}{2 \Delta x} \Big( f(u_l)- f(u_r) \Big) \\ =&a\frac{ u_l + u_r}{2} - \frac{a^2\Delta t}{2 \Delta x} \frac{ u_l + u_r}{2} (u_l- u_r) \end{align} $$

$f = 0.5u^2$ $$\begin{align} F_\text{Central}(u_l, u_r) =& \frac{u_l^2 + u_r^2}{4} \\ F_\text{Upwind} (u_l, u_r) =F_\text{Godunov} (u_l, u_r) =& \begin{cases} \min_{u_l \leq \theta \leq u_r} f(\theta) ,& u_l \leq u_r \\ \max_{u_r \leq \theta \leq u_l} f(\theta),& u_l > u_r \end{cases} \\ F_\text{Lax-Wendroff}(u_l, u_r) =& \frac{u_l^2 + u_r^2}{4} - \frac{u_l+u_r}{2} \frac{\Delta t}{2 \Delta x} \frac{u_l^2 - u_r^2}{4} \end{align} $$

Ghost points are usually points which are not updated by the usual FVM scheme. Instead, depending on the employed boundary condition can set them to fixed values, i.e.,

Outflow: $$u_0 = u_1, u_{N+1} = u_{N}$$ Dirichlet (be careful with this): $$u_0 = u_0^\star, u_{N+1} = u_{N+1}^\star$$ Periodic: $$u_0 = u_N, u_{N+1} = u_1$$