Morning-review items 2 and 3.
Point 2 (scram X_entry expansion):
- reach_loca_operation.jl: LQR reach under Q_sg widened to
[0, 1.5*P_0] (steam-line break envelope) for 3 s horizon.
Longer horizons cause numerical blowup in the box-hull
reach propagator due to slow precursor modes amplifying
under large disturbance — documented in the script.
- reach_scram_pj_fat.jl: computes bounding-box union of
hot-standby + heatup-tight + operation + LOCA reach
envelopes, clamps obvious numerical outliers on precursors
and temperatures, builds a fat X_entry(scram), runs scram
PJ reach. Result pending (TMJets compiling).
Point 3 (heatup steam-dump Q_sg):
- configs/heatup/with_steam_dump.toml: Q_sg ∈ [0, 0.05·P_0]
as bounded parameter.
- reach_heatup_pj_sd.jl: 12-state RHS with x[10]=Q_sg (dx=0,
augmented bounded param) and x[11]=t. Running in
background.
Tight-entry heatup via the new TOML-config reach_heatup_pj.jl
reproduces the previous all-6-halfspaces-discharged result
(300s horizon, T_c envelope [281.05, 291.0]). Refactor
preserves semantics.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.MatrixEquations—arecfor LQR Riccati,lyapcfor 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().