-
Notifications
You must be signed in to change notification settings - Fork 223
Open
Description
Summary
The documentation states
Pump controls and patterns: Pumps have speed settings which are adjustable by controls and/or patterns. With the EpanetSimulator, controls and patterns adjust the actual speed. With the WNTRSimulator, pumps have a ‘base speed’ (similar to junction demand and reservoir head), controls adjust the base speed, and speed patterns are a multiplier on the base speed. Results from the two simulators can match by scaling speed patterns and using controls appropriately.
However, when I try to operate a head pump at a speed different from 1, I get the error
NotImplementedError("Pump speeds other than 1.0 are not yet supported.")
Is the documentation wrong in this case, or am I doing something wrong?
Example
wn = wntr.network.WaterNetworkModel()
wn.add_reservoir("R1", base_head=10)
wn.add_tank("T1", elevation=0, diameter=10, min_level=0, init_level=0, max_level=20, overflow=False)
wn.add_curve('Pu-curve', "HEAD", [(0.1, 3)])
wn.add_pump(
"pump1",
start_node_name="R1",
end_node_name="T1",
pump_type="HEAD",
pump_parameter="Pu-curve",
)
wn.options.time.duration = 3600 * 5
action = wntr.network.ControlAction(wn.get_link('pump1'), 'base_speed', 1.1)
condition = wntr.network.SimTimeCondition(wn, '==', 3600 * 2)
control = wntr.network.Control(condition=condition, then_action=action)
wn.add_control('pump_base_speed', control)
sim = wntr.sim.WNTRSimulator(wn)
sim.run_sim() # raises NotImplementedErrorReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels