Example_SHOCK_POLAR_R.m#

 1% -------------------------------------------------------------------------
 2% EXAMPLE: SHOCK_POLAR_REFLECTED
 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:2: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 March 21 2021
21% -------------------------------------------------------------------------
22
23%% INITIALIZE
24self = App('Air_ions');   
25% self = App({'O2', 'N2', 'Ar', 'CO2'}); % Frozen
26% self = App({'O2'}); % Frozen
27%% INITIAL CONDITIONS
28self = set_prop(self, 'TR', 300, 'pR', 1 * 1.01325);
29self.PD.S_Oxidizer = {'O2'};
30self.PD.S_Inert    = {'N2', 'Ar', 'CO2'};
31self.PD.proportion_inerts_O2 = [78.084, 0.9365, 0.0319] ./ 20.9476;
32%% ADDITIONAL INPUTS (DEPENDS OF THE PROBLEM SELECTED)
33% range1 = logspace(0, 1, 300); range1 = range1(range1 < 5);
34% overdriven = [range1, linspace(5, 14, 30)]; overdriven = overdriven(overdriven > 1);
35% overdriven = 2:2:14;
36% overdriven = [2, 3, 5, 14];
37overdriven = 6.5;
38self = set_prop(self, 'u1', 3.472107491008314e+02 * overdriven, 'theta', [5:5:31.77]);
39%% SOLVE PROBLEM
40self = SolveProblem(self, 'SHOCK_POLAR_R');
41%% DISPLAY RESULTS (PLOTS)
42postResults(self);