Add regression for pumps without aux power
This commit is contained in:
18
tests/test_aux_power.py
Normal file
18
tests/test_aux_power.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from reactor_sim.reactor import Reactor
|
||||
from reactor_sim.commands import ReactorCommand
|
||||
|
||||
|
||||
def test_pump_stays_off_without_aux_power():
|
||||
reactor = Reactor.default()
|
||||
state = reactor.initial_state()
|
||||
reactor.shutdown = False
|
||||
reactor.primary_pump_active = True
|
||||
reactor.primary_pump_units = [True, False]
|
||||
reactor.secondary_pump_active = False
|
||||
reactor.generator_auto = False
|
||||
reactor.turbine_unit_active = [False, False, False]
|
||||
|
||||
reactor.step(state, dt=1.0, command=ReactorCommand(primary_pumps={1: True}))
|
||||
|
||||
assert state.primary_loop.mass_flow_rate == 0.0
|
||||
assert state.primary_pumps[0].status in {"OFF", "STOPPING"}
|
||||
Reference in New Issue
Block a user