# CHAPTER09:OBLIGUE SHOCK AND EXPANSION WAVES¶

## Example E01 : Pg 302¶

In :
# All the quantities are expressed in SI units
import math
M = 2.;                    # mach number
h = 16000.;                   # altitude of the plane

# the mach angle can be calculated from eq.(9.1) as
mue = math.asin(1./M);          # mach angle

d = h/math.tan(mue);

print"The plane is ahead of the bystander by a distance of:\nd =",d/1000.,"km"

The plane is ahead of the bystander by a distance of:
d = 27.7128129211 km


## Example E02 : Pg 302¶

In :
# All the quantities are expressed in SI units
from math import pi, sin,cos
M1 = 2.;                               # mach number
p1 = 1.;                                # ambient pressure
T1 = 288.;                              # ambient temperature
theta = 20.*pi/180.;                   # flow deflection

# from figure 9.9, for M = 2, theta = 20
b = 53.4*pi/180.;                     # beta
Mn_1 = M1*sin(b);                     # upstream mach number normal to shock

# for this value of Mn,1 = 1.60, from Appendix B we have
Mn_2 = 0.6684;                        # downstream mach number normal to shock
M2 = Mn_2/sin(b-theta);               # mach number downstream of shock
p2 = 2.82*p1;
T2 = 1.388*T1;

# for M = 2, from appendix A we have
p0_2 = 0.8952*7.824*p1;
T0_1 = 1.8*T1;
T0_2 = T0_1;

print"M2 =",M2,"\np2 =",p2,"atm","\nT2 =",T2,"K","\np0,2 =",p0_2,"atm","\nT0,2 =",T0_2,"K"

M2 = 1.214211418
p2 = 2.82 atm
T2 = 399.744 K
p0,2 = 7.0040448 atm
T0,2 = 518.4 K


## Example E03 : Pg 305¶

In :
# All the quantities are expressed in SI units
from math import pi,sin
b = 30.*pi/180.;                        # oblique shock wave angle
M1 = 2.4;                              # upstream mach number

# from figure 9.9, for these value of M and beta, we have
theta = 6.5*pi/180.;

Mn_1 = M1*sin(b);                      # upstream mach number normal to shock

# from Appendix B
pressure_ratio = 1.513;
temperature_ratio = 1.128;
Mn_2 = 0.8422;

M2 = Mn_2/sin(b-theta);

print"theta =",theta*180./pi,"degrees","\np2/p1 =",pressure_ratio,"\nT2/T1 =",temperature_ratio,"\nM2 =",M2

theta = 6.5 degrees
p2/p1 = 1.513
T2/T1 = 1.128
M2 = 2.11210524521


## Example E04 : Pg 309¶

In :
# All the quantities are expressed in SI units
from math import pi,sin
b = 35.*pi/180.;                    # oblique shock wave angle
pressure_ratio = 3.;                # upstream and downstream pressure ratio

# from appendix B
Mn_1 = 1.64;
M1 = Mn_1/sin(b);

print"The upstream mach number is:\nM =",M1

The upstream mach number is:
M = 2.85925274482


## Example E05 : Pg 309¶

In :
# All the quantities are expressed in SI units
from math import pi,sin
M1 = 3.;
b = 40.*pi/180.;

# for case 1, for M = 3, from Appendix B, we have
p0_ratio_case1 = 0.3283;

# for case 2
Mn_1 = M1*sin(b);

# from Appendix B
p0_ratio1 = 0.7535;
Mn_2 = 0.588;

# from fig. 9.9, for M1 = 3 and beta = 40, we have
theta = 22.*pi/180.;
M2 = Mn_2/sin(b-theta);

# from appendix B for M = 1.9; we have
p0_ratio2 = 0.7674;
p0_ratio_case2 = p0_ratio1*p0_ratio2;

ratio = p0_ratio_case2/p0_ratio_case1;

print"Ans =",ratio

Ans = 1.76130338105


## Example E06 : Pg 310¶

In :
# All the quantities are expressed in SI units
from math import pi,sin,tan
M1 = 5.;
theta = 15.*pi/180.;
gam = 1.4;

# for these values of M and theta, from fig. 9.9
b = 24.2*pi/180;
Mn_1 = M1*sin(b);

# from Appendix B, for Mn,1 = 2.05, we have
p_ratio = 4.736;

# hence
c_d = 4.*tan(theta)/gam/(M1**2.)*(p_ratio-1.);

print"The drag coefficient is given by:\ncd =",c_d

The drag coefficient is given by:
cd = 0.114406649477


## Example E07 : Pg 311¶

In :
# All the quantities are expressed in SI units
from math import pi,sin,tan
M1 = 3.5;
theta1 = 10.*pi/180.;
gam = 1.4;
p1 = 101300.;
T1 = 288.;
b=1.;#
# for these values of M and theta, from fig. 9.9
b1 = 24.*pi/180.;
Mn_1 = M1*sin(b);

# from Appendix B, for Mn,1 = 2.05, we have
Mn_2 = 0.7157;
p_ratio1 = 2.32;
T_ratio1 = 1.294;
M2 = Mn_2/sin(b1-theta1);

# now
theta2 = 10.*pi/180.;

# from fig. 9.9
b2 = 27.3*pi/180.;
phi = b2 - theta2;

# from Appendix B
p_ratio2 = 1.991;
T_ratio2 = 1.229;
Mn_3 = 0.7572;
M3 = Mn_3/sin(b2-theta2);

# thus
p3 = p_ratio1*p_ratio2*p1;
T3 = T_ratio1*T_ratio2*T1;

print"p3 =",p3/1e5,"x 10**5 N/m2","\nT3 =",T3,"K"

p3 = 4.67916856 x 10**5 N/m2
T3 = 458.013888 K


## Example E08 : Pg 312¶

In :
# All the quantities are expressed in SI units
from math import pi,sin,tan
M1 = 1.5;                        # upstream mach number
theta = 15.*pi/180.;              # deflection angle
p1 = 1.;                          # ambient pressure in atm
T1 = 288.;                        # ambient temperature

# from appendix C, for M1 = 1.5 we have
v1 = 11.91*pi/180.;

# from eq.(9.43)
v2 = v1 + theta;

# for this value of v2, from appendix C
M2 = 2.;

# from Appendix A for M1 = 1.5 and M2 = 2.0, we have
p2 = 1./7.824*1.*3.671*p1;
T2 = 1./1.8*1.*1.45*T1;
p0_1 = 3.671*p1;
p0_2 = p0_1;
T0_1 = 1.45*T1;
T0_2 = T0_1;

# from fig. 9.25, we have
fml = 41.81;                    # Angle of forward Mach line
rml = 30. - 15.;                  # Angle of rear Mach line

print"p2 =",p2,"atm","\nT2 =",T2,"K","\np0,2 =",p0_2,"atm","\nT0,2 =",T0_2,"K","\nAngle of forward Mach line =",fml,"degrees","\nAngle of rear Mach line =",rml,"degrees"

p2 = 0.469197341513 atm
T2 = 232.0 K
p0,2 = 3.671 atm
T0,2 = 417.6 K
Angle of forward Mach line = 41.81 degrees
Angle of rear Mach line = 15.0 degrees


## Example E09 : Pg 312¶

In :
# All the quantities are expressed in SI units
from math import pi
M1 = 10.;                        # upstream mach number
theta = 15.*pi/180.;              # deflection angle
p1 = 1.;                          # ambient pressure in atm
# from appendix C, for M1 = 10 we have
v1 = 102.3*pi/180.;
# in region 2
v2 = v1 - theta;
# for this value of v2, from appendix C
M2 = 6.4;
# from Appendix A for M1 = 10 and M2 = 6.4, we have
p2 = 1./(2355.)*1.*42440.*p1;
print"M2 =",M2,"\np2 =",p2,"atm"

M2 = 6.4
p2 = 18.0212314225 atm


## Example E10 : Pg 315¶

In :
# All the quantities are expressed in SI units
import math
M1 = 10;                        # upstream mach number
theta = 15*math.pi/180;              # deflection angle
p1 = 1;                          # ambient pressure in atm

# from fig 9.9, for M1 = 10 and theta = 15 we have
b = 20*math.pi/180;
Mn_1 = M1*math.sin(b);

# from Appendix B, for Mn,1 = 3.42
Mn_2 = 0.4552;
M2 = Mn_2/math.sin(b-theta);
p2 = 13.32*p1;

# from Appendix A, for M1 = 10
p0_2 = 0.2322*42440*p1;

print"M2 =",M2,"\np2 =",p2,"atm","\np0,2 =",p0_2/1e3,"x 10**3 atm"

M2 = 5.22283426943
p2 = 13.32 atm
p0,2 = 9.854568 x 10**3 atm


## Example E11 : Pg 316¶

In :
# All the quantities are expressed in SI units
import math
M1 = 3.;                        # upstream mach number
theta = 5.*math.pi/180.;             # deflection angle
alpha = theta;                 # angle of attack
gam = 1.4;

# from appendix C, for M1 = 3 we have
v1 = 49.76*math.pi/180.;

# from eq.(9.43)
v2 = v1 + theta;

# for this value of v2, from appendix C
M2 = 3.27;

# from Appendix A for M1 = 3 and M2 = 3.27, we have
p_ratio1 = 36.73/55.;

# from fig. 9.9, for M1 = 3 and theta = 5
b = 23.1*math.pi/180.;
Mn_1 = M1*math.sin(b);

# from Appendix B
p_ratio2 = 1.458;

# thus
c_l = 2./gam/(M1**2.)*(p_ratio2-p_ratio1)*math.cos(alpha);

c_d = 2./gam/(M1**2.)*(p_ratio2-p_ratio1)*math.sin(alpha);

print"The lift and drag coefficients are given by:\ncl =",c_l,"\ncd =",c_d

The lift and drag coefficients are given by:
cl = 0.124948402826
cd = 0.0109315687729