def gg_dump_isp(p_o, p_te, p_ne, T_o, eta, gamma, c_p, m_molar): '''Get the specific impulse of a Gas Generator turbine exhaust dump. Arguments: p_o: turbine inlet stagnation pressure [units: pascal]. p_te: turbine exit pressure [units: pascal]. p_ne: Dump nozzle exit pressure [units: pascal]. T_o: turbine inlet stagnation temperature [units: kelvin]. eta: turbine efficiency. gamma: working gas ratio of specific heats [units: none]. c_p: working gas heat capacity at const pressure [units: joule kilogram**-1 kelvin**-1]. m_molar: working gas molar mass [units: kilogram mole**-1]. ''' T_te = turbine_exit_temperature(p_o, p_te, T_o, eta, gamma, c_p) # Dump nozzle thrust coefficient and characteristic velocity. # Assume optimal expansion. C_f = nozzle.thrust_coef(p_c=p_te, p_e=p_ne, gamma=gamma) c_star = nozzle.c_star(gamma=gamma, m_molar=m_molar, T_c=T_te) # Dump nozzle specific impulse [units: second] Isp = c_star * C_f / 9.81 return Isp
def burn_and_throat_area(F, p_c, p_e, a, n, rho_solid, c_star, gamma): """Given thrust and chamber pressure, and propellant properties, find the burn area and throat area. Assumes that the exit pressure is matched (:math:`p_e = p_a`). Arguments: F (scalar): Thrust force [units: newton]. p_c (scalar): Chamber pressure [units: pascal]. p_e (scalar): Nozzle exit pressure [units: pascal]. a (scalar): Propellant burn rate coefficient [units: meter second**-1 pascal**-n]. n (scalar): Propellant burn rate exponent [units: none]. rho_solid (scalar): Solid propellant density [units: kilogram meter**-3]. c_star (scalar): Propellant combustion characteristic velocity [units: meter second**-1]. gamma (scalar): Exhaust gas ratio of specific heats [units: dimensionless]. Returns: tuple: tuple containing: A_b (scalar): Burn area [units: meter**2]. A_t (scalar): Throat area [units: meter**2]. """ C_F = nozzle.thrust_coef(p_c, p_e, gamma) A_t = F / (C_F * p_c) A_b = A_t * burn_area_ratio(p_c, a, n, rho_solid, c_star) return (A_b, A_t)
def test_hh_1_3(self): """Test against example problem 1-3 from Huzel and Huang.""" # Inputs T_c = 3633 # = 6540 R p_c = 6.895e6 # = 1000 psia p_e = 67.9e3 # = 9.85 psia p_a = 101e3 # = 14.7 psia m_molar = 22.67e-3 gamma = 1.2 er = 12 # Correct results from Huzel and Huang C_F_hh = 1.5918 C_F = nozzle.thrust_coef(p_c, p_e, gamma, p_a, er) self.assertTrue(abs(C_F - C_F_hh) < 0.01)
"""Estimate specific impulse, thrust and mass flow.""" from math import pi from proptools import nozzle # Declare engine design parameters p_c = 10e6 # Chamber pressure [units: pascal] p_e = 100e3 # Exit pressure [units: pascal] gamma = 1.2 # Exhaust heat capacity ratio [units: dimensionless] m_molar = 20e-3 # Exhaust molar mass [units: kilogram mole**1] T_c = 3000. # Chamber temperature [units: kelvin] A_t = pi * (0.1 / 2)**2 # Throat area [units: meter**2] # Predict engine performance C_f = nozzle.thrust_coef(p_c, p_e, gamma) # Thrust coefficient [units: dimensionless] c_star = nozzle.c_star( gamma, m_molar, T_c) # Characteristic velocity [units: meter second**-1] I_sp = C_f * c_star / nozzle.g # Specific impulse [units: second] F = A_t * p_c * C_f # Thrust [units: newton] m_dot = A_t * p_c / c_star # Propellant mass flow [units: kilogram second**-1] print 'Specific impulse = {:.1f} s'.format(I_sp) print 'Thrust = {:.1f} kN'.format(F * 1e-3) print 'Mass flow = {:.1f} kg s**-1'.format(m_dot)
from matplotlib import pyplot as plt import skaero.atmosphere.coesa as atmo from proptools import nozzle p_c = 10e6 # Chamber pressure [units: pascal] gamma = 1.2 # Exhaust heat capacity ratio [units: dimensionless] p_e_1 = 100e3 # Nozzle exit pressure, 1st stage [units: pascal] exp_ratio_1 = nozzle.er_from_p(p_c, p_e_1, gamma) # Nozzle expansion ratio [units: dimensionless] p_e_2 = 15e3 # Nozzle exit pressure, 2nd stage [units: pascal] exp_ratio_2 = nozzle.er_from_p(p_c, p_e_2, gamma) # Nozzle expansion ratio [units: dimensionless] alt = np.linspace(0, 84e3) # Altitude [units: meter] p_a = atmo.pressure(alt) # Ambient pressure [units: pascal] # Compute the thrust coeffieicient of the fixed-area nozzle, 1st stage [units: dimensionless] C_F_fixed_1 = nozzle.thrust_coef(p_c, p_e_1, gamma, p_a=p_a, er=exp_ratio_1) # Compute the thrust coeffieicient of the fixed-area nozzle, 2nd stage [units: dimensionless] C_F_fixed_2 = nozzle.thrust_coef(p_c, p_e_2, gamma, p_a=p_a, er=exp_ratio_2) # Compute the thrust coeffieicient of a variable-area matched nozzle [units: dimensionless] C_F_matched = nozzle.thrust_coef(p_c, p_a, gamma) plt.plot(alt * 1e-3, C_F_fixed_1, label='1st stage $\\epsilon_1 = {:.1f}$'.format(exp_ratio_1)) plt.plot(alt[0.4 * p_a < p_e_2] * 1e-3, C_F_fixed_2[0.4 * p_a < p_e_2], label='2nd stage $\\epsilon_2 = {:.1f}$'.format(exp_ratio_2)) plt.plot(alt * 1e-3, C_F_matched, label='matched', color='grey', linestyle=':') plt.xlabel('Altitude [km]') plt.ylabel('Thrust coefficient $C_F$ [-]') plt.title('Effect of altitude on nozzle performance') plt.legend()
"""Estimate specific impulse, thrust and mass flow.""" from math import pi from proptools import nozzle # Declare engine design parameters p_c = 10e6 # Chamber pressure [units: pascal] p_e = 100e3 # Exit pressure [units: pascal] gamma = 1.2 # Exhaust heat capacity ratio [units: dimensionless] m_molar = 20e-3 # Exhaust molar mass [units: kilogram mole**1] T_c = 3000. # Chamber temperature [units: kelvin] A_t = pi * (0.1 / 2)**2 # Throat area [units: meter**2] # Predict engine performance C_f = nozzle.thrust_coef(p_c, p_e, gamma) # Thrust coefficient [units: dimensionless] c_star = nozzle.c_star(gamma, m_molar, T_c) # Characteristic velocity [units: meter second**-1] I_sp = C_f * c_star / nozzle.g # Specific impulse [units: second] F = A_t * p_c * C_f # Thrust [units: newton] m_dot = A_t * p_c / c_star # Propellant mass flow [units: kilogram second**-1] print 'Specific impulse = {:.1f} s'.format(I_sp) print 'Thrust = {:.1f} kN'.format(F * 1e-3) print 'Mass flow = {:.1f} kg s**-1'.format(m_dot)
"""Effect of expansion ratio on thrust coefficient.""" import numpy as np from matplotlib import pyplot as plt from proptools import nozzle p_c = 10e6 # Chamber pressure [units: pascal] p_a = 100e3 # Ambient pressure [units: pascal] gamma = 1.2 # Exhaust heat capacity ratio [units: dimensionless] p_e = np.linspace(0.4 * p_a, 2 * p_a) # Exit pressure [units: pascal] # Compute the expansion ratio and thrust coefficient for each p_e exp_ratio = nozzle.er_from_p(p_c, p_e, gamma) C_F = nozzle.thrust_coef(p_c, p_e, gamma, p_a=p_a, er=exp_ratio) # Compute the matched (p_e = p_a) expansion ratio exp_ratio_matched = nozzle.er_from_p(p_c, p_a, gamma) plt.plot(exp_ratio, C_F) plt.axvline(x=exp_ratio_matched, color='grey') plt.annotate('matched $p_e = p_a$, $\epsilon = {:.1f}$'.format(exp_ratio_matched), xy=(exp_ratio_matched - 0.7, 1.62), xytext=(exp_ratio_matched - 0.7, 1.62), color='black', fontsize=10, rotation=90 ) plt.xlabel('Expansion ratio $\\epsilon = A_e / A_t$ [-]') plt.ylabel('Thrust coefficient $C_F$ [-]') plt.title('$C_F$ vs expansion ratio at $p_c = {:.0f}$ MPa, $p_a = {:.0f}$ kPa'.format( p_c *1e-6, p_a * 1e-3)) plt.show()
"""Effect of expansion ratio on thrust coefficient.""" import numpy as np from matplotlib import pyplot as plt from proptools import nozzle p_c = 10e6 # Chamber pressure [units: pascal] p_a = 100e3 # Ambient pressure [units: pascal] gamma = 1.2 # Exhaust heat capacity ratio [units: dimensionless] p_e = np.linspace(0.4 * p_a, 2 * p_a) # Exit pressure [units: pascal] # Compute the expansion ratio and thrust coefficient for each p_e exp_ratio = nozzle.er_from_p(p_c, p_e, gamma) C_F = nozzle.thrust_coef(p_c, p_e, gamma, p_a=p_a, er=exp_ratio) # Compute the matched (p_e = p_a) expansion ratio exp_ratio_matched = nozzle.er_from_p(p_c, p_a, gamma) plt.plot(exp_ratio, C_F) plt.axvline(x=exp_ratio_matched, color='grey') plt.annotate( 'matched $p_e = p_a$, $\epsilon = {:.1f}$'.format(exp_ratio_matched), xy=(exp_ratio_matched - 0.7, 1.62), xytext=(exp_ratio_matched - 0.7, 1.62), color='black', fontsize=10, rotation=90) plt.xlabel('Expansion ratio $\\epsilon = A_e / A_t$ [-]') plt.ylabel('Thrust coefficient $C_F$ [-]') plt.title('$C_F$ vs expansion ratio at $p_c = {:.0f}$ MPa, $p_a = {:.0f}$ kPa'. format(p_c * 1e-6, p_a * 1e-3)) plt.show()