Example_HP_MIXTEMP.m#

 1% -------------------------------------------------------------------------
 2% EXAMPLE: HP MIXTEMP
 3%
 4% Compute adiabatic temperature and equilibrium composition at constant
 5% pressure (e.g., 1.01325 bar) for lean to rich CH4-air mixtures at
 6% standard conditions except for the air which is at 380 K. Also, a set
 7% of 26 species considered and a set of equivalence ratios phi contained
 8% in (0.5, 5) [-]
 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 Feb 19 2022
21% -------------------------------------------------------------------------
22
23%% INITIALIZE
24self = App('Soot formation');
25%% INITIAL CONDITIONS
26self = set_prop(self, 'pR', 1 * 1.01325, 'phi', 0.5:0.01:5);
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
32self.PD.T_Fuel     = 300;
33self.PD.T_Oxidizer = 380;
34self.PD.T_Inert    = [380, 380, 380];
35%% ADDITIONAL INPUTS (DEPENDS OF THE PROBLEM SELECTED)
36self = set_prop(self, 'pP', self.PD.pR.value); 
37%% SOLVE PROBLEM
38self = SolveProblem(self, 'HP');
39%% DISPLAY RESULTS (PLOTS)
40postResults(self);