Add SCRAM matrix (DNB/subcool/SG limits) and clad split

This commit is contained in:
Codex Agent
2025-11-28 18:44:16 +01:00
parent 7ffb2a8ce0
commit def8ded816
4 changed files with 30 additions and 5 deletions

View File

@@ -435,12 +435,25 @@ 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:
# SCRAM matrix: DNB, subcooling, steam generator level/pressure
if state.core.dnb_margin is not None and state.core.dnb_margin < 0.5:
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:
if state.core.subcooling_margin is not None and state.core.subcooling_margin < 2.0:
LOGGER.critical("Subcooling margin lost: %.1fK, initiating SCRAM", state.core.subcooling_margin)
self.shutdown = True
self.control.scram()
elif state.core.subcooling_margin is not None and state.core.subcooling_margin < 5.0:
LOGGER.warning("Subcooling margin low: %.1fK", state.core.subcooling_margin)
if state.secondary_loop.level < 0.05 or state.secondary_loop.level > 0.98:
LOGGER.critical("Secondary level out of bounds (%.1f%%), initiating SCRAM", state.secondary_loop.level * 100)
self.shutdown = True
self.control.scram()
if state.secondary_loop.pressure > 0.95 * constants.MAX_PRESSURE:
LOGGER.critical("Secondary pressure high (%.2f MPa), initiating SCRAM", state.secondary_loop.pressure)
self.shutdown = True
self.control.scram()
failures = self.health_monitor.evaluate(
state,