# RD-V: 0505 Shock Tube

The transitory response of a perfect gas in a long tube separated into two parts using a diaphragm is studied. The problem is well-known as the Riemann problem. The numerical results based on the finite element method with the Lagrangian and Eulerian formulations, are compared to the analytical solution.

This famous experiment is interesting for observing the shock-wave propagation. Moreover, this case uses the representation of perfect gas and compares the different formulations: The ALE uses Lagrangian or Eulerian.
The first part of the study deals with the modeling description of perfect gas with the hydrodynamic viscous fluid LAW6. The purpose is to test the different formulations:
• Lagrangian (mesh points coincident to material points)
• Eulerian (mesh points fixed)

The propagation of the gas in the tube can be studied in an analytical manner. The gas is separated into different parts characterizing the expansion wave, the shock front and the contact surface. The simulation results are compared with the analytical solution for velocity, density and pressure.

## Input Files

Refer to Access the Model Files to download the required model file(s).

The model files used in this problem are available in:

## Model Description

The shock tube problem is one of the standard problems in gas dynamics. It is a very interesting test since the exact solution is known and can be compared with the simulation results. The Finite Element method using the Eulerian and Lagrangian formulations was used in the numerical models.

A shock tube consists of a long tube filled with the same gas in two different physical states. The tube is divided into two parts, separated by a diaphragm. The initial state is defined by the values for density, pressure and velocity, as shown in Figure 2 and Figure 3. All the viscous effects are negligible along the tube sides; it is also assumed that there is no motion in the beginning.

The initial state at time t = 0 consists of two constant states 1 and 4 with ${p}_{4}>{p}_{1}$, ${\rho }_{4}>{\rho }_{1}$, and ${v}_{4}={v}_{1}=0$ (table).

Table 1. Initial Conditions in the Shock Tube
High Pressure Side (4) Low Pressure Side (1)
Pressure $p$ 500000 $\left[\text{Pa}\right]$ 20000 $\left[\text{Pa}\right]$
Velocity $v$ 0 $\left[\frac{\text{m}}{\text{s}}\right]$ 0 $\left[\frac{\text{m}}{\text{s}}\right]$
Density $\rho$ 5.7487 $\left[\frac{\text{k}\text{g}}{\text{m}{\text{m}}^{3}}\right]$ 0.22995 $\left[\frac{\text{k}\text{g}}{\text{m}{\text{m}}^{3}}\right]$
Temperature $T$ 303 $\left[\text{K}\right]$ 303 $\left[\text{K}\right]$

Just after the membrane is removed, a compression shock runs into the low pressure region, while a rarefaction (decompression) wave moves into the high pressure part of the tube. Furthermore, a contact discontinuity usually occurs.

### Model Method

The hydrodynamic viscous fluid LAW6 is used to describe compressed gas.

The general equation describing pressure is:(1) $p={C}_{0}+{C}_{1}\mu +{C}_{2}{\mu }^{2}+{C}_{3}{\mu }^{3}+\left({C}_{4}+{C}_{5}\mu \right)E$

With $\mu =\frac{\rho }{{\rho }_{0}}-1$

Where,
$p$
Pressure
${C}_{i}$
Hydrodynamic constants
${E}_{n}$
Internal energy per initial volume
$\rho$
Density
Perfect gas is modeled by setting all coefficients:(2) ${C}_{0}={C}_{1}={C}_{2}={C}_{3}=0$ And

${C}_{4}={C}_{5}=\gamma -1$

Where, $\gamma$ is the gas constant.

Then the initial internal energy, per initial volume is calculated from initial pressure:(3) ${E}_{0}=\frac{{p}_{0}}{\gamma -1}$

Under the assumption $\gamma =const.=1.4$ (valid for low temperature range), the hydrodynamic constants ${C}_{4}={C}_{5}=0.4$.

Gas pressure is described by:(4) $p=\left({C}_{4}+{C}_{5}\mu \right)E$ (5) $p=\left(0.4+0.4\frac{\rho -{\rho }_{0}}{{\rho }_{0}}\right)E$ (6) ${E}_{0}=\frac{{p}_{0}}{0.4}$

Parameters of material LAW6 are provided in Table 2.

Table 2. Material Properties of Gas in LAW6
High Pressure Side (4) Low Pressure Side (1)
Initial volumetric energy density (E0) 1.25x106$\left[\frac{\mathrm{J}}{m{m}^{3}}\right]$ 5x104 $\left[\frac{\mathrm{J}}{m{m}^{3}}\right]$
${C}_{4}$ and ${C}_{5}$ 0.4 0.4
Density $\rho$ 5.7487 $\left[\frac{\text{k}\text{g}}{\text{m}{\text{m}}^{3}}\right]$ 0.22995$\left[\frac{\text{k}\text{g}}{\text{m}{\text{m}}^{3}}\right]$

### Analytical Approach

The shock tube problem has an analytical solution of time before the shock hits the extremity of the tube. 1

Evolution of the flow pattern is illustrated in Figure 4. When the diaphragm bursts, discontinuity between the two initial states breaks into leftward and rightward moving waves, separated by a contact surface.

Each wave pattern is composed of a contact discontinuity in the middle and a shock or a rarefaction wave on the left and the right sides separating the uniform state solution. The shock wave moves at a supersonic speed into the low pressure side. A one-dimensional problem is considered.
There are four distinct zones marked 1, 2, 3 and 4 in Figure 5.
• Zone 1 is the low pressure gas which is not disturbed by the shock wave.
• Zone 2 (divided in 2 and 2' by the contact surface) contains the gas immediately behind the shock traveling at a constant speed. The contact surface across which the density and the temperature are discontinuous lies within this zone.
• The zone between the head and the tail of the expansion fan is noted as Zone 3. In this zone, the flow properties gradually change since the expansion process is isentropic.
• Zone 4 denotes the undisturbed high pressure gas.

Equations in Zone 2 are obtained using the normal shock relations. Pressure and the velocity are constant in Zones 2 and 2'.

The ratio of the specific heat constant of gas $\gamma$ is fixed at 1.4. It is assumed that the value does not change under the temperature effect, which is valid for the low temperature range.

The analytical solution to the Riemann problem is indicated at t=0.4 ms. A solution is given according to the distinct zones and continuity must be checked. Evolution in Zones 2 and 3 is dependent on the constant conditions of Zone 1 and 4. The analytical equations use pressure, velocity, density, temperature, speed of sound through gas and a specific gas constant. Equations in Zone 2 are obtained using normal shock relations and the gas velocity in Zone 2 is constant throughout. The shock wave and the surface contact speeds make it possible to define the position of the zone limits.
Zone 4 Zone 1
Pressure $p$ ${p}_{4}$ = 500000 $\left[\text{Pa}\right]$ ${p}_{1}$ = 20000 $\left[\text{Pa}\right]$
Velocity $v$ ${v}_{4}=0$$\left[\frac{\text{m}}{\text{s}}\right]$ ${v}_{1}=0$ $\left[\frac{\text{m}}{\text{s}}\right]$
Density $\rho$ ${\rho }_{4}$ = 5.7487 $\left[\frac{\text{k}\text{g}}{\text{m}{\text{m}}^{3}}\right]$ ${\rho }_{1}$ = 0.22995 $\left[\frac{\text{k}\text{g}}{\text{m}{\text{m}}^{3}}\right]$
Temperature $T$ ${T}_{4}$ = 303 $\left[\text{K}\right]$ ${T}_{1}$ = 303 $\left[\text{K}\right]$
Speed of sound through gas:(7) $a=\sqrt{\frac{p\cdot \gamma }{\rho }}$
Specific gas constant:(8) $R=\frac{{a}^{2}}{T\cdot \gamma }$
High Pressure Side (4) Low Pressure Side (1)
α ${a}_{4}$=348.95 $\left[\frac{\text{m}}{\text{s}}\right]$ ${a}_{1}$= 348.95 $\left[\frac{\text{m}}{\text{s}}\right]$
R 287.049 $\left[\frac{\text{J}}{\text{kg}\cdot \text{K}}\right]$
Table 3. Zone 2
Analytical Solution Results at t = 0.4 ms
Pressure $p$ $\frac{{p}_{4}}{{p}_{1}}=\frac{{p}_{2}}{{p}_{1}}{\left(1-\frac{\left(\gamma -1\right)\cdot \left({a}_{2}}{{a}_{1}}\right)\cdot \left({p}_{2}}{{p}_{1}}-1\right)}{\sqrt{2\gamma \left[2\gamma +\left(\gamma +1\right)\cdot \left({p}_{2}}{{p}_{1}}-1\right)\right]}}\right)}^{\frac{-2\gamma }{\gamma -1}}$ ${p}_{2}$ = 80941.1 $\left[\text{Pa}\right]$
Velocity $v$ ${v}_{2}=\frac{{a}_{1}}{\gamma }\left({p}_{2}}{{p}_{1}}-1\right){\left(\frac{2\gamma }{\left(\gamma +1\right)}}{{p}_{2}}{{p}_{1}}+\left(\gamma -1\right)/\left(\gamma +1\right)}\right)}^{\frac{1}{2}}$ ${v}_{2}=399.628$ $\left[\frac{\text{m}}{\text{s}}\right]$
Density $\rho$ ${\rho }_{2}={\rho }_{2}R{T}_{2}$ ${\rho }_{2}$ = 0.5786 $\left[\frac{\text{k}\text{g}}{\text{m}{\text{m}}^{3}}\right]$
Temperature $T$ $\frac{{T}_{1}}{{T}_{2}}=\frac{{p}_{2}}{{p}_{1}}\left(\frac{\left(\gamma +1\right)}{\left(\gamma -1\right)}+{p}_{2}}{{p}_{1}}}{1+\left({p}_{2}}{{p}_{1}}\right)\cdot \left(\left(\gamma +1\right)}{\left(\gamma -1\right)}\right)}\right)$ ${T}_{2}=487.308$ $\left[\text{K}\right]$
Shock wave speed:(9) ${v}_{s}={a}_{1}\sqrt{\frac{\gamma +1}{2\gamma }\left(\frac{{p}_{2}}{{p}_{1}}-1\right)+1}=663.166$
$\left[\frac{\text{m}}{\text{s}}\right]$
Therefore, ${x}_{2}{1}}=0.4{v}_{s}+500=765.266\text{\hspace{0.17em}}\left[\mathrm{mm}\right]$
Table 4. Zone 2'
Analytical Solution Results at t = 0.4 ms
Pressure $p$ ${p}_{2}={p}_{2}\text{'}$ ${p}_{2}\text{'}=80941.1\text{\hspace{0.17em}}$ $\left[\text{Pa}\right]$
Velocity $v$ ${v}_{2}={v}_{2\text{'}}$ ${v}_{2\text{'}}=399.628$ $\left[\frac{\text{m}}{\text{s}}\right]$
Density $\rho$ ${\rho }_{2\text{'}}={\rho }_{3}\left({x}_{4/3}\right)$ ${\rho }_{2\text{'}}=1.5657\text{\hspace{0.17em}}$ $\left[\frac{\text{k}\text{g}}{\text{m}{\text{m}}^{3}}\right]$
Temperature $T$ ${\rho }_{2\text{'}}={r}_{2\text{'}}R{T}_{2\text{'}}$ ${T}_{2\text{'}}=180.096\text{\hspace{0.17em}}$ $\left[\text{K}\right]$

Surface contact speed: ${v}_{c}-{v}_{2}$

Therefore, ${x}_{2}{2\text{'}}}=0.4{v}_{s}+500=659.85\left[\mathrm{mm}\right]$

Zone 3

Zone 3 is defined as:(10) $-{a}_{4}\le \frac{X}{t}\le {v}_{3}-{a}_{3}$

Where, $x=X+500$

At ${v}_{3}-{a}_{3}=-{a}_{4}=-348.95$ $\left[\frac{\text{m}}{\text{s}}\right]$ $⇒X=-348.95t$

$⇒{x}_{4}{3}}\left(t=0.4\right)=360.42$ $\left[\text{mm}\right]$

At ${v}_{3}-{a}_{3}={v}_{2}-{a}_{2\text{'}}={v}_{2}-\sqrt{\frac{{p}_{2}\gamma }{{p}_{2\text{'}}}}=130.602$ $\left[\frac{\text{m}}{\text{s}}\right]$ $⇒-348.95t\le X\le 130.602t$

$⇒{x}_{3}{2\text{'}}}\left(t=0.4\right)=552.24$ $\left[\text{mm}\right]$
Table 5. Zone 3
Analytical Solution Results at t = 0.4 ms
Pressure $p$ $\frac{{p}_{3}}{{p}_{4}}={\left(1-\frac{\left(\gamma -1\right)}{2}\frac{{v}_{3}}{{a}_{4}}\right)}^{\frac{2\gamma }{\gamma -1}}$ ${p}_{3}=500000{\left(1-0.2\left(\frac{{v}_{3}\left(X\right)}{348.95}\right)\right)}^{7}$
Velocity $v$ ${v}_{3}=\frac{2}{\gamma +1}\left({a}_{4}+\frac{X}{t}\right)$ ${v}_{3}=290.792+2.0833X$
Density $\rho$ $\frac{{\rho }_{3}}{{\rho }_{4}}={\left(\frac{{p}_{3}}{{p}_{4}}\right)}^{-\gamma }$ ${\rho }_{3}=5.7487{\left(\frac{{p}_{3}\left(X\right)}{500000}\right)}^{1}{1.4}}$
Temperature $T$ $\frac{{p}_{3}}{{p}_{4}}={\left(\frac{{T}_{3}}{{T}_{4}}\right)}^{\gamma }{\gamma -1}}$ ${T}_{3}=303{\left(\frac{{p}_{3}\left(X\right)}{500000}\right)}^{1}{3.5}}$
Continuity verifications:(11) ${v}_{3}\left({X}_{3}{2\text{'}}}\right)={v}_{2\text{'}}\left({X}_{3}{2\text{'}}}\right)$ (12) ${v}_{3}\left({X}_{4}{3}}\right)={v}_{4}\left({X}_{4}{3}}\right)$ (13) ${p}_{3}\left({X}_{3}{2\text{'}}}\right)={p}_{2\text{'}}\left({X}_{3}{2\text{'}}}\right)$ (14) ${p}_{3}\left({X}_{4}{3}}\right)={p}_{4}\left({X}_{4}{3}}\right)$ (15) ${\rho }_{3}\left({X}_{3}{2\text{'}}}\right)={\rho }_{2\text{'}}\left({X}_{3}{2\text{'}}}\right)$ (16) ${\rho }_{3}\left({X}_{4}{3}}\right)={\rho }_{4}\left({X}_{4}{3}}\right)$ (17) ${T}_{3}\left({X}_{3}{2\text{'}}}\right)={T}_{2\text{'}}\left({X}_{3}{2\text{'}}}\right)$ (18) ${T}_{3}\left({X}_{4}{3}}\right)={T}_{4}\left({X}_{4}{3}}\right)$

### Finite Element Modeling with Lagrangian and Eulerian Formulations

Gas is modeled by 200 ALE bricks with solid property TYPE14 (general solid).

The model consists of regular mesh and elements, the size of which is 5 mm x 5 mm x 5 mm.

In the Lagrangian formulation, the mesh points remain coincident with the material points and the elements deform with the material. Since element accuracy and time step degrade with element distortion, the quality of the results decreases in large deformations.

In the Eulerian formulation, the coordinates of the element nodes are fixed. The nodes remain coincident with special points. Since elements are not changed by the deformation material, no degradation in accuracy occurs in large deformations.

The Lagrangian approach provides more accurate results than the Eulerian approach, due to taking into account the solved equations number.

For the ALE boundary conditions (/ALE/BCS), constraints are applied on:
• Material velocity
• Grid velocity

The nodes on extremities have material velocities fixed in X and Z directions. The other nodes have material and velocities fixed in X, Y and Z directions.

The ALE materials have to be declared Eulerian or Lagrangian with /ALE/MAT.

## Results

### Finite Element Results and Analytical Solution Comparison

Simulation results along the tube axis at 0.4 ms are shown in the following diagrams.
Lagrangian Formulation
Scale factor
$\text{Δ}{t}_{sca}=0.1$
Eulerian Formulation
Scale factor
$\text{Δ}{t}_{sca}=0.5$

### Pressure Distribution

Pressure wave produced in the shock-tube at t = 0.4 ms
1 J. D. Anderson Jr., Modern Compressible Flow with Historical Perspective, McGraw Hill Professional Publishing, 2nd ed., Oct. 1989