Dane Sabo 5050b9e71e fat-entry scram: n decays 0.047→0.009 over 60s from fat X_entry
Scram PJ reach from the bounding-box union of:
  - hot-standby box (mode_boundaries.q_shutdown)
  - heatup-tight reach envelope (results/reach_heatup_pj_tight.mat)
  - operation-LQR reach envelope (results/reach_operation_result.mat)
  - LOCA operation envelope (results/reach_loca_operation.mat, 3s)

with precursor + temperature outliers clamped to physical bounds.

Results at probe horizons:
  T=10s: 10890 sets in 480s wall — n ∈ [-8e-4, 0.047]   T_c [231, 362]
  T=30s: 16925 sets in 2892s wall — n ∈ [-4e-4, 0.021]  T_c [229, 361]
  T=60s: 23919 sets in 705s wall  — n ∈ [-2e-4, 0.009]  T_c [226, 359]

Monotone n decay, factor-of-5-per-minute even from the wide union.
This is the defensible scram-obligation version: starts from anywhere
the plant could plausibly be (including LOCA-perturbed operation
state), proves n decays. X_exit(scram)=n≤1e-4 still not reached in
60s — same T_max-vs-plant-decay mismatch previously flagged.

Fixed: missing Printf import that had failed the summary block on the
first run (results still computed correctly, just the final print
errored; the matwrite is after the print so the mat file wasn't
saved on that run).

Journal entry for 2026-04-21 extended with the fat-entry result +
the LOCA-reach 3s-horizon numerical-looseness apass. 38 pages.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 21:40:04 -04:00
..

code

Plant model, controllers, and reach-analysis toolchain for the HAHACS preliminary example. All Julia.

What this is

A 10-state coupled neutronics + thermal-hydraulics model (point kinetic equations + lumped thermal loop) with continuous-mode controllers for each of the DRC modes (shutdown, heatup, operation, scram), plus a hand-rolled linear reach-tube propagator, a Lyapunov-ellipsoid barrier attempt, and scaffolding for TMJets-based nonlinear reach.

Ported from MATLAB on 2026-04-20 once the reach experiments made it clear that Julia's stack (OrdinaryDiffEq, MatrixEquations, ReachabilityAnalysis, LazySets, @taylorize) was the right tool for everything we need going forward. The MATLAB originals are in the git history.

Running

First time:

cd code
julia --project=. -e 'using Pkg; Pkg.instantiate()'

Subsequent:

julia --project=. scripts/main_mode_sweep.jl          # all 5 DRC modes, figures
julia --project=. scripts/reach_operation.jl          # operation-mode linear reach
julia --project=. scripts/barrier_lyapunov.jl         # Lyapunov barrier attempt
julia --project=. scripts/barrier_compare_OL_CL.jl    # OL vs CL barrier
julia --project=. scripts/reach_heatup_nonlinear.jl   # nonlinear heatup (10s cap)

Figures save to ../docs/figures/. Reach results save to ../reachability/*.mat (gitignored).

Structure

See CLAUDE.md for the architectural overview and ../journal/ for the invention-log-style narrative of how this code got written.

Dependencies

From Project.toml:

  • OrdinaryDiffEq — ODE solver, Rodas5 for stiff systems.
  • MatrixEquationsarec for LQR Riccati, lyapc for Lyapunov.
  • ReachabilityAnalysis + LazySets — reach sets and set operations.
  • Plots — figures (GR backend by default).
  • JSON — read ../reachability/predicates.json.
  • MAT — save results.

Manifest.toml is gitignored; regenerate locally on first Pkg.instantiate().