Skip to content

Commit

Permalink
Merge pull request #876 from AlbertoCuadra/develop
Browse files Browse the repository at this point in the history
Major update: initialization, find_products when LS is not given, GUI, several bugs
  • Loading branch information
AlbertoCuadra committed Apr 11, 2023
2 parents bbbb734 + e5113b6 commit ba3eb1d
Show file tree
Hide file tree
Showing 18 changed files with 373 additions and 193 deletions.
58 changes: 15 additions & 43 deletions combustion_toolbox_contents.m → CONTENTS.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% -------------------------------------------------------------------------
% COMBUSTION TOOLBOX @v0.9.99g
% COMBUSTION TOOLBOX @v1.0.0
% A MATLAB-GUI based open-source tool for solving gaseous combustion problems
%
% Type of problems:
Expand All @@ -13,68 +13,40 @@
% * SHOCK_R ------------> Planar reflected shock wave
% * SHOCK_OBLIQUE ------> Oblique incident shock wave
% * SHOCK_OBLIQUE_R ----> Oblique incident and reflected states
% * SHOCK_POLAR --------> Shock polar curves
% * SHOCK_POLAR_R ------> Shock polar curves for incident and reflected states
% * SHOCK_POLAR --------> Shock polar diagrams
% * SHOCK_POLAR_R ------> Shock polar diagrams for incident and reflected states
% * SHOCK_IDEAL_GAS ----> Planar incident shock wave for a fixed adiabatic index
% * DET ----------------> Chapman-Jouguet Detonation
% * DET_R --------------> Reflected Chapman-Jouguet Detonation
% * DET_OBLIQUE --------> Oblique Detonation
% * DET_POLAR ----------> Detonation polar curves
% * DET_POLAR ----------> Detonation polar diagrams
% * DET_OVERDRIVEN -----> Over-driven Detonation
% * DET_OVERDRIVEN_R ---> Over-driven reflected Detonation
% * DET_UNDERDRIVEN ----> Under-driven Detonation
% * DET_UNDERDRIVEN_R --> Under-driven reflected Detonation
% * ROCKET -------------> Propellant rocket performance
%
% SEE THE EXAMPLES OR WIKI TO KNOW HOW TO START USING COMBUSTION TOOLBOX
% SEE THE EXAMPLES OR WEBSITE TO KNOW HOW TO START USING THE COMBUSTION TOOLBOX
%
% WEBSITE: https://combustion-toolbox-website.readthedocs.io/
% or type "run website_CT"
% or type in the promt "website_CT".
%
% LIST OF TUTORIAL SCRIPTS:
% * Example_TP
% * Example_HP
% * Example_HP_COMPLETE_INCOMPLETE
% * Example_HP_PRESSURE
% * Example_HP_PROPELLANTS
% * Example_HP_MIXTEMP
% * Example_SP
% * Example_TV
% * Example_EV
% * Example_SV
% * Example_SV_FROZEN
% * Example_SHOCK_I
% * Example_SHOCK_I_IONIZATION
% * Example_SHOCK_R
% * Example_SHOCK_OBLIQUE_BETA
% * Example_SHOCK_OBLIQUE_THETA
% * Example_SHOCK_OBLIQUE_R
% * Example_SHOCK_POLAR
% * Example_SHOCK_POLAR_R
% * Example_DET
% * Example_DET_R
% * Example_DET_OVERDRIVEN
% * Example_DET_OVERDRIVEN_R
% * Example_DET_UNDERDRIVEN
% * Example_DET_UNDERDRIVEN_R
% * Example_DET_OVERDRIVEN_AND_UNDERDRIVEN
% * Example_DET_OBLIQUE_BETA
% * Example_DET_OBLIQUE_THETA
% * Example_DET_POLAR
% * Example_ROCKET_IAC
% * Example_ROCKET_FAC
% * Example_live_ZELDOVICH_MECHANISM
% Please to send feedback or inquiries type in the promt "uifeedback".
%
% Please to send feedback or inquiries using the command "run uifeedback"
% Thank you for testing Combustion Toolbox!
% Thank you for using the Combustion Toolbox!
%
% Citing:
% Cuadra, A., Huete, C., & Vera, M. (2023). Combustion Toolbox: A
% MATLAB-GUI based open-source tool for solving gaseous combustion
% problems. (v1.0.0). Zenodo. https://doi.org/10.5281/zenodo.5554911.
%
% @author: Alberto Cuadra Lara
% PhD Candidate - Group Fluid Mechanics
% Universidad Carlos III de Madrid
%
% Last update Apr 07 2023
% Last update Apr 11 2023
% -------------------------------------------------------------------------
help combustion_toolbox_contents.m
help CONTENTS.m

% Set path
INSTALL();
Expand Down
5 changes: 3 additions & 2 deletions examples/Example_SHOCK_I.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
%
% 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
% initial shock front velocities (u1) contained in (360, 20000) [m/s]
% 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'}
Expand All @@ -23,8 +23,9 @@
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)
u1 = logspace(2, 5, 500); u1 = u1(u1<20000); u1 = u1(u1>=360);
u1 = logspace(2, 5, 500); u1 = u1(u1 < 20000); u1 = u1(u1 >= 1 * sound_velocity);
self = set_prop(self, 'u1', u1);
%% SOLVE PROBLEM
self = solve_problem(self, 'SHOCK_I');
Expand Down
14 changes: 7 additions & 7 deletions examples/Example_SHOCK_POLAR_R.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
% (altitude 30 km), a set of 39 species considered, an initial
% shock front Mach numbers = 20, and a deflection angle theta = 35;
%
% 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'}
% LS== {'eminus', 'Ar', 'Arplus', 'N', ...
% 'Nplus', 'Nminus', 'NO', 'NOplus', 'NO2', ...
% 'NO2minus', 'NO3', 'NO3minus', 'N2', 'N2plus', ...
% 'N2minus', 'N2O', 'N2Oplus', 'N2O3', 'N2O4', ...
% 'N2O5', 'N3', 'O', 'Oplus', 'Ominus', 'O2', 'O2plus', ...
% 'O2minus', 'O3'}
%
% See wiki or list_species() for more predefined sets of species
%
Expand All @@ -33,7 +33,7 @@
%% INITIALIZE
self = App(LS);

self.TN.FLAG_FAST = false;
self.TN.FLAG_FAST = true;
self.TN.FLAG_TCHEM_FROZEN = false;
%% INITIAL CONDITIONS
self = set_prop(self, 'TR', 226.65, 'pR', 0.0117);
Expand Down

0 comments on commit ba3eb1d

Please sign in to comment.