Skip to main content

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.

1 Schematic

Code
include("../../../utils/plot_connector_schematic.jl")
plot_connector_schematic(:Pump)

2 Allowed connectivity

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.

Code
include("../../../utils/plot_node_connectivity.jl")
plot_node_connectivity("Pump")

3 Tables

3.1 Static

Code
include("../../../utils/gen_docs_table.jl")
const PUMP_RESTRICTIONS = Dict(:flow_rate => "non-negative")
table_from_schema(Ribasim.Schema.Pump.Static; restrictions = PUMP_RESTRICTIONS)
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 -

3.2 Time

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.

Code
table_from_schema(Ribasim.Schema.Pump.Time; restrictions = PUMP_RESTRICTIONS)
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 -

4 Equations

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}) \]

  • \(Q\) is the actual Pump flow rate.
  • \(Q_\text{set}\) is the Pump’s target flow_rate.
  • \(Q_{\min}\) and \(Q_{\max}\) are the Pump min_flow_rate and max_flow_rate.
  • \(\phi_\text{storage}\) is the reduction factor that smoothly reduces flow as the upstream water depth goes from depth_threshold to the Basin bottom.
  • \(\phi_\text{level}\) is the product of the reduction factors that smoothly reduce flow based on these criteria:
    • The upstream level goes from min_upstream_level + level_difference_threshold to min_upstream_level.
    • The downstream level goes from 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.

For an allocation-controlled Pump the level criteria reduce the capacity instead of the flow rate:

\[ Q = \mathrm{clamp}(\phi_\text{storage} Q_\text{set}, \phi_\text{level} Q_{\min}, \phi_\text{level} Q_{\max}) \]

Allocation already takes these criteria into account when it sets the flow rate, so reducing the flow rate itself would apply them twice.

5 Behavior in allocation

How a Pump behaves in allocation depends on allocation_controlled in the Static table.

A Pump that is not allocation-controlled (the default) keeps the flow rate given in its tables or by its control node. Allocation takes this flow into account, but does not change it.

For an allocation-controlled Pump, allocation sets the flow rate between min_flow_rate and max_flow_rate, to bring water to where it is needed. This flow rate is used until the next intervention time, set by intervention_interval in the allocation settings, and is in allocation_control.nc. The simulated flow in flow.nc can be lower than this flow rate, for instance when the upstream Basin is almost empty, or when min_upstream_level or max_downstream_level is reached. An allocation-controlled Pump needs a finite max_flow_rate. A Pump that connects the primary network to a secondary network must be allocation-controlled, and a DiscreteControl node can switch allocation control on and off.

A FlowDemand on a Pump is a minimum flow rate when allocation is not used. With allocation it is a demand like the others: it is met in the order of its demand priority, so it can get less water than demanded when water is scarce.

With a route priority for Pump nodes, see allocation settings, allocation can be made to prefer or avoid routing water through them.