The Euler equations are a system of partial differential equations used in fluid dynamics which describe the flow of invicid fluids.
The parameter
To compare different numerical methods there are benchmark problems such as the Shu-Osher shock tube problem. This problem is given by the following initial conditions
with
The Lax-Friedrichs scheme is based on finite differences and is used to approximate solutions to hyperbolic partial differential equations.
To get to a stable method for a linear hyperbolic differential equation a viscosity term had to be added making the solutions smoother. Discontinuities or shocks in the solution will be smoothed out. The same goes for non-linear hyperbolic differential equations.
The Godunov schemes makes use of the exact solution to the Riemann problem at the boundary of two neighboring cells. This scheme is a lot better at preserving shocks in the solution.
Here
Here is an animation of the solution to the Shu-Osher shock tube problem using the Lax-Friedrichs and Godunov scheme.
Even with a reasonable resolution of 1000 cells the solutions are wildly different. Clearly the Lax-Friedrichs scheme produces a smoother solution but the Godunov scheme is a lot closer to the reference solution for the shock tube problem. Feel free to experiment with the code I have provided. The more cells you use the better the approximation becomes but beware of the added computational cost.