Example_SHOCK_I_IONIZATION.m#

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