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 list_species() 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 July 22 2022
22% -------------------------------------------------------------------------
23
24% Air_ions = {'O2','N2','O','O3','N','NO','NO2','NO3','N2O','N2O3',...
25%              'N2O4','N3_M','eminus','Nminus','Nplus','NOplus','NO2minus_M',...
26%              'NO3minus_M','N2plus','N2minus','N2Oplus','Oplus','Ominus',...
27%              'O2plus', 'O2minus','CO2','CO','COplus','C','Cplus',...
28%              'Cminus','CN_M','CNplus_M','CNminus_M','CNN_M','NCO','NCN_M','Ar',...
29%              'Arplus','O2_M','O3_M','CO2_M','O3minus_M','O3plus_M',...
30%              'N3minus_M','N3plus_M','NO3plus_M','CNminus_M','CNplus_M',...
31%              'NCOminus_M','NCOplus_M','NCNminus_M','NCNplus_M','O4_M',...
32%              'O4minus_M','O4plus_M'};
33
34Air_ions = {'O2','N2','O','O3','N','NO','NO2','NO3','N2O','N2O3',...
35             'N2O4','N3','eminus','Nminus','Nplus','NOplus','NO2minus',... 
36             'NO3minus','N2plus','N2minus','N2Oplus','Oplus','Ominus',...
37             'O2plus', 'O2minus','CO2','CO','COplus','C','Cplus',...
38             'Cminus','CN','CNplus','CNminus','CNN','NCO','NCN','Ar',...
39             'Arplus'};
40
41% Air_ions = find_species_LS(LS, {'C','N','O','minus','plus','Ar'}, 'any',...
42% {'I', 'S', 'L', 'T', 'P', 'F', 'ab', 'W', 'Z','X','R','Os','Cr','H','Br',...
43% 'G','K','U','Co','Cu','B','V','Ni','Na','Mg','Mo','Ag','Nb','Cb','Cl','D','T',...
44% 'Ca','Cs','Ne','Cd','Mn'}, 'all');
45
46%% INITIALIZE
47self = App(Air_ions);
48%% INITIAL CONDITIONS
49self = set_prop(self, 'TR', 300, 'pR', 1 * 1.01325);
50self.PD.S_Oxidizer = {'N2', 'O2', 'Ar', 'CO2'};
51self.PD.N_Oxidizer = [78.084, 20.9476, 0.9365, 0.0319] ./ 20.9476;
52%% ADDITIONAL INPUTS (DEPENDS OF THE PROBLEM SELECTED)
53u1 = logspace(2, 5, 500); u1 = u1(u1<20000); u1 = u1(u1>=347.25);
54self = set_prop(self, 'u1', u1);
55%% SOLVE PROBLEM
56self = solve_problem(self, 'SHOCK_I');
57%% DISPLAY RESULTS (PLOTS)
58post_results(self);