Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: example HP multicomponent fuel #950

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions examples/Example_HP_NATURAL_GAS.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
% -------------------------------------------------------------------------
% EXAMPLE: HP_NATURAL_GAS
%
% Compute adiabatic temperature and equilibrium composition at constant
% pressure (e.g., 1.01325 bar) for lean to rich natural gas (0.85% CH4, ...
% 0.10% C2H6, 0.0035% CO2)-air mixtures 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','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
%
% @author: Alberto Cuadra Lara
% PhD Candidate - Group Fluid Mechanics
% Universidad Carlos III de Madrid
%
% Last update July 22 2022
% -------------------------------------------------------------------------

%% INITIALIZE
self = App('Soot formation');
%% INITIAL CONDITIONS
self = set_prop(self, 'TR', 300, 'pR', 1 * 1.01325, 'phi', 0.5:0.01:5);
self.PD.S_Fuel = {'CH4', 'C2H6', 'CO2'};
self.PD.N_Fuel = [0.85, 0.1, 0.0035];
self.PD.S_Oxidizer = {'N2', 'O2', 'Ar', 'CO2'};
self.PD.ratio_oxidizers_O2 = [78.084, 20.9476, 0.9365, 0.0319] ./ 20.9476;
%% ADDITIONAL INPUTS (DEPENDS OF THE PROBLEM SELECTED)
self = set_prop(self, 'pP', self.PD.pR.value);
%% SOLVE PROBLEM
self = solve_problem(self, 'HP');
%% DISPLAY RESULTS (PLOTS)
post_results(self);
Loading