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 Tables

1.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 -

1.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 -

2 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 when the upstream volume is below the equivalent of a water depth of \(10 \;\text{cm}\) (change with solver setting depth_threshold).
  • \(\phi_\text{level}\) is the product of the reduction factors that smoothly reduce flow based on these criteria (change the \(0.02 \;\text{m}\) with solver setting level_difference_threshold):
    • The upstream level is below min_upstream_level + \(0.02 \;\text{m}\)
    • The downstream level is above max_downstream_level - \(0.02 \;\text{m}\)

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.