|
[Sponsors] |
A good shcheme for 2D euler equations on carthesian grid |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 29, 2022, 13:22 |
A good shcheme for 2D euler equations on carthesian grid
|
#1 |
Member
Anders Aamodt Resell
Join Date: Dec 2021
Location: Oslo, Norway
Posts: 66
Rep Power: 4 |
Hi
I'm creating a solver for 2D euler equations, and I would like some inputs on how to improve it. What I have attempted at this point is the following:
I set up a 1D riemann problem as a test case for my solver, and noticed the following. The fields are smeared a lot more at discontinuities when using the TVD RK3 method than when using explicit euler, although the euler solution has some ripples, which are now gone. I guess the TVD RK3 method shouldn't give more smearing, or am I wrong? I would like to hear if I have likely done some errors in my implementation, or if these results are to be expected. Any suggestions on how to improve the solver, without switching to an entirely different solution strategy (Like Lax Wendroff) would also be much appreciated! |
|
January 29, 2022, 15:47 |
|
#2 |
Senior Member
Join Date: Oct 2011
Posts: 242
Rep Power: 17 |
Hello,
This really depends on what applications you have in mind. There isn't a single numerical framework better for everything. An example from what you already implemented: Rusanov approximate Riemann solver is a two-wave RS, HLLC a three-wave. What's the difference ? One practical difference is that HLLC catches stationary contacts exactly while Rusanov cannot by construction. Have you experienced this through a test case ? This is a necessary verification case for your HLLC solver, zero velocity initial condition, constant pressure and density discontinuity: HLLC maintains contact exactly over time while Rusanov smears it. Now add constant velocity, on coarse meshes you will see HLLC predicts sharper contacts than Rusanov. Now, Rusanov RS is very robust for high pressure jumps although/because it is more diffusive. Which one is better ? Euler vs RGK. Accuracy of your solution is related to truncation errors, spatial AND temporal. Accuracy has to be understood in an asymptotic sense. For a given time step and grid a low order method may potentially give a better solution answer than a high order one. But in the end high order methods converge quicker and refining grids/time steps should show better accuracy for higher order methods. This is something you should experience and it will help verifying your code. There are stability constraints to handle as well, Euler time integrator + 2nd order spatial scheme is not stable. This may not be so obvious on shock tubes with small pressure ratios but it becomes more evident with very strong conditions. MinMod limiter tends to clip smooth extremas, you may try to experience it by working first with advection problems. Advect heaviside functions, gaussian profiles and compare with other limiters. Minmod acts also on smooth regions and degrades the accuracy. This is something you should consider to improve the accuracy of your code. You should set up various test cases with your current schemes before going further. This will help you understand all the methods you put in your code. |
|
January 30, 2022, 13:02 |
|
#3 | |
Senior Member
-
Join Date: Jul 2012
Location: Germany
Posts: 184
Rep Power: 14 |
As additional Note:
The ripples for the explicit Euler method are quite obvious, since it is not stable with a seconde order reconstruction. Quote:
Regards |
||
January 31, 2022, 18:20 |
|
#4 |
Member
Anders Aamodt Resell
Join Date: Dec 2021
Location: Oslo, Norway
Posts: 66
Rep Power: 4 |
Thanks for the nice replies.
I did the the stationary contact discontinuity test that you suggested and the HLLC solves it exactly while Rusanov smears it, so that's a good sign. I also notice that the contact discontinuity gets less smeared when using HLLC than Rusanov for Sod's problem and for the problem with initial velocity and density discontinuity. Unfortunately it doesn't seem like the solution converges faster with RK3 than explicit euler at least for Sod's problem. I tried running the test with 400 cells and the explicit euler solution is clearly sharper, but as you say it is unstable and will perhaps fail for different problems. I will do further tests when I have the time an perhaps try a different limiter. At this point I did the extrapolation on the primitive variables, instead of on the conserved variables directly because I have heard it can give better results. |
|
February 1, 2022, 04:13 |
|
#5 |
Senior Member
Join Date: Oct 2011
Posts: 242
Rep Power: 17 |
Hello,
Good job done with verifying hllc. Concerning TVD rk3, how do you assess convergence rate ? If you use a shock tube test, this is not the way to go. The reason is that your solution depends on two truncation errors, spatial and temporal. When checking solution dependence to the time-step size you need to be certain that the spatial error is much lower than the temporal one which in my opinion will not happen with a 400 nodes grid and a discontinuous flow (spatial truncation error is O(1) at the shock). Then, to check that your implementation of rk3 truly results in a 3rd order temporal scheme you may need a smooth test case on a rather fine grid, search for "method of manufactured solution" on the web. By the way, you don't need a rk3 scheme to stabilise your 2nd order space scheme, SSP-rk2 is enough. Extrapolating primitive variables is fine in most situations. Just make sure you do not violate thermodynamics, choose your set of primitives wisely: equation of state gives energy as a function of pressure and density and vice versa then you want to reconstruct two of the three variables and get third using EOS. Good verification to do with a shock tube: close all boundaries with slip walls. Monitor total mass and energy by summing over all cells rho_i*V_i and rho_i*E_i*V_i where V_i is volume of cell i. This should be machine error constant assuming your scheme uses finite volume approach and it is indeed conservative. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
2nd Order Spatial accuracy: Euler Equation on Unstrutured Grid | AshwaniAssam | Main CFD Forum | 1 | February 7, 2015 20:06 |
Analytic solution for 2D steady Euler equations | jojo81 | Main CFD Forum | 0 | October 15, 2012 13:05 |
Euler computation on hybrid grid | naffrancois | Main CFD Forum | 0 | October 7, 2011 06:51 |
multigrid solution of 2d euler equations | jim | Main CFD Forum | 2 | May 21, 2002 05:05 |
Grid Independent Solution | Chuck Leakeas | Main CFD Forum | 2 | May 26, 2000 12:18 |