Code
include("../../../utils/plot_connector_schematic.jl")
plot_connector_schematic(:Pump)Pump water from a source node to a destination node. The set flow rate will be pumped unless the intake storage is less than \(10~m^3\), in which case the flow rate will be linearly reduced to \(0~m^3/s\). The intake must be either a Basin or LevelBoundary. When PID controlled, the pump must point away from the controlled basin in terms of links.
The diagram below shows which node types are allowed directly upstream (left) and downstream (right) of this node. This is a connectivity illustration, not a valid simulation model.
| column | type | unit | optional | default | restriction |
|---|---|---|---|---|---|
| node_id | Int32 | - | x | - | - |
| flow_rate | Float64 | m³ s⁻¹ | x | - | non-negative |
| min_flow_rate | Float64 | m³ s⁻¹ | ✓ | 0.0 | - |
| max_flow_rate | Float64 | m³ s⁻¹ | ✓ | Inf | - |
| min_upstream_level | Float64 | m | ✓ | -Inf | - |
| max_downstream_level | Float64 | m | ✓ | Inf | - |
| control_state | String | - | ✓ | - | - |
| allocation_controlled | Bool | - | ✓ | false | - |
This table is the transient form of the Pump table. With this all parameters can be updated over time. In between the given times the values are block interpolated (forward fill), and outside the values are constant given by the nearest time value. Note that a node_id can be either in this table or in the static one, but not both.
| column | type | unit | optional | default | restriction |
|---|---|---|---|---|---|
| node_id | Int32 | - | x | - | - |
| time | DateTime | - | x | - | - |
| flow_rate | Float64 | m³ s⁻¹ | x | - | non-negative |
| min_flow_rate | Float64 | m³ s⁻¹ | ✓ | 0.0 | - |
| max_flow_rate | Float64 | m³ s⁻¹ | ✓ | Inf | - |
| min_upstream_level | Float64 | m | ✓ | -Inf | - |
| max_downstream_level | Float64 | m | ✓ | Inf | - |
The behavior of a Pump is simple if these nodes are not PID controlled. Their flow is given by a fixed flow rate \(q\), multiplied by reduction factors:
\[ Q = \phi_\text{level} \, \mathrm{clamp}(\phi_\text{storage} Q_\text{set}, Q_{\min}, Q_{\max}) \]
flow_rate.min_flow_rate and max_flow_rate.depth_threshold to the Basin bottom.min_upstream_level + level_difference_threshold to min_upstream_level.max_downstream_level - level_difference_threshold to max_downstream_level.For depth_threshold, level_difference_threshold see Solver settings.
Since \(\phi_\text{level}\) is applied after the clamp, min_flow_rate is not a strict minimum: the level criteria can still reduce the flow to zero.