Example_DET_POLAR.m#

 1% -------------------------------------------------------------------------
 2% EXAMPLE: DET_POLAR
 3%
 4% Compute detonation polar curves at standard conditions, a set of 30 species
 5% considered, and a set of pre-shock Mach numbers M1 = [5, 6, 7, 8, 10], or
 6% what is the same, drive factors M1/M1_cj = [1.0382, 1.2458, 1.4534,...
 7% 1.6611, 2.0763]
 8%    
 9% Hydrogen == {'H2O','H2','O2','N2','He','Ar','H','HNO',...
10%              'HNO3','NH','NH2OH','NO3','N2H2','N2O3','N3','OH',...
11%              'HNO2','N','NH3','NO2','N2O','N2H4','N2O5','O','O3',...
12%              'HO2','NH2','H2O2','N3H','NH2NO2'}
13%   
14% See wiki or list_species() 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 Oct 07 2022
21% -------------------------------------------------------------------------
22
23%% INITIALIZE
24self = App('Hydrogen');
25%% INITIAL CONDITIONS
26self = set_prop(self, 'TR', 300, 'pR', 1 * 1.01325, 'phi', 1);
27self.PD.S_Fuel = {'H2'};
28self.PD.S_Oxidizer = {'N2', 'O2'};
29self.PD.ratio_oxidizers_O2 = [79, 21]/21;
30%% ADDITIONAL INPUTS (DEPENDS OF THE PROBLEM SELECTED)
31self = set_prop(self, 'drive_factor', [1.0382, 1.2458, 1.4534, 1.6611, 2.0763]);
32%% TUNING PROPERTIES
33self.TN.N_points_polar = 300; % Number of points to compute polar curves
34%% SOLVE PROBLEM
35self = solve_problem(self, 'DET_POLAR');
36%% DISPLAY RESULTS (PLOTS)
37post_results(self);