Example_SHOCK_OBLIQUE_THETA.m#

 1% -------------------------------------------------------------------------
 2% EXAMPLE: SHOCK_OBLIQUE_THETA
 3%
 4% Compute pre-shock and post-shock state for a oblique incident shock wave
 5% at standard conditions, a set of 20 species considered, a initial 
 6% shock front velocities u1 = a1 * 10 [m/s], and a set of deflection angle 
 7% theta = [5:5:40] [deg]
 8%    
 9% Air_ions == {'O2','N2','O','O3','N','NO','NO2','NO3','N2O','N2O3',...
10%              'N2O4','N3','eminus','Nminus','Nplus','NOplus','NO2minus',...
11%              'NO3minus','N2plus','N2minus','N2Oplus','Oplus','Ominus',...
12%              'O2plus', 'O2minus,'CO2','CO','COplus','C','Cplus',...
13%              'Cminus','CN','CNplus','CNminus','CNN','NCO','NCN','Ar',...
14%              'Arplus'}
15%   
16% See wiki or ListSpecies() for more predefined sets of species
17%
18% @author: Alberto Cuadra Lara
19%          PhD Candidate - Group Fluid Mechanics
20%          Universidad Carlos III de Madrid
21%                 
22% Last update March 24 2022
23% -------------------------------------------------------------------------
24
25%% INITIALIZE
26self = App('Air_ions');
27% self = App({'O2', 'N2', 'Ar', 'CO2'}); % Frozen
28% self = App({'O2'}); % Frozen
29%% INITIAL CONDITIONS
30self = set_prop(self, 'TR', 300, 'pR', 1 * 1.01325);
31self.PD.S_Oxidizer = {'O2'};
32self.PD.S_Inert    = {'N2', 'Ar', 'CO2'};
33self.PD.proportion_inerts_O2 = [78.084, 0.9365, 0.0319] ./ 20.9476;
34%% ADDITIONAL INPUTS (DEPENDS OF THE PROBLEM SELECTED)
35overdriven = 10;
36self = set_prop(self, 'u1', 3.472107491008314e+02 * overdriven, 'theta', 5:5:40);
37%% SOLVE PROBLEM
38self = SolveProblem(self, 'SHOCK_OBLIQUE');
39%% DISPLAY RESULTS (PLOTS)
40postResults(self);