One of the famous and convenient test cases for shock wave modeling is the 1D Sod's shock tube. This is a Riemann problem for the compressible Euler equations of gas dynamics. The initial set up has been done by dividing domain half with diaphragm. The left and right sides of the domain have initial values chosen to generate a shock wave. The left region has initial pressure and density values higher then those in the right region. Velocities are zero on both sides of the diaphragm.

In my case, I know the initial Mach number of the shock wave and the right hand side initial values. I wish to know how to determine the initial values for the left side when only the Mach number and initial right state are given.

  • $\begingroup$ @DavidKetcheson thank you for the link. I also had another source which is Linear and Nonlinear Waves by Whitham. In this book the chapter 6 has the conditions for shock waves which is obtained by Rankine-Hugoniot conditions. Even if I know these shock conditions, it is not enough for me to determine the left initial states by only knowing right initial states and initial Mach number. Because of that my confusion still remains. $\endgroup$
    – Loading...
    Commented Oct 19, 2014 at 12:06

2 Answers 2


I have implemented the solution derived below using PyClaw in an IPython notebook. If you download that, you can adjust the initial values and see the computed solutions.

General setup

In the solution of a Riemann problem for the 1D Euler equations, there are generally 3 waves. Two of them are genuinely nonlinear; the other is a contact discontinuity, which only carries a jump in the density. My understanding is that you'd like to set up initial left and right states such that the velocity is initially zero everywhere, the rightmost wave is a shock moving at Mach number $M$ relative to the right-state sound speed, and the leftmost wave is a rarefaction (you didn't specify the last requirement, but it would make the problem analogous to the Sod shock tube). This situation is depicted in the figure below, which also establishes the notation I'll use.

Riemann solution states

Finding the state behind the shock

Let $$\mu = \frac{2(M^2-1)}{M(\gamma+1)}.$$

Using the Rankine-Hugoniot conditions, we find that the state just to the right of the contact is given by the following:

\begin{align} \rho_r^*& = \rho_r \frac{M}{M-\mu} \\ u & = \mu c_r \\ p & = p_r \frac{(2M^2 -1)\gamma+1}{\gamma+1}. \end{align}

If you were willing to have a non-zero velocity for the left state, you could stop here and use the values just derived for the left state. If you want $u_l=0$, read on.

Finding the left state

Next, we know that the left state and the $[\rho_l^*, u, p]$ state must be connected by a left-going rarefaction. The relevant Riemann invariants imply

$$\rho_l = \frac{4\gamma p_l}{(\gamma-1)^2 u^2} \left(1- \left(\frac{p}{p_l}\right)^{\frac{\gamma-1}{2\gamma}}\right)^2$$


$$\rho_l^* = \left(\frac{p}{p_l}\right)^{1/\gamma} \rho_l.$$

So we can prescribe any value we like for $p_l$ and compute the remaining values $\rho_l,\rho_l^*$ from the equations above. The only catch is that the resulting rarefaction should satisfy the entropy condition, which is true if $p_l>p$.


I worked this out using Chapter 14 of Randall Leveque's text on finite volume methods.

There is a 1-parameter family of possible left states (which seems obvious once you check the number of unknowns and constraints).

If you didn't restrict the left-state velocity to be zero, it would be possible to set up a problem where only the shock wave appears by taking the left state to be $(\rho_r^*, u, p)^T$. But since you want zero initial velocities, it's necessary to use the full procedure described above.

  • $\begingroup$ this answer will clear my confusion and will be helpful to determine the left initial states, thank you. $\endgroup$
    – Loading...
    Commented Oct 21, 2014 at 9:34

If I recall my compressibles, you want to use the normal shock equations. You'll also need to pick a $\gamma$.

  • 2
    $\begingroup$ Is this sufficient? In the solution of the Riemann problem there will be three states. These tables refer only to the rightmost state and the middle state, connected by a shock wave. There will also be a rarefaction wave connecting the middle state to the left state. $\endgroup$ Commented Oct 18, 2014 at 17:32
  • 2
    $\begingroup$ @DavidKetcheson. It's sufficient for the initial conditions, I think. There will be lots of states once the virtual diaphragm is removed. $\endgroup$
    – Bill Barth
    Commented Oct 18, 2014 at 21:02
  • 2
    $\begingroup$ Looks like the shock moves to the right and the right (upstream) state is known so with the prescribed shock speed, the Rankine-Hugoniot conditions (or shock tables) would tell you the middle state. You can then find the left state using Generalized Riemann invariants. If instead the left state had been prescribed, you would need to solve for a middle state. $\endgroup$
    – Jed Brown
    Commented Oct 19, 2014 at 2:37
  • 1
    $\begingroup$ @Jed Brown that's what I'm saying -- the tables won't directly give you the left state, which is what the OP needs. $\endgroup$ Commented Oct 19, 2014 at 4:53
  • $\begingroup$ @DavidKetcheson the main goal to learn the left state initial values in my case and this tables helps me to find middle state values. totally agree with you, just realized it. $\endgroup$
    – Loading...
    Commented Oct 19, 2014 at 11:58

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.