Incident shock waves for different wave angles#

 1% -------------------------------------------------------------------------
 2% EXAMPLE: SHOCK_OBLIQUE_BETA
 3%
 4% Compute pre-shock and post-shock state for a oblique incident shock wave
 5% at standard conditions (T1 = 300 K, p1 = 1 atm), a pre-shock Mach number
 6% M1 = 10, and a set of wave angles beta = [20:1:85] [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);
26
27% Initialize mixture
28mix = Mixture(system);
29
30% Define chemical state
31set(mix, {'N2', 'O2', 'Ar', 'CO2'}, [78.084, 20.9476, 0.9365, 0.0319] / 20.9476);
32
33% Define properties
34mixArray1 = setProperties(mix, 'temperature', 300, 'pressure', 1.01325, 'M1', 10, 'beta', 20:1:85);
35
36% Initialize solver
37solver = ShockSolver('problemType', 'SHOCK_OBLIQUE');
38
39% Solve problem
40[mixArray1, mixArray2] = solver.solveArray(mixArray1);
41
42% Generate report
43report(solver, mixArray1, mixArray2);