RocketIsp Code Functions

Thruster

Geometry

class rocketisp.geometry.Geometry(Rthrt=1, CR=2.5, eps=20, pcentBell=80, LnozInp=None, RupThroat=1.5, RdwnThroat=1.0, RchmConv=1.0, cham_conv_deg=30, LchmOvrDt=3.0, LchmMin=1.0, LchamberInp=None)

The Geometry object holds all the major thrust chamber geometry values.

Parameters
  • Rthrt (float) – in, throat radius

  • CR (float) – chamber contraction ratio (Ainj / Athroat)

  • eps (float) – nozzle area ratio (Aexit / Athroat)

  • pcentBell (float) – nozzle percent bell (Lnoz / L_15deg_cone)

  • LnozInp (float) – in, user input nozzle length (will override pcentBell)

  • RupThroat (float) – radius of curvature just upstream of throat (Rupstream / Rthrt)

  • RdwnThroat (float) – radius of curvature just downstream of throat (Rdownstream / Rthrt)

  • RchmConv (float) – radius of curvature at start of convergent section (Rconv / Rthrt)

  • cham_conv_deg (float) – deg, half angle of conical convergent section

  • LchmOvrDt (float) – ratio of chamber length to throat diameter (Lcham / Dthrt)

  • LchmMin (float) – in, minimum chamber length (will override LchmOvrDt)

  • LchamberInp (float) – in, user input value of chamber length (will override all other entries)

Returns

Geometry object

Return type

Geometry

Variables
  • At – in**2, throat area

  • Lnoz – in, nozzle length

  • Ltotal – in, nozzle + chamber length

  • Rinj – in, radius of injector

  • Dinj – in, diameter of injector

  • Ainj – in**2, area of injector

  • Lcham_cyl – in, length of cylindrical section of chamber

  • Lcham_conv – in, length of convergent section of chamber

  • Vcham – in**3, approximate chamber volume

LprimeOvRcham()

return chamber length / chamber radius

evaluate()

Uses basic geometry input values to determine derived geometry values. (for example, throat area, nozzle length, injector area, etc.)

getNozObj()

Create and return a Nozzle object.

get_attr_comment(name)

Some attributes may have comments associated with them

get_model_summ_obj()

return ModelSummary object for current state of Geometry instance.

get_summ_str(alpha_ordered=True, numbered=False, add_trailer=True, fillchar='.', max_banner=76, intro_str='')

return string of the current state of Geometry instance.

reset_attr(name, value, re_evaluate=True)

Resets Geometry object attribute by name if that attribute already exists.

summ_print()

print to standard output, the current state of Geometry instance.

rocketisp.geometry.maybe_show_ft(val)

If input inches > 12, return string with feet units.

rocketisp.geometry.solidCylVol(D, L)

calculates a cylinder volume

rocketisp.geometry.solidFrustrumVol(D1, D2, h)

calculates cone frustrum

Nozzle

class rocketisp.nozzle.nozzle.Nozzle(CR=2.5, eps=16.0, pcentBell=80.0, Rt=1.5, Nsegs=20, Rup=2.0, Rd=1.0, cham_conv_ang=30.0, Rc=1.0, theta=None, exitAng=None, forceCone=0, use_huzel_angles=False)

Nozzle contour object holds both a dimensionless and absolute dimension representation of the nozzle. It includes interpolators for entire contour.

Parameters
  • CR (float) – contraction ratio of chamber (Ainj / Athroat)

  • eps (float) – nozzle area ratio (Aexit / Athroat)

  • pcentBell (float) – nozzle percent bell (Lnoz / L_15deg_cone)

  • Rt (float) – in, throat radius

  • Nsegs (int) – number of segments to hold in array of nozzle contour

  • Rup (float) – radius of curvature just upstream of throat (Rupstream / Rthroat)

  • Rd (float) – radius of curvature just downstream of throat (Rdownstream / Rthroat)

  • cham_conv_ang (float) – deg, half angle of convergent section of chamber

  • Rc (float) – radius of curvature at start of convergent section (Rconvergent / Rthroat)

  • theta (float) – deg, entrance angle of nozzle (tangent to Rd circular curve)

  • exitAng (float) – deg, exit angle of nozzle

  • forceCone (bool) – flag to force nozzle to be a conical nozzle instead of bell nozzle.

  • use_huzel_angles (bool) – flag to force use of Huzel entrance and exit angle correlation

Returns

Nozzle object

Return type

Nozzle

get_conv_zL_epsL()

Returns 2 lists for the convergent contour, the z contour and the area ratio contour starting at the injector and going to the throat, but NOT including Throat

get_div_zL_epsL()

Returns 2 lists for the divergent nozzle contour, the z contour and the area ratio contour starting at the throat and going to the nozzle exit, but NOT including Throat

set_abs_Rt(Rt)

Use throat radius to create an absolute contour from the dimensionless contour.

z_range()

return (zmin, zmax)

rocketisp.nozzle.nozzle.ref_nozzle(Rup=2.0, Rd=1.0, eps=16.0, theta=30.0, alphaExit=10.0, pcBell=80.0, Nsegs=30, forceCone=0, cham_conv_ang=30.0, Rc=1.0, CR=2.5)

DIMENSIONLESS Parabolic Nozzle Contour (Rthroat = 1.0)

Efficiencies

class rocketisp.efficiencies.Efficiencies(**constD)

Holds all of the thrust chamber efficiencies and provides access to efficiency models in order to update each one.

evaluate()

Combines nozzle and chamber efficiencies into overall nozzle and over chamber efficiency. Gives overall Isp efficiency including any pulsing effects.

get_model_summ_obj()

return ModelSummary object for current state of Efficiencies instance.

get_state_str_list()

Return a list of | delimited state strings for each Efficiency

get_summ_str()

return string of the current state of Efficiencies instance.

set_const(name, value, re_evaluate=True)

Give a new constant value to named efficiency. Call evaluate if re_evaluate is True.

set_value(name, value, value_src='user input', re_evaluate=True)

Give a new value to named efficiency. Call evaluate if re_evaluate is True.

summ_print()

print to standard output, the current state of Efficiencies instance.

class rocketisp.efficiencies.Efficiency(name, value, desc, value_src)

Holds an individual efficiency that is coordinated by the Efficiencies object.

Parameters
  • name (str) – name of efficiency (e.g. Div, BL, Kin, etc)

  • value (float) – initial value of efficiency (should be between 0.0 and 1.0)

  • desc (str) – long description of efficiency

  • value_src (str) – technical source of the efficiency (e.g. user input, NASA model, etc.)

Returns

Efficiency object

Return type

Efficiency

get_state_str()

Return a | delimited state string.

set_value(value, value_src)

Every time a new value is set, the source of that value must be given.

Stream Tubes

Injector

class rocketisp.injector.Injector(coreObj, Tox=None, Tfuel=None, elemEm=0.8, fdPinjOx=0.25, fdPinjFuel=0.25, dpOxInp=None, dpFuelInp=None, setNelementsBy='acoustics', elemDensInp=5, NelementsInp=100, OxOrfPerEl=1.0, FuelOrfPerEl=1.0, lolFuelElem=False, setAcousticFreqBy='mode', desAcousMode='3T', desFreqInp=5000, CdOxOrf=0.75, CdFuelOrf=0.75, dropCorrOx=0.33, dropCorrFuel=0.33, DorfMin=0.008, LfanOvDorfOx=20.0, LfanOvDorfFuel=20.0)

Injector object holds basic information about the injector. Injector design features are calculated including chamber losses due to the injector, Em, Mix and Vap.

Parameters
  • coreObj (CoreStream) – CoreStream object

  • Tox (None or float) – degR, temperature of oxidizer

  • Tfuel (None or float) – degR, temperature of fuel

  • elemEm (float) – intra-element Rupe mixing factor (0.7 below ave, 0.8 ave, 0.9 above ave)

  • fdPinjOx (float) – fraction of Pc used as oxidizer injector pressure drop

  • fdPinjFuel (float) – fraction of Pc used as fuel injector pressure drop

  • dpOxInp (None or float) – psia,input value of injector pressure drop for oxidizer (overrides fdPinjOx)

  • dpFuelInp (None or float) – psia,input value of injector pressure drop for fuel (overrides fdPinjFuel)

  • setNelementsBy (str) – flag determines how to calculate number of elements ( “acoustics”, “elem_density”, “input”)

  • elemDensInp (float) – elem/in**2, input value for element density (setNelementsBy == “elem_density”)

  • NelementsInp (float) – input value for number of elements (setNelementsBy == “input”)

  • OxOrfPerEl (float) – number of oxidizer orifices per element

  • FuelOrfPerEl (float) – number of fuel orifices per element

  • lolFuelElem (bool) – flag for like-on-like fuel element (determines strouhal multiplier)

  • setAcousticFreqBy (str) – flag indicating how to determine design frequency. (can be “mode” or “freq”)

  • desAcousMode (str or float) – driving acoustic mode of injector OR acoustic mode multiplier (setNelementsBy==”acoustics” and setAcousticFreqBy==”mode”)

  • desFreqInp (None or float) – Hz, driving acoustic frequency of injector (sets D/V if setNelementsBy==”acoustics” and setAcousticFreqBy==”freq”)

  • CdOxOrf (float) – flow coefficient of oxidizer orifices

  • CdFuelOrf (float) – flow coefficient of fuel orifices

  • dropCorrOx (float) – oxidizer drop size multiplier (showerhead=3.0, like-doublet=1.0, vortex=0.5, unlike-doublet=0.33)

  • dropCorrFuel (float) – fuel drop size multiplier (showerhead=3.0, like-doublet=1.0, vortex=0.5, unlike-doublet=0.33)

  • DorfMin (float) – in, minimum orifice diameter (lower limit)

  • LfanOvDorfOx (float) – fan length / oxidizer orifice diameter

  • LfanOvDorfFuel (float) – fan length / fuel orifice diameter

Returns

Injector object

Return type

Injector

Variables
  • sgOx – g/ml, oxidizer density

  • dHvapOx – BTU/lbm, oxidizer heat of vaporization

  • surfOx – lbf/in, oxidizer surface tension

  • viscOx – poise, oxidizer viscosity

  • MolWtOx – g/gmole, oxidizer molecular weight

  • sgFuel – g/ml, fuel density

  • dHvapFuel – BTU/lbm, fuel heat of vaporization

  • surfFuel – lbf/in, fuel surface tension

  • viscFuel – poise, fuel viscosity

  • MolWtFuel – g/gmole, fuel molecular weight

  • dpOx – psid, oxidizer injector pressure drop

  • dpFuel – psid, fuel injector pressure drop

  • des_freq – Hz, chamber design acoustic frequency

  • DorfFlForHzLimit – in, fuel orifice Diameter for frequency in Hewitt Correlation

  • Nelements – number of elements on injector face

  • NFuelOrf – number of fuel orifices on injector face

  • NOxOrf – number of oxidizer orifices on injector face

  • elemDensCalc – elem/in**2, element density on injector face

  • NelemMakable – maximum number of makable elements giving correct flow rate (diam=DorfMin)

  • velOx_fps – ft/s, velocity of injected oxidizer

  • velFuel_fps – ft/s, velocity of injected fuel

  • AfloOx – in**2, total flow area of oxidizer

  • AfloFuel – in**2, total flow area of fuel

  • DorfOx – in, oxidizer orifice diameter

  • DorfFuel – in, fuel orifice diameter

calc_element_attr()

calc Nelements, injection velocities, elements diam, etc.

calculate_effEm()

calc intra-element mixing efficiency

calculate_effMix()

calc inter-element mixing efficiency

calculate_effVap()

calculate vaporization efficiency

evaluate(DOREVAL=False)

Calculates chamber losses due to the injector, Em, Mix and Vap.

get_closest_mode()

Get the name and frequency of the closest mode to des_freq

get_model_summ_obj()

return ModelSummary object for current state of Injector instance.

get_summ_str(show_core_stream=True, alpha_ordered=True, numbered=False, add_trailer=True, fillchar='.', max_banner=76, intro_str='')

return string of the current state of Injector instance.

summ_print(show_core_stream=True)

print to standard output, the current state of Injector instance.

rocketisp.injector.temperature_clamp(value, name, min_value, max_value)

Check to see if name is limited in range.