Shocks and detonations module#
In this section, you will find the documentation of the routines implemented to solves processes that involve strong changes in dynamic pressure, such as steady state shock and detonation waves in either normal or oblique stream configurations within the limits of regular shock reflections.
Note
The kernel of the incident, reflected, and Chapman-Jouguet detonations are based on Gordon, S., & McBride, B. J. (1994). NASA reference publication, 1311.
Routines
- det_cj(self, mix1, varargin)#
Compute pre-shock and post-shock states of a Chapman-Jouguet detonation
This method is based on the method outlined in Gordon, S., & McBride, B. J. (1994). NASA reference publication, 1311.
- Parameters:
self (
struct
) – Data of the mixture, conditions, and databasesmix1 (
struct
) – Properties of the mixture in the pre-shock state
- Optional Args:
mix2 (struct): Properties of the mixture in the post-shock state (previous calculation)
- Returns:
Tuple containing
mix1 (struct): Properties of the mixture in the pre-shock state
mix2 (struct): Properties of the mixture in the post-shock state
Examples
[mix1, mix2] = det_cj(self, self.PS.strR{1})
[mix1, mix2] = det_cj(self, self.PS.strR{1}, self.PS.strP{1})
- det_compute_guess(self, mix1, phi, drive_factor)#
Obtain guess of the jump conditions for a Chapman-Jouguet detonation. Only valid if the mixture have CHON. It computes the guess assuming first a complete combustion, next it recomputes assuming an incomplete combustion from the composition obtained in the previous step.
- Parameters:
self (
struct
) – Data of the mixture, conditions, and databasesmix1 (
struct
) – Properties of the mixture in the pre-shock statephi (
float
) – Equivalence ratio [-]drive_factor (
float
) – Overdriven ratio [-] respect to the sound velocity of the mixture
- Returns:
Tuple containing
P (float): Pressure ratio [-]
T (float): Temperature ratio [-]
M1 (float): Pre-shock Mach number [-]
R (float): Density ratio [-]
Q (float): Dimensionless Heat release []
STOP (float): Relative error [-]
Example
[P, T, M1, R, Q, STOP] = det_compute_guess(self, self.PS.strR{1}, 1, 2)
- det_compute_guess_CEA(self, mix1)#
Obtain guess of the jump conditions for a Chapman-Jouguet detonation as in NASA’s CEA code (see Sec. 8.3 of [1])
[1] Gordon, S., & McBride, B. J. (1994). NASA reference publication, 1311.
- Parameters:
self (
struct
) – Data of the mixture, conditions, and databasesmix1 (
struct
) – Properties of the mixture in the pre-shock state
- Returns:
Tuple containing
P (float): Pressure ratio [-]
T (float): Temperature ratio [-]
STOP (float): Relative error [-]
Example
[P, T, STOP] = det_compute_guess_CEA(self, self.PS.strR{1})
- det_oblique_beta(self, mix1, drive_factor, beta, varargin)#
Compute pre-shock and post-shock states of an oblique detonation wave given the wave angle (two solutions)
- Parameters:
self (
struct
) – Data of the mixture, conditions, and databasesmix1 (
struct
) – Properties of the mixture in the pre-shock statedrive_factor (
float
) – Drive_factor [-]beta (
float
) – Wave angle [deg] of the incident oblique detonation
- Optional Args:
mix2 (struct): Properties of the mixture in the post-shock state (previous calculation)
- Returns:
Tuple containing
mix1 (struct): Properties of the mixture in the pre-detonation state
mix2_1 (struct): Properties of the mixture in the post-detonation state - weak detonation
mix2_2 (struct): Properties of the mixture in the post-detonation state - strong detonation
Examples
[mix1, mix2_1, mix2_2] = det_oblique_beta(self, self.PS.strR{1}, 2, 60)
[mix1, mix2_1, mix2_2] = det_oblique_beta(self, self.PS.strR{1}, 2, 60, self.PS.strP{1})
- det_oblique_theta(self, mix1, drive_factor, theta, varargin)#
Compute pre-shock and post-shock states of an oblique detonation wave given the deflection angle.
- Two solutions:
Weak detonation
Strong detonation
- Parameters:
self (
struct
) – Data of the mixture, conditions, and databasesmix1 (
struct
) – Properties of the mixture in the pre-shock statedrive_factor (
float
) – Drive factor [-]theta (
float
) – Deflection angle [deg]
- Optional Args:
mix2_1 (struct): Properties of the mixture in the post-shock state - weak detonation (previous calculation)
mix2_2 (struct): Properties of the mixture in the post-shock state - strong detonation (previous calculation)
- Returns:
Tuple containing
mix1 (struct): Properties of the mixture in the pre-detonation state
mix2_1 (struct): Properties of the mixture in the post-detonation state - weak detonation
mix2_2 (struct): Properties of the mixture in the post-detonation state - strong detonation
Examples
[mix1, mix2_1, mix2_2] = det_oblique_theta(self, self.PS.strR{1}, 2, 30)
[mix1, mix2_1, mix2_2] = det_oblique_theta(self, self.PS.strR{1}, 2, 30, self.PS.strP{1})
- det_overdriven(self, mix1, drive_factor, varargin)#
Compute pre-shock and post-shock states of an overdriven planar detonation
- Parameters:
self (
struct
) – Data of the mixture, conditions, and databasesmix1 (
struct
) – Properties of the mixture in the pre-shock statedrive_factor (
float
) – Overdriven factor [-]
- Optional Args:
mix2 (struct): Properties of the mixture in the post-shock state (previous calculation)
- Returns:
Tuple containing
mix1 (struct): Properties of the mixture in the pre-shock state
mix2 (struct): Properties of the mixture in the post-shock state
Examples
[mix1, mix2] = det_overdriven(self, mix1, 1.5)
[mix1, mix2] = det_overdriven(self, mix1, 1.5, mix2)
- det_polar(self, mix1, drive_factor, varargin)#
Compute detonation polar diagrams
- Parameters:
self (
struct
) – Data of the mixture, conditions, and databasesmix1 (
struct
) – Properties of the mixture in the pre-shock stateu1 (
float
) – Pre-shock velocity [m/s]
- Optional Args:
mix2 (struct): Properties of the mixture in the post-shock state (previous calculation)
- Returns:
Tuple containing
mix1 (struct): Properties of the mixture in the pre-shock state
mix2 (struct): Properties of the mixture at the post-shock state with the shock polar results
Examples
[mix1, mix2] = det_polar(self, mix1, 3000)
[mix1, mix2] = det_polar(self, mix1, 3000, mix2)
- det_underdriven(self, mix1, drive_factor, varargin)#
Compute pre-shock and post-shock states of an overdriven planar detonation
- Parameters:
self (
struct
) – Data of the mixture, conditions, and databasesmix1 (
struct
) – Properties of the mixture in the pre-shock statedrive_factor (
float
) – Underdriven factor [-]
- Optional Args:
mix2 (struct): Properties of the mixture in the post-shock state (previous calculation)
- Returns:
Tuple containing
mix1 (struct): Properties of the mixture in the pre-shock state
mix2 (struct): Properties of the mixture in the post-shock state
Examples
[mix1, mix2] = det_underdriven(self, mix1, 1.5)
[mix1, mix2] = det_underdriven(self, mix1, 1.5, mix2)
- shock_ideal_gas(gamma, M1)#
Compute jump conditions assuming a thermochemically frozen gas (calorically perfect gas)
- Parameters:
gamma (
float
) – Adiabatic index [-]M1 (
float
) – Pre-shock Mach number [-]
- Returns:
Tuple containing
R (float): Density ratio [-]
P (float): Pressure ratio [-]
T (float): Temperature ratio [-]
Gammas (float): Rankine-Hugoniot slope parameter [-]
M1 (float): Pre-shock Mach number [-]
Example
[R, P, T, Gammas, M1] = shock_ideal_gas(1.4, 2.0)
- shock_incident(self, mix1, u1, varargin)#
Compute pre-shock and post-shock states of a planar incident shock wave
This method is based on the method outlined in Gordon, S., & McBride, B. J. (1994). NASA reference publication, 1311.
- Parameters:
self (
struct
) – Data of the mixture, conditions, and databasesmix1 (
struct
) – Properties of the mixture in the pre-shock stateu1 (
float
) – Pre-shock velocity [m/s]
- Optional Args:
mix2 (struct): Properties of the mixture in the post-shock state (previous calculation)
- Returns:
Tuple containing
mix1 (struct): Properties of the mixture in the pre-shock state
mix2 (struct): Properties of the mixture in the post-shock state
Examples
[mix1, mix2] = shock_incident(self, mix1, u1)
[mix1, mix2] = shock_incident(self, mix1, u1, mix2)
- shock_incident_2(self, mix1, u1, varargin)#
Compute pre-shock and post-shock states of a planar incident shock wave
- Parameters:
self (
struct
) – Data of the mixture, conditions, and databasesmix1 (
struct
) – Properties of the mixture in the pre-shock stateu1 (
float
) – Pre-shock velocity [m/s]
- Optional Args:
mix2 (struct): Properties of the mixture in the post-shock state (previous calculation)
- Returns:
Tuple containing
mix1 (struct): Properties of the mixture in the pre-shock state
mix2 (struct): Properties of the mixture in the post-shock state
Examples
[mix1, mix2] = shock_incident_2(self, mix1, u1) [mix1, mix2] = shock_incident_2(self, mix1, u1, mix2)
- shock_oblique_beta(self, mix1, u1, beta, varargin)#
Compute pre-shock and post-shock states of an oblique shock wave given the wave angle (one solution)
- Parameters:
self (
struct
) – Data of the mixture, conditions, and databasesmix1 (
struct
) – Properties of the mixture in the pre-shock stateu1 (
float
) – Pre-shock velocity [m/s]beta (
float
) – Wave angle [deg] of the incident oblique shock
- Optional Args:
mix2 (struct): Properties of the mixture in the post-shock state (previous calculation)
- Returns:
Tuple containing
mix1 (struct): Properties of the mixture in the pre-shock state
mix2 (struct): Properties of the mixture at the post-shock state
Examples
[mix1, mix2] = shock_oblique_beta(self, mix1, u1, beta)
[mix1, mix2] = shock_oblique_beta(self, mix1, u1, beta, mix2)
- shock_oblique_reflected_theta(self, mix1, u2, theta, mix2, varargin)#
Compute pre-shock and post-shock states of an oblique reflected shock wave given the deflection angle.
- Two solutions:
Weak shock
Strong shock
- Parameters:
self (
struct
) – Data of the mixture, conditions, and databasesmix1 (
struct
) – Properties of the mixture in the pre-shock state of the incident shocku2 (
float
) – Post-shock velocity [m/s] of the incident shocktheta (
float
) – Deflection angle [deg]mix2 (
struct
) – Properties of the mixture in the post-shock state of the incident shock
- Optional Args:
mix5_1 (struct): Properties of the mixture in the post-shock state of the reflected shock - weak shock (previous calculation)
mix5_2 (struct): Properties of the mixture in the post-shock state of the reflected shock - strong shock (previous calculation)
- Returns:
Tuple containing
mix1 (struct): Properties of the mixture in the pre-shock state of the incident shock
mix2 (struct): Properties of the mixture in the post-shock state of the incident shock
mix5_1 (struct): Properties of the mixture in the post-shock state of the reflected shock - weak shock
mix5_2 (struct): Properties of the mixture in the post-shock state of the reflected shock - strong shock
Examples
[mix1, mix2, mix5_1, mix5_2] = shock_oblique_reflected_theta(self, mix1, u2, theta, mix2)
[mix1, mix2, mix5_1, mix5_2] = shock_oblique_reflected_theta(self, mix1, u2, theta, mix2, mix5_1, mix5_2)
- shock_oblique_theta(self, mix1, u1, theta, varargin)#
Compute pre-shock and post-shock states of an oblique shock wave given the deflection angle.
- Two solutions:
Weak shock
Strong shock
- Parameters:
self (
struct
) – Data of the mixture, conditions, and databasesmix1 (
struct
) – Properties of the mixture in the pre-shock stateu1 (
float
) – Pre-shock velocity [m/s]theta (
float
) – Deflection angle [deg]
- Optional Args:
mix2_1 (struct): Properties of the mixture in the post-shock state - weak shock (previous calculation)
mix2_2 (struct): Properties of the mixture in the post-shock state - strong shock (previous calculation)
- Returns:
Tuple containing
mix1 (struct): Properties of the mixture in the pre-shock state
mix2_1 (struct): Properties of the mixture in the post-shock state - weak shock
mix2_2 (struct): Properties of the mixture in the post-shock state - strong shock
Examples
[mix1, mix2_1, mix2_2] = shock_oblique_theta(self, mix1, u1, theta)
[mix1, mix2_1, mix2_2] = shock_oblique_theta(self, mix1, u1, theta, mix2_1, mix2_2)
- shock_polar(self, mix1, u1, varargin)#
Compute shock polar diagrams
- Parameters:
self (
struct
) – Data of the mixture, conditions, and databasesmix1 (
struct
) – Properties of the mixture in the pre-shock stateu1 (
float
) – Pre-shock velocity [m/s]
- Optional Args:
mix2 (struct): Properties of the mixture in the post-shock state (previous calculation)
- Returns:
Tuple containing
mix1 (struct): Properties of the mixture in the pre-shock state
mix2 (struct): Properties of the mixture at the post-shock state with the shock polar results
Examples
[mix1, mix2] = shock_polar(self, mix1, u1)
[mix1, mix2] = shock_polar(self, mix1, u1, mix2)
- shock_polar_limitRR(self, mix1, u1)#
Obtain polar curves for the given pre-shock conditions using Broyden’s method
- Parameters:
self (
struct
) – Data of the mixture, conditions, and databasesmix1 (
struct
) – Properties of the mixture in the pre-shock stateu1 (
float
) – Pre-shock velocity [m/s]
- Returns:
Tuple containing
mix1 (struct): Properties of the mixture in the pre-shock state
mix2 (struct): Properties of the mixture in the post-shock state - polar diagrams from mix1 (incident)
mix2_1 (struct): Properties of the mixture in the post-shock state - weak shock
mix3 (struct): Properties of the mixture in the post-shock state - polar diagrams from mix2_1 (reflected)
Example
[mix1, mix2, mix2_1, mix3] = shock_polar_limitRR(self, mix1, u1)
- shock_reflected(self, mix1, u1, mix2, varargin)#
Compute pre-shock and post-shock states of a planar reflected shock wave
This method is based on the method outlined in Gordon, S., & McBride, B. J. (1994). NASA reference publication, 1311.
- Parameters:
self (
struct
) – Data of the mixture, conditions, and databasesmix1 (
struct
) – Properties of the mixture in the pre-shock state of the incident shocku1 (
float
) – Pre-shock velocity [m/s]mix2 (
struct
) – Properties of the mixture at the post-shock state of the incident shock
- Optional Args:
mix5 (struct): Properties of the mixture in the post-shock state of the reflected shock (previous calculation)
- Returns:
Tuple containing
mix1 (struct): Properties of the mixture in the pre-shock state of the incident shock
mix2 (struct): Properties of the mixture at the post-shock state of the incident shock
mix5 (struct): Properties of the mixture in the post-shock state of the reflected shock
Examples
[mix1, mix2, mix5] = shock_reflected(self, mix1, u1, mix2)
[mix1, mix2, mix5] = shock_reflected(self, mix1, u1, mix2, mix5)