Skip to content
Beta.roc@modelscript/rocets 14 diagnostic rules
Parser WASM GLR
Diagnostics 14 rules
DAE Arena Lowering
Simulation Native Solvers
Projections Modelica, SSP
Live ExampleLoxMethaneExpanderCycle.roc

NASA ROCETS LOX/Methane Expander-Bleed Rocket Engine

Cryogenic liquid rocket engine balance deck coupling LOX/CH4 turbopumps, regenerative cooling jacket, preburner, and main thrust chamber.

Playground
Source (23 lines)
1TITLE LOX-Methane Staged Expander Engine Cycle
2MODULE TURBOPUMP TP_LOX
3  EFFICIENCY = 0.78
4  PRESSURE_RATIO = 22.4
5  FLOW_RATE = 84.5
6MODULE TURBOPUMP TP_CH4
7  EFFICIENCY = 0.75
8  PRESSURE_RATIO = 26.0
9  FLOW_RATE = 24.1
10MODULE HEAT_EXCHANGER REGEN_JACKET
11  HEAT_LOAD = 14.2E6
12  DP_FRAC = 0.08
13MODULE TURBINE DRIVE_TURB
14  EFFICIENCY = 0.81
15  POWER_MW = 6.8
16MODULE CHAMBER MAIN_TCA
17  PC = 135.0
18  MR = 3.50
19  ISP_VAC = 364.2
20CONNECT TP_CH4.OUT -> REGEN_JACKET.IN
21CONNECT REGEN_JACKET.OUT -> DRIVE_TURB.IN
22CONNECT DRIVE_TURB.OUT -> MAIN_TCA.FUEL_IN
23CONNECT TP_LOX.OUT -> MAIN_TCA.OX_IN
ROCETS Propulsion Cycle P&ID Schematic
ROCETS_ENGINE - Liquid Propulsion P&ID Schematic LOX-Methane Staged Expander Engine Cycle MODULE [CHAMBER]
Drag to pan · Click % to reset

NASA ROCETS Liquid Propulsion Modeling (.roc, .deck) ​

The @modelscript/rocets package (languages/rocets) provides native compilation, simulation, and analysis for NASA ROCETS (Rocket Engine Transient Simulator) liquid propellant rocket engine decks and turbomachinery maps. It delivers multi-syntax parsing, embedded Fortran user routine bridge via @modelscript/fortran, pre-flight static propulsion diagnostics (M8001–M8014), direct continuous DAE arena lowering into @modelscript/runtime (IDaeBuilder), a coupled steady-state power and flow balance solver, dynamic start/shutdown transient integration, multi-domain projections to Modelica 3.x and FMI SSP, and interactive Piping & Instrumentation Diagram (P&ID) vector schematic generation.


Supported File Specifications ​

ExtensionFormatKey Structural Features
.roc / .deckEngine Model DeckTagged DECK, COMPONENTS, PARAMS, S0, PORTS, CONNECTIONS, BALANCE blocks
.map / .datTurbomachinery MapsMultidimensional speed-flow-head and efficiency performance tables for pumps and turbines
.f / .forUser SubroutinesEmbedded or external Fortran routines for custom fluid properties and component characteristics

Architecture & Compilation Pipeline ​

Rendering diagram...

Propulsion Component Library ​

NASA ROCETS provides specialized thermodynamic and turbomachinery modules for rocket engine architectures:

ModuleCategoryDescriptionPrimary Parameters & States
CHAMBER / TCCombustionThrust chamber & convergent-divergent supersonic nozzle expansionPc,At,ε,Vc,c∗,O/F
PUMPTurbomachineryCentrifugal / axial propellant pumpΔP,η,ρ,m˙,Pshaft
TURBINETurbomachineryGas-driven drive turbinePR,η,Tin,cp,Pshaft
SHAFTMechanicalTurbopump rotating assemblyJ,ω,Nrpm,τturb,τpump
COOLING_JACKETThermalRegenerative nozzle cooling jacketTwall,Qgas,Qcool,hg,ΔPcool
VALVE / ORIFICEFluidThrottle, cavitating venturi, or shutoff valveCv,position,ΔP
JUNCTIONFluidPropellant flow splitter or mixing manifold∑m˙=0,Pnode

Propellants & Thermodynamics ​

The @modelscript/rocets thermo engine provides:

  • Cryogenic & Hydrocarbon Propellants: Standard properties for Liquid Oxygen (LOX), Liquid Hydrogen (LH2), Liquid Methane (LCH4), and RP-1 kerosene.
  • NASA CEA Combustion Curves: Chemical equilibrium calculations of characteristic velocity (c∗), adiabatic flame temperature (Tc), isentropic expansion exponent (γ), and molecular weight.
  • Gas Dynamics: Isentropic supersonic nozzle expansion with Mach area relations, vacuum and sea level thrust, and vacuum/SL specific impulse (Isp).
  • Bartz Convective Heat Transfer: Gas-side throat heat transfer coefficient (hg) for regenerative cooling circuit sizing.

Pre-Flight Diagnostic Rules ​

14 rules9 error5 warning Run with msx lint

CodeRuleSeverityMessage
M8001unconnected-fluid-porterrorFluid port '<comp>.<port>' is not connected in the propellant flow circuit.
M8002fluid-type-mismatcherrorIncompatible fluid stream connection '<conn>': cannot mix '<fromFluid>' into '<toFluid>' without a combustion chamber.
M8003shaft-power-imbalanceerrorTurbopump shaft '<shaftId>' power imbalance: <reason>.
M8004unbalanced-flow-spliterrorMass conservation failure at junction '<junct>': inlet and outlet flow mismatch exceeds tolerance (|\u0394m| = <value> kg/s).
M8005pump-cavitation-riskwarningPump '<pumpId>' inlet suction pressure is below required NPSH margin (margin: <value> kPa). Cavitation risk.
M8006negative-chamber-pressureerrorNon-physical pressure at '<comp>': computed pressure is <val> Pa (must be > 0).
M8007combustion-temperature-limitwarningGas temperature at '<comp>' (<value> K) exceeds throat thermal structural limit (<limitK> K).
M8008invalid-valve-scheduleerrorInvalid valve actuation profile for '<valveId>': <reason>.
M8009choked-flow-inconsistencywarningSupersonic nozzle expansion at '<comp>' is not choked (pressure ratio Pc/Pa = <value> < 1.89).
M8010user-fortran-routine-errorerrorFortran user routine in component '<comp>' has syntax or semantic error: <msg>.
M8011extreme-mixture-ratiowarningEngine mixture ratio (O/F = <value>) at '<comp>' is outside stable combustion limits.
M8012missing-fluid-tableerrorPropellant fluid table for '<fluid>' is not loaded in the session.
M8013turbine-overspeed-hazardwarningTurbopump shaft '<shaft>' speed (<value> RPM) exceeds maximum burst rating (<maxRpm> RPM).
M8014closed-flow-circuiterrorPump '<pumpId>' discharge is completely blocked with no open valve or recirculation path.

Generated from languages/rocets/src/lints/index.ts. All languages →


Example ROCETS Engine Deck ​

rocets
DECK: GasGeneratorCycleEngine
TITLE: "Gas Generator Cycle Cryogenic Engine"

COMPONENTS:
  OPUMP TYPE=PUMP TITLE="LOX Turbopump" X=100 Y=150
    PARAMS: DELTA_P=14.0E6, ETA=0.78, RHO=1140.0
    PORTS: IN_P=0.3E6 FLUID=LOX DIR=in, OUT_P=14.3E6 FLUID=LOX DIR=out

  FPUMP TYPE=PUMP TITLE="LH2 Turbopump" X=100 Y=320
    PARAMS: DELTA_P=18.0E6, ETA=0.74, RHO=71.0
    PORTS: IN_P=0.2E6 FLUID=LH2 DIR=in, OUT_P=18.2E6 FLUID=LH2 DIR=out

  TURB01 TYPE=TURBINE TITLE="Drive Gas Turbine" X=320 Y=240
    PARAMS: PR=1.65, ETA=0.74, T_IN=950.0
    PORTS: IN_P=15.0E6, OUT_P=9.1E6

  SHAFT01 TYPE=SHAFT TITLE="Main Turbopump Shaft" X=210 Y=240
    PARAMS: INERTIA=0.1, SPEED_RPM=32000.0, MAX_RPM=40000.0
    S0: SPEED_RPM=32000.0

  CHAMBER TYPE=CHAMBER TITLE="Main Thrust Chamber" X=550 Y=240
    PARAMS: PC=10.0E6, MR=6.0, AT=0.035, EPS=50.0, VC=0.02
    S0: PC=10.0E6

  MAIN_OX_VALVE TYPE=VALVE TITLE="Main Oxidizer Valve" X=350 Y=150
    PARAMS: CV=0.005, POSITION=1.0

CONNECTIONS:
  OPUMP.OUT_P -> MAIN_OX_VALVE.IN_P
  MAIN_OX_VALVE.OUT_P -> CHAMBER.IN_OX
  FPUMP.OUT_P -> CHAMBER.IN_FUEL
  TURB01.OUT_P -> CHAMBER.IN_GAS
  SHAFT01.TORQUE_TURB -> TURB01.TORQUE
  SHAFT01.TORQUE_PUMP -> FPUMP.TORQUE

Command Line Interface (msx rocets) ​

ModelScript provides full headless CLI tooling for NASA ROCETS models:

bash
# Pre-flight linting of an engine deck
msx rocets lint engine.roc

# Print engine architecture summary and flow connections
msx rocets summary engine.roc

# Solve steady-state power and flow balance
msx rocets balance engine.roc --target-pc=12E6 --mr=6.0

# Simulate dynamic ignition and ramp transient
msx rocets simulate engine.roc --t-end=2.0

# Project to executable Modelica 3.x
msx rocets to-modelica engine.roc --out=Engine.mo

# Export to FMI 2.0/3.0 System Structure Description (SSP)
msx rocets to-ssp engine.roc --out=SystemStructure.ssd

# Render vector P&ID flow diagram
msx rocets diagram engine.roc --out=pid.svg

VS Code & Web IDE Custom Editor ​

The @modelscript/ide-client package provides a dedicated dual-mode custom editor (modelscript.rocetsEditor):

  • P&ID Vector Schematic: Interactive diagram with propellant stream color coding, zoom/pan navigation, and SVG export.
  • Engine Balance Panel: Shaft power metrics, chamber stagnation conditions, sea level / vacuum thrust, and Isp.
  • Start Transient Viewer: Ignition ODE trajectory table and graphs (Pc(t), RPM(t), F(t), Tw(t)).
  • Module Netlist: Filterable tabular listing of modules, parameters, and ports.
  • Pre-Flight Diagnostics: Live diagnostic warnings and error badges with click-to-line navigation.
  • Projections: Side-by-side Modelica and FMI SSP code viewers with one-click export.

Open-Core under the GNU AGPL v3 License; Enterprise Edition (ee/) under the ModelScript Enterprise License. • Trademark Policy