Example_SHOCK_POLAR_R.m#

 1% -------------------------------------------------------------------------
 2% EXAMPLE: SHOCK_POLAR_REFLECTED_THERMO
 3%
 4% Compute shock polar plots at T1 = 226.65 K and p1 = 0.0117 bar
 5% (altitude 30 km), a set of 28 species considered, an initial
 6% shock front Mach number = 20, deflection angle theta = 35, and different
 7% thermochemical models (chemical equilibrium and frozen chemistry).
 8%    
 9% LS== {'eminus', 'Ar', 'Arplus', 'N', ...
10%       'Nplus', 'Nminus', 'NO', 'NOplus', 'NO2', ...
11%       'NO2minus', 'NO3', 'NO3minus', 'N2', 'N2plus', ...
12%       'N2minus', 'N2O', 'N2Oplus', 'N2O3', 'N2O4', ...
13%       'N2O5', 'N3', 'O', 'Oplus', 'Ominus', 'O2', 'O2plus', ...
14%       'O2minus', 'O3'}
15%   
16% See wiki or list_species() for more predefined sets of species
17%
18% @author: Alberto Cuadra Lara
19%          PhD Candidate - Group Fluid Mechanics
20%          Universidad Carlos III de Madrid
21%                  
22% Last update Apr 13 2023
23% -------------------------------------------------------------------------
24    
25LS = {'eminus', 'Ar', 'Arplus', 'N', ...
26      'Nplus', 'Nminus', 'NO', 'NOplus', 'NO2', ...
27      'NO2minus', 'NO3', 'NO3minus', 'N2', 'N2plus', ...
28      'N2minus', 'N2O', 'N2Oplus', 'N2O3', 'N2O4', ...
29      'N2O5', 'N3', 'O', 'Oplus', 'Ominus', 'O2', 'O2plus', ...
30      'O2minus', 'O3'};
31
32% Initialize
33self = App(LS);
34% Miscellaneous
35self.TN.FLAG_FAST = true;
36self.Misc.FLAG_RESULTS = false;
37if FLAG_FROZEN
38    self.Misc.config.linestyle = '--';
39end
40% Thermochemical model
41self.PD.FLAG_FROZEN = false;
42% Initial conditions
43self = set_prop(self, 'TR', 226.65, 'pR', 0.0117);
44self.PD.S_Oxidizer = {'N2', 'O2', 'Ar'};
45self.PD.N_Oxidizer = [78, 21, 1] ./ 21;
46% Additional inputs (depends of the problem selected)
47self = set_prop(self, 'M1', 20, 'theta', 35);
48% Solve problem
49self = solve_problem(self, 'SHOCK_POLAR_R');
50% Display results (plots)
51post_results(self);