Skip to main content

Module curve

Module curve 

Source
Expand description

Thrust curves: thrust against time, and the impulse, burn time and average thrust derived from them.

A ThrustCurve holds samples (t_i, F_i) and joins them with straight lines, which is how the RASP .eng and RockSim .rse formats are drawn and how RocketPy reads them by default. When the first sample is after t = 0, the curve starts from an implicit (0, 0), as the RASP format specifies. After the last sample the thrust is zero. Two samples at the same time make a step: the thrust takes the later sample’s value from that time on. Real curves use steps for an abrupt burnout and where times were rounded (docs/format/eng.md).

Delivered samples. A sample is delivered when it starts or ends a segment of non-zero width (t_i < t_{i+1} or t_{i−1} < t_i). Its thrust is then a value the curve takes: at its own instant when it starts a segment (ThrustCurve::thrust_n returns it there), or as the limit while time rises to its instant when it ends one. A sample strictly inside a run of three or more equal times (t_{i−1} = t_i = t_{i+1}) is never delivered: the thrust steps straight past it to the run’s last value; so is the first sample of a step at the curve’s start and the last of a step at its end, where the thrust is zero outside the curve. The peak and the burn-time crossings use only delivered samples, so the peak is exactly the least upper bound of ThrustCurve::thrust_n over time.

Impulse. The integral of the piecewise-linear thrust is exact by the trapezoid rule:

I(t) = Σ ½ (F_{i} + F_{i+1}) (t_{i+1} − t_i)   over the intervals before t, plus the partial one

Burn time (NFPA 1125). From the moment the thrust first reaches 5% of its peak to the moment it last falls to 5% of its peak, with the crossings found on the straight segments and the peak taken over delivered samples. ThrustCurve.org’s glossary uses this definition. Average thrust is the total impulse over that burn time. See docs/physics/motor.md.

Structs§

ThrustCurve
A thrust curve: thrust in newtons against time in seconds from ignition, joined by straight lines.

Constants§

NFPA_1125_THRESHOLD
The fraction of peak thrust that starts and ends the NFPA 1125 burn time.