Self-similar ideal-gas rarefaction (source code)

= Self-similar ideal-gas rarefaction
{title2=$\frac{du}{d\xi}=\frac2{\gamma+1}$}

For $\gamma>1$ and positive <mass density> and <pressure>, let $\xi=x/t$ in one-dimensional adiabatic <compressible flow>. The smooth equations are $(u-\xi)\rho'+\rho u'=0$, $(u-\xi)u'+p'/\rho=0$ and $(u-\xi)p'+\gamma p u'=0$. Away from a constant branch, their coefficient determinant forces $\xi=u+\sigma c$ with $\sigma=\pm1$ and <adiabatic sound speed> $c=\sqrt{\gamma p/\rho}$. The entropy equation gives $p=K\rho^\gamma$, and combining continuity with $c'/c=(\gamma-1)\rho'/(2\rho)$ gives
$$
u'=\frac2{\gamma+1},\qquad c'=\sigma\frac{\gamma-1}{\gamma+1},\qquad u-\frac{2\sigma c}{\gamma-1}=J.
$$
Thus $u=[2\xi+(\gamma-1)J]/(\gamma+1)$, $c=\sigma(\gamma-1)(\xi-J)/(\gamma+1)$, $\rho=(c^2/(\gamma K))^{1/(\gamma-1)}$ and $p=K\rho^\gamma$, on intervals where $c>0$. The <specific entropy> is constant. Together with uniform branches, these exhaust smooth positive-gas self-similar solutions; a <contact discontinuity> is not a smooth fan.