Example_DET.m#

 1% -------------------------------------------------------------------------
 2% EXAMPLE: DET
 3%
 4% Compute pre-shock and post-shock state for a planar detonation
 5% considering Chapman-Jouguet (CJ) theory for lean to rich CH4-air mixtures
 6% at standard conditions, a set of 26 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','He','Ar','Cbgrb',...
11%                    'C2','C2H4','CH','CH','CH3','CH4','CN','H',...
12%                    'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'}
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 Oct 22 2021
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:4);
27self.PD.S_Fuel     = {'CH4'};
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)
32% No additional data required. The initial velocity is unique for CJ
33% condition
34%% SOLVE PROBLEM
35self = SolveProblem(self, 'DET');
36%% DISPLAY RESULTS (PLOTS)
37postResults(self);