Roe's algorithm [14] solves exactly a linearized problem, instead of looking for an iterative solution of the exact original Riemann problem. The approximate solver proposed by Roe is much less expensive in terms of computational effort than the exact one, because the exact solution of a linear Riemann problem can be more easily built. This is the reason why we do not need Burgers equation to figure out the exact solution of the triangular profile (it is not straightforward tough).
When the energy of a flow is highly kinetic, a Godunov-type conservative numerical scheme based on a veneration of the Riemann problem may fail by predicting non-physical states with negative density or internal energy. This failure may happen because in flows where the dominant energy mode is kinetic the resulting internal energy may be negative. When the jump in the shock produces a null zero shock speed, i.e. vanishing, we expect differences. In these cases a Roe linearization will fail and produce different fluxes than the Riemann exact solver.
In addition to characteristics crossing and a shock forming, another possible way the method of characteristics can break down, and a discontinuity can form, is if the characteristics on both sides of the discontinuity emanate from it, rather than go into it. Then the discontinuity is called a rarefaction wave.
For reasons of numerical efficiency and, particularly in multi-dimensions, the exact solution of the Riemann problem is frequently avoided and linearized (approximate) Riemann solvers are preferred. These solvers are based on the exact solution of Riemann problems corresponding to a linearized version of the original system of equations. After extensive experimentation, the results achieved with approximate Riemann solvers are comparable to those obtained with the exact solver.
We modified calc_flux.f so the flux is calculated now via:
f(1) = 0.5d0*q**2