diff --git a/examples/Example_DET.m b/examples/Example_DET.m index 0f7042c34..7256d17f1 100644 --- a/examples/Example_DET.m +++ b/examples/Example_DET.m @@ -3,12 +3,12 @@ % % Compute pre-shock and post-shock state for a planar detonation % considering Chapman-Jouguet (CJ) theory for lean to rich CH4-air mixtures -% at standard conditions, a set of 26 species considered and a set of +% at standard conditions, a set of 24 species considered and a set of % equivalence ratios (phi) contained in (0.5, 5) [-] % % -% Soot formation == {'CO2','CO','H2O','H2','O2','N2','He','Ar','Cbgrb',... -% 'C2','C2H4','CH','CH','CH3','CH4','CN','H',... +% Soot formation == {'CO2','CO','H2O','H2','O2','N2','Ar','Cbgrb',... +% 'C2','C2H4','CH','CH3','CH4','CN','H',... % 'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'} % % See wiki or list_species() for more predefined sets of species diff --git a/examples/Example_DET_OBLIQUE_BETA.m b/examples/Example_DET_OBLIQUE_BETA.m index d5c4f8325..a7ca9c692 100644 --- a/examples/Example_DET_OBLIQUE_BETA.m +++ b/examples/Example_DET_OBLIQUE_BETA.m @@ -3,11 +3,11 @@ % % Compute pre-shock and post-shock state for a oblique detonation % considering Chapman-Jouguet (CJ) theory for a stoichiometric CH4-air -% mixture at standard conditions, a set of 26 species considered, an +% mixture at standard conditions, a set of 24 species considered, an % overdrive of 4 and a set of wave angles [15:5:80] [deg]. % -% Soot formation == {'CO2','CO','H2O','H2','O2','N2','He','Ar','Cbgrb',... -% 'C2','C2H4','CH','CH','CH3','CH4','CN','H',... +% Soot formation == {'CO2','CO','H2O','H2','O2','N2','Ar','Cbgrb',... +% 'C2','C2H4','CH','CH3','CH4','CN','H',... % 'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'} % % See wiki or list_species() for more predefined sets of species diff --git a/examples/Example_DET_OBLIQUE_THETA.m b/examples/Example_DET_OBLIQUE_THETA.m index 2819226ee..8e628906a 100644 --- a/examples/Example_DET_OBLIQUE_THETA.m +++ b/examples/Example_DET_OBLIQUE_THETA.m @@ -6,9 +6,9 @@ % mixture at standard conditions, a set of 24 species considered, an % overdrive of 4 and a set of deflection angles [15:5:50] [deg]. % -% Soot formation == {'CO2', 'CO', 'H2O', 'H2', 'O2', 'N2', 'He', 'Ar',... -% 'HCN','H','OH','O','CN','NH3','CH4','C2H4','CH3',... -% 'NO','HCO','NH2','NH','N','CH','Cbgrb'} +% Soot formation == {'CO2','CO','H2O','H2','O2','N2','Ar','Cbgrb',... +% 'C2','C2H4','CH','CH3','CH4','CN','H',... +% 'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'} % % See wiki or list_species() for more predefined sets of species % diff --git a/examples/Example_DET_OVERDRIVEN.m b/examples/Example_DET_OVERDRIVEN.m index 815d37b95..4e84ce289 100644 --- a/examples/Example_DET_OVERDRIVEN.m +++ b/examples/Example_DET_OVERDRIVEN.m @@ -6,8 +6,8 @@ % mixture at standard conditions, a set of 26 species considered and a set % of overdrives contained in (1,10) [-]. % -% Soot formation == {'CO2','CO','H2O','H2','O2','N2','He','Ar','Cbgrb',... -% 'C2','C2H4','CH','CH','CH3','CH4','CN','H',... +% Soot formation == {'CO2','CO','H2O','H2','O2','N2','Ar','Cbgrb',... +% 'C2','C2H4','CH','CH3','CH4','CN','H',... % 'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'} % % See wiki or list_species() for more predefined sets of species diff --git a/examples/Example_DET_OVERDRIVEN_AND_UNDERDRIVEN.m b/examples/Example_DET_OVERDRIVEN_AND_UNDERDRIVEN.m index 4f5941ab8..d66a05274 100644 --- a/examples/Example_DET_OVERDRIVEN_AND_UNDERDRIVEN.m +++ b/examples/Example_DET_OVERDRIVEN_AND_UNDERDRIVEN.m @@ -3,11 +3,11 @@ % % Compute pre-shock and post-shock state for a planar underdriven to % overdriven detonation considering Chapman-Jouguet (CJ) theory for a -% stoichiometric CH4-air mixture at standard conditions, a set of 26 +% stoichiometric CH4-air mixture at standard conditions, a set of 24 % species considered and a set of overdrives contained in (1,10) [-]. % -% Soot formation == {'CO2','CO','H2O','H2','O2','N2','He','Ar','Cbgrb',... -% 'C2','C2H4','CH','CH','CH3','CH4','CN','H',... +% Soot formation == {'CO2','CO','H2O','H2','O2','N2','Ar','Cbgrb',... +% 'C2','C2H4','CH','CH3','CH4','CN','H',... % 'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'} % % See wiki or list_species() for more predefined sets of species diff --git a/examples/Example_DET_OVERDRIVEN_R.m b/examples/Example_DET_OVERDRIVEN_R.m index f51e1c03a..3de69bc62 100644 --- a/examples/Example_DET_OVERDRIVEN_R.m +++ b/examples/Example_DET_OVERDRIVEN_R.m @@ -3,11 +3,11 @@ % % Compute pre-shock and post-shock state for a reflected planar overdriven % detonation considering Chapman-Jouguet (CJ) theory for a stoichiometric -% CH4-air mixture at standard conditions, a set of 26 species considered +% CH4-air mixture at standard conditions, a set of 24 species considered % and a set of overdrives contained in (1,10) [-]. % -% Soot formation == {'CO2','CO','H2O','H2','O2','N2','He','Ar','Cbgrb',... -% 'C2','C2H4','CH','CH','CH3','CH4','CN','H',... +% Soot formation == {'CO2','CO','H2O','H2','O2','N2','Ar','Cbgrb',... +% 'C2','C2H4','CH','CH3','CH4','CN','H',... % 'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'} % % See wiki or list_species() for more predefined sets of species diff --git a/examples/Example_DET_R.m b/examples/Example_DET_R.m index 6c770ba50..9089c0100 100644 --- a/examples/Example_DET_R.m +++ b/examples/Example_DET_R.m @@ -3,12 +3,12 @@ % % Compute pre-shock and post-shock state for a reflected planar detonation % considering Chapman-Jouguet (CJ) theory for lean to rich CH4-air mixtures -% at standard conditions, a set of 26 species considered and a set of +% at standard conditions, a set of 24 species considered and a set of % equivalence ratios (phi) contained in (0.5, 5) [-] % % -% Soot formation == {'CO2','CO','H2O','H2','O2','N2','He','Ar','Cbgrb',... -% 'C2','C2H4','CH','CH','CH3','CH4','CN','H',... +% Soot formation == {'CO2','CO','H2O','H2','O2','N2','Ar','Cbgrb',... +% 'C2','C2H4','CH','CH3','CH4','CN','H',... % 'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'} % % See wiki or list_species() for more predefined sets of species diff --git a/examples/Example_DET_UNDERDRIVEN.m b/examples/Example_DET_UNDERDRIVEN.m index 0d4aae91b..1e6caa26f 100644 --- a/examples/Example_DET_UNDERDRIVEN.m +++ b/examples/Example_DET_UNDERDRIVEN.m @@ -3,11 +3,11 @@ % % Compute pre-shock and post-shock state for a planar under-driven detonation % considering Chapman-Jouguet (CJ) theory for a stoichiometric CH4-air -% mixture at standard conditions, a set of 26 species considered and a set +% mixture at standard conditions, a set of 24 species considered and a set % of underdrives contained in (1,10) [-]. % -% Soot formation == {'CO2','CO','H2O','H2','O2','N2','He','Ar','Cbgrb',... -% 'C2','C2H4','CH','CH','CH3','CH4','CN','H',... +% Soot formation == {'CO2','CO','H2O','H2','O2','N2','Ar','Cbgrb',... +% 'C2','C2H4','CH','CH3','CH4','CN','H',... % 'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'} % % See wiki or list_species() for more predefined sets of species diff --git a/examples/Example_DET_UNDERDRIVEN_R.m b/examples/Example_DET_UNDERDRIVEN_R.m index 644799f52..a96b858d1 100644 --- a/examples/Example_DET_UNDERDRIVEN_R.m +++ b/examples/Example_DET_UNDERDRIVEN_R.m @@ -3,11 +3,11 @@ % % Compute pre-shock and post-shock state for a reflected planar underdriven % detonation considering Chapman-Jouguet (CJ) theory for a stoichiometric -% CH4-air mixture at standard conditions, a set of 26 species considered +% CH4-air mixture at standard conditions, a set of 24 species considered % and a set of overdrives contained in (1,10) [-]. % -% Soot formation == {'CO2','CO','H2O','H2','O2','N2','He','Ar','Cbgrb',... -% 'C2','C2H4','CH','CH','CH3','CH4','CN','H',... +% Soot formation == {'CO2','CO','H2O','H2','O2','N2','Ar','Cbgrb',... +% 'C2','C2H4','CH','CH3','CH4','CN','H',... % 'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'} % % See wiki or list_species() for more predefined sets of species diff --git a/examples/Example_EV.m b/examples/Example_EV.m index 1a82f8010..27505a9e8 100644 --- a/examples/Example_EV.m +++ b/examples/Example_EV.m @@ -3,11 +3,11 @@ % % Compute equilibrium composition at adiabatic temperature and constant % volume for lean to rich CH4-air mixtures at standard conditions, a set -% of 26 species considered and a set of equivalence ratios (phi) contained +% of 24 species considered and a set of equivalence ratios (phi) contained % in (0.5, 5) [-] % -% Soot formation == {'CO2','CO','H2O','H2','O2','N2','He','Ar','Cbgrb',... -% 'C2','C2H4','CH','CH','CH3','CH4','CN','H',... +% Soot formation == {'CO2','CO','H2O','H2','O2','N2','Ar','Cbgrb',... +% 'C2','C2H4','CH','CH3','CH4','CN','H',... % 'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'} % % See wiki or list_species() for more predefined sets of species diff --git a/examples/Example_HP.m b/examples/Example_HP.m index b15214a4e..6dfa9e321 100644 --- a/examples/Example_HP.m +++ b/examples/Example_HP.m @@ -3,11 +3,11 @@ % % Compute adiabatic temperature and equilibrium composition at constant % pressure (e.g., 1.01325 bar) for lean to rich CH4-air mixtures at -% standard conditions, a set of 26 species considered and a set of +% standard conditions, a set of 24 species considered and a set of % equivalence ratios phi contained in (0.5, 5) [-] % -% Soot formation == {'CO2','CO','H2O','H2','O2','N2','He','Ar','Cbgrb',... -% 'C2','C2H4','CH','CH','CH3','CH4','CN','H',... +% Soot formation == {'CO2','CO','H2O','H2','O2','N2','Ar','Cbgrb',... +% 'C2','C2H4','CH','CH3','CH4','CN','H',... % 'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'} % % See wiki or list_species() for more predefined sets of species diff --git a/examples/Example_HP_COMPLETE_INCOMPLETE.m b/examples/Example_HP_COMPLETE_INCOMPLETE.m index e5897d6f9..b0b23abe0 100644 --- a/examples/Example_HP_COMPLETE_INCOMPLETE.m +++ b/examples/Example_HP_COMPLETE_INCOMPLETE.m @@ -12,8 +12,8 @@ % - soot = {'N2', 'Ar', 'CO', 'H2', 'Cbgrb', 'CO2', 'H2O'}; (equivalence ratio > equivalence ratio soot) % % * Incomplete: -% - Soot formation == {'CO2','CO','H2O','H2','O2','N2','He','Ar','Cbgrb',... -% 'C2','C2H4','CH','CH','CH3','CH4','CN','H',... +% - Soot formation == {'CO2','CO','H2O','H2','O2','N2','Ar','Cbgrb',... +% 'C2','C2H4','CH','CH3','CH4','CN','H',... % 'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'} % % See wiki or list_species() for more predefined sets of species diff --git a/examples/Example_HP_MIXTEMP.m b/examples/Example_HP_MIXTEMP.m index 42c433cc3..de135ca32 100644 --- a/examples/Example_HP_MIXTEMP.m +++ b/examples/Example_HP_MIXTEMP.m @@ -4,11 +4,11 @@ % Compute adiabatic temperature and equilibrium composition at constant % pressure (e.g., 1.01325 bar) for lean to rich CH4-air mixtures at % standard conditions except for the air which is at 380 K. Also, a set -% of 26 species considered and a set of equivalence ratios phi contained +% of 24 species considered and a set of equivalence ratios phi contained % in (0.5, 5) [-] % -% Soot formation == {'CO2','CO','H2O','H2','O2','N2','He','Ar','Cbgrb',... -% 'C2','C2H4','CH','CH','CH3','CH4','CN','H',... +% Soot formation == {'CO2','CO','H2O','H2','O2','N2','Ar','Cbgrb',... +% 'C2','C2H4','CH','CH3','CH4','CN','H',... % 'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'} % % See wiki or list_species() for more predefined sets of species diff --git a/examples/Example_HP_PRESSURE.m b/examples/Example_HP_PRESSURE.m index 37e832a9f..e826c678d 100644 --- a/examples/Example_HP_PRESSURE.m +++ b/examples/Example_HP_PRESSURE.m @@ -18,8 +18,8 @@ % - soot = {'N2', 'Ar', 'CO', 'H2', 'Cbgrb', 'CO2', 'H2O'}; (equivalence ratio > equivalence ratio soot) % % * Incomplete: -% - Soot formation == {'CO2','CO','H2O','H2','O2','N2','He','Ar','Cbgrb',... -% 'C2','C2H4','CH','CH','CH3','CH4','CN','H',... +% - Soot formation == {'CO2','CO','H2O','H2','O2','N2','Ar','Cbgrb',... +% 'C2','C2H4','CH','CH3','CH4','CN','H',... % 'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'} % % See wiki or list_species() for more predefined sets of species diff --git a/examples/Example_ROCKET_IAC.m b/examples/Example_ROCKET_IAC.m index 689b5e4d5..f9f0ea01d 100644 --- a/examples/Example_ROCKET_IAC.m +++ b/examples/Example_ROCKET_IAC.m @@ -2,7 +2,7 @@ % EXAMPLE: ROCKET Propellants considering an Infinite-Area-Chamber (IAC) % % Compute rocket propellant performance considering an Infinite-Area-Chamber -% for lean to rich LH2-LOX mixtures at 101.325 bar, a set of 24 species +% for lean to rich LH2-LOX mixtures at 101.325 bar, a set of 11 species % considered, a set of equivalence ratios phi contained in (2, 5) [-], and % an exit area ratio A_exit/A_throat = 3 % diff --git a/examples/Example_ROCKET_IAC_2.m b/examples/Example_ROCKET_IAC_2.m index ed79fc2db..c694eeff1 100644 --- a/examples/Example_ROCKET_IAC_2.m +++ b/examples/Example_ROCKET_IAC_2.m @@ -2,12 +2,13 @@ % EXAMPLE: ROCKET Propellants considering an Infinite-Area-Chamber (IAC) % % Compute rocket propellant performance considering an Infinite-Area-Chamber -% for lean to rich MON25-MHF3 mixtures at 101.325 bar, a set of 24 species +% for lean to rich MHF3-MON25 mixtures at 101.325 bar, a set of 24 species % considered, a set of equivalence ratios phi contained in (2, 5) [-], and % an exit area ratio A_exit/A_throat = 3 % -% HYDROGEN_L == {'H','H2O','OH','H2','O','O3','O2','HO2','H2O2',... -% 'H2bLb','O2bLb'} +% Soot formation == {'CO2','CO','H2O','H2','O2','N2','Ar','Cbgrb',... +% 'C2','C2H4','CH','CH3','CH4','CN','H',... +% 'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'} % % See wiki or list_species() for more predefined sets of species % @@ -15,17 +16,17 @@ % PhD Candidate - Group Fluid Mechanics % Universidad Carlos III de Madrid % -% Last update Jul 30 2022 +% Last update Feb 08 2024 % ------------------------------------------------------------------------- %% INITIALIZE self = App('Soot Formation'); %% INITIAL CONDITIONS self = set_prop(self, 'TR', 298.15, 'pR', 100 * 1.01325, 'phi', 2); -self.PD.S_Fuel = {'N2O4bLb', 'N2O3'}; -self.PD.N_Fuel = convert_weight_percentage_to_moles(self.PD.S_Fuel, [36.67, 63.33], self.DB); -self.PD.S_Oxidizer = {'CH6N2bLb', 'N2H4bLb'}; -self.PD.wt_ratio_oxidizers = [86, 14]; +self.PD.S_Fuel = {'CH6N2bLb', 'N2H4bLb'}; +self.PD.N_Fuel = convert_weight_percentage_to_moles(self.PD.S_Fuel, [86, 14], self.DB); +self.PD.S_Oxidizer = {'N2O4bLb', 'N2O3'}; +self.PD.wt_ratio_oxidizers = [36.67, 63.33]; self.PD.FLAG_IAC = true; %% ADDITIONAL INPUTS (DEPENDS OF THE PROBLEM SELECTED) self = set_prop(self, 'Aratio', 3); diff --git a/examples/Example_SHOCK_I.m b/examples/Example_SHOCK_I.m index b3c05e4df..be8f695c1 100644 --- a/examples/Example_SHOCK_I.m +++ b/examples/Example_SHOCK_I.m @@ -2,11 +2,11 @@ % EXAMPLE: SHOCK_I % % Compute pre-shock and post-shock state for a planar incident shock wave -% at standard conditions, a set of 20 species considered and a set of +% at standard conditions, a set of 16 species considered and a set of % initial shock front velocities (u1) contained in (sound velocity, 20000) [m/s] % % Air == {'O2','N2','O','O3','N','NO','NO2','NO3','N2O','N2O3','N2O4',... -% 'N3','C','CO','CO2','Ar','H2O','H2','H','He'} +% 'N3','C','CO','CO2','Ar'} % % See wiki or list_species() for more predefined sets of species % diff --git a/examples/Example_SHOCK_I_IONIZATION.m b/examples/Example_SHOCK_I_IONIZATION.m index fcf8abd73..85bef10fb 100644 --- a/examples/Example_SHOCK_I_IONIZATION.m +++ b/examples/Example_SHOCK_I_IONIZATION.m @@ -2,15 +2,18 @@ % EXAMPLE: SHOCK_I_IONIZATION % % Compute pre-shock and post-shock state for a planar incident shock wave -% at standard conditions, a set of 39 species considered and a set of +% at standard conditions, a set of 51 species considered and a set of % initial shock front velocities (u1) contained in (360, 13000) [m/s] % -% Air_ions == {'O2','N2','O','O3','N','NO','NO2','NO3','N2O','N2O3',... -% 'N2O4','N3','eminus','Nminus','Nplus','NOplus','NO2minus',... -% 'NO3minus','N2plus','N2minus','N2Oplus','Oplus','Ominus',... -% 'O2plus', 'O2minus','CO2','CO','COplus','C','Cplus',... -% 'Cminus','CN','CNplus','CNminus','CNN','NCO','NCN','Ar',... -% 'Arplus'} +% Air_ions == {'eminus', 'Ar', 'Arplus', 'C', 'Cplus', 'Cminus', ... +% 'CN', 'CNplus', 'CNminus', 'CNN', 'CO', 'COplus', ... +% 'CO2', 'CO2plus', 'C2', 'C2plus', 'C2minus', 'CCN', ... +% 'CNC', 'OCCN', 'C2N2', 'C2O', 'C3', 'C3O2', 'N', ... +% 'Nplus', 'Nminus', 'NCO', 'NO', 'NOplus', 'NO2', ... +% 'NO2minus', 'NO3', 'NO3minus', 'N2', 'N2plus', ... +% 'N2minus', 'NCN', 'N2O', 'N2Oplus', 'N2O3', 'N2O4', ... +% 'N2O5', 'N3', 'O', 'Oplus', 'Ominus', 'O2', 'O2plus', ... +% 'O2minus', 'O3'} % % See wiki or list_species() for more predefined sets of species % @@ -21,30 +24,8 @@ % Last update July 22 2022 % ------------------------------------------------------------------------- -% Air_ions = {'O2','N2','O','O3','N','NO','NO2','NO3','N2O','N2O3',... -% 'N2O4','N3_M','eminus','Nminus','Nplus','NOplus','NO2minus_M',... -% 'NO3minus_M','N2plus','N2minus','N2Oplus','Oplus','Ominus',... -% 'O2plus', 'O2minus','CO2','CO','COplus','C','Cplus',... -% 'Cminus','CN_M','CNplus_M','CNminus_M','CNN_M','NCO','NCN_M','Ar',... -% 'Arplus','O2_M','O3_M','CO2_M','O3minus_M','O3plus_M',... -% 'N3minus_M','N3plus_M','NO3plus_M','CNminus_M','CNplus_M',... -% 'NCOminus_M','NCOplus_M','NCNminus_M','NCNplus_M','O4_M',... -% 'O4minus_M','O4plus_M'}; - -Air_ions = {'O2','N2','O','O3','N','NO','NO2','NO3','N2O','N2O3',... - 'N2O4','N3','eminus','Nminus','Nplus','NOplus','NO2minus',... - 'NO3minus','N2plus','N2minus','N2Oplus','Oplus','Ominus',... - 'O2plus', 'O2minus','CO2','CO','COplus','C','Cplus',... - 'Cminus','CN','CNplus','CNminus','CNN','NCO','NCN','Ar',... - 'Arplus'}; - -% Air_ions = find_species_LS(LS, {'C','N','O','minus','plus','Ar'}, 'any',... -% {'I', 'S', 'L', 'T', 'P', 'F', 'ab', 'W', 'Z','X','R','Os','Cr','H','Br',... -% 'G','K','U','Co','Cu','B','V','Ni','Na','Mg','Mo','Ag','Nb','Cb','Cl','D','T',... -% 'Ca','Cs','Ne','Cd','Mn'}, 'all'); - %% INITIALIZE -self = App(Air_ions); +self = App('Air_ions'); %% INITIAL CONDITIONS self = set_prop(self, 'TR', 300, 'pR', 1 * 1.01325); self.PD.S_Oxidizer = {'N2', 'O2', 'Ar', 'CO2'}; diff --git a/examples/Example_SHOCK_OBLIQUE_BETA.m b/examples/Example_SHOCK_OBLIQUE_BETA.m index 25b36e11a..e4ff55cdb 100644 --- a/examples/Example_SHOCK_OBLIQUE_BETA.m +++ b/examples/Example_SHOCK_OBLIQUE_BETA.m @@ -2,16 +2,19 @@ % EXAMPLE: SHOCK_OBLIQUE_BETA % % Compute pre-shock and post-shock state for a oblique incident shock wave -% at standard conditions, a set of 20 species considered, a initial +% at standard conditions, a set of 51 species considered, a initial % shock front velocities u1 = a1 * 10 [m/s], and a set of wave angles % beta = [20:5:85] [deg] % -% Air_ions == {'O2','N2','O','O3','N','NO','NO2','NO3','N2O','N2O3',... -% 'N2O4','N3','eminus','Nminus','Nplus','NOplus','NO2minus',... -% 'NO3minus','N2plus','N2minus','N2Oplus','Oplus','Ominus',... -% 'O2plus', 'O2minus,'CO2','CO','COplus','C','Cplus',... -% 'Cminus','CN','CNplus','CNminus','CNN','NCO','NCN','Ar',... -% 'Arplus'} +% Air_ions == {'eminus', 'Ar', 'Arplus', 'C', 'Cplus', 'Cminus', ... +% 'CN', 'CNplus', 'CNminus', 'CNN', 'CO', 'COplus', ... +% 'CO2', 'CO2plus', 'C2', 'C2plus', 'C2minus', 'CCN', ... +% 'CNC', 'OCCN', 'C2N2', 'C2O', 'C3', 'C3O2', 'N', ... +% 'Nplus', 'Nminus', 'NCO', 'NO', 'NOplus', 'NO2', ... +% 'NO2minus', 'NO3', 'NO3minus', 'N2', 'N2plus', ... +% 'N2minus', 'NCN', 'N2O', 'N2Oplus', 'N2O3', 'N2O4', ... +% 'N2O5', 'N3', 'O', 'Oplus', 'Ominus', 'O2', 'O2plus', ... +% 'O2minus', 'O3'} % % See wiki or list_species() for more predefined sets of species % diff --git a/examples/Example_SHOCK_OBLIQUE_R.m b/examples/Example_SHOCK_OBLIQUE_R.m index df301cdf9..15cc3625d 100644 --- a/examples/Example_SHOCK_OBLIQUE_R.m +++ b/examples/Example_SHOCK_OBLIQUE_R.m @@ -2,16 +2,19 @@ % EXAMPLE: SHOCK_OBLIQUE_R % % Compute pre-shock and post-shock state (incident and reflected) for a -% oblique incident shock wave at standard conditions, a set of 20 species +% oblique incident shock wave at standard conditions, a set of 51 species % considered, a initial shock front velocities u1 = a1 * 10 [m/s], and a % deflection angle theta = 20 [deg] % -% Air_ions == {'O2','N2','O','O3','N','NO','NO2','NO3','N2O','N2O3',... -% 'N2O4','N3','eminus','Nminus','Nplus','NOplus','NO2minus',... -% 'NO3minus','N2plus','N2minus','N2Oplus','Oplus','Ominus',... -% 'O2plus', 'O2minus,'CO2','CO','COplus','C','Cplus',... -% 'Cminus','CN','CNplus','CNminus','CNN','NCO','NCN','Ar',... -% 'Arplus'} +% Air_ions == {'eminus', 'Ar', 'Arplus', 'C', 'Cplus', 'Cminus', ... +% 'CN', 'CNplus', 'CNminus', 'CNN', 'CO', 'COplus', ... +% 'CO2', 'CO2plus', 'C2', 'C2plus', 'C2minus', 'CCN', ... +% 'CNC', 'OCCN', 'C2N2', 'C2O', 'C3', 'C3O2', 'N', ... +% 'Nplus', 'Nminus', 'NCO', 'NO', 'NOplus', 'NO2', ... +% 'NO2minus', 'NO3', 'NO3minus', 'N2', 'N2plus', ... +% 'N2minus', 'NCN', 'N2O', 'N2Oplus', 'N2O3', 'N2O4', ... +% 'N2O5', 'N3', 'O', 'Oplus', 'Ominus', 'O2', 'O2plus', ... +% 'O2minus', 'O3'} % % See wiki or list_species() for more predefined sets of species % diff --git a/examples/Example_SHOCK_OBLIQUE_THETA.m b/examples/Example_SHOCK_OBLIQUE_THETA.m index 33a227164..5abb6e7ff 100644 --- a/examples/Example_SHOCK_OBLIQUE_THETA.m +++ b/examples/Example_SHOCK_OBLIQUE_THETA.m @@ -2,16 +2,19 @@ % EXAMPLE: SHOCK_OBLIQUE_THETA % % Compute pre-shock and post-shock state for a oblique incident shock wave -% at standard conditions, a set of 20 species considered, a initial +% at standard conditions, a set of 51 species considered, a initial % shock front velocities u1 = a1 * 10 [m/s], and a set of deflection angle % theta = [5:5:40] [deg] % -% Air_ions == {'O2','N2','O','O3','N','NO','NO2','NO3','N2O','N2O3',... -% 'N2O4','N3','eminus','Nminus','Nplus','NOplus','NO2minus',... -% 'NO3minus','N2plus','N2minus','N2Oplus','Oplus','Ominus',... -% 'O2plus', 'O2minus,'CO2','CO','COplus','C','Cplus',... -% 'Cminus','CN','CNplus','CNminus','CNN','NCO','NCN','Ar',... -% 'Arplus'} +% Air_ions == {'eminus', 'Ar', 'Arplus', 'C', 'Cplus', 'Cminus', ... +% 'CN', 'CNplus', 'CNminus', 'CNN', 'CO', 'COplus', ... +% 'CO2', 'CO2plus', 'C2', 'C2plus', 'C2minus', 'CCN', ... +% 'CNC', 'OCCN', 'C2N2', 'C2O', 'C3', 'C3O2', 'N', ... +% 'Nplus', 'Nminus', 'NCO', 'NO', 'NOplus', 'NO2', ... +% 'NO2minus', 'NO3', 'NO3minus', 'N2', 'N2plus', ... +% 'N2minus', 'NCN', 'N2O', 'N2Oplus', 'N2O3', 'N2O4', ... +% 'N2O5', 'N3', 'O', 'Oplus', 'Ominus', 'O2', 'O2plus', ... +% 'O2minus', 'O3'} % % See wiki or list_species() for more predefined sets of species % diff --git a/examples/Example_SHOCK_POLAR.m b/examples/Example_SHOCK_POLAR.m index ec016b438..b0de33c1b 100644 --- a/examples/Example_SHOCK_POLAR.m +++ b/examples/Example_SHOCK_POLAR.m @@ -1,15 +1,18 @@ % ------------------------------------------------------------------------- % EXAMPLE: SHOCK_POLAR % -% Compute shock polar plots at standard conditions, a set of 39 species -% considered, and a set of initial shock front velocities u1/a1 = [2, 3, 5, 14] +% Compute shock polar plots at standard conditions, a set of 51 species +% considered, and a set of initial shock front Mach numbers = [2, 3, 5, 14] % -% Air_ions == {'O2','N2','O','O3','N','NO','NO2','NO3','N2O','N2O3',... -% 'N2O4','N3','eminus','Nminus','Nplus','NOplus','NO2minus',... -% 'NO3minus','N2plus','N2minus','N2Oplus','Oplus','Ominus',... -% 'O2plus', 'O2minus,'CO2','CO','COplus','C','Cplus',... -% 'Cminus','CN','CNplus','CNminus','CNN','NCO','NCN','Ar',... -% 'Arplus'} +% Air_ions == {'eminus', 'Ar', 'Arplus', 'C', 'Cplus', 'Cminus', ... +% 'CN', 'CNplus', 'CNminus', 'CNN', 'CO', 'COplus', ... +% 'CO2', 'CO2plus', 'C2', 'C2plus', 'C2minus', 'CCN', ... +% 'CNC', 'OCCN', 'C2N2', 'C2O', 'C3', 'C3O2', 'N', ... +% 'Nplus', 'Nminus', 'NCO', 'NO', 'NOplus', 'NO2', ... +% 'NO2minus', 'NO3', 'NO3minus', 'N2', 'N2plus', ... +% 'N2minus', 'NCN', 'N2O', 'N2Oplus', 'N2O3', 'N2O4', ... +% 'N2O5', 'N3', 'O', 'Oplus', 'Ominus', 'O2', 'O2plus', ... +% 'O2minus', 'O3'} % % See wiki or list_species() for more predefined sets of species % @@ -26,10 +29,8 @@ self = set_prop(self, 'TR', 300, 'pR', 1 * 1.01325); self.PD.S_Oxidizer = {'N2', 'O2', 'Ar', 'CO2'}; self.PD.N_Oxidizer = [78.084, 20.9476, 0.9365, 0.0319] ./ 20.9476; -sound_velocity = compute_sound(self.PD.TR.value, self.PD.pR.value, self.PD.S_Oxidizer, self.PD.N_Oxidizer, 'self', self); %% ADDITIONAL INPUTS (DEPENDS OF THE PROBLEM SELECTED) -Mach_number = [2, 3, 5, 14]; -self = set_prop(self, 'u1', sound_velocity * Mach_number); +self = set_prop(self, 'M1', [2, 3, 5, 14]); %% SOLVE PROBLEM self = solve_problem(self, 'SHOCK_POLAR'); %% DISPLAY RESULTS (PLOTS) diff --git a/examples/Example_SHOCK_POLAR_LIMIT_RR_ALTITUDE.m b/examples/Example_SHOCK_POLAR_LIMIT_RR_ALTITUDE.m index c72e1b17a..f14f62865 100644 --- a/examples/Example_SHOCK_POLAR_LIMIT_RR_ALTITUDE.m +++ b/examples/Example_SHOCK_POLAR_LIMIT_RR_ALTITUDE.m @@ -7,12 +7,15 @@ % calculations are carried out for a set of initial shock front velocities % u1/a1 = [1.75:0.1:20] % -% Air_ions == {'O2','N2','O','O3','N','NO','NO2','NO3','N2O','N2O3',... -% 'N2O4','N3','eminus','Nminus','Nplus','NOplus','NO2minus',... -% 'NO3minus','N2plus','N2minus','N2Oplus','Oplus','Ominus',... -% 'O2plus', 'O2minus,'CO2','CO','COplus','C','Cplus',... -% 'Cminus','CN','CNplus','CNminus','CNN','NCO','NCN','Ar',... -% 'Arplus'} +% Air_ions == {'eminus', 'Ar', 'Arplus', 'C', 'Cplus', 'Cminus', ... +% 'CN', 'CNplus', 'CNminus', 'CNN', 'CO', 'COplus', ... +% 'CO2', 'CO2plus', 'C2', 'C2plus', 'C2minus', 'CCN', ... +% 'CNC', 'OCCN', 'C2N2', 'C2O', 'C3', 'C3O2', 'N', ... +% 'Nplus', 'Nminus', 'NCO', 'NO', 'NOplus', 'NO2', ... +% 'NO2minus', 'NO3', 'NO3minus', 'N2', 'N2plus', ... +% 'N2minus', 'NCN', 'N2O', 'N2Oplus', 'N2O3', 'N2O4', ... +% 'N2O5', 'N3', 'O', 'Oplus', 'Ominus', 'O2', 'O2plus', ... +% 'O2minus', 'O3'} % % See wiki or list_species() for more predefined sets of species % diff --git a/examples/Example_SHOCK_R.m b/examples/Example_SHOCK_R.m index dba04357e..04377d664 100644 --- a/examples/Example_SHOCK_R.m +++ b/examples/Example_SHOCK_R.m @@ -2,11 +2,11 @@ % EXAMPLE: SHOCK_R % % Compute pre-shock and post-shock state for a planar reflected shock wave -% at standard conditions, a set of 20 species considered and a set of +% at standard conditions, a set of 16 species considered and a set of % initial shock front velocities (u1) contained in (360, 9000) [m/s] % % Air == {'O2','N2','O','O3','N','NO','NO2','NO3','N2O','N2O3','N2O4',... -% 'N3','C','CO','CO2','Ar','H2O','H2','H','He'} +% 'N3','C','CO','CO2','Ar'} % % See wiki or list_species() for more predefined sets of species % diff --git a/examples/Example_SP.m b/examples/Example_SP.m index c8ded3cfe..d427de9d0 100644 --- a/examples/Example_SP.m +++ b/examples/Example_SP.m @@ -2,11 +2,11 @@ % EXAMPLE: SP % Compute Isentropic compression/expansion and equilibrium composition at % a defined set of pressure (1.01325, 1013.25 bar) for a rich CH4-air mixture -% at standard conditions, a set of 26 species considered, and a equivalence +% at standard conditions, a set of 24 species considered, and a equivalence % ratio phi 1.5 [-] % -% Soot formation == {'CO2','CO','H2O','H2','O2','N2','He','Ar','Cbgrb',... -% 'C2','C2H4','CH','CH','CH3','CH4','CN','H',... +% Soot formation == {'CO2','CO','H2O','H2','O2','N2','Ar','Cbgrb',... +% 'C2','C2H4','CH','CH3','CH4','CN','H',... % 'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'} % % See wiki or list_species() for more predefined sets of species diff --git a/examples/Example_SV.m b/examples/Example_SV.m index 670fdba08..7a02d5ab4 100644 --- a/examples/Example_SV.m +++ b/examples/Example_SV.m @@ -2,11 +2,11 @@ % EXAMPLE: SV % Compute Isentropic compression/expansion and equilibrium composition at % a defined set of volume ratios (0.5, 2) for a lean CH4-air mixture at -% 700 K and 10 bar, a set of 26 species considered, and a equivalence +% 700 K and 10 bar, a set of 24 species considered, and a equivalence % ratio phi 0.5 [-] % -% Soot formation == {'CO2','CO','H2O','H2','O2','N2','He','Ar','Cbgrb',... -% 'C2','C2H4','CH','CH','CH3','CH4','CN','H',... +% Soot formation == {'CO2','CO','H2O','H2','O2','N2','Ar','Cbgrb',... +% 'C2','C2H4','CH','CH3','CH4','CN','H',... % 'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'} % % See wiki or list_species() for more predefined sets of species diff --git a/examples/Example_TP.m b/examples/Example_TP.m index e8c657251..85985c8aa 100644 --- a/examples/Example_TP.m +++ b/examples/Example_TP.m @@ -3,11 +3,11 @@ % % Compute equilibrium composition at defined temperature (e.g., 3000 K) and % pressure (e.g., 1.01325 bar) for lean to rich CH4-air mixtures at -% standard conditions, a set of 26 species considered and a set of +% standard conditions, a set of 24 species considered and a set of % equivalence ratios phi contained in (0.5, 5) [-] % -% Soot formation == {'CO2','CO','H2O','H2','O2','N2','He','Ar','Cbgrb',... -% 'C2','C2H4','CH','CH','CH3','CH4','CN','H',... +% Soot formation == {'CO2','CO','H2O','H2','O2','N2','Ar','Cbgrb',... +% 'C2','C2H4','CH','CH3','CH4','CN','H',... % 'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'} % % See wiki or list_species() for more predefined sets of species diff --git a/examples/Example_TP_ZELENIK_1968.m b/examples/Example_TP_ZELENIK_1968.m index 538b7ad34..e2c59bf87 100644 --- a/examples/Example_TP_ZELENIK_1968.m +++ b/examples/Example_TP_ZELENIK_1968.m @@ -5,9 +5,8 @@ % pressure (e.g., 0.0101325 bar) for a stoichiometric CH2-O2 mixture, % and a set of 20 species considered % -% Soot formation == {'C','CH','CH2','CH3','CH4','CO','CO2','C2',... -% 'C2H2_acetylene','C2H4','C2O','C3','H','HCO',... -% 'HO2','H2','H2O','O','OH','O2'} +% LS == {'C','CH','CH2','CH3','CH4','CO','CO2','C2','C2H2_acetylene',... +% 'C2H4','C2O','C3','H','HCO','HO2','H2','H2O','O','OH','O2'} % % See wiki or list_species() for more predefined sets of species % diff --git a/examples/Example_TV.m b/examples/Example_TV.m index 625073098..bc08b4b7e 100644 --- a/examples/Example_TV.m +++ b/examples/Example_TV.m @@ -3,11 +3,11 @@ % % Compute equilibrium composition at defined temperature (e.g., 3000 K) and % constant volume for lean to rich CH4-air mixtures at standard conditions, -% a set of 26 species considered and a set of equivalence ratios (phi) +% a set of 24 species considered and a set of equivalence ratios (phi) % contained in (0.5, 5) [-] % -% Soot formation == {'CO2','CO','H2O','H2','O2','N2','He','Ar','Cbgrb',... -% 'C2','C2H4','CH','CH','CH3','CH4','CN','H',... +% Soot formation == {'CO2','CO','H2O','H2','O2','N2','Ar','Cbgrb',... +% 'C2','C2H4','CH','CH3','CH4','CN','H',... % 'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'} % % See wiki or list_species() for more predefined sets of species diff --git a/examples/Example_live_TP_class_ex9a.mlx b/examples/Example_live_TP_class_ex9a.mlx index 9b1fcc54b..0edc4563a 100644 Binary files a/examples/Example_live_TP_class_ex9a.mlx and b/examples/Example_live_TP_class_ex9a.mlx differ diff --git a/examples/TP_class_ex11.m b/examples/TP_class_ex11.m index 5b9f450e8..8ec332f2f 100644 --- a/examples/TP_class_ex11.m +++ b/examples/TP_class_ex11.m @@ -6,9 +6,9 @@ % standard conditions, a set of 24 species considered and a set of % equivalence ratios phi contained in (0.7, 1.5) [-] % -% Soot formation == {'CO2', 'CO', 'H2O', 'H2', 'O2', 'N2', 'He', 'Ar',... -% 'HCN','H','OH','O','CN','NH3','CH4','C2H4','CH3',... -% 'NO','HCO','NH2','NH','N','CH','Cbgrb'} +% Soot formation == {'CO2','CO','H2O','H2','O2','N2','Ar','Cbgrb',... +% 'C2','C2H4','CH','CH3','CH4','CN','H',... +% 'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'} % % See wiki or list_species() for more predefined sets of species % diff --git a/examples/TP_class_ex11b.m b/examples/TP_class_ex11b.m index a08a18c8c..75f862d2c 100644 --- a/examples/TP_class_ex11b.m +++ b/examples/TP_class_ex11b.m @@ -3,11 +3,11 @@ % % Compute adiabatic temperature and equilibrium composition at constant % pressure (e.g., 1.01325 bar) for lean to rich CH4-air mixtures at -% standard conditions, a set of 26 species considered and a set of +% standard conditions, a set of 24 species considered and a set of % equivalence ratios phi contained in (0.7, 1.5) [-] % -% Soot formation == {'CO2','CO','H2O','H2','O2','N2','He','Ar','Cbgrb',... -% 'C2','C2H4','CH','CH','CH3','CH4','CN','H',... +% Soot formation == {'CO2','CO','H2O','H2','O2','N2','Ar','Cbgrb',... +% 'C2','C2H4','CH','CH3','CH4','CN','H',... % 'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'} % % See wiki or list_species() for more predefined sets of species diff --git a/examples/TP_class_ex12b.m b/examples/TP_class_ex12b.m index ebd7181b1..8e499923c 100644 --- a/examples/TP_class_ex12b.m +++ b/examples/TP_class_ex12b.m @@ -6,9 +6,9 @@ % of 24 species considered and a set of equivalence ratios phi contained % in (0.7, 1.5) [-] % -% Soot formation == {'CO2', 'CO', 'H2O', 'H2', 'O2', 'N2', 'He', 'Ar',... -% 'HCN','H','OH','O','CN','NH3','CH4','C2H4','CH3',... -% 'NO','HCO','NH2','NH','N','CH','Cbgrb'} +% Soot formation == {'CO2','CO','H2O','H2','O2','N2','Ar','Cbgrb',... +% 'C2','C2H4','CH','CH3','CH4','CN','H',... +% 'HCN','HCO','N','NH','NH2','NH3','NO','O','OH'} % % See wiki or list_species() for more predefined sets of species % diff --git a/examples/check_time_dependence_species.m b/examples/check_time_dependence_species.m deleted file mode 100644 index 9f4f08e55..000000000 --- a/examples/check_time_dependence_species.m +++ /dev/null @@ -1,146 +0,0 @@ -% ------------------------------------------------------------------------- -% EXAMPLE: HP PROPELLANTS RP1 -% -% Compute adiabatic temperature and equilibrium composition at constant -% pressure (e.g., 1.01325 bar) for lean to rich LH2-LOX mixtures at -% standard conditions, a set of 24 species considered and a set of -% equivalence ratios phi contained in (0.5, 5) [-] -% -% HYDROGEN_L == {'H','H2O','OH','H2','O','O3','O2','HO2','H2O2',... -% 'H2bLb','O2bLb'} -% -% See wiki or ListSpecies() for more predefined sets of species -% -% @author: Alberto Cuadra Lara -% PhD Candidate - Group Fluid Mechanics -% Universidad Carlos III de Madrid -% -% Last update Feb 19 2022 -% ------------------------------------------------------------------------- - -%% INITIALIZE -LS = {'CO','H2O','H2','O2','He','Ar','Cbgrb',... -'C2H','C2H2_acetylene','C2H3_vinyl','C2H4','C2H5OH','C2H6',... -'C3','C3H3_2_propynl','C3H4_allene','C3H4_propyne',... -'C3H5_allyl','C3H6O_acetone','C3H6_propylene',... -'C3H8','C6H2','CH','CH2CO_ketene','CH2OH','CH3CHO_ethanal',... -'CH3COOH','CH4','COOH','H','HCO','HCOOH','O','RP_1','H2bLb','O2bLb',... -'COO_M','CD_M','CDH3_M','CDO_M','CD2_M','CD2O_M','CD3_M','CD4_M',... -'CD3OD_M','CH_M','CHO_M','COH_M','HOCO_M','HCOO_M','HCbOOb_M','CHO3_M',... -'CH2_M','CH2D2_M','HCHO_M','CHOH_M','CH2O_M','CH2O2_M','CH2OO_M',... -'CH3_M','CH3OD_M','CH3O_M','CH2OH_M','CH3O2_M','CH3OH_M','CH2OH2_M',... -'CH4O2_M','CO2_M','COO_M','CT_M','CT3_M','CT4_M','C2_M','C2D_M',... -'C2D2_M','C2D2O_M','C2D4_M','C2D4O_M','C2D6_M','C2D6O_M','C2H_M',... -'C2DH_M','HCCO_M','C2HO3_M','C2H2_M','C2H2O_M','HCC_OH_M',... -'C2H2O2_M','O_COH_CH_O_M','C2H2O4_M','CH3C_M','CH3Cquartet_M',... -'CH3CD3_M','CH3CO_M','CH2_CHO_M','C2H3O_M','C2H3O2_M','CH3CH_M',... -'C2H4O_M','C2H4O2_M','C2H4O3_M','C2H5_M','C2H5O_M','C2H5O2_M',... -'C2H4OOH_M','C2H6O_M','C2H6O2_M','COC_M','C2O_M','C3D4_M','C3D6_M',... -'C3D6O_M','C3H_M','C3H2_M','C3H3_1_propynl_M','C3H3_M','C3H3O_M',... -'C3H4_M','C3H4O_M','C3H4O2_M','C3H5_M','C3H5O_M','C3H5O2_M',... -'C3H5OH_M','C3H6O_M','C3H6O2_M','C3H6O3_M','C3H7_n_propyl_M',... -'C3H7_i_propyl_M','C3H7O_M','C3H7OO_M','C3H7O2_M','C3H8O_M',... -'C3H8O2_M','C3H8O3_M','C3O2_M','C4_M','C4D6_M','C4H_M','C4H2_M',... -'C4H3_M','C4H4_M','C4H4O_M','num_1_4_C4H4O_M','C4H4O2_M','C4H4O4_M',... -'C4H5_M','C4H5O_M','C4H5O2_M','C4H6_M','C4H6O_M','C4H6O2_M',... -'C4H6O4_M','C4H7_M','C4H7O_M','C4H7O2_M','num_1_C4H8_M','C4H8_M',... -'C4H8O_M','C4H8O2_M','C4H7OOH_M','C4H8O4_M','C4H9_M','t_C4H9_M',... -'C4H9O_M','C4H9O2_M','C4H10O_M','num_2_C4H10O_M','T_C4H10O_M',... -'n_C4H10O2_M','C4H10O2_M','C4H10O3_M','C4H10O4_M','C5_M','C5H_M',... -'C5H2_M','C5H3_M','C5H4_M','C5H4O_M','C5H4O2_M','C5H5_M','C5H4OH_M',... -'C5H5O_M','C5H5O2_M','C5H6_M','C5H5OH_M','C5H6O_M','C5H6O2_M',... -'C5H7_M','C5H7O_M','C5H8_M','C5H8O_M','C5H8O2_M','C5H8O4_M',... -'C5H9_M','C5H9O2_M','C5H10_M','C5H9OH_M','C5H10O_M','C5H10O2_M',... -'C5H10O3_M','n_C5H11_M','s_C5H11_M','t_C5H11_M','C5H11_M',... -'C5H11OH_M','C5H12O_M','C5H12O2_M','C6_M','C6H_M','C6H3_M',... -'o_C6H3_M','num_1_2_C6H4_M','num_1_3_C6H4_M','num_1_4_C6H4_M',... -'num_1_5_C6H4_M','num_1_2_3_4_5_C6H4_M','C6H4_M','C6H4O2_M',... -'C6H5_M','C6H5O_M','C6H5OO_M','C6H6_M','C6H6O_M','C6H6O2_M',... -'C6H5OOH_M','C6bOHb6_M','C6H7_M','C6H8_M','C6H8O_M','C6H8O3_M',... -'C6H8O7_M','C6H9_M','C6H10_M','C6H10O5_M','C6H11_M','C6H11O2_M',... -'C6H12_M','C6H12O_M','C6H12O2_M','C6H12O6_M','C6H12O7_M','C6H13_M',... -'C6H14_M','C6H14O_M','C6H14O2_M','C6H14O3_M','C6H14O6_M','C6T6_M',... -'C7_M','C7H_M','C7H4_M','C7H5O_M','C7H6O_M','C7H6O2_M','C7H7_M',... -'C7H7O_M','C7H7O2_M','C7H8_M','C7H8O_M','C7H8O2_M','C7H9_M','C7H10_M',... -'C7H11_M','C7H12_M','C7H13_M','C7H14_M','C7H14O_M','C7H14O2_M',... -'C7H15_M','C7H16_M','C7H16O_M','C8_M','C8H_M','C8H2_M','C8H5_M',... -'C8H6_M','C8H6O_M','C8H6O2_M','C8H7_M','C8H8_M','C8H8O_M','C8H8O2_M',... -'C8H9_M','C8H10_M','C8H12_M','C8H14_M','C8H16_M','C8H16O2_M',... -'C8H17_M','C8H18_M','C8H18O_M','C9_M','C9H_M','C9H4_M','C9H7_M',... -'C9H8_M','C9H9_M','C9H10_M','C9H10O2_M','C9H11_M','C9H12_M',... -'C9H16_M','C9H18O2_M','C9H18O6_M','C9H19_M','C9H20_M','C9H20O_M',... -'C10_M','C10D8_M','C10H_M','C10H2_M','C10H6_M','C10H7_M',... -'C10H8_M','C10H8O_M','C10H9_M','C10H10_M','C10H12O3_M','C10H14_M',... -'C10H15_M','C10H16_exo_M','C10H16_M','C10H18_M','C10H20_M',... -'C10H20O2_M','C10H21_1_M','C10H21_M','C10H22_M','C10H22O_M',... -'C10H22O4_M','C11_M','C11H_M','C11H8_M','C11H9_M','C11H10_M',... -'C11H11_M','C11H12_M','C11H20O2_M','C11H22O2_M','C11H24_M','C12_M',... -'O_C12D9_M','C12D10_M','C12H_M','C12H2_M','C12H7_M','C12H8_M',... -'C12H8O_M','C12H8O2_M','C12H9_M','C12H10_M','C12H12_M','C12H18_M',... -'C12H24_M','C12H24O2_M','C12H25_M','C12H26_M','C13H9_M','C13H10_M',... -'C13H10O_M','C13H12_M','p_C13H12_M','C13H14_M','C13H26O2_M',... -'C14H8_M','C14H10_M','C14H12_M','C14H14_M','C14H28_M','C14H28O2_M',... -'n_C14H30_M','C15H12_M','C15H14_M','C15H16O2_M','C15H30O2_M',... -'n_C15H32_M','C16H10_M','C16H29O2_M','C16H30O2_M','C16H31O2_M',... -'C16H32O2_M','C16H33_M','C16H34_M','C16H34O_M','C17H12_M',... -'C17H31O2_M','C17H32O2_M','C17H33O2_M','C17H34O2_M','C17H36_M',... -'C18H10_M','C18H12_M','C18H29O2_M','C18H30O2_M','C18H31O2_M',... -'C18H32O2_M','C18H33O2_M','C18H34_M','C18H34O2_M','C18H34O3_M',... -'C18H35O2_M','C18H36_M','C18H36O2_M','C18H36O4_M','C18H38_M',... -'C19H40_M','C20H10_M','C20H12_M','C20H32O2_M','C20H38O2_M',... -'C20H39O2_M','C20H40O2_M','C20H42_M','C21H12_M','C21H44_M',... -'C22H14_M','C22H44O2_M','C24H12_M','C24H18_M','C24H46O2_M',... -'C24H48O2_M','C25H20_M','C25H52_M','C30H10_M','C30H62_M','C32H13_M',... -'C32H14_M','C60bcrb_M','C60_M','C70bcrb_M','C70_M','OH_M','HOT_M',... -'HO2_M','HO3_M','HT_M','H2O2_M','H2O3_M','HOOOH_M'}; - - -for i = length(LS):-1:10 - % 'HC/O2/N2 PROPELLANTS' - self = App(LS(1:i)); - self.TN.tolN = 1e-20; - self.TN.tol0 = 1e-6; - %% INITIAL CONDITIONS - self = set_prop(self, 'TR', 300, 'pR', 45, 'phi', 6.811333:1:11.352221); - self.PD.S_Fuel = {'RP_1'}; - self.PD.S_Oxidizer = {'O2bLb'}; - %% ADDITIONAL INPUTS (DEPENDS OF THE PROBLEM SELECTED) - self = set_prop(self, 'pP', self.PD.pR.value); - % load huzel OF_T_real T_real OF_gamma_real gamma_real - % self.Tcurve = griddedInterpolant(OF_T_real, T_real, 'pchip', 'linear'); - % self.gammacurve = griddedInterpolant(OF_gamma_real, gamma_real, 'pchip', 'linear'); - %% SOLVE PROBLEM - t0 = tic; - self = solve_problem(self, 'HP'); - NS(i) = i; - time(i) = toc(t0); - %% DISPLAY RESULTS (PLOTS) - % self.C.mintol_display = 1e-6; - % postResults(self); -end - -ax = set_figure; -plot(ax, NS, time) -x = linspace(NS(1), NS(end)); - - -%% Fit: 'untitled fit 1'. -[xData, yData] = prepareCurveData( NS, time ); - -% Set up fittype and options. -ft = fittype( 'poly1' ); -excludedPoints = xData < 1; -opts = fitoptions( 'Method', 'LinearLeastSquares' ); -opts.Exclude = excludedPoints; - -% Fit model to data. -[fitresult, gof] = fit( xData, yData, ft, opts ); - -% Plot fit with data. -figure( 'Name', 'untitled fit 1' ); -h = plot( fitresult, xData, yData, excludedPoints ); -legend( h, 'time vs. NS', 'Excluded time vs. NS', 'untitled fit 1', 'Location', 'NorthEast', 'Interpreter', 'none' ); -% Label axes -xlabel( 'NS', 'Interpreter', 'none' ); -ylabel( 'time', 'Interpreter', 'none' ); -grid on \ No newline at end of file diff --git a/modules/self/Species/list_species.m b/modules/self/Species/list_species.m index 14cb3e220..7b681c52b 100644 --- a/modules/self/Species/list_species.m +++ b/modules/self/Species/list_species.m @@ -75,7 +75,7 @@ case 'SOOT FORMATION' self.S.LS = {'CO2', 'CO', 'H2O', 'H2', 'O2', 'N2', 'Ar', 'Cbgrb', ... - 'C2', 'C2H4', 'CH', 'CH', 'CH3', 'CH4', 'CN', 'H', ... + 'C2', 'C2H4', 'CH', 'CH3', 'CH4', 'CN', 'H', ... 'HCN', 'HCO', 'N', 'NH', 'NH2', 'NH3', 'NO', 'O', 'OH'}; case 'SOOT FORMATION EXTENDED' @@ -186,7 +186,7 @@ case 'SI/HC/O2/N2 PROPELLANTS' self.S.LS = {'CO2', 'CO', 'H2O', 'H2', 'O2', 'N2', 'Ar', 'Cbgrb', ... - 'C2', 'C2H4', 'CH', 'CH', 'CH3', 'CH4', 'CN', 'H', ... + 'C2', 'C2H4', 'CH', 'CH3', 'CH4', 'CN', 'H', ... 'H2O2', 'HCN', 'HCO', 'N', 'NH', 'NH2', 'NH3', 'NO', 'O', 'OH', ... 'O2bLb', 'Si', 'SiH', 'SiH2', 'SiH3', 'SiH4', 'SiO2', 'SiO', ... 'SibLb', 'SiO2bLb', 'Si2'}; diff --git a/validations/other stuff/check_time_dependence_species.m b/validations/other stuff/check_time_dependence_species.m new file mode 100644 index 000000000..d0bd6fdb9 --- /dev/null +++ b/validations/other stuff/check_time_dependence_species.m @@ -0,0 +1,74 @@ +% ------------------------------------------------------------------------- +% Check time dependence with number of chemical species +% +% @author: Alberto Cuadra Lara +% Postdoctoral researcher - Group Fluid Mechanics +% Universidad Carlos III de Madrid +% +% Last update Feb 08 2024 +% ------------------------------------------------------------------------- + +% Definitions +nfrec = 10; +NS_min = 7; +phi = 0.5:0.1:2; + +% Get list of species +self = App; +LS = find_products(self, {'C', 'H', 'O', 'N'}, 'flag_burcat', true); +LS = unique(['CO2', 'CO', 'H2O', 'H2', 'O2', 'N2', 'Cbgrb', LS], 'stable'); + +% Preallocation +NS = NS_min:nfrec:length(LS); +time = zeros(size(NS)); +id = 0; + +for i = NS_min:nfrec:length(LS) + % Update + id = id + 1; + + % Initialization + self = App(LS(1:i)); + + % Set initial state + self = set_prop(self, 'TR', 300, 'pR', 1, 'phi', phi); + self.PD.S_Fuel = {'CH4'}; + self.PD.S_Oxidizer = {'N2', 'O2'}; + self.PD.ratio_oxidizers_O2 = [79, 21] / 21; + + % Define additiational constrains (depends of the problem selected) + self = set_prop(self, 'pP', self.PD.pR.value); + + % Tunning properties + self.TN.tolN = 1e-14; + self.TN.tol0 = 1e-4; + + % Solve problem + t0 = tic; + self = solve_problem(self, 'HP'); + time(id) = toc(t0); +end + +time_per_case = time / length(phi); + +% Least squares interpolation +[xData, yData] = prepareCurveData( NS, time_per_case ); + +% Set up fittype and options. +ft = fittype( 'poly1' ); +excludedPoints = xData < 1; +opts = fitoptions( 'Method', 'LinearLeastSquares' ); +opts.Exclude = excludedPoints; + +% Fit model to data. +[fitresult, gof] = fit( xData, yData, ft, opts ); + +% Plot fit with data. +ax = set_figure; +h = plot( ax, fitresult, xData, yData, excludedPoints ); +legend( h, 'Data', 'Least squares interpolation', 'Location', 'NorthEast', 'Interpreter', 'latex' ); + +% Label axes +xlabel( 'Number chemical species', 'Interpreter', 'latex' ); +ylabel( 'Time per case', 'Interpreter', 'latex' ); +grid on \ No newline at end of file