LOX · LH₂ · LCH₄ · LN₂ Cryogenic Propellant Tank Thermal Suite FastAPI + Plotly.js + SciPy 12 Modules · Full Physics SI Units Everywhere
First Principles  ·  Deterministic Physics  ·  Industry-Grade Tool

CRYO TANK
THERMAL
Analysis Suite

A full-stack web application for transient thermal analysis of cryogenic propellant tanks — covering wall chilldown, boil-off, self-pressurization, thermal stratification, vent sizing and complete propellant loading operations. Real physics, real correlations, real answers.

LOX / LH₂ / LCH₄ / LN₂ Bromley Film Boiling Rohsenow Nucleate Zuber CHF MLI Heat Leak SciPy ODE Solver FastAPI Backend Plotly.js Charts SSE Live Progress SQLite Case Library
cryo_thermal_suite · chilldown_solver.py
$ uvicorn main:app --reload --port 8000
# LOX tank, Cylindrical+Elliptical, Al-2219 wall
→ Stage 1: Fluid properties (LOX @ 90.2 K)
  ρ_liq = 1141.0 kg/m³   h_fg = 213 kJ/kg
  T_sat = 90.2 K   P_crit = 5.04 MPa
→ Stage 2: Boiling regime identification
  ΔT_sat(t=0) = 209.8 K   Regime: Film
  h_film = 127 W/m²K   q" = 26.7 kW/m²
→ Stage 3: Transient ODE (solve_ivp RK45)
  t = 42 s   T_wall = 190 KTransition
  t = 68 s   T_wall = 96 KNucleate
→ Chilldown complete in 84.2 s
  Propellant lost: 14.7 kg   (3.1% of tank)
$
The Engineering Problem

WHY CRYOGENIC TANKS ARE HARD

Cryogenic propellant tanks (LOX, LH₂, LCH₄, LN₂) undergo several distinct thermal processes that drive real operational costs and risks. Understanding and quantifying these processes is the primary purpose of this suite.

FROM WARM TO COLD

When cryogen first enters a warm tank (near ambient, ~280–300 K), liquid flashes to vapor on contact with warm walls. The wall is so hot relative to the boiling point that a Leidenfrost vapor film forms — insulating the wall from the liquid and making heat transfer extremely inefficient. This film boiling regime must transition through nucleate boiling before the wall is truly chilled.

This three-regime boiling progression is the dominant physics in chilldown analysis. The Thermal Suite models all three regimes using Bromley (1950) for film boiling, Rohsenow (1952) for nucleate boiling, and Zuber (1959) for Critical Heat Flux — the transition boundary.

Once cold, a cryogenic tank continuously absorbs ambient heat through its insulation, structural supports, plumbing penetrations, and radiation — converting liquid to vapor. In a vented tank this is the boil-off rate; in a sealed tank this causes self-pressurization.

Film Boiling — Bromley (1950)
h_film = 0.62 · [k_v³·ρ_v·(ρ_l−ρ_v)·g·h_fg*] / [μ_v·ΔT·L]^0.25
Critical Heat Flux — Zuber (1959)
q"_CHF = 0.131 · h_fg · √ρ_v · [σ·g·(ρ_l−ρ_v)]^0.25
Nucleate Boiling — Rohsenow (1952)
q" = μ_l·h_fg·[g·(ρ_l−ρ_v)/σ]^0.5 · [Cp_l·ΔT / C_sf·h_fg·Pr_l]³
Vented Boil-Off Rate (constant pressure)
ṁ_boiloff = Q_total(t) / h_fg(T_sat)
Self-Pressurization (closed, saturated ullage)
dP/dt = f(Q_in, V_liq, V_vap, ρ_l, ρ_v, dρ/dP)
MLI Heat Leak — Modified Lockheed Equation
Q_MLI = [C_r·N_layers^2.56 + C_s·N_layers^(4/3)·k_solid + C_g·P_res] · A
Boiling Regime Color Convention (used across all charts)
Film Boiling — Red (#cc3333) — Leidenfrost, T_wall >> T_sat, inefficient, thermal shock risk Transition Boiling — Amber (#d4870a) — unstable regime between CHF and Leidenfrost points Nucleate Boiling — Green (#00e8a0) — efficient regime, h peaks near CHF Single-Phase Liquid — Blue (#00c8ff) — wall fully chilled, convection only
12tabs
Physics Modules in the Web App
4 fluids
LOX · LH₂ · LCH₄ · LN₂
18py
Core Physics Modules
0 ML
Deterministic Physics Only — No AI
SIonly
Internally — Display conversion at UI layer
Thermal Processes Modelled

6 COUPLED PHYSICAL PROCESSES

Each process is solved independently and can be linked — e.g. heat leak budget feeds directly into boil-off and self-pressurization. The suite covers the complete thermal life of a cryogenic tank from first fill to launch hold.

Chilldown → Heat Leak → Boil-Off → Self-Pressurization → Stratification → Vent Sizing
01 ❄️

Wall Chilldown

Lumped-mass wall ODE from ambient to cryogenic temperature. Three boiling regimes. Propellant loss quantified.

02 🌡️

Heat Leak Budget

MLI, structural supports, plumbing penetrations, radiation, and free convection. Sunburst chart breakdown.

03 💨

Vented Boil-Off

Constant-pressure boil-off over time. Liquid level tracking, boil-off rate in kg/hr and %/day.

04 📈

Self-Pressurization

Closed-tank two-region DAE/ODE. Saturated or GHe-pressurized ullage. Time-to-relief prediction.

05 🌊

Stratification

N-layer horizontal liquid stack with Rayleigh-Bénard inter-layer convection. Pressure rise prediction.

06 🔧

Vent Sizing

Compressible choked/unchoked orifice flow. Two-phase HEM correction. Required diameter via brentq.

System Architecture

HOW THE SYSTEM IS BUILT

Clean two-tier architecture: a Python/FastAPI backend handles all physics and ODE solving; a single-page HTML/CSS/JS frontend handles all UI, charts, and user interaction. They communicate via a REST+SSE JSON API.

BACKEND PHYSICS ENGINE

The backend is a pure-physics Python package with zero GUI dependencies. All thermal calculations — property correlations, boiling regime transitions, ODE integration, and compressible flow sizing — are implemented in the core/ modules using NumPy and SciPy.

Long-running transient solvers (chilldown, boil-off, stratification) use Server-Sent Events (SSE) so the frontend receives live progress updates while the ODE integrator runs in a ThreadPoolExecutor. All Plotly figures are generated server-side as JSON and sent to the frontend for rendering.

The backend is fully stateless per request — all inputs come from the JSON request body, all outputs go back in the JSON response. The only persistent state is the SQLite case library.

FRONTEND SINGLE-PAGE APP

The frontend is a single HTML file with all CSS and JavaScript inline — no build step, no framework, no NPM. Pure vanilla JS + Fetch API + Plotly.js.

12 physics tabs share a unified design system derived from the master prompt's CSS custom properties. Each tab has a left-column input card (295px) and right-column results cards + Plotly charts. Tab switching is handled by JS without any routing library.

SSE streams are consumed via EventSource and drive an animated progress bar. Results from each tab are stored in a global state object for CSV export. The exportCSV() function uses the Blob API to download the current tab's time arrays.

⚙️ Backend Stack

Python / FastAPI

FastAPI with Uvicorn ASGI server. Pydantic v2 models for all request/response schemas. SciPy solve_ivp (RK45) for transient ODEs, brentq for inverse solves, PchipInterpolator for tabulated fallbacks.

  • Framework FastAPI + Uvicorn[standard]
  • Numerics NumPy, SciPy, CoolProp
  • Charts (server) Plotly (to_json())
  • Validation Pydantic v2
  • Persistence SQLite (standard sqlite3)
Fully Implemented
🌐 Frontend Stack

Vanilla JS + Plotly

Single index.html SPA. No React, no Vue, no build pipeline. Google Fonts: DM Sans + Space Mono (specified in design system). Plotly.js from CDN with local fallback in assets/.

  • Charts (client) Plotly.js (CDN + local fallback)
  • API calls fetch() + EventSource SSE
  • Fonts DM Sans + Space Mono
  • CSS Custom properties design system
  • State const state = {} global object
Fully Implemented
🔗 Communication Protocol

REST + SSE JSON

Frontend sends POST /api/<module>/run with JSON body. Backend returns JSON with scalar results, time arrays, and Plotly figure JSON strings. Long solvers stream progress via SSE.

  • Sync endpoints POST …/run → full JSON result
  • Streaming GET …/stream → SSE progress + data
  • Plotly figs fig.to_json() → JSON string → Plotly.react()
  • CORS allow_origins=["*"] (local dev)
  • Base URL const API = 'http://localhost:8000'
Fully Implemented
Project Layout

FILE STRUCTURE EXPLAINED

Every file exists for a reason. Below is the full directory tree with a description of each file's purpose, its role in the physics stack, and its dependencies.

cryo_tank_thermal_suite/ — Full Directory Tree
backend/
main.py ← FastAPI app entrypoint
requirements.txt
cases.db ← SQLite case library
core/ ← All physics here
fluid_properties.py
boiling_heat_transfer.py
chilldown_solver.py
tank_geometry.py
heat_leak.py
boiloff_solver.py
self_pressurization.py
stratification.py
ullage_pvt.py
vent_system.py
loading_ops.py
densification.py
pressurant.py
propellant_cea.py
vent_gas.py
units.py
database.py
schemas/ ← Pydantic I/O models
chilldown.py boiloff.py
heat_leak.py stratification.py
self_pressurization.py
vent_sizing.py loading_ops.py
parametric.py fluid_tank.py
case_library.py
routes/ ← FastAPI routers
fluid_tank.py chilldown.py
heat_leak.py boiloff.py
self_pressurization.py
stratification.py vent_sizing.py
loading_ops.py validation.py
parametric.py case_library.py
vent_gas.py propellant.py
densification.py pressurant.py
frontend/
index.html ← 12-tab SPA (all CSS + JS)
assets/
plotly.min.js ← local CDN fallback
core/ — Dependency Order

Build Order Matters

Core modules have a strict dependency chain. Everything depends on fluid_properties.py and tank_geometry.py — these must be built and validated first.

  • Layer 1 (base) fluid_properties.py, tank_geometry.py, units.py
  • Layer 2 boiling_heat_transfer.py, ullage_pvt.py
  • Layer 3 heat_leak.py, chilldown_solver.py, boiloff_solver.py
  • Layer 4 self_pressurization.py, stratification.py, vent_system.py
  • Layer 5 loading_ops.py (delegates to layer 3+4)
  • Top database.py (independent), propellant_cea.py
schemas/ — Pydantic Validation

Type-Safe API Contracts

Every API endpoint has a paired Pydantic schema file. Inputs are validated at the HTTP boundary — no raw dicts reach physics code. Responses are also typed, enabling automatic OpenAPI docs at /docs.

  • chilldown.py ChilldownRequest, ChilldownResponse
  • heat_leak.py HeatLeakRequest, HeatLeakResponse
  • boiloff.py BoiloffRequest, BoiloffResponse
  • fluid_tank.py FluidTankConfig, TankGeometryInput
  • case_library.py Case, CaseListResponse
Core Module Reference

EVERY PHYSICS FILE EXPLAINED

🧪 core/fluid_properties.py

Property Correlations

The foundation of the entire suite. Provides T- and P-dependent thermophysical properties for LOX, LH₂ (para), LCH₄, LN₂ using published polynomial/exponential fits derived from Barron's Cryogenic Heat Transfer, Younglove/McCarty, and NIST technical notes.

  • Functions Psat(T), Tsat(P), rho_liq, rho_vap, cp, k, mu, h_fg, sigma
  • Inverse solve Tsat(P) via scipy.brentq
  • Z factor Redlich-Kwong for P > 0.5 MPa
  • Validation validate_properties() → % error vs NIST reference
Critical Dependency
🔥 core/boiling_heat_transfer.py

Boiling Correlations

Implements the full pool boiling curve for any wall superheat ΔT_sat. The key function compute_boiling_hc() returns q_flux, h_coefficient, and regime_label from {"Film","Transition","Nucleate","Single-Phase Liquid"}.

  • Film boiling Bromley (1950) — C=0.62 horiz, 0.943 vert
  • CHF Zuber (1959) — critical heat flux boundary
  • Nucleate Rohsenow (1952) — C_sf=0.013, n=1.0
  • Transition Log-linear interpolation CHF↔Leidenfrost
Implemented
⏱️ core/chilldown_solver.py

Chilldown ODE Solver

Lumped-mass wall chilldown transient solver. The wall is discretised into N segments (5–50). At each timestep, the local boiling regime and heat transfer coefficient are evaluated, giving the ODE for wall temperature of each segment.

  • Integrator scipy.solve_ivp RK45 adaptive stepsize
  • State variables T_wall_i(t) for i=1..N segments
  • Tracks cumulative boiloff mass, phase boundary times
  • Thermal shock dT/dt threshold check vs material yield
Implemented + SSE Streaming
📐 core/tank_geometry.py

Tank Geometry

TankGeometry dataclass with exact analytic formulas for wetted area, dry area, and liquid volume as a function of fill height. Inverse solve (liquid_fraction_to_height) via brentq. Supports three shapes.

  • Cylindrical + Elliptical heads scipy.integrate.quad for head volume
  • Cylindrical + Hemispherical closed form
  • Pure Spherical closed form
  • Materials Al-2219, Al-Li 2195, SS 304L, Ti-6Al-4V, CFRP
Critical Dependency
🛡️ core/heat_leak.py

Heat Leak Models

Five sub-models for every heat path into the cryogenic tank. Each cites its source inline in code comments.

  • MLI Modified Lockheed equation — Barron Ch.6
  • Supports G-10 k(T) integrated via scipy.quad
  • Penetrations thin-wall tube conduction, N lines
  • Radiation grey-body ε·σ_SB·A·(T_h⁴−T_c⁴)
  • Convection Churchill-Chu correlation for vert. cylinder
Implemented
💧 core/boiloff_solver.py

Vented Boil-Off

Simulates vented (constant-pressure) boil-off over time. Since temperature is fixed at T_sat(P_vent), the energy balance is purely Q_total(t)/h_fg. Wetted area updates as liquid level drops.

  • Outputs m_liquid(t), fill_fraction(t), boiloff_rate(t)
  • Area tracking wetted_area updates via tank_geometry
  • Units displayed kg/hr, %/day via units.py
Implemented + SSE
📊 core/self_pressurization.py

Closed-Tank Pressure Rise

Two-region (liquid + saturated vapor) lumped model in a sealed tank. The DAE is reduced to an ODE by differentiating the saturation constraint. GHe-pressurized ullage uses partial pressure bookkeeping.

  • Integrator scipy.solve_ivp
  • Modes Pure saturated vapour / GHe-pressurised
  • Key output initial dP/dt (kPa/min), time-to-relief
Implemented + SSE
🌡️ core/stratification.py

Thermal Stratification

N-layer horizontal liquid stack model. Heat enters at the wall and drives convection between layers following Rayleigh-Bénard. The saturation pressure is tracked from the top layer temperature — key to understanding rollover.

  • Layers 2–20 user-selectable layers
  • Stability Brunt-Väisälä stability reduction factor
  • Output T(z, t) profiles, P_sat(T_surface) vs P_sat(T_bulk)
Implemented + SSE
🔩 core/vent_system.py

Vent / Relief Sizing

Compressible flow orifice equations for both choked and unchoked regimes. Inverts for required orifice diameter to pass a given mass flow. Two-phase HEM (Homogeneous Equilibrium Model) correction for vapor quality < 1.

  • Choked criterion P_d/P_u < 0.528 (γ=1.4 air, exact for each fluid)
  • Sizing brentq inversion for required D_orifice
  • Two-phase HEM correction factor applied
Implemented
⚗️ core/ullage_pvt.py

Ullage P-V-T

Bookkeeps ullage gas state with real-gas Z-factor. GHe always ideal (Z=1.0); working fluid vapour uses Redlich-Kwong correction above 0.5 MPa.

Implemented
🔄 core/loading_ops.py

Loading Sequencer

Chains slow-fill (chilldown), fast-fill (mass accounting), topping/hold (boiloff), and optional drain phases into a single continuous time array with phase boundary markers.

Implemented + SSE
📏 core/units.py

SI Unit Conversions

All internal calculations in SI (Pa, K, kg, m, s, J, W). This module provides SI↔practical conversions (bar, kg/hr, %/day, liters, kPa/min) for display only.

Implemented
💾 core/database.py

Case Library DB

SQLite schema and CRUD operations for the case library. Saves complete analysis configurations (fluid, geometry, all inputs) as JSON blobs for reload, compare, and export.

SQLite + CRUD
Physics Deep Dive

THE POOL BOILING CURVE

The pool boiling curve is the most important single curve in cryogenic tank thermal analysis. It maps wall superheat (ΔT_sat = T_wall − T_sat) to heat flux, and governs the entire chilldown process.

Pool Boiling Curve — LOX at 1 atm (qualitative)
Film boiling (ΔT > ΔT_Leid)
h~100–500 W/m²K
Transition boiling
q" decreasing
Critical Heat Flux (CHF)
q"_max peak
Nucleate boiling (ΔT < ΔTCHF)
h~1000–10000 W/m²K
Single-phase liquid convection
h~500–2000 W/m²K
Leidenfrost point = minimum in film boiling q"  |  CHF = max in nucleate boiling q"
Transition boiling is mechanically unstable — q" decreases as ΔT increases
Film Boiling — The Leidenfrost Effect

Vapor Film Insulation

When ΔT_sat is very large (200+ K at chilldown start), a continuous vapor film forms between the wall and liquid — insulating the wall. This is the Leidenfrost state. The Bromley correlation gives h_film ∝ ΔT^(−0.25), so larger superheat actually means lower heat flux per unit ΔT.

This is why chilldown takes time — the tank must stay in this low-efficiency regime until the wall cools enough to transition.

Nucleate Boiling — The Target Regime

Bubble Nucleation

When ΔT_sat is small (<~20 K for LOX), discrete bubbles nucleate at wall surface defects and depart. This is the efficient regime — h is 10–100× higher than film boiling. The Rohsenow correlation gives q" ∝ ΔT³, with the C_sf surface-fluid constant (0.013 default) characterising the surface finish.

Reaching nucleate boiling is the goal of chilldown. Once there, boil-off rate drops dramatically.

Critical Heat Flux — The Zuber Limit

Peak Heat Flux & Burnout

CHF marks the boundary between nucleate and transition boiling. Above CHF, bubble nucleation is so intense that vapor blankets the surface — transitioning back toward film boiling. For cryogens, CHF is much lower than for water (LOX CHF ≈ 100–300 kW/m²) because the vapor density is high relative to liquid density. The Zuber (1959) correlation predicts q"_CHF from fluid properties alone — no empirical constants.

Backend API

REST ENDPOINT REFERENCE

All routes return JSON. SSE routes return text/event-stream and are used for long-running ODE solvers. Pydantic schemas validate all inputs — invalid requests get HTTP 422 with field-level error detail.

Method Route Description & Schema
GET /api/fluid/properties Fluid thermophysical properties at given T & P. Params: ?fluid=LOX&T=90.2 → FluidPropertiesResponse
POST /api/tank/geometry Compute tank volumes and areas for given shape + dimensions → TankGeometryResponse
POST /api/chilldown/run Full chilldown transient → ChilldownResponse (time arrays, summary, Plotly JSON)
GET /api/chilldown/streamSSE Streaming chilldown solve — emits progress%, interim T_wall arrays, final result
POST /api/heat-leak/run Heat leak budget breakdown → HeatLeakResponse (table, sunburst Plotly JSON, implied boiloff)
POST /api/boiloff/run Vented boil-off transient → BoiloffResponse
GET /api/boiloff/streamSSE Streaming boiloff solve
POST /api/self-press/run Closed-tank self-pressurization → SelfPressResponse (P(t), T_liquid(t), dP/dt, time-to-relief)
GET /api/self-press/streamSSE Streaming self-pressurization solve
POST /api/stratification/run N-layer thermal stratification → StratResponse (T(z,t) profile, P_sat comparison)
GET /api/stratification/streamSSE Streaming stratification solve
POST /api/vent/run Vent / relief valve sizing → VentResponse (required D_orifice, flow regime, capacity chart)
POST /api/loading-ops/run Full loading sequence (slow-fill + fast-fill + top-off) → LoadingOpsResponse
GET /api/loading-ops/streamSSE Streaming loading operations solve
GET /api/validation/run Run all 8 self-test cases → ValidationResponse (PASS/FAIL per test, Psat chart JSON)
POST /api/parametric/run Parametric sweep study → ParametricResponse (2D line chart or heatmap JSON)
GET /api/cases List all saved cases → CaseListResponse
POST /api/cases Save current analysis configuration → Case
GET /api/cases/{id} Load a saved case by ID → Case (full JSON blob for re-population)
DELETE /api/cases/{id} Delete a case → {deleted: true}
GET /api/health Health check → {status: "ok"}
SSE Architecture — Long-Running Solvers

How Streaming Works

Long-running ODE solvers (chilldown, boil-off, stratification, loading ops, parametric sweeps) expose a GET …/stream SSE endpoint. The ODE runs in a ThreadPoolExecutor so it does not block the FastAPI event loop. Results are pushed via a shared asyncio queue.

SSE Event Types
event: progress   data: {"pct": 42}
event: data   data: {"t": [...], "T_wall": [...]}
event: done   data: {"summary": {...}}
event: error   data: {"msg": "..."}

The frontend creates an EventSource object listening to the SSE endpoint. Progress events update a progress bar. On done, the full result is rendered. On error, the user sees an error banner.

Frontend SSE Pattern
const src = new EventSource(API + '/api/chilldown/stream?' + params);
src.addEventListener('progress', e => updateBar(JSON.parse(e.data).pct));
src.addEventListener('done', e => { renderResults(e.data); src.close(); });
Frontend Application

12-TAB SINGLE-PAGE APP

The complete frontend lives in a single index.html file — all CSS in a <style> block, all JS in a <script> block. Each of the 12 tabs corresponds to a physics module and follows the same left-column inputs / right-column results layout.

🏗️ Tab 1

Fluid & Tank Setup

Fluid dropdown (LOX/LH₂/LCH₄/LN₂) auto-fetches NBP properties from the API. Tank shape, dimensions, wall material, and initial conditions. Canvas SVG schematic of selected tank shape with liquid level indicator.

First Load Default: LOX
❄️ Tab 2

Chilldown Transient

SSE-streamed chilldown solve. Multi-trace T_wall(t) chart colored by boiling regime. Animated boiling curve showing operating point scrubbed through time. Thermal shock flag if dT/dt exceeds material limit.

SSE Streaming
🛡️ Tab 3

Heat Leak Budget

Dynamic table to add/remove heat leak sources (MLI, supports, penetrations, radiation, convection). Sunburst chart shows % breakdown. MLI optimizer chart: q vs N_layers with knee-point annotation.

Dynamic Row Builder
💨 Tab 4

Vented Boil-Off

SSE-streamed boil-off transient. m_liquid(t), fill fraction, instantaneous and cumulative boil-off. Topping calculator: required flow rate to maintain fill fraction.

SSE Streaming
📈 Tab 5

Self-Pressurization

Closed tank P(t) with dashed relief setpoint line and auto-annotation "RELIEF VALVE OPENS". Saturated or GHe ullage modes. Stacked area chart for GHe partial pressure contribution.

SSE Streaming
🌊 Tab 6

Thermal Stratification

Animated T(z) profile — slider scrubs through time showing warm-top, cool-bottom characteristic. Comparison table: well-mixed (Tab 5 pressure) vs stratified predicted pressure after duration.

Animated Plotly Slider
🔧 Tab 7

Vent & Relief Sizing

Required orifice diameter output highlighted green (CHOKED) or amber (UNCHOKED). Capacity chart: mdot vs orifice diameter family of curves for P_upstream from nominal to relief setpoint.

Instant Result
🔄 Tab 8

Loading Operations

Sequence builder table (add/remove phases). 4-panel master timeline: m_liquid, T_wall, P_tank, m_lost_cumulative. Vertical phase boundary lines. Propellant cost in dollars.

SSE Streaming
Tab 9

Self-Test & Validation

Runs all 8 built-in validation cases. Per-fluid property tables vs NIST references — cells color-coded by % error. Psat(T) log-scale chart all four fluids from triple point to critical point.

8 Automated Checks
📊 Tab 10

Parametric Study

5 prebuilt studies: boil-off vs MLI layers, chilldown loss vs flow rate, time-to-relief vs heat leak, boil-off vs fill fraction, fluid comparison. Custom sweep option. 2D line or heatmap output.

SSE Streaming
💾 Tab 11

Case Library

Table of all saved cases with Load / Delete / Duplicate buttons. Compare mode overlays two cases on shared charts. JSON export/import. SQLite-backed persistence.

SQLite Persistence
📚 Tab 12

Theory & References

Scrollable reference covering all 11 physical theory topics: boiling regimes, MLI model, self-pressurization DAE derivation, stratification physics, compressible vent flow, LOX/LH₂/LCH₄/LN₂ comparison, and modeling limitations.

Reference Material
Target Fluids

FOUR CRYOGENIC PROPELLANTS

The suite supports all four major cryogenic propellants used in launch vehicles and ground test articles. Property correlations are anchored to published NIST/Barron reference values at the Normal Boiling Point within 5%.

LOX
O₂ — Liquid Oxygen
T_NBP90.2 K
ρ_liq @ NBP1141 kg/m³
h_fg @ NBP213 kJ/kg
T_crit154.6 K
P_crit5.04 MPa
UsageOxidiser, most launch vehicles
LH₂
p-H₂ — Para-Hydrogen
T_NBP20.3 K
ρ_liq @ NBP70.8 kg/m³
h_fg @ NBP446 kJ/kg
T_crit33.2 K
P_crit1.30 MPa
UsageSLS core stage, upper stages, space tugs
LCH₄
CH₄ — Liquid Methane
T_NBP111.7 K
ρ_liq @ NBP423 kg/m³
h_fg @ NBP510 kJ/kg
T_crit190.6 K
P_crit4.60 MPa
UsageStarship, Neutron, Terran-R
LN₂
N₂ — Liquid Nitrogen
T_NBP77.4 K
ρ_liq @ NBP807 kg/m³
h_fg @ NBP199 kJ/kg
T_crit126.2 K
P_crit3.39 MPa
UsageGround test articles, inert simulant
Why LH₂ is the Hardest

The LH₂ Challenge

Liquid hydrogen is the most thermally demanding cryogen in the suite. Its extremely low boiling point (20.3 K) means even small heat leaks produce large boil-off fractions — because the enthalpy of vaporization per unit volume is the lowest of all four fluids. A 1 W heat leak into an LH₂ tank causes roughly 5× more boil-off in %/day than the same leak into an LOX tank.

For identical tank geometry and insulation: boil-off order = LH₂ > LN₂ > LOX > LCH₄. This is verified as validation case #8 in Tab 9.

Validation Case #8

Fluid Ordering Check

Boil-off rate for identical tank + Q_in
ṁ_boiloff = Q / h_fg(T_sat)
%/day = ṁ × 86400 / m_liquid_total × 100
Why LH₂ boils off fastest — low h_fg/volume
h_fg(LH₂) = 446 kJ/kg but ρ_liq = 70.8 kg/m³
→ h_fg·ρ ≈ 31.6 MJ/m³ vs LOX ≈ 243 MJ/m³
Self-Test & Validation

8 AUTOMATED VALIDATION CASES

Every function in the suite is validated against published reference values. Tab 9 runs all 8 checks automatically via GET /api/validation/run and displays PASS/FAIL with % error for each. These form the acceptance criteria for correctness of the property correlations.

Case #1

LOX Psat Check

Psat(90.2 K) must equal ~101.325 kPa within 3%. Psat(100 K) must be in [230, 280] kPa. Anchors the entire LOX property model at NBP.

PASS criterion: < 3%
Case #2

LH₂ Density Check

rho_liq(20.3 K) = 70.8 kg/m³ within 5%. At T_crit=33.2 K → rho_crit ~31 kg/m³ within 15%.

PASS criterion: < 5%
Case #3

Film Boiling h (LN₂)

T_wall=293K, T_sat=77.4K, L_char=0.05m → h_film must be in [20, 500] W/m²K. Validates Bromley correlation implementation.

PASS criterion: in range
Case #4

Nucleate vs Film Magnitude

For LN₂ at ΔT_sat=5K: h_nucleate must be ≥ 10× h_film. Validates the 10–100× efficiency advantage of nucleate boiling.

PASS criterion: ≥10×
Case #5

MLI Heat Leak Range

N=30 layers, T_hot=293K, T_cold=90K, A=10m², P_res=1.3e-4 Pa → Q_MLI must be in [0.5, 50] W. Validates Lockheed MLI model.

PASS criterion: in [0.5, 50] W
Case #6

Self-Press dP/dt

V=10 m³ LOX, 90% fill, P_init=0.15 MPa, Q=50W → initial dP/dt must be in [0.01, 50] kPa/min. Validates closed-tank ODE.

PASS criterion: in range
Case #7

Vent Orifice Flow Regime

GOX at P_up=0.12 MPa, T=90.2K, ṁ=0.05 kg/s, Cd=0.8 → must identify UNCHOKED (P_d/P_u=0.844 > 0.528), D in [1, 30] mm.

PASS: UNCHOKED + D range
Case #8

Fluid Ordering Boil-Off

Identical tank + heat leak → %/day boil-off order must be: LH₂ > LN₂ > LOX > LCH₄. Validates all four fluid property sets relative to each other.

PASS: correct ordering
Frontend Design System

VISUAL LANGUAGE OF THE APP

The frontend implements a strict design system specified in the master prompt. Every color, spacing, typography choice, and component pattern is defined as a CSS custom property and must not deviate. This ensures visual consistency across all 12 tabs.

#000000
--bg (Background)
Deepest void — used for input fields and absolute darkest layer
#00c896
--accent (Primary Green)
LOX cold-liquid highlights, active states, primary CTAs, nucleate boiling regime
#3d8bff
--accent2 (Blue)
Vapor/ullage indicators, info banners, single-phase liquid regime color
#d4870a
--warn (Amber)
Warnings, transition boiling regime, unchoked vent flag, topping calculators
#cc3333
--danger (Red)
Errors, film boiling regime, thermal shock flag, danger states
Space Mono
--mono Font
All numeric values, headers, labels, tab buttons, result rows, code blocks
DM Sans
--sans Font
Table cell text, general body text inside cards, form field input labels
295px
Left Column Width
Inputs column is always 295px; right columns take remaining space in 3-col grid
Development Status

WHAT IS IMPLEMENTED

The suite was built according to the master prompt spec. Below is a full account of what is implemented, what was extended beyond the spec, and areas for future enhancement.

Core Physics — Complete ✓

PROPERTY & BOILING MODELS

LOX/LH₂/LCH₄/LN₂ correlations Psat/Tsat, rho, cp, k, mu, h_fg, sigma Bromley film boiling Rohsenow nucleate boiling Zuber CHF Redlich-Kwong Z factor validate_properties() self-test
Transient Solvers — Complete ✓

ODE/DAE MODULES

Chilldown solver (N segments, RK45) Boiloff solver (vented, constant P) Self-pressurization (saturated + GHe) Stratification (N layers, Rayleigh-Bénard) Loading ops sequencer (4 phases) ThreadPoolExecutor + SSE streaming
Steady-State Modules — Complete ✓

SIZING & BUDGET TOOLS

Heat leak budget (5 source types) Vent/relief sizing (choked + unchoked) Tank geometry (3 shapes, exact analytic) Ullage P-V-T bookkeeping Densification module Pressurant sizing
Frontend — Complete ✓

12-TAB SPA

All 12 tabs with full input forms Plotly.js charts on all result tabs SSE progress bars (6 tabs) CSV export (Blob API) Case library with SQLite Tank schematic Canvas SVG Parametric sweep (5 prebuilt + custom)
Future Extensions

ENHANCEMENT OPPORTUNITIES

REFPROP/CoolProp direct integration 2D axisymmetric FEM chilldown Sloshing dynamics (pendulum model) Supercritical storage (beyond P_crit) Densification optimizer 3D tank visualization (Three.js) Rollover event simulation
Cryogenic Thermal Suite — Architecture Stack
Browser UI  index.html — 12 tabs Live
Plotly.js Charts
CDN + local fallback
SSE Progress
EventSource API
REST + SSE JSON API  ·  http://localhost:8000
FastAPI  routes/ + schemas/ Live
chilldown
solver
boiloff
solver
self_press
solver
stratif
solver
heat_leak
models
vent
sizing
fluid_properties.py  ·  boiling_heat_transfer.py  ·  tank_geometry.py
NumPy
arrays
SciPy
solve_ivp
SQLite
cases.db
Getting Started

SETUP & RUN

The backend runs as a local Python process; the frontend is served by FastAPI at /. No separate web server needed for development.

Installation & Launch
# 1. Install backend dependencies
cd cryo_tank_thermal_suite/backend
pip install -r requirements.txt
# 2. Start the FastAPI backend
uvicorn main:app --reload --port 8000
# 3. Open the frontend in a browser
http://localhost:8000/
# — or serve frontend separately —
python -m http.server 3000 --directory frontend
# 4. API documentation (auto-generated)
http://localhost:8000/docs
requirements.txt

Python Dependencies

  • fastapi Web framework + auto OpenAPI docs
  • uvicorn[standard] ASGI server with WebSocket + SSE
  • numpy Array math, all property evaluations
  • scipy solve_ivp, brentq, quad, PchipInterpolator
  • plotly Server-side figure generation → JSON
  • pydantic Request/response schema validation
  • coolprop High-accuracy fallback property lookup
Non-Negotiable Rules

Engineering Constraints

  • SI everywhere Pa, K, kg, m, s, J, W — conversion only at display
  • No AI/ML Deterministic physics only — correlations & numerics
  • No stubs Zero pass, zero TODO, zero NotImplementedError
  • Cite sources Every correlation cites its paper inline
  • Offline capable Backend runs fully without internet access
"The behavior of cryogenic liquids in storage tanks is governed by physics that is unforgiving — you cannot argue with Leidenfrost."
Principle of First-Principles Engineering

WHY FIRST PRINCIPLES

Every number in this suite comes from a physics equation, not a lookup table or empirical rule of thumb. The Bromley correlation for film boiling was published in 1950. The Rohsenow nucleate boiling correlation in 1952. The Zuber CHF model in 1959. These equations have been validated against cryogenic test data for over 60 years.

By implementing them from first principles — with the full correlation equations, proper fluid property coupling, and transient ODE integration — this tool gives you answers you can trace back to a citation and justify to a review board.

The goal: a propulsion engineer provides tank geometry and insulation design, and gets a credible boil-off rate, chilldown loss estimate, and time-to-relief prediction in minutes.

1950
Bromley Film Boiling
60+
Years of Validation
<5%
Target Property Error