Example_DET_R.m#

 1% -------------------------------------------------------------------------
 2% EXAMPLE: DET REFLECTED
 3%
 4% Compute pre-shock and post-shock state for a reflected planar detonation
 5% considering Chapman-Jouguet (CJ) theory for lean to rich CH4-air mixtures
 6% at standard conditions, a set of 24 species considered and a set of
 7% equivalence ratios (phi) contained in (0.5, 5) [-]
 8%   
 9%   
10% Soot formation == {'CO2','CO','H2O','H2','O2','N2','Ar','Cbgrb',...
11%                    'C2','C2H4','CH','CH3','CH4','CN','H',...
12%                    'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'}
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 July 22 2022
21% -------------------------------------------------------------------------
22
23%% INITIALIZE
24self = App('Soot Formation');
25%% INITIAL CONDITIONS
26self = set_prop(self, 'TR', 300, 'pR', 1 * 1.01325, 'phi', 0.5:0.01:5);
27self.PD.S_Fuel     = {'CH4'};
28self.PD.S_Oxidizer = {'N2', 'O2', 'Ar', 'CO2'};
29self.PD.ratio_oxidizers_O2 = [78.084, 20.9476, 0.9365, 0.0319] ./ 20.9476;
30%% ADDITIONAL INPUTS (DEPENDS OF THE PROBLEM SELECTED)
31% No additional data required. The initial velocity is unique for CJ
32% condition
33%% SOLVE PROBLEM
34self = solve_problem(self, 'DET_R');
35%% DISPLAY RESULTS (PLOTS)
36post_results(self);