Example_SHOCK_POLAR.m#

 1% -------------------------------------------------------------------------
 2% EXAMPLE: SHOCK_POLAR
 3%
 4% Compute shock polar plots at standard conditions, a set of 39 species
 5% considered, and a set of initial shock front velocities u1/a1 = [2, 3, 5, 14]
 6%    
 7% Air_ions == {'O2','N2','O','O3','N','NO','NO2','NO3','N2O','N2O3',...
 8%              'N2O4','N3','eminus','Nminus','Nplus','NOplus','NO2minus',...
 9%              'NO3minus','N2plus','N2minus','N2Oplus','Oplus','Ominus',...
10%              'O2plus', 'O2minus,'CO2','CO','COplus','C','Cplus',...
11%              'Cminus','CN','CNplus','CNminus','CNN','NCO','NCN','Ar',...
12%              'Arplus'}
13%   
14% See wiki or ListSpecies() for more predefined sets of species
15%
16% @author: Alberto Cuadra Lara
17%          PhD Candidate - Group Fluid Mechanics
18%          Universidad Carlos III de Madrid
19%                 
20% Last update July 22 2022
21% -------------------------------------------------------------------------
22
23%% INITIALIZE
24self = App('Air_ions');
25%% INITIAL CONDITIONS
26self = set_prop(self, 'TR', 300, 'pR', 1 * 1.01325);
27self.PD.S_Oxidizer = {'N2', 'O2', 'Ar', 'CO2'};
28self.PD.N_Oxidizer = [78.084, 20.9476, 0.9365, 0.0319] ./ 20.9476;
29%% ADDITIONAL INPUTS (DEPENDS OF THE PROBLEM SELECTED)
30Mach_number = [2, 3, 5, 14];
31self = set_prop(self, 'u1', 3.472107491008314e+02 * Mach_number);
32%% SOLVE PROBLEM
33self = solve_problem(self, 'SHOCK_POLAR');
34%% DISPLAY RESULTS (PLOTS)
35post_results(self);