A comprehensive physics-based simulation pipeline for pintle injector liquid rocket engines. This pipeline takes tank pressures as input and solves for chamber pressure, mass flow rates, and thrust output.
Input: Tank pressures (LOX and RP-1)
Output: Thrust, chamber pressure, mass flow rates, O/F ratio, Isp, and all combustion parameters
Key Feature: Chamber pressure (Pc) is solved, not input. The system balances propellant supply (from injectors) with combustion demand (from nozzle) to find the equilibrium operating point.
examples/pintle_engine/
├── README.md # This file
├── config_minimal.yaml # Engine configuration (geometry, fluids, etc.)
├── run_full_pipeline.py # Single-point evaluation example
├── comprehensive_performance_plots.py # 16-panel performance dashboard
├── chamber_3d_plots.py # 3D chamber behavior visualization
├── validate_chamber_intrinsics.py # Validation against Huzel & Huang
├── compare_ideal_vs_actual.py # Ideal CEA vs chamber-driven comparison
├── pressure_sweep_example.py # 2D pressure maps and slices
└── plot_performance_summary.py # 9-panel summary plots
pintle_pipeline/ # Core pipeline modules
├── constants.py # Fluid properties
├── config_schemas.py # Pydantic validation schemas
├── cea_cache.py # CEA lookup table management
├── combustion_eff.py # L*-based combustion efficiency
├── feed_loss.py # Feed system pressure losses
├── regen_cooling.py # Regenerative cooling model
├── io.py # YAML loading, CSV/JSON export
└── visualization.py # Plotting utilities
pintle_models/ # Physics models
├── geometry.py # Pintle geometry (areas, hydraulic diameters)
├── discharge.py # Discharge coefficient (Re-dependent)
├── spray.py # Spray physics (J, θ, We, SMD, x*)
├── closure.py # Mass flow closure (iterative solver)
├── chamber_solver.py # Chamber pressure root finder
├── nozzle.py # Thrust calculation (momentum + pressure)
└── runner.py # Main pipeline orchestrator
pip install numpy scipy matplotlib pandas pyyaml pydantic rocketceafrom pintle_pipeline.io import load_config
from pintle_models.runner import PintleEngineRunner
# Load configuration
config = load_config('examples/pintle_engine/config_minimal.yaml')
# Initialize pipeline
runner = PintleEngineRunner(config)
# Evaluate at specific tank pressures
P_tank_O = 1000 * 6894.76 # 1000 psi in Pa
P_tank_F = 950 * 6894.76 # 950 psi in Pa
results = runner.evaluate(P_tank_O, P_tank_F)
print(f"Chamber Pressure: {results['Pc']/6894.76:.1f} psi")
print(f"Thrust: {results['F']/1000:.2f} kN")
print(f"Mass Flow (O): {results['mdot_O']:.3f} kg/s")
print(f"Mass Flow (F): {results['mdot_F']:.3f} kg/s")
print(f"O/F Ratio: {results['MR']:.2f}")
print(f"Isp: {results['Isp']:.1f} s")# Single operating point
python examples/pintle_engine/run_full_pipeline.py
# Comprehensive performance dashboard
python examples/pintle_engine/comprehensive_performance_plots.py
# 3D chamber behavior plots
python examples/pintle_engine/chamber_3d_plots.py
# Validate against Huzel & Huang data
python examples/pintle_engine/validate_chamber_intrinsics.py
# Compare ideal vs actual performance
python examples/pintle_engine/compare_ideal_vs_actual.py
# 2D pressure sweeps and maps
python examples/pintle_engine/pressure_sweep_example.pyEdit config_minimal.yaml to define:
- Fluid properties: Density, viscosity, surface tension
- Pintle geometry: LOX orifices (n, d), fuel annulus (d_pintle_tip, h_gap)
- Feed system: Inlet diameters, loss coefficients
- Discharge coefficients: Cd values (fixed or Re-dependent)
- Chamber: Volume, L*, throat area
- Nozzle: Expansion ratio, exit area, efficiency
The pipeline follows this sequence:
- Input: Tank pressures (P_tank_O, P_tank_F)
- Feed Losses: Calculate pressure drop from tank to injector
Δp_feed = K_eff(P) × (ρ/2) × (ṁ/(ρ×A_hyd))²- Optional: Add regenerative cooling pressure drop for fuel
- Injector Flow: Calculate mass flow rates from injector to chamber
ṁ = Cd × A × √(2×ρ×Δp_injector)- Δp_injector = P_injector - Pc
- Spray Physics: Validate atomization quality
- Momentum flux ratio (J), spray angle (θ)
- Weber numbers, Sauter Mean Diameter (SMD)
- Evaporation length (x*)
- Chamber Solver: Find Pc where supply = demand
- Supply:
ṁ_supply = ṁ_O + ṁ_F(from injectors) - Demand:
ṁ_demand = Pc × At / c*_actual - c*_actual = η_c* × c*_ideal (CEA with L* correction)
- Supply:
- Nozzle: Calculate thrust
- Momentum:
F_momentum = ṁ × v_exit - Pressure:
F_pressure = (P_exit - Pa) × A_exit - Total:
F = F_momentum + F_pressure
- Momentum:
Generate plots for:
- Performance: Thrust, Isp, Pc, MR vs tank pressures
- Combustion: Tc, c*, gamma, R vs O/F ratio
- Injector: Mass flow rates, pressure drops, velocities
- Spray: J, θ, We, SMD, x* diagnostics
- Chamber: 3D plots of Pc, Thrust, Isp vs MR and mdot_total
LOX (Axial Flow):
- Flows through N orifices on pintle tip
- Area:
A_LOX = N × π × (d_orifice/2)² - Hydraulic diameter:
d_hyd = d_orifice
Fuel (Radial Flow):
- Flows through annulus gap between pintle tip and reservoir
- Area:
A_fuel = π × (R_outer² - R_inner²) - Hydraulic diameter:
d_hyd = 2 × h_gap(thin annulus)
Re-dependent model:
Cd(Re) = Cd_∞ - a_Re/√Re
Cd_min ≤ Cd ≤ Cd_∞
Set a_Re = 0 for fixed Cd (matches spreadsheet approach).
L*-based correction for finite chamber:
η_c* = 1 - C × e^(-K×L*)
Where:
L* = V_chamber / A_throat(characteristic length)- C, K: Empirical coefficients (default from Huzel & Huang)
Uses Brent's method to find Pc where:
residual(Pc) = ṁ_supply(Pc) - ṁ_demand(Pc) = 0
- Supply: From injector flow (depends on P_injector - Pc)
- Demand: From combustion (depends on Pc, MR, c*_actual)
High-fidelity calculation:
F = ṁ × v_exit + (P_exit - Pa) × A_exit
Exit conditions calculated using isentropic relations with actual gamma (frozen flow corrected).
pintle_geometry:
lox:
n_orifices: 16
d_orifice: 0.001779 # m (1.779 mm)
fuel:
d_pintle_tip: 0.019050 # m (19.05 mm = 0.750")
h_gap: 0.000313 # m (0.313 mm)feed_system:
oxidizer:
d_inlet: 0.009525 # m (3/8" = 9.525 mm)
K0: 2.0 # Base loss coefficient
K1: 0.0 # Pressure dependence (0 = constant)
fuel:
d_inlet: 0.009525 # m
K0: 2.0
K1: 0.0regen_cooling:
enabled: true
d_inlet: 0.009525 # m
L_inlet: 0.5 # m
n_channels: 12
channel_width: 0.002 # m
channel_height: 0.001 # m
channel_length: 0.18162 # m (chamber length)
d_outlet: null # Same as inlet
L_outlet: 0.1 # mRunning the examples generates:
comprehensive_performance.png- 16-panel dashboardpressure_sweep_2d.png- 2D contour maps (Thrust, Pc, MR, Isp)chamber_3d_plots.png- 3D scatter plotschamber_2d_projections.png- 2D projectionschamber_intrinsics_validation.png- Validation plotsideal_vs_actual_comparison.png- CEA vs chamber-driven comparisonpressure_slices.png- 1D slices through pressure grid
The pipeline has been validated against:
- Huzel & Huang: Chamber intrinsics (Tc, c*, gamma, R) vs O/F ratio
- Spreadsheet calculations: Mass flow rates and O/F ratio
- Physical constraints: Spray quality (We, x*), pressure drops
-
Chamber pressure is solved, not input. The
Pc_rangein config is only for CEA lookup table generation. -
Injector pressure drop varies with operating conditions. The 150 psi in spreadsheets is a design target, not the actual operating point.
-
Area calculations use exact formulas:
- LOX:
A = N × π × (d/2)² - Fuel:
A = π × (R_outer² - R_inner²)(annulus)
- LOX:
-
CEA cache is automatically generated on first run. Subsequent runs use cached values for speed.
Solver fails: "No solution: Supply > Demand at all Pc"
- Tank pressures are too low or mismatched
- Try increasing P_tank_O or reducing P_tank_F
- Check that P_tank_O > P_tank_F (typical)
O/F ratio too low/high:
- Adjust fuel gap (
h_gap) or LOX orifice diameter - Check discharge coefficients (Cd values)
Mass flow rates don't match spreadsheet:
- Verify geometry matches spreadsheet exactly
- Check that Cd values are correct
- Remember: pressure drops vary with operating conditions
- Huzel & Huang, "Design of Liquid Propellant Rocket Engines"
- RocketCEA documentation
- Pintle injector design literature
See repository license file.