Example_SHOCK_I.m#

 1% -------------------------------------------------------------------------
 2% EXAMPLE: SHOCK_I
 3%
 4% Compute pre-shock and post-shock state for a planar incident shock wave
 5% at standard conditions, a set of 20 species considered and a set of
 6% initial shock front velocities (u1) contained in (360, 20000) [m/s]
 7%    
 8% Air == {'O2','N2','O','O3','N','NO','NO2','NO3','N2O','N2O3','N2O4',...
 9%         'N3','C','CO','CO2','Ar','H2O','H2','H','He'}
10%   
11% See wiki or ListSpecies() for more predefined sets of species
12%
13% @author: Alberto Cuadra Lara
14%          PhD Candidate - Group Fluid Mechanics
15%          Universidad Carlos III de Madrid
16%                 
17% Last update March 17 2022
18% -------------------------------------------------------------------------
19
20%% INITIALIZE
21self = App('Air');
22%% INITIAL CONDITIONS
23self = set_prop(self, 'TR', 300, 'pR', 1 * 1.01325);
24self.PD.S_Oxidizer = {'O2'};
25self.PD.S_Inert    = {'N2', 'Ar', 'CO2'};
26self.PD.proportion_inerts_O2 = [78.084, 0.9365, 0.0319] ./ 20.9476;
27%% ADDITIONAL INPUTS (DEPENDS OF THE PROBLEM SELECTED)
28u1 = logspace(2, 5, 500); u1 = u1(u1<20000); u1 = u1(u1>=360);
29self = set_prop(self, 'u1', u1);
30%% SOLVE PROBLEM
31self = SolveProblem(self, 'SHOCK_I');
32%% DISPLAY RESULTS (PLOTS)
33postResults(self);