Example_SV.m#

 1% -------------------------------------------------------------------------
 2% EXAMPLE: SV
 3% Compute Isentropic compression/expansion and equilibrium composition at 
 4% a defined set of volume ratios (0.5, 2) for a lean CH4-air mixture at
 5% 700 K and 10 bar, a set of 26 species considered, and a equivalence
 6% ratio phi 0.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 19 2022
19% -------------------------------------------------------------------------
20
21%% INITIALIZE
22self = App('Soot formation');
23%% INITIAL CONDITIONS
24self = set_prop(self, 'TR', 700, 'pR', 10, 'phi', 0.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, 'vP_vR', 0.5:0.01:2); 
31%% SOLVE PROBLEM
32self = SolveProblem(self, 'SV');
33%% DISPLAY RESULTS (PLOTS)
34postResults(self);