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 1


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.

  • $\begingroup$ 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? $\endgroup$
    – Loading...
    Commented Nov 18, 2014 at 10:41
  • $\begingroup$ 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. $\endgroup$
    – gk1
    Commented Nov 18, 2014 at 11:47

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.