Dane Sabo aba017c5b1 overnight wrap: summary notes + tighter-entry heatup PJ stub
- OVERNIGHT_NOTES.md: read-this-first TL;DR for morning review.
  Points at journal.pdf (32 pages, latest entry has all results),
  validate_pj_heatup.png, and the Pluto app.  Lists priority-1 actions
  (look at data, decide on refinement vs accept-300s-tube) and
  priority-2 followups (scram reach ingestion, entry refinement,
  saturation hybrid, SOS barriers, alpha parametric).

- reach_heatup_pj_tight.jl: script committed but not yet run tonight.
  Tighter X_entry on T_c (width 6 K vs baseline 14 K) to test whether
  the low-T_avg-trip tube-looseness is entry-box-width driven or
  reach-growth driven.

Scram PJ still compiling as of this commit; will land separately
when it completes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 14:49:48 -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().