Skip to content

Commit

Permalink
Update: sample for CT v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertoCuadra committed Sep 3, 2024
1 parent 1146e50 commit 4c95542
Show file tree
Hide file tree
Showing 29 changed files with 147,049 additions and 128,054 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# macOS
*.DS_Store
498 changes: 242 additions & 256 deletions README.md

Large diffs are not rendered by default.

57 changes: 35 additions & 22 deletions sample/input/example_1.m
Original file line number Diff line number Diff line change
@@ -1,22 +1,35 @@
% Initialize
self = App('Soot formation extended');

% Initial conditions
self = set_prop(self, 'TR', 300, 'pR', 1, 'phi', 0.5:0.01:4);
self.PD.S_Fuel = {'C2H2_acetylene'};
self.PD.S_Oxidizer = {'N2', 'O2'};
self.PD.ratio_oxidizers_O2 = [79, 21] ./ 21;

% Additional inputs (depends of the problem selected)
self = set_prop(self, 'pP', self.PD.pR.value);

% Solve problem
self = solve_problem(self, 'HP');

% Miscellaneous
self.Misc.display_species = {'CO2', 'CO', 'H2O', 'H2', 'O2', 'N2',...
'HCN', 'H', 'OH', 'O', 'CN', 'NH3', 'CH4', 'C2H4',...
'CH3', 'NO', 'HCO', 'NH2', 'NH', 'N', 'CH', 'Cbgrb'};

% Display output (plots)
post_results(self);
% Import packages
import combustiontoolbox.databases.NasaDatabase
import combustiontoolbox.core.*
import combustiontoolbox.equilibrium.*

% Get Nasa database
DB = NasaDatabase();

% Define chemical system
system = ChemicalSystem(DB, 'soot formation extended');

% Initialize mixture
mix = Mixture(system);

% Define chemical state
set(mix, {'C2H2_acetylene'}, 'fuel', 1);
set(mix, {'N2', 'O2'}, 'oxidizer', [79, 21] / 21);

% Define properties
mixArray = setProperties(mix, 'T', 300, 'p', 1, 'equivalenceRatio', 0.5:0.01:4);

% Initialize solver
solver = EquilibriumSolver('problemType', 'HP');

% Solve problem
solver.solveArray(mixArray);

% Set displaySpecies
displaySpecies = {'CO2', 'CO', 'H2O', 'H2', 'O2', 'N2',...
'HCN','H','OH','O','CN','NH3','CH4','C2H4','CH3',...
'NO','HCO','NH2','NH','N','CH','Cbgrb'};
solver.plotConfig.displaySpecies = displaySpecies;

% Generate report
report(solver, mixArray);
9,119 changes: 0 additions & 9,119 deletions sample/input/example_1_gui/gui_1_labels.svg

This file was deleted.

17,799 changes: 0 additions & 17,799 deletions sample/input/example_1_gui/gui_2_labels.svg

This file was deleted.

28,435 changes: 0 additions & 28,435 deletions sample/input/example_1_gui/gui_34_vertical_labels.svg

This file was deleted.

55,182 changes: 55,182 additions & 0 deletions sample/input/example_1_gui/gui_cuadra2024_labels_1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion sample/input/example_2.m
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
% Example 2
% Example 2
run_validation_TP_CEA_6()
2 changes: 1 addition & 1 deletion sample/input/example_3.m
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
% Example 3
% Example 3
run_validation_SHOCK_POLAR_SDToolbox_2()
Binary file modified sample/output/example_1/example_1_molar_composition.fig
Binary file not shown.
2,878 changes: 2,317 additions & 561 deletions sample/output/example_1/example_1_molar_composition.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sample/output/example_1/example_1_properties.fig
Binary file not shown.
4,273 changes: 3,453 additions & 820 deletions sample/output/example_1/example_1_properties.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17,799 changes: 0 additions & 17,799 deletions sample/output/example_1_gui/gui_2_labels.svg

This file was deleted.

23,368 changes: 0 additions & 23,368 deletions sample/output/example_1_gui/gui_3_labels.svg

This file was deleted.

21,802 changes: 0 additions & 21,802 deletions sample/output/example_1_gui/gui_4_labels.svg

This file was deleted.

Loading

0 comments on commit 4c95542

Please sign in to comment.