1D Euler Riemann Problem Exact Solver

Below is a Mathematica module that solves the Euler Riemann problem exactly. The user can use sliders to set the initial fluid variables (density, velocity, pressure) on the left and right sides of the discontinuity and evolve (and animate!) the system. In addition, the adiabatic index (gamma) can also be changed from 7/5 to 5/3. The thick blue lines show the solution at time t and the dashed green lines show the initial conditions.

Some Things to Try

  • Spot the strong shock, contact discontinuity, and rarefaction fan in the plot of density. At the contact discontinuity the pressure and velocity are constant (there is only a jump in density).
  • Set up initial conditions that are consistent with a contact discontinuity. In this case, the solution will just advect and will not split into 3 waves.
  • Observe the symmetric property of the problem by switching the left and right states.
  • Find initial conditions that produce two rarefaction fans and no strong shocks.
  • Find initial conditions that produce two strong shocks and no rarefaction fans.
  • Perform a Galilean boost (increase in initial left and right velocities by the same amount) and notice that the shape of the solution does not change (it's only shifted in the lab frame).