# What kind of test cases are convenient to use for testing the code for Euler equations of gas dynamics in polar coordinates?

Consider Euler equation of gas dynamics in polar coordinates as
$$\left( \begin{array}{ccc} \rho \\ \rho u_{r} \\ \rho u_{\theta} \\ E \end{array} \right)_{t} + \frac{1}{r} \left( \begin{array}{ccc} r \rho u_{r} \\ r (\rho u_{r}u_{r} + p)\\ r \rho u_{r} u_{\theta}\\ r u_{r}(E + p)\end{array} \right)_{r} + \frac{1}{r} \left( \begin{array}{ccc} \rho u_{\theta} \\ \rho u_{r}u_{\theta} \\ \rho u_{\theta} u_{\theta} + p\\ u_{\theta}(E + p)\end{array} \right)_{\theta} = \left( \begin{array}{ccc} 0 \\ \frac{p}{r} + \frac{\rho u_{\theta} u_{\theta}}{r} \\ -\frac{\rho u_{r} u_{\theta}}{r}\\ 0\end{array} \right)$$

• Velocity of shock waves are my interest for this problem.
• The finite volume numerical method is picked to obtain approximate solutions for this system.

Before I run my code for my problem ,which does not have an analytical solution so I can't be certain if my code is correct or not, is there any test cases that I can use to test my code ?

For my problem boundary conditions are quite challenging, what kind should I pick and how to apply it to my FVM scheme ?

Matlab is the preferable language for this calculation. Any help is appreciated.

## 1 Answer

As a starting point, "method of manufactured solutions" can be used to check the validity of your code. For information regarding this: http://www.innovative-cfd.com/manufactured-solutions.html, or you can just google about manufactured solutions.

Roughly, CFL condition scales as $h^2$ instead of $h$ if you use artificial diffusion terms. For DG methods, it is typically given by: $$\Delta t \sim \frac{1}{\lambda_{max}\frac{N^2}{h} + ||\nu||_{L^\infty}\frac{N^4}{h^2}}$$ where N is the approximation polynomial degree. For reference:

Boundary conditions question needs to be more concrete I think for the community to help.

• MMS method is definitely useful to check convergence rate for the scheme. I used this method for the 2D Euler equations in cartesian coordinates and it works very well without including boundary conditions. For that case I used sinus and cosines functions which depend only on x and y independent variables. To test above problem, is it going to be the similar case? Could you give me some example? – Loading... Nov 18 '14 at 10:41
• It is going to be exactly like cartesian coordinates. The only difference is $x$ and $y$ are now $r$ and $\theta$. Take a smooth soution for your unknowns (in terms of $r$ and $\theta$), substitute them in the governing equations and add the extra terms that you get as source terms. – gk1 Nov 18 '14 at 11:47