Beispiel #1
0
# e) answers
print('stagnation pressure [bar]: ', p_0i)
Qm = u_e * rho_e * b * 2 * h_duct  #kg/s
print('massflow [kg/s]', Qm)
"""
2) compute M,p,p0 along the nozzle and the duct
"""

po_star = p_0_star_e
#a) nozzle
x = np.linspace(0, 120, 1000)
ones = np.ones(len(x))
h = np.zeros(len(x))
for i in range(len(h)):
    h[i] = nozzle_height(x[i]) / 1000
air_ratios = h_throat / h
Mx = useful.inv_air_ratio(air_ratios, 0.5 * np.ones(len(x)))
px = p_0i / ((1 + 0.2 * Mx**2)**(1.4 / 0.4))

np.savetxt("results\homework_a_nozzle.txt", np.stack((x, Mx, px, p_0i * ones)))
# fig, ax = plt.subplots()
# ax.set_title('a nozzle')
# ax.plot(x,Mx,'-b',label='M')
# ax.plot(x,px,'-r',label='p[bar]')
# ax.plot(x,p_0i*ones,'-c',label='p0[bar]')
# ax.legend()
# ax.grid()

#b) duct
x2 = np.linspace(0, l_duct, 1000)
Beispiel #2
0
l_nozzle = 0.12  # [m]
l_duct = 1.5  # [m]
xe = l_duct  # [m]
de = 2 * h_duct
dt = 0.006  # 6 [mm]
b = 0.05  # 50 [mm]
Dh_duct = 4 * h_duct * b / (b + 2 * h_duct)  # 4*A/P
p_a = 1.01325  # 1.01325[bar] = 1[atm]
T0 = 300  # [K]
# Gas = air (assuming air as a perfect gas)
gamma = 1.4
R = 287.1  # [J/kg/K]

p_e = p_a
x_sh = 0.07  # [m]
h_sh = nozzle_height(x_sh * 1000) / 1000  #[m]
"""
2) resolution de l exercice'
"""

# Throat conditions = sonic conditions
T_star = 2 * T0 / (gamma + 1)
c_star = np.sqrt(gamma * R * T_star)

# Shock relations :
#  -1- Isentropic between reservoir and sh1
#  -2- Isentropic between sh2 and end of the nozzle

#1) determiner les conditions juste avant le shock
M_sh1 = np.array([1.5])
air_ratio1 = h_throat / h_sh  #ratio between the throat and the first shock
Beispiel #3
0
import numpy as np
from nozzle import nozzle_height
import useful
from matplotlib import pyplot as plt

#données de base
# hello world
h_throat = 0.003 #3mm
h_duct = 0.0075 #7.5 mm
length_nozzle = 0.12
length_duct = 1.5#58.29722
d = 2*h_duct
b = 0.05 #50mm
Dh_duct = 4*h_duct*b/(b+2*h_duct) #4*A/perimeter
x_shock= 0.07
h_shock = nozzle_height(x_shock*1000)/1000 #[m]

p_a = 1.01325 #btm
gamma = 1.4
R=287.1 #J/kg/K
T0 = 300 #K

#b.1) Determine the  sonic conditions A_t = A*
T_star = T0/(gamma+1)*2
c_star = np.sqrt(gamma*R*T_star)

#b.2) determiner les conditions juste avant le shock
air_ratio1 = h_throat/h_shock #ratio between the throat and the first shock
M1 = useful.inv_air_ratio_sup(air_ratio1,np.array([1.5]))
T1 =  T0/(1+0.2*M1**2)
u1= M1*np.sqrt(1.4*R*T1)
Beispiel #4
0
l_nozzle = 0.12  # [m]
l_duct = 1.5  # [m]
xe = l_duct  # [m]
de = 2 * h_duct
dt = 0.006  # 6 [mm]
b = 0.05  # 50 [mm]
Dh_duct = 4 * h_duct * b / (b + 2 * h_duct)  # 4*A/P
p_a = 101325.0  # [Pa] = 1 [atm]
T0 = 300  # [K]
# Gas = air (assuming air as a perfect gas)
gamma = 1.4
R = 287.1  # [J/kg/K]

p_e = p_a
x_sh = 0.12  # [m]
h_sh = nozzle_height(x_sh * 1000) / 1000  #[m]

# Throat conditions
T_t = 2 * T0 / (gamma + 1)
T_star = T_t
c_t = np.sqrt(gamma * R * T_t)
u_t = c_t

# Shock relations :
#  -1- Isentropic between reservoir and sh1
#  -2- Isentropic between sh2 and end of the nozzle
M_sh1 = 1.5
M_sh1, error_M_sh1, iter_M_sh1 = fun.ratio_A_star_over_A_super(
    h_throat, h_sh, M_sh1)
print('M_sh1 = ', M_sh1)
T_sh1 = T0 / (1 + 0.5 * (gamma - 1) * M_sh1**2)
Beispiel #5
0
from nozzle import nozzle_height
import useful
from matplotlib import pyplot as plt
"""
données de base
"""

h_throat = 0.003  #3mm
h_duct = 0.0075  #7.5 mm
length_nozzle = 0.12
l_duct = 1.5  #58.29722
de = 2 * h_duct
b = 0.05  #50mm
Dh_duct = 4 * h_duct * b / (b + 2 * h_duct)  #4*A/perimeter
x_shock = 0.12
h_shock = nozzle_height(x_shock * 1000) / 1000  #[m]

pa = 1.01325  # 1 atm = 1.01325 bar
gamma = 1.4
R = 287.1  #J/kg/K
T0 = 300  #K

#1) Determine conditions at the throat = sonic conditions A_t = A*
T_star = T0 / (gamma + 1) * 2
c_star = np.sqrt(gamma * R * T_star)

# Shock relations :
#  -1- Isentropic between reservoir and sh1
#  -2- Isentropic between sh2 and end of the nozzle
#2) determiner les conditions juste avant le shock
air_ratio = h_throat / h_shock  #ratio between the throat and the first shock