RocketProps Code Functions

RocketProps models liquid rocket propellants that are injected into liquid rocket chambers.

RocketProps calculates the various propellant properties required to analyze a liquid propellant thrust chamber. This includes density, viscosity, vapor pressure, heat of vaporization, surface tension, heat capacity and thermal conductivity. Other properties such as critical temperature and pressure, normal boiling point, molecular weight and freezing temperature are available.

RocketProps Copyright (C) 2020 Applied Python

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.


class rocketprops.rocket_prop.Prop(valueD=None)
set_std_state()

Set properties and standard state of Propellant

class rocketprops.rocket_prop.Propellant(name='MMH')

RocketProps models liquid rocket propellants that are injected into liquid rocket chambers.

:param name : name of propellant :type name : str :return: Propellant object :rtype: Propellant

CondAtTdegR(TdegR)

Given temperature in degR, return thermal conductivity of saturated liquid in BTU/hr-ft-R.

CondAtTr(Tr)

Given reduced temperature (Tr), return thermal conductivity of saturated liquid in BTU/hr-ft-R.

CpAtTdegR(TdegR)

Given temperature in degR, return Heat Capacity of saturated liquid in BTU/lbm-R.

CpAtTr(Tr)

Given reduced temperature (Tr), return heat capacity of saturated liquid in BTU/lbm-R.

HvapAtTdegR(TdegR)

Given temperature in degR, return heat of vaporization of saturated liquid in BTU/lbm.

HvapAtTr(Tr)

Given reduced temperature (Tr), return heat of vaporization of saturated liquid in BTU/lbm.

P_data_range()

Return tuple of pressure range, (Pmin, Pmax) in psia

PvapAtTdegR(TdegR)

Given temperature in degR, return saturation pressure in psia.

PvapAtTr(Tr)

Given reduced temperature (Tr), return vapor pressure of saturated liquid in psia.

SGLiqAtTdegR(TdegR)

Given temperature in degR, return specific gravity of saturated liquid in g/ml.

SGLiqAtTr(Tr)

Given reduced temperature (Tr), return specific gravity of saturated liquid in g/ml.

SGVapAtTdegR(TdegR)

Given temperature in degR, return specific gravity of Saturated Vapor in g/ml.

SGVapAtTr(Tr)

Given reduced temperature (Tr), return specific of Saturated Vapor in g/ml.

SG_compressed(TdegR, Ppsia)

Calculates compressed-liquid specific gravity, unless overridden, uses COSTALD since COSTALD matched non-alcohol REFPROP propellants best.

Parameters:
  • TdegR (float) – temperature in degR
  • Ppsia (float) – pressure in psia
Returns:

specific gravity at (TdegR, Ppsia) in g/ml

SG_compressedCOSTALD(TdegR, Ppsia)

Calculates compressed-liquid specific gravity, using the COSTALD CSP method.

This code is modified from thermo package: https://thermo.readthedocs.io/index.html

Parameters:
  • TdegR (float) – temperature in degR
  • Ppsia (float) – pressure in psia
Returns:

specific gravity at (TdegR, Ppsia) in g/ml

SG_compressedCZ1(TdegR, Ppsia)

Calculates compressed-liquid specific gravity, using the Chang Zhao method.

This code is derived from equation 4-12.3 in 5th Ed. of Gases and Liquids.

Parameters:
  • TdegR (float) – temperature in degR
  • Ppsia (float) – pressure in psia
Returns:

specific gravity at (TdegR, Ppsia) in g/ml

SG_compressedCZ2(TdegR, Ppsia)

Calculates compressed-liquid specific gravity, using the Chang Zhao method as modified in Journal of Molecular Liquids 160 (2011) 94-102

Parameters:
  • TdegR (float) – temperature in degR
  • Ppsia (float) – pressure in psia
Returns:

specific gravity at (TdegR, Ppsia) in g/ml

SG_compressedNasrfar(TdegR, Ppsia)

Calculates compressed-liquid specific gravity, using the Nasrfar Moshfeghian method from Journal of Molecular Liquids 160 (2011) 94-102

Parameters:
  • TdegR (float) – temperature in degR
  • Ppsia (float) – pressure in psia
Returns:

specific gravity at (TdegR, Ppsia) in g/ml

SGc

Return critical specific gravity.

SurfAtTdegR(TdegR)

Given temperature in degR, return surface tension of saturated liquid in lbf/in.

SurfAtTr(Tr)

Given reduced temperature (Tr), return surface tension of saturated liquid in lbf/in.

TAtTr(Tr)

Given reduced temperature, return absolute temperature in degR.

T_data_range()

Return tuple of temperature range, (Tmin, Tmax) in degR

TdegRAtPsat(Psat)

Given saturation pressure in psia, solve for saturation temperature in degR

TrAtT(T)

Given temperature, return reduced temperature.

Tr_data_range()

Return tuple of reduced temperature range, (Trmin, Trmax)

ViscAtTdegR(TdegR)

Given temperature in degR, return viscosity of saturated liquid in poise.

ViscAtTr(Tr)

Given reduced temperature (Tr), return viscosity of saturated liquid in poise.

Visc_compressed(TdegR, Ppsia)

Adjusts viscosity of a liquid for high pressure using an empirical formula developed by Lucas.

This code is modified from thermo package: https://thermo.readthedocs.io/ also see: equation 9-9.1 in 5th Ed. of Gases and Liquids.

Parameters:
  • TdegR (float) – temperature in degR
  • Ppsia (float) – pressure in psia
Returns:

viscosity at (TdegR, Ppsia) in poise

ZLiqAtTdegR(TdegR)

Given temperature in degR, return compressibility of saturated liquid.

ZLiqAtTr(Tr)

Given reduced temperature (Tr), return compressibility of saturated liquid.

ZVapAtTdegR(TdegR)

Given temperature in degR, return compressibility of Saturated Vapor.

ZVapAtTr(Tr)

Given reduced temperature (Tr), return compressibility of Saturated Vapor.

plot_sat_props(save_figures=False, show_plot=True)

Create and launch matplotlib plots of all saturation properties.

summ_print()

Print a summary of the Propellant object.

rocketprops.rocket_prop.build_mixture(prop_name='')

Build a mixture of MMH + N2H4 (e.g. M20), N2O4 + NO (e.g. MON25) or LOX + F2 (e.g. FLOX70)

Args:

Returns: Propellant object of mixture

rocketprops.rocket_prop.get_prop(name, suppress_warning=False)

Return a Propellant object for the named propellant.

Parameters:
  • name (string) – name of propellant (for example “N2O4” or “LOX”)
  • suppress_warning (boolean) – if True, then do not print warnings.
Returns:

Propellant object for named propellant

Return type:

Propellant

rocketprops.rocket_prop.solve_Tnbp(tL, pvapL)

Given Temperature list, tL and Vapor Pressure list, pvapL, solve for Tnbp tL = temperature list, degR pvapL = vapor pressure list, psia Return: Tnbp = normal boiling point, degR

Tank Support

rocketprops.tank_supt.calc_tank_volume(pObj, kg_expelled=50.0, TmaxC=50.0, expPcent=98.0, ullPcent=3.0)

Calculate the volume of a propellant tank given operating requirements.

Parameters:
  • pObj (Propellant) – propellant object
  • kg_expelled (float) – mass of expelled propellant in kg
  • TmaxC (float) – max operating/storage/transport temperature in deg C
  • expPcent (float) – expulsion efficiency in percent
  • ullPcent (float) – percent of total tank volume that is ullage at TmaxC
Returns:

(volume of tank (ml), loaded propellant mass (kg), residual propellant mass (kg))

Return type:

(float, float, float)

Line Support

rocketprops.line_supt.calc_line_id_dp(pObj, TdegR=530.0, Ppsia=1000.0, wdotPPS=0.5, velFPS=13.0, roughness=5e-06, Kfactors=2.0, len_inches=50.0)

Calculate the inner diameter and pressure drop in propellant line.

Parameters:
  • pObj (Propellant) – propellant object
  • TdegR (float) – temperature of propellant, degR
  • Ppsia (float) – inlet pressure to orifice, psia
  • wdotPPS (float) – mass flow rate in line, lbm/sec
  • velFPS (float) – velocity of liquid in line, ft/sec
  • roughness (float) – line roughness, inches
  • Kfactors (float) – number of velocity heads lost due to bends, valves, etc.
  • len_inches (float) – length of line, inches
Returns:

tuple of inside diameter and pressure drop (dinsid, deltaP), (inch, psid)

Return type:

(float, float)

rocketprops.line_supt.calc_line_vel_dp(pObj, TdegR=530.0, Ppsia=1000.0, wdotPPS=0.5, IDinches=0.335, roughness=5e-06, Kfactors=2.0, len_inches=50.0)

Calculate the line velocity and pressure drop in propellant line.

Parameters:
  • pObj (Propellant) – propellant object
  • TdegR (float) – temperature of propellant, degR
  • Ppsia (float) – inlet pressure to orifice, psia
  • wdotPPS (float) – mass flow rate in line, lbm/sec
  • IDinches – inside diameter of line, in
  • roughness (float) – line roughness, inches
  • Kfactors (float) – number of velocity heads lost due to bends, valves, etc.
  • len_inches (float) – length of line, inches
Returns:

tuple of velocity and pressure drop (velFPS, deltaP), (ft/s, psid)

Return type:

(float, float)

Injector Support

rocketprops.injector_supt.calc_inj_velocity(pObj, dPpsia=50.0, TdegR=530.0, Ppsia=1000.0)

Calculate the injection velocity of a propellant.

Parameters:
  • pObj (Propellant) – propellant object
  • dPpsia (float) – pressure drop across orifice, psid
  • TdegR (float) – temperature of propellant, degR
  • Ppsia (float) – inlet pressure to orifice, psia
Returns:

injection velocity, ft/sec

Return type:

float

rocketprops.injector_supt.calc_orifice_flow_rate(pObj, CdOrf=0.75, DiamInches=0.01, dPpsia=50.0, TdegR=530.0, Ppsia=1000.0)

Calculate mass flow rate through a single injector orifice.

Parameters:
  • pObj (Propellant) – propellant object
  • CdOrf (float) – discharge coefficient of orifice
  • DiamInches (float) – diameter of orifice, inch
  • dPpsia (float) – pressure drop across orifice, psid
  • TdegR (float) – temperature of propellant, degR
  • Ppsia (float) – inlet pressure to orifice, psia
Returns:

mass flow rate of single orifice, lbm/sec

Return type:

float

Valve Support

rocketprops.valve_supt.calib_valve_dp(pObj, wdotPPS=0.5, TdegR=530.0, Ppsia=1000.0, refWaterWdot=0.214, refWaterDP=30.0)

Calculate valve pressure drop for a valve that has been calibrated with a water flow test.

Parameters:
  • pObj (Propellant) – propellant object
  • wdotPPS (float) – propellant mass flow rate in line, lbm/sec
  • TdegR (float) – propellant temperature of propellant, degR
  • Ppsia (float) – propellant inlet pressure to valve, psia
  • refWaterWdot (float) – reference water flow rate, lbm/sec
  • refWaterDP (float) – reference water pressure drop, psid
Returns:

propellant pressure drop , psid

Return type:

float

rocketprops.valve_supt.cv_valve_dp(pObj, Cv=1.0, wdotPPS=0.5, TdegR=530.0, Ppsia=1000.0)

Calculate valve pressure drop for a valve with a known imperial flow coefficient, Cv.

Imperial flow coefficient (Cv) is the amount of water (in gallons per minute) at 60 degF that will flow through a fully open valve with a difference of 1 psi between the inlet and the outlet.

Parameters:
  • pObj (Propellant) – propellant object
  • Cv (float) – valve flow coefficient
  • wdotPPS (float) – propellant mass flow rate in line, lbm/sec
  • TdegR (float) – propellant temperature of propellant, degR
  • Ppsia (float) – propellant inlet pressure to valve, psia
Returns:

propellant pressure drop , psid

Return type:

float

rocketprops.valve_supt.kv_valve_dp(pObj, Kv=1.0, wdotPPS=0.5, TdegR=530.0, Ppsia=1000.0)

Calculate valve pressure drop for a valve with a known metric flow coefficient, Kv.

Metric flow coefficient (Kv) is the amount of water (in m**3/hr) at 4 degC that will flow through a fully open valve with a difference of 1 bar between the inlet and the outlet.

Parameters:
  • pObj (Propellant) – propellant object
  • Kv (float) – valve flow coefficient
  • wdotPPS (float) – propellant mass flow rate in line, lbm/sec
  • TdegR (float) – propellant temperature of propellant, degR
  • Ppsia (float) – propellant inlet pressure to valve, psia
Returns:

propellant pressure drop , psid

Return type:

float