Prevent duplicate generator panel and fix aux defaults
This commit is contained in:
@@ -127,7 +127,10 @@ def test_secondary_pump_unit_toggle_can_restart_pump():
|
||||
reactor.secondary_pump_active = False
|
||||
reactor.secondary_pump_units = [False, False]
|
||||
|
||||
reactor.step(state, dt=1.0, command=ReactorCommand(secondary_pumps={1: True}))
|
||||
cmd = ReactorCommand(secondary_pumps={1: True}, generator_units={1: True})
|
||||
for _ in range(5):
|
||||
reactor.step(state, dt=1.0, command=cmd)
|
||||
cmd = ReactorCommand(coolant_demand=0.75)
|
||||
|
||||
assert reactor.secondary_pump_units == [True, False]
|
||||
assert reactor.secondary_pump_active is True
|
||||
@@ -140,11 +143,9 @@ def test_primary_pumps_spool_up_over_seconds():
|
||||
reactor.secondary_pump_units = [False, False]
|
||||
# Enable both pumps and command full flow; spool should take multiple steps.
|
||||
target_flow = reactor.primary_pump.flow_rate(1.0) * len(reactor.primary_pump_units)
|
||||
reactor.step(
|
||||
state,
|
||||
dt=1.0,
|
||||
command=ReactorCommand(primary_pumps={1: True, 2: True}, generator_units={1: True}, coolant_demand=1.0),
|
||||
)
|
||||
cmd = ReactorCommand(primary_pumps={1: True, 2: True}, generator_units={1: True}, coolant_demand=1.0)
|
||||
reactor.step(state, dt=1.0, command=cmd)
|
||||
reactor.step(state, dt=1.0, command=ReactorCommand(coolant_demand=1.0))
|
||||
first_flow = state.primary_loop.mass_flow_rate
|
||||
assert 0.0 < first_flow < target_flow
|
||||
|
||||
@@ -164,6 +165,8 @@ def test_full_rod_withdrawal_reaches_gigawatt_power():
|
||||
reactor.secondary_pump_active = True
|
||||
reactor.primary_pump_units = [True, True]
|
||||
reactor.secondary_pump_units = [True, True]
|
||||
reactor.generator_auto = True
|
||||
reactor.step(state, dt=1.0, command=ReactorCommand(generator_units={1: True}))
|
||||
|
||||
early_power = 0.0
|
||||
for step in range(60):
|
||||
@@ -184,6 +187,8 @@ def test_partially_inserted_rods_hold_near_three_gw():
|
||||
reactor.secondary_pump_active = True
|
||||
reactor.primary_pump_units = [True, True]
|
||||
reactor.secondary_pump_units = [True, True]
|
||||
reactor.generator_auto = True
|
||||
reactor.step(state, dt=1.0, command=ReactorCommand(generator_units={1: True}))
|
||||
|
||||
for _ in range(120):
|
||||
reactor.step(state, dt=1.0)
|
||||
|
||||
Reference in New Issue
Block a user