Incident shock waves#

Introduction#

This tutorial presents the solution of the Rankine–Hugoniot equations for a planar incident shock wave in a supersonic flow. A schematic is shown in Fig. 4. The shock wave is characterized by the upstream velocity \(u_1\) and thermodynamic state, which for an ideal gas is defined by its chemical composition (\(\boldsymbol{n}_1\)) and two independent state variables (e.g., temperature \(T_1\) and pressure \(p_1\)). Across the shock, the flow undergoes an abrupt and irreversible change in state: the downstream properties \((u_2, p_2, T_2)\) follow from the conservation of mass, momentum, and energy, while the post-shock composition \(\boldsymbol{n}_2\) is obtained according to the selected chemical model—either frozen or chemical equilibrium—applied at the downstream state.

../../_images/sketch_normal_shock.svg

Fig. 4 Schematic of a planar shock wave in the wave-fixed frame.#

Governing equations#

For a one-dimensional planar shock, the Rankine–Hugoniot relations express the conservation of mass, momentum, and energy across the shock front as:

\begin{equation} p_2 = p_1 + \rho_1 u_1^2 \left( 1-\dfrac{\rho_1}{\rho_2}\right) \quad \text{and} \quad h_2 = h_1 + \dfrac{u_1^2}{2}\left[1- \left(\dfrac{\rho_1}{\rho_2}\right)^2\right], \end{equation}

where \(h\) denotes specific enthalpy. This equation must be supplemented by the equation of state, which for an ideal gas reads

\begin{equation} p = \rho R T / W, \end{equation}

where \(R\) is the universal gas constant and \(W\) is the molecular weight of the gas.

Numerical example#

We now illustrate how to solve the Rankine–Hugoniot equations in the Combustion Toolbox using the class ShockSolver() class, part of the +combustiontoolbox.+shockdetonation (CT-SD) subpackage (module). Below is an example that solves the Rankine-Hugoniot equations for a planar incident shock wave in air (79% \(\text{N}_2\), 21% \(\text{O}_2\) by volume), with an initial temperature \(T_1 = 300\) K, pressure \(p_1 = 1\) bar, and a pre-shock Mach number \(\mathcal{M}_1 \in [1, 10]\):

% Import packages
import combustiontoolbox.databases.NasaDatabase
import combustiontoolbox.core.*
import combustiontoolbox.shockdetonation.ShockSolver

% Get NASA's database
DB = NasaDatabase();

% Define chemical system
system = ChemicalSystem(DB);

% Initialize mixture
mix = Mixture(system);

% Define chemical state
set(mix, {'N2', 'O2'}, [79/21, 1]);

% Define properties
mixArray1 = setProperties(mix, 'temperature', 300, 'pressure', 1, 'Mach', 1:0.1:10);

% Initialize shock solver
solver = ShockSolver();

% Perform shock calculations
[mixArray1, mixArray2] = solveArray(solver, mixArray1);

% Generate report
report(solver, mixArray1, mixArray2);

This code snippet will generate two figures: Molar fraction of species in the mixture as a function of the pre-shock Mach number and the variation of the thermodynamic properties (e.g., temperature, pressure) as a function of the pre-shock Mach number.

../../_images/shock_waves_1_fig1.svg

Fig. 5 Molar fraction of chemical species downstream of a normal shock in air (79% \(\text{N}_2\), 21% \(\text{O}_2\) by volume) as a function of the pre-shock Mach number \(\mathcal{M}_1\), for standard upstream conditions \(T_1 = 300\) K, \(p_1 = 1\) bar.#

../../_images/shock_waves_1_fig2.svg

Fig. 6 Thermodynamic properties downstream of a normal shock in air (79% \(\text{N}_2\), 21% \(\text{O}_2\) by volume) as function of the pre-shock Mach number \(\mathcal{M}_1\), for standard upstream conditions \(T_1 = 300\) K, \(p_1 = 1\) bar.#

Tip

The Combustion Toolbox supports multiple caloric models for the final gas mixture through the CaloricGasModel() class. By default, CT uses the calorically imperfect gas model. To specify a different caloric model, set the property caloricGasModel when initializing the ShockSolver() class.

For example, to consider the calorically perfect gas approximation, initialize the ShockSolver() class as follows

solver = ShockSolver('problemType', 'SHOCK_I', 'caloricGasModel', CaloricGasModel.perfect);

For the thermally perfect gas model, also known as the calorically imperfect gas with frozen chemistry model, use

solver = ShockSolver('problemType', 'SHOCK_I', 'caloricGasModel', CaloricGasModel.thermallyPerfect);