For the current path from performance requirements to machinable, testable parts, start with the September readiness review and delivery plan. It consolidates repository findings, the implementation backlog, and literature gaps.
The local scientific memory provides searchable source passages,
a knowledge graph, and traceability from scientific claims to code and tests.
Run knowledge/kg.sh status to inspect its current coverage.
LREKit is a Python research and preliminary-design toolkit for liquid rocket engine simulation and CAD export. It currently covers nozzle, throat, chamber, regenerative-cooling, and pintle-injector workflows, pairing a practical Rao thrust-optimized parabolic (TOP) bell path with quasi-one-dimensional performance estimation, low-order engineering screens, an axisymmetric method-of-characteristics (MOC) solver, a finite-dimensional Rao variational boundary-value problem (BVP), a vendored NASA/JHU reference-code port, and a differentiable JAX backend with exact-Jacobian solves and gradient sensitivities.
The default, trusted path is the chart-based Rao/TOP quadratic-Bézier contour: it is deterministic, endpoint-exact, and benchmarked against published geometry. The MOC and variational solvers are active research implementations — they expose residuals, topology, reference comparisons, and explicit reliability metadata, but they are not promoted to design-validated or hardware-qualified status.
Engineering status. Every generated contour is stamped
hardware_qualified = False. Passing the repository's design gates means a result cleared internal preliminary screening. It does not replace independent CFD, conjugate heat-transfer analysis, structural FEA, combustion-stability work, material allowables, manufacturing review, inspection, proof testing, or hot-fire qualification.
Literature-attributed relations in this document are routed to the local
sources in propulsion_texts/. Repository-created
heuristics and packaging defaults are labeled as assumptions rather than
being presented as literature laws; the machine-readable inventory and its
validity levels live in docs/architecture/MODEL_REGISTRY.md.
The dated closure map for the audit-driven changes is
docs/audits/PHYSICAL_INTEGRITY_REMEDIATION_2026-07-11.md.
- Capabilities and maturity
- Test and validation status
- What the tool does
- Physical model
- Contour methods
- Differentiable (JAX) backend
- Screening models
- Installation
- Command-line usage
- Python API
- Outputs
- Validation and reference evidence
- Repository layout
- Known limitations
- Remaining work
- References
| Area | Current implementation | Status |
|---|---|---|
| Rao/TOP geometry | Upstream + downstream throat arcs and a quadratic Bézier bell using interpolated Rao-chart angles | Trusted preliminary baseline |
| Ideal performance | Constant-$\gamma$, calorically perfect, quasi-1D isentropic flow; |
Preliminary |
| Frozen variable-$c_p$ performance | Fixed-composition, thermally perfect quasi-1D throat/exit profile with exact piecewise-linear |
Software-verified preliminary; Bézier only, not physically validated |
| Thermochemistry | Built-in combustion-product constants, optional RocketCEA chamber snapshot, or a strict externally generated frozen-mixture |
Preliminary; no equilibrium nozzle chemistry |
| Direct MOC wall optimization | Axisymmetric characteristic march coupled to a monotone spline wall under SLSQP / Nelder–Mead | Experimental |
| Rao variational / MOC BVP | NASA-topology seed, Rao stationarity, characteristic compatibility, mass + length closure, |
Experimental research path |
| Differentiable solver | JAX/Optimistix Levenberg–Marquardt residual solve, differentiable NASA-style kernel march, optional solved |
Implemented, research-grade |
| Wall pressure & separation | Quasi-1D wall-pressure estimate; Summerfield, Kalt–Badal, Schmucker separation screens | Screening only |
| Thermal / cooling / structure | Bartz convection, turbulent Sieder-Tate plus the Shah-London rectangular-duct laminar branch, fin correction, rough/helical Darcy loss, coolant-chemistry screens, station-wise SP-125 liner stress | Screening / preliminary sizing |
| Pintle injector | Fixed slot/hole sizing plus a Son-2017 continuous movable radial-gap branch with exact tip/center-gap control area, evidence-gated Cd(L/Lmax), static actuation, and fixed-hardware throttle scheduling through a separate axial controller |
Software-verified preliminary; configuration-specific cold-flow/hot-fire validation required |
| Geometry export | CSV/STL and unit-declared neutral B-rep STEP for the requested nozzle, regen, injector, pump, and engine packages, with kernel re-import, connectivity, and clearance/interference gates | Verified preliminary geometry, not production definition |
| Validation | Unit/regression tests, literature manifests, NASA/JHU parsers, kernel/topology parity, diagnostic reports | Strong software verification; incomplete physical validation |
The maturity column is enforced in code. Each contour carries a
design_status keyed by method —
preliminary_top_geometry, experimental_moc_geometry,
experimental_variational_geometry, or
experimental_rao_variational_moc_bvp — and a research-grade
ContourReliability level (see
Reliability labels).
The full normal (non-slow) selection completed on July 11, 2026 with:
1246 passed, 26 deselected, 3 warnings in 1086.67s (0:18:06)
using
MPLCONFIGDIR=/tmp/raosim-mpl \
.venv-jax/bin/python -m pytest -q -m "not slow"The complementary selection of every test marked slow completed on the
same date with:
26 passed, 1247 deselected in 592.96s (0:09:52)
using
.venv-jax/bin/python -m pytest -q -m slowThis is the exact completed-run record, not an immutable future test count. A
provenance-only registry assertion added after that process had collected its
tests was verified separately with 5 passed in
tests/verification/test_model_registry.py. For historical comparison, the June 14 normal
baseline was 784 passed, 4 xfailed, 26 deselected in 350.73 s.
The repository now has no @pytest.mark.xfail literature/reference tests: Rao
1958 Nozzle B is a strict published-data benchmark; the scarfed 1990 case is
explicitly unsupported by the axisymmetric solver; Cuffel–Back–Massier uses
packaged, source-labelled narrative anchors; the historical TT' artifact is
an explicit theory-vs-overlay mode regression; and the obsolete parabola-fit
agreement target is a negative-applicability test. Slow JAX solves, fixed-end
closure, and the full Rao-chart sweep remain selected with the slow marker.
This is software and mathematical verification. It demonstrates internal consistency, parity between backends, and agreement with reference fixtures — not physical validation against experiment or CFD. See Validation and reference evidence.
Given a chamber pressure, ambient pressure, throat size or target thrust, expansion ratio, propellant model, and contour method, LREKit can:
- generate a reduced-length Rao/TOP bell, a conical nozzle, an MOC-optimized bell, or an experimental Rao variational/MOC contour;
- size throat radius from a requested thrust, or size expansion ratio for matched ideal expansion;
- compute ideal exit Mach number and pressure, thrust coefficient, thrust, mass flow, effective exhaust velocity, and specific impulse;
- estimate wall pressure, overexpansion separation, altitude performance, boundary-layer displacement, heat flux, regenerative-cooling capacity, and thin-wall pressure stress;
- generate one injector-to-exit thrust-chamber contour from
$L^*$ , contraction ratio, shoulder geometry, and a shared throat specification; - optionally close injector vaporization, explicitly supplied mixing/chemical
efficiencies, delivered
$c^*$ , and cycle mass flow through a relaxed fixed point (with strict phase/applicability gates); - sweep
$\varepsilon$ ,$P_c$ , or$R_t$ ; compare contour families; and run literature-backed benchmark cases with explicit strict, report-only, or unsupported policies; - plot contours, characteristic nets, Mach / pressure / angle fields, wall distributions, exit-plane profiles, topology, residual diagnostics, and JAX sensitivity fields;
- export versioned CSV, STL, STEP, JSON, Markdown, and metadata artifacts;
- compute exact derivatives of the control-surface
$C_F$ with respect to the solved node variables via the JAX backend.
The default gas-dynamics and all characteristic-based nozzle solvers assume:
- steady, inviscid, adiabatic flow;
- a calorically perfect ideal gas with constant
$\gamma$ ; - isentropic expansion, except where an empirical loss or separation screen is applied;
- axisymmetry for the active MOC and Rao implementations;
- a choked throat and a fully supersonic divergent section;
- no reacting-flow chemistry evolution, finite-rate kinetics, particles, film cooling, wall roughness, ablation, embedded shocks, side loads, or fluid–structure interaction inside the solved flowfield.
The optional CEA integration supplies a frozen chamber-property snapshot.
cea_frozen remains the supported constant-$\gamma$ approximation and
cea_equilibrium is rejected. A separate, opt-in
frozen-variable-cp quasi-1D path resolves a fixed composition with bounded
docs/subsystems/S04-performance-and-off-design/FROZEN_VARIABLE_CP_EXPANSION.md.
The built-in database stores nominal combustion-product properties (the exhaust gas at the nominal mixture ratio), not raw propellant properties:
| Propellant |
|
|
O/F | ||
|---|---|---|---|---|---|
| N2O/Ethanol | 1.22 | 0.0264 | 2950 | 0.921 | 5.5 |
| LOX/RP-1 | 1.24 | 0.0219 | 3571 | 0.960 | 2.27 |
| LOX/LCH4 | 1.20 | 0.0203 | 3533 | 0.960 | 3.5 |
| LOX/LH2 | 1.26 | 0.0089 | 2999 | 0.980 | 4.83 |
The specific gas constant is
For Mach number
The area–Mach relation is
inverted with Newton iteration on the chosen (subsonic or supersonic) branch. The Prandtl–Meyer function and Mach angle are
with propulsion_texts/prmeyer.pdf).
With
The built-in propellant model applies an empirical efficiency multiplier
The characteristic velocity, mass flow, specific impulse, and effective exhaust velocity are
with
The conical utility reuses the bell throat arcs and a straight divergent
wall at half-angle
The comparison module also estimates a bell divergence loss from an assumed linear exit-plane flow-angle profile,
which is a comparison aid, not a resolved exit-plane solution of the Bézier contour.
The baseline contour has three pieces:
- an upstream circular throat arc,
$R_u = 1.5,R_t$ ; - a downstream circular throat arc,
$R_d = 0.382,R_t$ ; - a quadratic Bézier bell from inflection point
$N$ to exit point$E$ .
The exit radius and reference 15° cone length are
and the bell is
where
Chart angles and provenance. The default rao_chart_extrapolated, and blocked by the benchmark/design gate; they are
available only as diagnostic geometry.
This method is the trusted preliminary baseline because it is deterministic, smooth, endpoint-exact, benchmarked against explicit TOP geometry, and does not depend on the convergence of an experimental flow solver.
The authoritative contour includes the injector face, cylindrical chamber,
rounded chamber shoulder, straight convergent, shared upstream throat arc,
downstream throat arc, and bell. Chamber sizing uses contraction ratio
The cylindrical length is root-solved against the exact volume of the piecewise-linear revolved contour. Each meridional segment is integrated as a conical frustum, including the shoulder and upstream throat arc. Infeasible combinations are rejected rather than assigned an arbitrary short cylinder.
ThroatGeometrySpec is shared by chamber and nozzle and owns --cd-target using the Hall
leading-order throat discharge-coefficient relation over the SP-8120
0.6 <= Ru/Rt <= 1.5 range. The CLI permits a separately labelled
repository-only diagnostic extension to 2.0 only with
--allow-throat-radius-extension; it is not attributed to SP-8120. The
chamber-shoulder fillet defaults to
--shoulder-sizing auto, a geometric closure based on --shoulder-radius-factor remains
available as an explicit override. The minimum cylindrical length fallback is
still a geometric placeholder, not an injector- or combustion-qualified
limit, and validated mode therefore requires explicit L_star, contraction
ratio, and minimum cylindrical length inputs.
This remains a geometric volume model only:
This path parameterizes the bell as a monotone cubic Hermite spline with decision variables
For each candidate wall it builds a transonic starting line, marches an
axisymmetric characteristic net with wall feedback, samples the exit plane,
and minimizes a cost combining negative exit thrust, exit-flow-angle
penalties, radius monotonicity, and curvature regularization. SciPy SLSQP is
used when available, with a NumPy Nelder–Mead fallback. The exported bell now
samples the same optimized monotone cubic-Hermite spline used by the objective
and constraints. The endpoint-tangent Bézier intersection is retained only as
reference metadata; it no longer replaces the optimized wall. The method
remains experimental_moc_geometry because its flow and optimization model is
not physically validated.
The legacy Rao path discretizes a supersonic control surface, evaluates
thrust / mass-flow / length functionals, solves a finite-dimensional
constrained optimization, and attempts a control-surface-driven MOC wall
construction. It is retained for regression and comparison; its public
status is experimental_variational_geometry. Unsupported applicability and
unmet promotion requirements are asserted directly; there are no expected-
failure literature tests standing in for missing physics.
This solver seeds a finite-dimensional BVP from the NASA/JHU topology
Its default configuration uses the JAX/Optimistix Levenberg–Marquardt
backend with exact autodiff Jacobians, the characteristic residual
formulation, a NASA-style fixed-end topology seed, full position /
flow-angle / Mach continuity at point
with optional wall unknowns and an optional live kernel angle
With nodes ordered downstream and the axisymmetric source
the implemented compatibility relations are
The
The source term src/lrekit/components/nozzle/solvers/residuals.py).
The critical Mach number is
The primary algebraic optimum-thrust condition along the control surface
implemented in logarithmic form for conditioning. This is Eq. (1) of
Rao, Beck & Booth, AIAA 99-2584 (propulsion_texts/rao1999.pdf). Its
differential identity, Eq. (2) of the same paper,
is retained as a secondary consistency check. The older direct-method functionals are also available; per unit radial extent their stagnation-normalized forms are
representing axial thrust, mass flow, and axial length respectively.
The public performance gate reconstructs the complete
Mass closure compares the surface-normal flux integral on
The BVP additionally pins the commanded exit station and radius,
The classical Rao validity inequality is evaluated along
If invalid_short_nozzle_region and the reliability level is downgraded. This
boundary relation is the perfect-gas optimum-thrust boundary of
Rao, Beck & Booth (1999) and is discussed in Östlund's KTH thesis
(propulsion_texts/fulltext01.pdf, §3).
For the repository's
theta_B = 25.5659 deg
f_D = 0.15216
D = (M = 3.40145, theta = 18.5182 deg)
E = (M = 3.47655, theta = 11.1193 deg)
These are a numerical regression point for the implemented formulation, not a universal nozzle-design result.
The MOC code provides several throat starting-line models:
kliegel_levine— a third-order toroidal-coordinate Kliegel–Levine series (default; Kliegel & Levine, 1969);sauer_modified— a compact leading-order curved-throat approximation;area_ratio— a quasi-1D area–Mach starting line;hall— a deprecated alias forsauer_modified;nasa_visible_kliegel_levine— a source-faithful NASA/JHU compatibility mode used by the reference port.
The theory-correct Kliegel–Levine implementation documents and tests several coefficient-transcription corrections; the source-faithful mode deliberately preserves the historical C++ integer-division behavior required for NASA binary/output parity. The two modes answer different verification questions and are intentionally not collapsed into one implementation.
src/lrekit/numerics/jax/ provides the default inner solver for the Rao BVP and the
gradient API. The design keeps a single boundary
(JAX_DIFFERENTIABLE_PLAN.md §2): the NumPy shell in
rao_variational.solve_rao_bvp still owns seeding, kernel construction,
reliability gating, diagnostics, and output assembly, while the JAX layer
owns only the inner least-squares solve.
-
Solver. Optimistix Levenberg–Marquardt with the exact
jacfwdJacobian of the assembled residual, replacing SciPy's finite-differenceleast_squares. Box bounds are handled by a smooth reparametrization$u = \mathrm{lo} + (\mathrm{hi}-\mathrm{lo}),\sigma(z)$ so every iterate stays strictly inside the box. A constraint-weight continuation ladder up-weights the single-element mass/length/endpoint residuals; the reported residual is always the unweighted one, so reliability gates stay comparable across the NumPy and JAX backends. -
Differentiable kernel march and
$\theta_B$ . The NASA-style kernel march and the live$\theta_B$ secant path are differentiable. -
Sensitivities.
rao_sensitivities(config, solution=...)returns exact derivatives of the control-surface$C_F$ with respect to the solved node variables, explicit fixed-solution partials with respect to$p_a/p_0$ and$\gamma$ , and the residual-Jacobian condition number.
Not yet provided (v2 deferrals): total re-solved (implicit-function)
design derivatives with respect to jax==0.6.2, jaxlib==0.6.2, optimistix==0.0.11, equinox==0.13.8.
These models are deliberately low-order. They are useful for ranking concepts and rejecting obviously unsuitable designs, not for qualification.
At each contour radius the code sets
Three empirical overexpansion-separation criteria are exposed (as implemented):
The first contour station whose quasi-1D wall pressure falls below the chosen threshold is reported as the estimated separation location. Side loads, restricted/free shock separation, hysteresis, and transient startup are not modeled. (Criteria surveyed in NASA SP-8120 and Stark, Flow Separation in Rocket Nozzles — An Overview, 2009.)
The displacement-thickness screen uses a turbulent flat-plate-style correlation,
and estimates an effective exit area ratio from
The gas-side model implements the Bartz correlation, including the pressure,
area-ratio, throat-curvature, and wall-temperature property factor. Gas
transport properties remain estimated unless supplied from CEA or measured
data, so it is still preliminary design physics rather than a validated CHT
boundary condition. Regenerative cooling is marched station by station in
the coolant-flow direction. The coolant-side coefficient uses Sieder–Tate in
turbulent flow and the Shah–London all-walls-uniform-heat-flux polynomial in
laminar flow, with the local rectangular hydraulic diameter, channel aspect
ratio, bulk/wall viscosity, and fin area. Unequal wall heating, thermal-entry,
and hydrodynamic-developing effects remain unresolved. A lower-level legacy
call that omits rectangular geometry retains Nu=4.36 only as the explicit
circular-duct API branch. The optional curved-channel multiplier is the
Niino-Kumakawa/Taylor relation reproduced by
Pizzarelli et al. (2011) and Torres et al. (2009). It remains disabled in
automatic liquid-coolant sizing because NASA SP-8087 recommends experimental
calibration before crediting curvature enhancement;
--curvature-correction opts into it. The wall is the series
resistance
Total absorbed heat and coolant rise satisfy
while friction pressure loss is integrated with local Darcy factor,
hydraulic diameter, velocity, channel roughness, and the actual helical
passage length. Smooth passages use Blasius and rough passages use
Swamee-Jain. An
absolute coolant outlet pressure (or the explicit default
--gate-coolant-chemistry. --hydraulic-network adds every channel branch,
annular inlet/outlet headers, ports, and entry/exit losses to the pressure
budget. Methane and LH2 use station-wise CoolProp properties with
--coolant-property-backend auto|coolprop. --radiation-model spectral
accepts explicit band data, while leccese_gray provides a documented
LOX/CH4 or LOX/H2 screen. --boiling-chf reports phase state and a
conservative Zuber CHF reference; supercritical heat-transfer deterioration
and qualified forced-flow cryogenic CHF remain outside the model.
For a coaxial-shell regen liner, the station-wise combined stress follows NASA SP-125 equation 4-31:
This exposes the real thickness squeeze: pressure stress wants a thicker
liner, while wall temperature and thermal-gradient stress usually want a
thinner one. --size-wall searches hot-wall thickness, channel count, and
channel width together against thermal margin, yield margin, channel fit,
manufacturing minimum, and pressure-drop budget. NARloy-Z uses NASA
CR-134627 Coffin–Manson/Basquin data; GRCop-84 uses NASA direct
total-strain/life regressions. Both are active sourced screening gates, not
chamber-life qualification.
The joint optimizer first selects channels and a feasible uniform
size_wall_profile refines the liner and
outer-jacket thickness and channel depth station by station. SP-125 equation
4-29 is reported as an equivalent-tube longitudinal-buckling screen for
milled channels and does not gate by default; the separate rib-supported
coolant-over-gas liner screen does gate. NARloy-Z and GRCop-84 use sourced
stress- and temperature-dependent cyclic tangent-modulus curves instead of
the former fixed Et/E assumption. Fatigue still uses a nominal
Without --size-wall, the scalar --wall-thickness is only a uniform
geometry/reference input and is labeled as unsized in the report. The
station-wise solver does not force the throat to be thicker: SP-8087 also
recommends thin walls where heat load is highest and nozzle tapering for
heat-flux-limited coolants. Local thermal, pressure, buckling, manufacturing,
and degradation constraints determine the profile; --t-hot-min supplies
the process-specific liner floor.
With --regen-brep, the CAD path exports one OpenCascade STEP solid
containing liner, full-count patterned ribs, end seals, jacket, and real
channel gaps. --regen-manifolds additionally cuts connected annular
plenums and area-sized radial ports. This is a neutral final B-rep, not native
Inventor feature history. The optional one-dimensional manifold graph now
reports maldistribution and local/network losses; 3-D manifold CFD, jacket
buckling, plasticity, creep, weld/braze allowables, stress concentrations,
and nonlinear FEA are not yet solved.
-
Rt,epsilon, andlength-pctset local radius, heated area, passage length, channel pitch, and the radius multiplying pressure stress. -
gammaandPcchange the gas state and Bartz heat loading;Pcalso sets propellant flow and the coolant/gas pressure load. -
pa/p0primarily changes nozzle performance/separation. It does not directly prescribe thickness. -
O/Fsets the fuel share used as coolant in the simplified cycle:$\dot m_c=\dot m_\mathrm{total}/(1+O/F)$ . LowerO/Ftherefore increases available fuel coolant in this model; a real change also requires updated thermochemistry. -
marginandmax wall Timpose the allowable peak wall temperature. -
pressure-drop budget, channel width/height/count, coolant properties, and helix turns control velocity, heat transfer, and hydraulic loss. Helical channels use their longer 3-D path and the reduced pitch transverse to coolant flow, not merely a visual coil. -
auto-sizeselects channel geometry at a fixed wall thickness.size-wallco-sizes channels, then refines variable liner and jacket thickness profiles.
The equation provenance, local-PDF inventory, parameter map, and exact CAD
scope are collected in docs/subsystems/S07-regen-cooling-and-wall-structures/regen_wall_model.md.
Altitude performance uses piecewise ISA layers (troposphere −6.5 K/km from 0–11 km, isothermal 11–20 km, +1.0 K/km 20–47 km) with an exponential tail above 47 km. The optional trajectory module integrates a one-dimensional vertical point mass,
with
Python 3.12 is recommended because the differentiable backend is pinned to a tested JAX stack.
For a normal user install after the first PyPI release:
python3.12 -m pip install lrekitOptional integrations can be requested with extras:
# Optional thermochemistry (frozen chamber-property snapshot)
python3.12 -m pip install "lrekit[cea]"
# CadQuery/OpenCascade support for true B-rep STEP export
python3.12 -m pip install "lrekit[cad]"Until the package is published on PyPI, install directly from GitHub:
python3.12 -m pip install \
"lrekit @ git+https://github.com/ibrahimshahid1/RaoRocketSim.git"For repository development:
python3.12 -m venv .venv-jax
source .venv-jax/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"Core dependencies are NumPy, SciPy, Matplotlib, CoolProp, JAX, JAXlib,
Optimistix, and Equinox. Optional integrations are not installed by default.
The PyPI release checklist is in
docs/architecture/pypi_release.md.
After installation, the toolbox CLI is available as:
lrekit --help
lrekitlrekit launches the current nozzle/chamber/regenerative-cooling/pintle
runner, the same implementation as python scripts/run_nozzle.py .... The
existing RaoRocketSim command remains as a compatibility alias. The older
top-level toolbox interface is still available as:
RaoRocketSimLegacy --helpTrue B-rep is the default hard requirement for requested STEP output. A run
fails if the required CAD kernel or a geometry/re-import gate is unavailable.
For an explicitly non-manufacturing wall diagnostic only,
--no-require-brep permits the labelled faceted AP214 fallback. For example:
lrekit --max-nfev 4000 --regen \
--l-star 1.0 --contraction-ratio 2.5 \
--material grcop-84 --size-wall --cad step --require-brep --regen-brep \
--out builds/regen_brepAdd --regen-manifolds to include two connected plenums and radial ports.
Port area defaults to total channel flow area and can be distributed with
--regen-ports-per-manifold. That flag also enables the matching
full-channel hydraulic graph. The fluid/radiation/phase screens can be run
without CAD, for example:
lrekit --max-nfev 4000 --regen --thermal \
--coolant methane --coolant-inlet-temperature 120 \
--coolant-property-backend coolprop \
--hydraulic-network --radiation-model leccese_gray \
--radiation-family methane --boiling-chfFor fixed-discrete pintle injector manufacturing geometry, request the machined CAD package:
lrekit --injector pintle --injector-cad machined \
--injector-face-od 0.10 --injector-face-thickness 0.010 \
--bolt-count 8 --bolt-circle 0.085 --bolt-hole 0.004 \
--min-tool-diameter 0.0005 --injector-tolerance 0.00005This writes pintle/injector_manufacturing_report.json on every run and, when
CadQuery/OpenCascade is installed, exports the coaxial five-part pintle stack
(pintle_body.step, pintle_tip.step, injector_body.step,
orifice_plate.step, faceplate.step) plus
injector_assembly_machined.step.
The Son continuous movable-pintle branch is selected with
--injector-architecture son_continuous_movable and
--pintle-radial-exit continuous_radial_gap. It implements Son Eq. 1 tip
area, the fixed center-gap cap, a configuration-specific Cd(L/Lmax)
contract bound to an exact Son-geometry fingerprint, physical opening/stops,
and a throttle map that holds the annulus
hardware fixed while reporting the required separate upstream controller.
Position, leakage, and actuator/material gates require separate source/hash-
bound evidence records rather than accepting unproven nominal values.
Mechanical opening is not liquid-sheet thickness; a spray handoff requires
independent, geometry-matched, in-domain VOF or measured thickness evidence. Use
--injector-cad none: every movable CAD request fails closed until a swept
moving assembly with stops, running clearances, seals, and collision checks is
implemented. See the full model and CLI example in
docs/subsystems/S08-injector-and-spray-coupling/MOVABLE_PINTLE_MODEL.md.
The default --require-brep policy applies to this request. The CLI will not
silently substitute a mesh-derived STEP if the five-part package cannot be
built and re-imported as valid solids. Inventor, Fusion, SolidWorks, and
FreeCAD can import the neutral STEP bodies; they do not contain native
Inventor feature history.
For repo-local development, python scripts/run_nozzle.py ... remains a thin
compatibility wrapper around the packaged runner.
The current lrekit / raosim runner uses SI units at the CLI:
pressure in Pa, length in m, thrust in N, mass flow in kg/s. Run
lrekit --tags for the grouped splash list and lrekit --help for the full
argparse reference.
lrekit --complete-package --max-nfev 0 --out builds/complete_seedBare lrekit runs enter the same complete-package interactive interview by
default. The starter package applies LOX/RP-1 screening defaults, sizes the
nozzle/chamber, generates a pintle injector package, and sizes the selected
electric fuel/oxidizer pump hardware. It writes contour.csv, profile.png,
wall.stl, pintle.json, pump.json, pump_bom.json,
pump_reference_geometry.json, summary.json, and the pintle/ and pump/
deliverable folders. The pump folder includes reference pump parameters,
dimension tables, assembly CAD, and per-part impeller, inducer,
diffuser/volute, motor, inverter, and battery package geometry.
Use --injector none --no-electric-pump for a nozzle/chamber-only run.
For repeated update checks, the repository includes a complete 13 kN LOX/RP-1 sample that exercises throat sizing, chamber geometry, regenerative wall sizing, thermal screens, a copper liner, a 316L stainless jacket, pintle injector sizing, electric pump sizing, and core CAD export:
lrekit @examples/cli/lox_rp1_13kn_copper_316l_full_engine.args \
--out builds/samples/latest_13kn_checkArgument files use one normal CLI token line at a time, with # comments.
Any later command-line flag overrides the value from the file.
lrekit \
--propellant LOX/RP-1 \
--pc 7.0e6 --rt 0.020 --epsilon 10 --length-pct 80 \
--contour-method rao-bvp --backend jax \
--max-nfev 4000 --out builds/nozzle_mocThe CLI contour default remains the trusted deterministic Rao/TOP Bézier.
--contour-method rao-bvp explicitly enters the experimental BVP; within that
path, JAX is the default inner-solver backend. Use --max-nfev 0 for a fast
seed-geometry diagnostic, not a design export.
lrekit \
--propellant LOX/LCH4 \
--pc 6.0e6 --target-thrust 10000 --epsilon 12 \
--complete-package --out builds/ten_kn_completeThe sizing relation is
lrekit \
--propellant LOX/RP-1 --mixture-ratio 2.27 \
--pc 8.0e6 --target-thrust 13000 --epsilon 8 \
--contour-method bezier \
--nozzle-expansion-model frozen-variable-cp \
--frozen-gas-table path/to/configuration-controlled-mixture.json \
--injector none --no-electric-pump --cad none \
--out builds/frozen_q1dThe JSON table is not synthesized from the scalar propellant row. It must use
the strict schema-v2 property/provenance contract, including frozen mass
fractions, freeze state, generator/database identity, and source-artifact
SHA-256. Target-thrust and matched-pressure sizing use the integrated frozen
profile. MOC/Rao, explicit --gamma, Hall-$C_d$ throat sizing, and the
constant-$\gamma$ Bartz/regen path are rejected in this mode. Conservation
closure is reported separately from the still-failed physical property and
performance benchmark gate.
lrekit \
--propellant LOX/RP-1 \
--pc 7.0e6 --rt 0.020 --epsilon 10 \
--injector pintle --electric-pump \
--fuel-tank-pressure 5.0e5 --oxidizer-tank-pressure 6.0e5 \
--injector-cad auto --pump-cad parts --pump-cad-format stl \
--out builds/pintle_pumpThe injector questions and flags feed InjectorSpec, FeedSystemSpec, and
PumpSizingSpec directly. pump.json includes the feed-pressure ledger,
selected RPM/bus voltage, battery and motor sizing, architecture classification,
normalized BOM rows, editable reference geometry, impeller, inducer,
diffuser/volute, velocity-triangle/meanline, pump curve, system-curve throttle
margin, thermal/stress screens, gates, and literature assumptions. --pump-cad
exports a meanline/packaging reference CAD package. --pump-cad-format step
or both requests true B-rep parts and assemblies, including the connected
inlet-to-outlet fluid volume; the request fails without CadQuery/OpenCascade
or when the export/re-import gates fail. The hydraulic solve now closes the
shaft/fit/root-wall annular eye, inlet/exit blade blockage, net-area flow
coefficients, velocity-triangle beta1, main/splitter layout, casing pressure
wall, and pump duty before CAD. The blade-root bending screen also feeds its
required thickness back through exit blockage and the RPM/diameter iteration;
a fixed-RPM design that cannot fit the structural root fails the free-area
gate. B-rep export treats any subsequent hub change as a hard regression. The
volute is exported as separable rear-body/front-cover
halves with a keyhole gasket land, body/outlet-neck bolt holes, dowels, and a
preliminary pressure-clamp gate. The legacy STL path is explicitly schematic.
cold_flow_release_ready remains false until selected joint hardware,
bearings, seals, shaft retention, tolerances, rotordynamics, proof/cold-flow
tests, and measured maps exist.
The correlation-based spray screen is report-only by default. An explicit
fixed point is available with --spray-cstar-coupling,
--spray-eta-mixing, and --spray-eta-combustion; see
docs/subsystems/S08-injector-and-spray-coupling/SPRAY_CSTAR_COUPLING.md. The opt-in
deterministic one-way parcel mid-tier and its validation limits are documented
in docs/subsystems/S08-injector-and-spray-coupling/LAGRANGIAN_SPRAY_MODEL.md. It is not
a replacement for VOF, reacting CFD, or cold-/hot-fire evidence.
The implemented Son continuous movable-pintle branch is documented in
docs/subsystems/S08-injector-and-spray-coupling/MOVABLE_PINTLE_MODEL.md. At each
throttle point it holds the post, rod, center gap, open stop, and axial annulus
fixed; solves radial center-rod travel; and solves a separately identified
upstream controller pressure drop for the axial stream. It requires a
configuration-bound Cd artifact to pass its hydraulic gate and never treats
mechanical opening or a continuity-equivalent gap as VOF/measured sheet
thickness.
For fixed-discrete pintle CAD, --injector-cad auto now selects the machined
STEP package:
pintle_body.step, pintle_tip.step, injector_body.step,
orifice_plate.step, faceplate.step, injector_assembly_machined.step, and
injector_manufacturing_report.json. Use reference or parts only when you
want the older schematic reference bodies instead of the machining-oriented
coaxial assembly.
lrekit \
--propellant LOX/RP-1 \
--pc 7.0e6 --rt 0.020 --epsilon 10 \
--regen --material grcop-84 --jacket-material inconel718 \
--size-wall --thermal --cad step --out builds/regen_thermostructuralThis path uses Bartz heat flux, Sieder-Tate channel cooling, coolant-property screens, station-wise SP-125 liner stress, fatigue screening where sourced material coefficients exist, and optional STEP/regen CAD exports.
RaoRocketSimLegacy \
--propellant LOX/LCH4 \
--Pc 60 --Rt 25 --epsilon 10 \
--sweep epsilon 4 50 20 --no-plot
RaoRocketSimLegacy \
--benchmark-case lea_top_schomberg_2014 \
--benchmark-method bezier \
--benchmark-report builds/benchmarks --no-plotThe legacy alias keeps the older bar/kPa/mm CLI, sweep workflow, and benchmark entrypoints available while the maintained runner focuses on complete component package generation.
Available manifests are lea_top_schomberg_2014, rao1958_nozzle_b,
rao_scarfed_moc_1990, and vulcain_s1_separation_similarity. Current method
policies are strict, report, or unsupported: Rao 1958 Nozzle B is a
strict axisymmetric BVP benchmark, while the scarfed 1990 geometry is
explicitly unsupported by the axisymmetric solvers.
from lrekit.engine import compute_engine_performance
from lrekit.nozzle_geometry import bell_nozzle_contour
from lrekit.propellants import get_propellant
prop = get_propellant("LOX/RP-1")
contour = bell_nozzle_contour(
Rt=0.020, epsilon=10.0, length_pct=80.0,
method="bezier", gamma=prop.gamma,
)
performance = compute_engine_performance(
Pc=4.5e6, Pa=101325.0, Rt=0.020, epsilon=10.0, prop=prop,
)from lrekit.design import DesignInput, ThermoSpec, design_nozzle_v2
result = design_nozzle_v2(DesignInput(
thermo=ThermoSpec(mode="constant_gamma", propellant_name="LOX/RP-1"),
Pc=8.0e6, Rt=0.020, epsilon=8.0,
method="bezier", mode="preliminary",
))
print(result.performance.thrust)
print(result.gate_report.to_dict())
print(result.report_sections["thermal"])The API name ValidatedDesignResult and workflow mode validated mean the
stricter internal schema and gate set were used. They do not set
hardware_qualified = True. Validated mode currently requires RocketCEA, the
Bézier method, regenerative-cooling inputs, material/manufacturing inputs,
and all internal gates to pass.
from lrekit.rao_variational import RaoSolverConfig, solve_rao_bvp
from lrekit.jax.api import rao_sensitivities
config = RaoSolverConfig(
Rt=0.020, epsilon=10.0, gamma=1.4, length_pct=80.0,
solver_backend="jax", formulation="characteristic",
)
solution = solve_rao_bvp(config)
sens = rao_sensitivities(config, solution=solution)
print(solution.reliability) # ContourReliability level
print(solution.residuals.max_scaled) # worst scaled residual
print(sens.cf, sens.condition_number) # Cf and Jacobian conditioningPass solver_backend="numpy" to fall back to the legacy SciPy path.
Normal CLI runs create builds/vNNN_YYYYMMDD_HHMMSS/ and may contain:
- contour CSV in meters;
- a binary STL closed wall solid;
- a true B-rep STEP solid when requested (the default hard policy), or a
clearly labelled faceted AP214 wall diagnostic only when the user explicitly
supplies
--no-require-brep; - with variable wall sizing, separate liner and closeout-jacket solids;
- optionally,
regen.step: one full-channel-count cooling-aware material solid, with connected plenum/port voids when requested; - optionally, a pintle machined-CAD package with Boolean-cut STEP bodies for the face, slotted pintle post, annular sleeve, and assembly, plus an injector manufacturing report;
- for a Son continuous movable pintle with
--injector-cad none, a report-only JSON/CSV/SVG/PNG package that separates control area, physical opening, actuator/calibration evidence, and liquid-sheet evidence; movable STEP/DXF/ parts/machined requests fail closed until swept-assembly CAD exists; - an Inventor conversion manifest pointing to the authoritative STEP file;
- optional regen STL/PNG visualization surfaces for liner, channels, and jacket;
- design-gate JSON and v2 physics-screening sections;
- canonical-unit sidecars, CAD manufacturing/assembly gate reports, and an optional configuration-bound physical-evidence report;
- sweep CSV or benchmark JSON / Markdown reports;
- human-readable
metadata.txtwith inputs, performance, warnings, gate results, and generated filenames.
Native Autodesk Inventor IPT writing is not implemented. Pintle machined mode
models injector bolt holes, manifolds, feed/inlet ports, seal grooves, annulus
passages, and slot cut-throughs, but remains preliminary until cold-flow and
joint/fitting-specific validation are complete. Throat inserts, weld/braze
allowances, and non-pintle injector interfaces are metadata/readiness
placeholders, not modeled solid features.
The repository deliberately separates software verification from physical validation.
The test suite covers gas-dynamics identities and inverse relations; Bézier,
conical, chamber, curvature, export, and design-workflow behavior;
axisymmetric characteristic pairing and source terms; transonic
Kliegel–Levine coefficients and NASA-visible-source semantics; characteristic
topology, mass conservation, BDE closure, wall tangency, and crossing checks;
NumPy/JAX primitive and residual parity; exact-Jacobian convergence,
kernel-march parity, solved-$\theta_B$ derivatives, and
Three-Dimensional-Nozzle-Design-Code-master/
vendors the Rice/JHU 2D MOC, streamline-tracing, and 3D MOC source package
plus sample outputs. For the pinned M3.5 perfect-nozzle configuration, the
visible-source reference track is SHA-256 pinned and software-verified for the
initial throat line, kernel rows, and BDE wall extraction. The active Python
implementation also provides arc-wall, interior, special-wall, and axis unit
processes; characteristic mass flow; point-$D$ selection; fixed-end
point-$E$ closure; complete RaoTopology objects for CropNozzleToLength path is not ported for exported interior grids, and an
arbitrary BVP solve is not automatically the pinned reference case.
The checked-in M3.5 perfect-nozzle wall comparison is within the repository's
wall.out). However, the
generator provenance of the historical TT'.out fixture is unresolved
(see docs/subsystems/S06-rao-moc-bvp-contour/nasa_tt_prime_provenance.md):
the visible MOC_GridCalc_BDE.cpp source-port workflow is the canonical
reference track, and the orphaned M3.5Perf fixture is a diagnostic overlay
only — not promotion authority. Consequently the public solver does not
label any contour NASA_REFERENCE_MATCHED.
The research code defines an ordered ContourReliability vocabulary:
geometric_approximation → moc_compatible →
rao_variational_residual_solved → nasa_reference_matched →
benchmark_validated → cfd_checked → experimentally_validated.
This is a vocabulary, not a claim that every level has been reached. The
rao_variational_moc solver assigns its level from per-solve gates: a clean
solve that passes the BVP residual, MOC closure, valid-region, and thrust
sanity gates reaches rao_variational_residual_solved. Promotion to
benchmark_validated is gated behind the module flag
BENCHMARK_VALIDATED_AT_RELEASE, which is False in the current code, so
no public contour is benchmark-validated, NASA-reference-matched,
CFD-checked, or experimentally validated by this repository.
Reorganized 2026-11-05 around the data flow of the current CLI. The pipeline stages
(S01 CLI dispatch, S02 inputs/contracts, S03 thermochemistry, S04 performance, S05 nozzle/chamber
geometry, S06 Rao/MOC/BVP contour, S07 regen/wall/structure, S08 injector/spray, S09 pumps,
S10 interface/mass ledger, S11 CAD export, S12 plots, S13 engine MDO, S14 re-evaluation/run records)
are defined in docs/architecture/DATAFLOW.md; every code file is assigned
to a stage in docs/architecture/CODE_MAP.md, and the verbatim header
comment of every file is collected in
docs/architecture/CODE_HEADER_COMMENTS.md.
A readable PDF synthesis is built from latex-report/RaoRocketSim_Repository_Guide/ into
output/pdf/RaoRocketSim_Repository_Guide.pdf.
src/lrekit/ The Python package (all engineering code; module -> stage in CODE_MAP.md)
cli.py, job_cli.py, guided.py lrekit console entry: job verbs guided/run/validate/catalog, else the design runner
application/ cli.py entry points, runner.py (the ~330-flag runner driving S03-S14), design
components/ nozzle/ (+ solvers/), chamber/, cooling/, injector/ (+ spray/), pump/, electrical/
optimization/ Differentiable engine MDO, job specs, requirements (S13; formerly raosim/mdo)
numerics/jax/ Differentiable primitives, residuals, kernel march, LM solve (formerly raosim/jax)
assembly/ performance/ thermochemistry/ core/ geometry/ verification/ mission/ simulation/openfoam/
legacy/ Legacy interactive/batch toolbox (RaoRocketSimLegacy; formerly main.py)
benchmark_data/, data/ Packaged manifests, curves, CEA tables, Rao domain maps
_compat.py Old import names (raosim.*, and flat ones like raosim.cea) alias the modules above
src/raosim/ Compatibility package for the former name: __init__.py and __main__.py only
tests/ Tests grouped by package area; contracts/ pins import identity and packaging
experiments/ Research diagnostics and MOC experiments (formerly scripts/; not collected as tests)
scripts/ User-facing generators: run_nozzle, generate_contour, generate_regen_nozzle, sample_cea_surface
examples/cli/ Shipped @argfile examples (see examples/cli for usage)
docs/ Documentation, organized by data-flow stage (see docs/README.md)
architecture/ Data flow, code map, header comments, registry, contracts
subsystems/Sxx-<slug>/ Physics/design basis per pipeline stage
program/ Plans, roadmaps, REMAINING_WORK_AND_GOALS.md; JAX_DIFFERENTIABLE_PLAN.md = project record
audits/ literature/ agents/ data/ archive/
knowledge/ Local scientific memory (kg.sh); see knowledge/README.md
latex-report/ LaTeX sources of the written reports and the repository guide
output/pdf/ Compiled PDFs of the reports
debug_outputs/ Tracked scan/diagnostic evidence written by tests/experiments/nozzle/rao_existence_scan.py etc.
builds/ Run output (gitignored); _archive_2026-11-05/ holds all earlier builds
archive/ Local-only scratch moved out of the tree (gitignored)
propulsion_texts/ Local source literature (gitignored corpus)
Three-Dimensional-Nozzle-Design-Code-master/
Vendored Rice/JHU reference source and outputs (used as an oracle by tests)
- No hardware qualification. All results require independent analysis and test evidence.
-
Constant-property nozzle flow. CEA does not yet drive variable
$\gamma$ , composition, or transport properties through the MOC field. - Inviscid MOC. Boundary-layer growth is applied only as a separate screen, not coupled into characteristic marching or contour optimization.
- Incomplete separation physics. Empirical onset criteria only — no shock/boundary-layer or side-load solver.
-
Experimental exact-Rao path. The BVP is mathematically auditable and
heavily tested, but release-level literature promotion is disabled
(
BENCHMARK_VALIDATED_AT_RELEASE = False). - Chart vs. exact-variational angles. Rao 1960 TOP chart angles are parabola-fit design data; the exact variational solution can differ systematically. Those deltas are recorded, not forced to zero.
-
Partial differentiability. The NASA kernel march and live
$\theta_B$ path are differentiable, but the complete start-line-to-final-wall design map and total design derivatives are unfinished. - Low-order thermal/structural models. Radiation bands, the hydraulic graph, CoolProp properties, fatigue, buckling, and CHF remain preliminary screens—not qualification CHT, 3-D manifold CFD, cyclic plasticity, creep, or FEA.
- Preliminary manufacturing CAD. Engine/injector bolt patterns, retention features, seal/thread envelopes, mating flow passages, regen plenums/ports, pump fluid volumes, nominal clearances, and interference checks are modeled and B-rep-gated. The repository still does not issue released drawings, GD&T or a signed tolerance stack, selected seal/thread/fastener standards, process-specific weld/braze/AM allowances, cleaning/NDE plans, or inspection and assembly instructions.
- Alpha API and release status. Package metadata and CLI entry points exist, but the research interfaces do not yet carry a stable compatibility guarantee and the first public PyPI release is still pending.
A practical roadmap, grounded in the current code rather than historical phase labels:
- Obtain independent review of the exact-variational chart/reference sweep,
publish accepted exact-vs-TOP-fit deltas, and define the evidence required
before
BENCHMARK_VALIDATED_AT_RELEASEcould ever be enabled. - Make the live differentiable
$\theta_B$ solve a routinely exercised production path and finish total implicit design derivatives with respect to$R_t$ ,$\varepsilon$ ,$L_{%}$ ,$\gamma$ , and ambient pressure. - Differentiate or replace the remaining start-line and BDE/final-wall steps so sensitivities reach manufacturable wall coordinates, not only the control surface.
- Generalize the pinned M3.5 source-visible reference port by implementing
CropNozzleToLengthfor exported interior grids. Preserve the unresolved historicalTT'generator provenance as an overlay limitation; do not use it as promotion authority. - Validate the implemented frozen-composition variable-$c_p$ quasi-1D path against configuration-controlled CEA/property fixtures, then add profile-aware transport/thermal adapters. Equilibrium expansion and a variable-property characteristic flowfield remain separate future models.
- Couple viscous displacement, wall pressure, separation, and side-load physics to the contour solution; validate against published experiments and CFD.
- Add independent axisymmetric Euler/RANS CFD comparisons with quantitative
gates for
$C_F$ , wall pressure, exit Mach, and flow angle. - Extend the implemented, version-pinned OpenFOAM v13 external-gap VOF wedge to the full internal movable-pintle passage, run strict mesh/solver and convergence studies, and physically validate the typed VOF-to-Lagrangian parcel bridge. Static case export and the current correlation fixed point are not parcel CFD or validation evidence.
- Replace screening thermal/structural models with independently reviewed CHT and FEA, and calibrate coolant/manifold pressure losses and material behavior with configuration-controlled data.
- Validate the coupled pump meanline/shaft/hub/blade-free-area/split-casing design with bearing/seal/retention detail, rotordynamics, cavitation, pressure proof, cold flow, and measured pump maps.
- Complete drawings, GD&T, fits, selected seals/threads/fasteners, process plans, NDE/inspection, proof/leak tests, cold flow, stability assessment, and hot-fire evidence for each released configuration. The evidence manifest can record these results; the software cannot create them.
- Retire or clearly isolate legacy paths, define API compatibility policy, complete release engineering/licensing, and publish reproducible artifacts.
Primary literature in propulsion_texts/ and the
reference notes under docs/ and
src/lrekit/benchmark_data/:
- G. V. R. Rao, Exhaust Nozzle Contour for Optimum Thrust, Jet Propulsion, 1958.
- G. V. R. Rao, Approximation of Optimum Thrust Nozzle Contour, ARS J.
30(6), 1960 — the TOP
$\theta_n/\theta_e$ design charts. - G. V. R. Rao, Recent Developments in Rocket Nozzle Configurations, ARS J.
31(11), 1961 —
$\gamma$ -insensitivity of the optimal contour (RaoRecentDevinRockNozConfig.pdf). - Rao, Beck & Booth, Rao Variational Optimum Bell Nozzle: A Design
Compendium, AIAA 99-2584, 1999 — stationarity Eq. (1)–(2), validity
boundary (
rao1999.pdf). - NASA SP-8120, Liquid Rocket Engine Nozzles — chart reproduction, separation and wall-pressure guidance.
- Rice, 2D and 3D Method-of-Characteristics Tools for Complex Nozzle Development, JHU/APL RTDC-TPS-481, 2003.
- Kliegel & Levine, Transonic Flow in Small Throat Radius of Curvature
Nozzles, 1969 (
prmeyer.pdfand related notes). - J. Östlund, Flow Processes in Rocket Engine Nozzles…, KTH, 2002 — Rao
valid-region discussion (
fulltext01.pdf). - R. Stark, Flow Separation in Rocket Nozzles — An Overview, 2009.
- J. D. Anderson, Modern Compressible Flow — isentropic relations, Prandtl–Meyer, MOC compatibility (§11.4).
- M. J. Zucrow & J. D. Hoffman, Gas Dynamics, Vol. 2, Ch. 17 — axisymmetric characteristics.
- G. P. Sutton & O. Biblarz, Rocket Propulsion Elements — performance relations.
See latex-report/raosim_reference.pdf
for the extended mathematical reference and
JAX_DIFFERENTIABLE_PLAN.md for the
differentiable-solver development record. Those documents contain historical
research notes; where any status statement conflicts with the executable
code or the current test suite, the code and tests are authoritative.