Incident shock waves for different deflection angles#

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