Add DNB/subcooling margins and keypad rod control

This commit is contained in:
Codex Agent
2025-11-25 18:13:27 +01:00
parent c2bbadcaf4
commit bb2f03d8b2
5 changed files with 35 additions and 1 deletions

View File

@@ -402,6 +402,12 @@ class Reactor:
if (not self.secondary_pump_active or state.secondary_loop.mass_flow_rate <= 1.0) and total_power > 50.0:
self._handle_heat_sink_loss(state)
if state.core.dnb_margin is not None and state.core.dnb_margin < 0.3:
LOGGER.critical("DNB margin low: %.2f, initiating SCRAM", state.core.dnb_margin)
self.shutdown = True
self.control.scram()
if state.core.subcooling_margin is not None and state.core.subcooling_margin < 5.0:
LOGGER.warning("Subcooling margin low: %.1fK", state.core.subcooling_margin)
failures = self.health_monitor.evaluate(
state,