Clarify generator control and turbine status
This commit is contained in:
@@ -394,7 +394,6 @@ class ReactorDashboard:
|
||||
"Turbine / Grid",
|
||||
[
|
||||
("Turbines", " ".join(self._turbine_status_lines())),
|
||||
("Turbine Ctrl", "MANUAL"),
|
||||
("Unit1 Elec", f"{state.turbines[0].electrical_output_mw:7.1f} MW" if state.turbines else "n/a"),
|
||||
(
|
||||
"Unit2 Elec",
|
||||
@@ -544,6 +543,8 @@ class ReactorDashboard:
|
||||
if not state.generators:
|
||||
return [("Status", "n/a")]
|
||||
lines: list[tuple[str, str]] = []
|
||||
control = "AUTO" if self.reactor.generator_auto else "MANUAL"
|
||||
lines.append(("Control", control))
|
||||
for idx, gen in enumerate(state.generators):
|
||||
status = "RUN" if gen.running else "START" if gen.starting else "OFF"
|
||||
spool = f" spool {gen.spool_remaining:4.1f}s" if gen.starting else ""
|
||||
|
||||
@@ -363,7 +363,9 @@ class Reactor:
|
||||
turbine_state = state.turbines[idx]
|
||||
if idx in active_indices:
|
||||
turbine.step(state.secondary_loop, turbine_state, steam_power_mw=power_per_unit, dt=dt)
|
||||
if turbine_state.electrical_output_mw < max(1.0, power_per_unit * 0.7):
|
||||
if power_per_unit <= 0.0 and turbine_state.electrical_output_mw < 0.1:
|
||||
turbine_state.status = "OFF"
|
||||
elif turbine_state.electrical_output_mw < max(0.5, power_per_unit * 0.5):
|
||||
turbine_state.status = "STARTING"
|
||||
else:
|
||||
turbine_state.status = "RUN"
|
||||
|
||||
Reference in New Issue
Block a user