Example_SP.m#

 1% -------------------------------------------------------------------------
 2% EXAMPLE: SP
 3% Compute Isentropic compression/expansion and equilibrium composition at 
 4% a defined set of pressure (1.01325, 1013.25 bar) for a rich CH4-air mixture
 5% at standard conditions, a set of 26 species considered, and a equivalence
 6% ratio phi 1.5 [-]
 7%   
 8% Soot formation == {'CO2','CO','H2O','H2','O2','N2','He','Ar','Cbgrb',...
 9%                    'C2','C2H4','CH','CH','CH3','CH4','CN','H',...
10%                    'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'}
11%   
12% See wiki or ListSpecies() for more predefined sets of species
13%
14% @author: Alberto Cuadra Lara
15%          PhD Candidate - Group Fluid Mechanics
16%          Universidad Carlos III de Madrid
17%                 
18% Last update Feb 18 2022
19% -------------------------------------------------------------------------
20
21%% INITIALIZE
22self = App('Soot formation');
23%% INITIAL CONDITIONS
24self = set_prop(self, 'TR', 300, 'pR', 1 * 1.01325, 'phi', 1.5);
25self.PD.S_Fuel     = {'CH4'};
26self.PD.S_Oxidizer = {'O2'};
27self.PD.S_Inert    = {'N2', 'Ar', 'CO2'};
28self.PD.proportion_inerts_O2 = [78.084, 0.9365, 0.0319] ./ 20.9476;
29%% ADDITIONAL INPUTS (DEPENDS OF THE PROBLEM SELECTED)
30self = set_prop(self, 'pP', 1.01325 * logspace(0, 3, 200)); 
31%% SOLVE PROBLEM
32self = SolveProblem(self, 'SP');
33%% DISPLAY RESULTS (PLOTS)
34postResults(self);