Hide steam pressure when no steam is present
This commit is contained in:
@@ -424,7 +424,7 @@ class ReactorDashboard:
|
||||
[
|
||||
("Turbines", " ".join(self._turbine_status_lines())),
|
||||
("Rated Elec", f"{len(self.reactor.turbines)*self.reactor.turbines[0].rated_output_mw:7.1f} MW"),
|
||||
("Steam P", f"{state.secondary_loop.pressure:5.2f} MPa"),
|
||||
("Steam P", f"{self._steam_pressure(state):5.2f} MPa"),
|
||||
("Unit1 Elec", f"{state.turbines[0].electrical_output_mw:7.1f} MW" if state.turbines else "n/a"),
|
||||
(
|
||||
"Unit2 Elec",
|
||||
@@ -599,6 +599,12 @@ class ReactorDashboard:
|
||||
]
|
||||
return lines
|
||||
|
||||
def _steam_pressure(self, state: PlantState) -> float:
|
||||
# Only report steam pressure if quality/flow indicate steam is present.
|
||||
if state.secondary_loop.steam_quality < 0.05 or state.secondary_loop.mass_flow_rate < 100.0:
|
||||
return 0.0
|
||||
return state.secondary_loop.pressure
|
||||
|
||||
def _update_trends(self, state: PlantState) -> None:
|
||||
self._trend_history.append((state.time_elapsed, state.core.fuel_temperature, state.core.power_output_mw))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user