Example_SV_FROZEN.m#

 1% -------------------------------------------------------------------------
 2% EXAMPLE: SV FROZEN
 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, frozen chemistry, and a equivalence ratio phi 0.5 [-]
 6%   
 7% LS == {'CH4', 'O2', 'N2', 'Ar', 'CO2'}
 8%   
 9% See wiki or ListSpecies() for more predefined sets of species
10%
11% @author: Alberto Cuadra Lara
12%          PhD Candidate - Group Fluid Mechanics
13%          Universidad Carlos III de Madrid
14%                 
15% Last update Feb 19 2022
16% -------------------------------------------------------------------------
17
18%% INITIALIZE
19self = App({'CH4', 'O2', 'N2', 'Ar', 'CO2'});
20%% INITIAL CONDITIONS
21self = set_prop(self, 'TR', 700, 'pR', 10, 'phi', 0.5);
22self.PD.S_Fuel     = {'CH4'};
23self.PD.S_Oxidizer = {'O2'};
24self.PD.S_Inert    = {'N2', 'Ar', 'CO2'};
25self.PD.proportion_inerts_O2 = [78.084, 0.9365, 0.0319] ./ 20.9476;
26%% ADDITIONAL INPUTS (DEPENDS OF THE PROBLEM SELECTED)
27self = set_prop(self, 'vP_vR', 0.5:0.01:2); 
28%% SOLVE PROBLEM
29self = SolveProblem(self, 'SV');
30%% DISPLAY RESULTS (PLOTS)
31postResults(self);