Skip to content

Add RocketCEA integration for propellant thermochemistry#14

Merged
cmflannery merged 2 commits intomasterfrom
add-rocketcea
Nov 26, 2025
Merged

Add RocketCEA integration for propellant thermochemistry#14
cmflannery merged 2 commits intomasterfrom
add-rocketcea

Conversation

@cmflannery
Copy link
Owner

@cmflannery cmflannery commented Nov 26, 2025

Summary

Integrates NASA CEA (via RocketCEA) for automatic combustion thermochemistry calculations. Engineers can now specify propellants directly instead of manually looking up Tc, gamma, and molecular weight.

Changes

  • New propellants.py module

    • get_combustion_properties() - get Tc, MW, gamma, c* from CEA
    • get_optimal_mixture_ratio() - find optimal O/F for max Isp
    • Propellant name normalization (LOX/LO2/O2 all work)
  • EngineInputs.from_propellants() factory method

    • Specify oxidizer, fuel, thrust, chamber pressure
    • Thermochemistry auto-calculated from CEA
  • RocketCEA is a required dependency

    • Requires Fortran compiler: brew install gcc (macOS) or apt install gfortran (Linux)
  • Bug fix: Fixed convergent section discontinuity in nozzle contour generation

Example

from openrocketengine import EngineInputs, design_engine
from openrocketengine.units import kilonewtons, megapascals

# Before: manually specify Tc=3620K, gamma=1.17, MW=23.3
# Now: just specify propellants
inputs = EngineInputs.from_propellants(
    oxidizer="LOX",
    fuel="RP1",
    thrust=kilonewtons(100),
    chamber_pressure=megapascals(7),
    mixture_ratio=2.7,
)

performance, geometry = design_engine(inputs)

Testing

  • Added tests/test_propellants.py with CEA integration tests
  • Added examples/propellant_design.py demonstrating LOX/RP-1, LOX/CH4, LOX/LH2 comparison

@cmflannery cmflannery changed the title Add rocketCEA Add RocketCEA integration for propellant thermochemistry Nov 26, 2025
@cmflannery cmflannery merged commit e9ca21e into master Nov 26, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant