Jump conditions for incident shock waves for different pre-shock velocities#

 1% -------------------------------------------------------------------------
 2% EXAMPLE: JUMPCONDITIONS
 3%
 4% Compute jump conditions for a planar incident shock wave at temperature
 5% 300 K and pressure 1.01325 bar for an air mixture with 79% N2 and 21% O2
 6% in % volume and a range of pre-shock Mach numbers M1 = [1, 8]
 7% 
 8% @author: Alberto Cuadra Lara
 9%          Postdoctoral researcher - Group Fluid Mechanics
10%          Universidad Carlos III de Madrid
11%                 
12% Last update Dec 16 2025
13% -------------------------------------------------------------------------
14
15% Import packages
16import combustiontoolbox.databases.NasaDatabase
17import combustiontoolbox.core.*
18import combustiontoolbox.shockdetonation.*
19import combustiontoolbox.utils.display.*
20
21% Definitions
22FLAG_PAPER = true;
23caloricGasModel = CaloricGasModel.imperfect;
24
25% Get Nasa database
26DB = NasaDatabase();
27
28% Define chemical system
29system = ChemicalSystem(DB);
30
31% Initialize mixture
32mix = Mixture(system);
33
34% Define chemical state
35set(mix, {'N2', 'O2'}, [79, 21] / 21);
36
37% Define properties
38mixArray = setProperties(mix, 'temperature', 300, 'pressure', 1.01325, 'mach', 1:0.1:8);
39
40% Initialize solver
41solver = JumpConditionsSolver('caloricGasModel', caloricGasModel, 'FLAG_PAPER', FLAG_PAPER, 'FLAG_RESULTS', false);
42
43% Solve problem
44jumpData = solver.solve(mixArray);
45
46% Generate report
47report(solver, jumpData);