Reduce secondary pump head and ease secondary heating
This commit is contained in:
@@ -18,12 +18,17 @@ class CoreState:
|
||||
reactivity_margin: float # delta rho
|
||||
power_output_mw: float # MW thermal
|
||||
burnup: float # fraction of fuel consumed
|
||||
clad_temperature: float | None = None # Kelvin
|
||||
xenon_inventory: float = 0.0
|
||||
iodine_inventory: float = 0.0
|
||||
delayed_precursors: list[float] = field(default_factory=list)
|
||||
fission_product_inventory: dict[str, float] = field(default_factory=dict)
|
||||
emitted_particles: dict[str, float] = field(default_factory=dict)
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
if self.clad_temperature is None:
|
||||
self.clad_temperature = self.fuel_temperature
|
||||
|
||||
def update_burnup(self, dt: float) -> None:
|
||||
produced_energy_mwh = self.power_output_mw * (dt / 3600.0)
|
||||
self.burnup = clamp(self.burnup + produced_energy_mwh * 1e-5, 0.0, 0.99)
|
||||
@@ -111,6 +116,10 @@ class PlantState:
|
||||
core_blob = dict(data["core"])
|
||||
inventory = core_blob.pop("fission_product_inventory", {})
|
||||
particles = core_blob.pop("emitted_particles", {})
|
||||
# Backwards/forwards compatibility for optional core fields.
|
||||
core_blob.pop("dnb_margin", None)
|
||||
core_blob.pop("subcooling_margin", None)
|
||||
core_blob.setdefault("clad_temperature", core_blob.get("fuel_temperature", 295.0))
|
||||
turbines_blob = data.get("turbines")
|
||||
if turbines_blob is None:
|
||||
# Compatibility with previous single-turbine snapshots.
|
||||
|
||||
Reference in New Issue
Block a user