Incident and reflected shock waves for a given deflection angle#

 1% -------------------------------------------------------------------------
 2% EXAMPLE: SHOCK_OBLIQUE_R
 3%
 4% Compute pre-shock and post-shock state (incident and reflected) for a
 5% oblique incident shock wave at standard conditions, a set of 51 species
 6% considered, a pre-shock Mach number = 10, and a deflection angle
 7% theta = 20 [deg]
 8%   
 9% See wiki or setListspecies method from ChemicalSystem class for predefined
10% sets of species
11%
12% @author: Alberto Cuadra Lara
13%                 
14% Last update October 06 2025
15% -------------------------------------------------------------------------
16
17% Import packages
18import combustiontoolbox.databases.NasaDatabase
19import combustiontoolbox.core.*
20import combustiontoolbox.shockdetonation.*
21
22% Get Nasa database
23DB = NasaDatabase();
24
25% Define chemical system
26system = ChemicalSystem(DB);
27system.FLAG_ION = true;
28
29% Initialize mixture
30mix = Mixture(system);
31
32% Define chemical state
33set(mix, {'N2', 'O2', 'Ar', 'CO2'}, [78.084, 20.9476, 0.9365, 0.0319] / 20.9476);
34
35% Define properties
36mixArray1 = setProperties(mix, 'temperature', 300, 'pressure', 1.01325, 'M1', 10, 'theta', 20);
37
38% Initialize solver
39solver = ShockSolver('problemType', 'SHOCK_OBLIQUE_R');
40
41% Solve problem
42[mixArray1, mixArray2, mixArray3_1, mixArray3_2] = solver.solveArray(mixArray1);