Skip to main content

FlowDemand

A FlowDemand node associates a non-consuming flow demand to a connector node (e.g. Pump, TabulatedRatingCurve) for one or more demand priorities. FlowDemand nodes can set a flow demand only for a single connector node. FlowDemand nodes do nothing when allocation is not activated, except when they are connected to a Pump or an Outlet. In that case the flow demand flow rate is taken as the minimum flow through that Pump or Outlet.

FlowDemand nodes can be used for instance to model minimum environmental flow or flushing requirements at specific locations in the network.

1 Tables

1.1 Static

Code
include("../../../utils/gen_docs_table.jl")
const FLOW_DEMAND_RESTRICTIONS = Dict(:demand => "non-negative", :demand_priority => "positive")
table_from_schema(Ribasim.Schema.FlowDemand.Static; restrictions = FLOW_DEMAND_RESTRICTIONS)
column type unit optional default restriction
node_id Int32 - x - -
demand Float64 m³ s⁻¹ x - non-negative
demand_priority Int32 - ✓ 1 positive

1.2 Time

This table is the transient form of the FlowDemand table, in which a time-dependent demand can be supplied. With this the demand can be updated over time. In between the given times the demand is block interpolated (forward fill), and outside the demand is constant given by the nearest time value. The allocation algorithm evaluates the interpolation at the start of the allocation time step.

Code
table_from_schema(Ribasim.Schema.FlowDemand.Time; restrictions = FLOW_DEMAND_RESTRICTIONS)
column type unit optional default restriction
node_id Int32 - x - -
time DateTime - x - -
demand Float64 m³ s⁻¹ x - non-negative
demand_priority Int32 - ✓ 1 positive

2 Behavior in allocation

With allocation, a FlowDemand is a demand for a minimum flow through the node it is connected to. The water is not consumed, so it remains available downstream, and the flow through the node can be larger than the demand. Like other demands, it is met in the order of its demand priority.

How well the demand can be met depends on the node. For an allocation-controlled Pump, Outlet or TabulatedRatingCurve, allocation can set the flow through the node directly. For other nodes, the flow follows from the water levels around the node, so allocation can only meet the demand by changing these levels, for instance by steering an allocation-controlled node upstream.

The demand, allocated and realized flow rates are in allocation.nc. Flow demands and level demands cannot have the same demand priority within a subnetwork.