Expose xenon reactivity impact on dashboard
This commit is contained in:
@@ -557,6 +557,11 @@ class ReactorDashboard:
|
||||
lines.append(fmt("Xe", "Xe (xenon)", getattr(state.core, "xenon_inventory", 0.0)))
|
||||
lines.append(fmt("Sm", "Sm (samarium)", inventory.get("Sm", 0.0)))
|
||||
lines.append(fmt("I", "I (iodine)", getattr(state.core, "iodine_inventory", 0.0)))
|
||||
try:
|
||||
xe_penalty = -self.reactor.neutronics.xenon_penalty(state.core)
|
||||
lines.append(("Xe Δρ", f"{xe_penalty:+.4f}"))
|
||||
except Exception:
|
||||
pass
|
||||
lines.append(("Neutrons (src)", f"{particles.get('n', 0.0):9.2e}"))
|
||||
lines.append(("Gammas", f"{particles.get('gamma', 0.0):9.2e}"))
|
||||
lines.append(("Alphas", f"{particles.get('alpha', 0.0):9.2e}"))
|
||||
|
||||
@@ -50,7 +50,7 @@ class NeutronDynamics:
|
||||
rod_term
|
||||
+ temperature_feedback(state.fuel_temperature)
|
||||
- fuel_reactivity_penalty(state.burnup)
|
||||
- self._xenon_penalty(state)
|
||||
- self.xenon_penalty(state)
|
||||
)
|
||||
return rho
|
||||
|
||||
@@ -96,5 +96,9 @@ class NeutronDynamics:
|
||||
decay_Xe = state.xenon_inventory * self.xenon_decay_const
|
||||
state.xenon_inventory = max(0.0, state.xenon_inventory + (prod_Xe - decay_Xe - burn_Xe) * dt)
|
||||
|
||||
def xenon_penalty(self, state: CoreState) -> float:
|
||||
"""Return delta-rho penalty from xenon inventory (positive magnitude)."""
|
||||
return self._xenon_penalty(state)
|
||||
|
||||
def _xenon_penalty(self, state: CoreState) -> float:
|
||||
return min(0.03, state.xenon_inventory * self.xenon_reactivity_coeff)
|
||||
|
||||
Reference in New Issue
Block a user