STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
engine.layerx.flight.InlineAscent Class Reference

Public Member Functions

None __init__ (self, *, float mass_kg, float reference_area_m2, float nozzle_exit_area_m2, float elevation_m, Optional[float] reference_pressure_pa, Any drag=None, float dt_max=0.01)
"InlineAscent" from_config (cls, Any config, float liftoff_mass_kg, float ambient_pa, *, Any drag=None, float dt_max=0.01)
float specific_force (self)
bool held (self)
float advance (self, float t, float thrust_N, float mdot_kg_s)

Public Attributes

 A_ref = float(reference_area_m2)
 A_e = float(nozzle_exit_area_m2)
 elevation = float(elevation_m)
 p_ref = None if reference_pressure_pa is None else float(reference_pressure_pa)
 dt_max = float(dt_max)
 drag = drag
Optional[float] t = None
float z = 0.0
float v = 0.0
float m = float(mass_kg)
float thrust = 0.0
float mdot = 0.0
Optional[float] liftoff_time_s = None
 held

Protected Member Functions

Tuple[float, bool] _specific (self, float z, float v, float m, float thrust)
Tuple[float, float, float] _rhs (self, float z, float v, float m, float thrust, float mdot)
None _integrate (self, float t0, float t1, float f0, float f1, float md0, float md1)

Protected Attributes

 _isa = isa_troposphere
 _mach = np.asarray(drag.mach, dtype=float)
 _cd_on = np.asarray(drag.cd_power_on, dtype=float)
 _cd_off = np.asarray(drag.cd_power_off, dtype=float)

Detailed Description

A vertical 1-DOF ascent advanced sample by sample, for a burn pass to read the specific force
a liquid column feels at each step without flying the whole burn first (D5-C).

Same equations, drag and atmosphere as ``engine.pipeline.flight_1dof`` (which matches RocketPy's
specific force to 0.002 % on LE4, AUDIT 9.3, 5). Thrust and mass flow are linear between the
samples given to :meth:`advance`; the state is integrated by RK4 in substeps of at most
``dt_max``. Mass leaves only as propellant: the pressurant moves from the COPV into the ullages
and stays aboard.

**Held.** At rest on the pad (z = 0, v = 0) with thrust, pressure thrust and drag below the
weight, the stand (or rail) carries the rest and the vehicle does not move. Its specific force
is then exactly ``G0``: the pad's one g, ``Setup.body_acceleration``'s default. Pressure thrust
acts only while the thrust sample is positive, so a lead-in sample with no thrust is held.

Definition at line 472 of file flight.py.

Constructor & Destructor Documentation

◆ __init__()

None engine.layerx.flight.InlineAscent.__init__ ( self,
* ,
float mass_kg,
float reference_area_m2,
float nozzle_exit_area_m2,
float elevation_m,
Optional[float] reference_pressure_pa,
Any drag = None,
float dt_max = 0.01 )

Definition at line 488 of file flight.py.

Member Function Documentation

◆ _integrate()

None engine.layerx.flight.InlineAscent._integrate ( self,
float t0,
float t1,
float f0,
float f1,
float md0,
float md1 )
protected

◆ _rhs()

Tuple[float, float, float] engine.layerx.flight.InlineAscent._rhs ( self,
float z,
float v,
float m,
float thrust,
float mdot )
protected

Definition at line 544 of file flight.py.

References _specific().

Referenced by _integrate().

◆ _specific()

Tuple[float, bool] engine.layerx.flight.InlineAscent._specific ( self,
float z,
float v,
float m,
float thrust )
protected
(the specific force the motor and the air give [m/s^2], held) at this state.

Definition at line 526 of file flight.py.

References _cd_off, _cd_on, _isa, _mach, A_e, A_ref, drag, backend.routers.flight.EnvironmentConfig.elevation, elevation, feedtwin.comps.manifold.ManifoldPort.elevation, max, p_ref, and feedtwin.engine.design.DischargeModel.p_ref.

Referenced by _rhs(), held(), and specific_force().

◆ advance()

float engine.layerx.flight.InlineAscent.advance ( self,
float t,
float thrust_N,
float mdot_kg_s )

◆ from_config()

"InlineAscent" engine.layerx.flight.InlineAscent.from_config ( cls,
Any config,
float liftoff_mass_kg,
float ambient_pa,
* ,
Any drag = None,
float dt_max = 0.01 )
The vehicle the RocketPy flight flies: body radius, nozzle exit, pad elevation and drag
from ``config``; ``ambient_pa`` is the pressure the thrust curve was computed against (the
site's, as Layer X burns it).

Definition at line 517 of file flight.py.

References engine.layerx.flight._vehicle_terms().

◆ held()

◆ specific_force()

float engine.layerx.flight.InlineAscent.specific_force ( self)
The axial specific force at the current sample [m/s^2]: exactly ``G0`` while held.

Definition at line 548 of file flight.py.

References _specific(), detail::exception.m, m, time.m, thrust, __iar_u32.v, detail::output_vector_adapter< CharType, AllocatorType >.v, v, gui.App.v, lc_calibration_gui.LCPlotWindow.v, Adafruit_LIS3DH.z, and z.

Member Data Documentation

◆ _cd_off

engine.layerx.flight.InlineAscent._cd_off = np.asarray(drag.cd_power_off, dtype=float)
protected

Definition at line 507 of file flight.py.

Referenced by _specific().

◆ _cd_on

engine.layerx.flight.InlineAscent._cd_on = np.asarray(drag.cd_power_on, dtype=float)
protected

Definition at line 506 of file flight.py.

Referenced by _specific().

◆ _isa

engine.layerx.flight.InlineAscent._isa = isa_troposphere
protected

Definition at line 503 of file flight.py.

Referenced by _specific().

◆ _mach

engine.layerx.flight.InlineAscent._mach = np.asarray(drag.mach, dtype=float)
protected

Definition at line 505 of file flight.py.

Referenced by _specific().

◆ A_e

engine.layerx.flight.InlineAscent.A_e = float(nozzle_exit_area_m2)

Definition at line 496 of file flight.py.

Referenced by _specific().

◆ A_ref

engine.layerx.flight.InlineAscent.A_ref = float(reference_area_m2)

Definition at line 495 of file flight.py.

Referenced by feed_line_K.Run._refer(), and _specific().

◆ drag

engine.layerx.flight.InlineAscent.drag = drag

Definition at line 500 of file flight.py.

Referenced by _specific().

◆ dt_max

engine.layerx.flight.InlineAscent.dt_max = float(dt_max)

Definition at line 499 of file flight.py.

Referenced by _integrate().

◆ elevation

engine.layerx.flight.InlineAscent.elevation = float(elevation_m)

Definition at line 497 of file flight.py.

Referenced by _specific().

◆ held

engine.layerx.flight.InlineAscent.held

Definition at line 569 of file flight.py.

◆ liftoff_time_s

Optional[float] engine.layerx.flight.InlineAscent.liftoff_time_s = None

Definition at line 514 of file flight.py.

Referenced by _integrate().

◆ m

engine.layerx.flight.InlineAscent.m = float(mass_kg)

◆ mdot

engine.layerx.flight.InlineAscent.mdot = 0.0

◆ p_ref

engine.layerx.flight.InlineAscent.p_ref = None if reference_pressure_pa is None else float(reference_pressure_pa)

Definition at line 498 of file flight.py.

Referenced by _specific().

◆ t

◆ thrust

engine.layerx.flight.InlineAscent.thrust = 0.0

Definition at line 512 of file flight.py.

Referenced by advance(), held(), and specific_force().

◆ v

engine.layerx.flight.InlineAscent.v = 0.0

Definition at line 510 of file flight.py.

Referenced by _integrate(), held(), and specific_force().

◆ z

engine.layerx.flight.InlineAscent.z = 0.0

Definition at line 509 of file flight.py.

Referenced by _integrate(), held(), and specific_force().


The documentation for this class was generated from the following file: