4
$\begingroup$

I'm implementing a Finite Difference WENO5 with Lax-Friedrich flux splitting on a uniform, structured grid to solve the 2D Euler equations of fluid dynamics on a rectangular domain in cartesian coordinates.

$$\frac{\partial U}{\partial t}+\frac{\partial F}{\partial x}+\frac{\partial G}{\partial y}=0$$

where:

$$U = (\rho,\rho{u},\rho{v},\rho E)^t$$ $$F = (\rho{u},\rho{u^2}+p,\rho u v, \rho uH)^t$$ $$G = (\rho{v},\rho u v,\rho{v^2}+p, \rho vH)^t$$

$$E = \frac{p }{\rho (\gamma-1)} + \frac{1}{2}(u^2+v^2)$$ $$H = \frac{\gamma p }{\rho (\gamma-1)} + \frac{1}{2}(u^2+v^2)$$


Although the interior scheme seems to work fine, I am having trouble with the numeric implementation of boundary conditions.

The WENO5 interpolation is done on the fluxes, to approximate the derivative on the node $i$ as: $$\left( \frac{\partial F}{\partial x}\right) _{i}=\frac{f^{WENO}_{i+1/2}-f^{WENO}_{i-1/2}}{\Delta x}$$ and then update the conservative variables' vector via a Runge-Kutta method.

I want to use ghost nodes, and I know there has to be 3 ghost nodes on each end of the domain (because of the stencil of the WENO5) but I do not know what values I have to assign to the ghost nodes, or what kind of extrapolation I have to use to find those values. In my case the physical boundaries coincide with the leftmost and rightmost (lowermost and uppermost for the other direction) points of the grid, respectively.

These are the three types of boundary conditions I'm working with at the moment, namely:

  • Reflecting wall (x-direction): $$\begin{bmatrix}\frac{\partial \rho }{\partial x}=0 \\ u=0\\ \frac{\partial v }{\partial x}=0 \\ \frac{\partial p }{\partial x}=0 \end{bmatrix} $$

  • Reflecting wall (y-direction): $$\begin{bmatrix}\frac{\partial \rho }{\partial y}=0 \\ \frac{\partial u }{\partial y}=0 \\ v=0\\ \frac{\partial p }{\partial y}=0 \end{bmatrix} $$

  • Dirichlet condition with fixed value on all primitive variables: $$\begin{bmatrix} \rho =\rho_0 \\ u =u_0 \\ v =v_0 \\ p =p_0 \end{bmatrix} $$

Thanks in advance for your answers.

$\endgroup$
3
  • $\begingroup$ You are already part way through the process. Choose ghost nodes. Then based on your interpolation procedure you can determine what the values in the ghost nodes need to be to make the boundary faces have the correct value. $\endgroup$
    – Vikram
    Jan 19, 2017 at 12:32
  • $\begingroup$ @Vikram Thank you for your reply. I tried to mimic this paper but I think I'm missing something. because I need to know the values of rho, u, v and p for the 3 ghost points. Could you elaborate a little more on your answer? I did not quite get what you mean with "interpolation procedure" but I think it is the key to achieve what I need. $\endgroup$ Jan 19, 2017 at 18:19
  • $\begingroup$ WENO is just a scheme to do an interpolation. You have values at $u_i$, $u_{i+1}$, $u_{i-1}$ etc. From that you get $u_{i+\frac{1}{2}}$. So, now when you impose $u_{i+\frac{1}{2}}$ as a boundary condition you have to use the same or lower order procedure to get back $u_i$, given $u_{i+\frac{1}{2}}$. For eg. if your interpolation is $0.5 (u_{i+1} + u_{i}) = u_{i+\frac{1}{2}}$ and $u_{i+\frac{1}{2}} = 0$ then you simply impose $u_{i} = -u_{i+1}$ $\endgroup$
    – Vikram
    Jan 20, 2017 at 14:17

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.