Skip to main content

FlowBoundary

A FlowBoundary adds water to the model at a specified flow rate. It can be used as a boundary condition like a measured upstream flow rate, or lateral inflow. We require that a link connected to a FlowBoundary is always outgoing, and points towards a Basin.

1 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("FlowBoundary")

2 Tables

2.1 Static

Code
include("../../../utils/gen_docs_table.jl")
table_from_schema(
    Ribasim.Schema.FlowBoundary.Static;
    restrictions = Dict(:flow_rate => "non-negative"),
)
column type unit optional restriction
node_id Int32 - x -
flow_rate Float64 m³ s⁻¹ x non-negative

2.2 Time

This table is the transient form of the FlowBoundary table. The difference is that a time column is added, and an optional interpolation column. With this the flow rates can be updated over time. In between the given times the flow rate is interpolated, and outside the flow rate is constant given by the nearest time value unless the node is cyclic in time. Note that a node_id can be either in this table or in the static one, but not both.

The interpolation column sets the interpolation type per node, either block or linear. It cannot change over time, so it must have the same value in all rows of a node. If it is missing, the flow_boundary interpolation type from the interpolation settings is used, which is block by default.

Code
table_from_schema(
    Ribasim.Schema.FlowBoundary.Time;
    restrictions = Dict(
        :flow_rate => "non-negative",
        :interpolation => "block or linear, constant per node",
    ),
)
column type unit optional restriction
node_id Int32 - x -
time DateTime - x -
flow_rate Float64 m³ s⁻¹ x non-negative
interpolation String - ✓ block or linear, constant per node

2.3 Concentration

This table defines the concentration of substances for the flow from the FlowBoundary.

Code
table_from_schema(
    Ribasim.Schema.FlowBoundary.Concentration;
    restrictions = Dict(:substance => "can correspond to known Delwaq substances"),
)
column type unit optional restriction
node_id Int32 - x -
time DateTime - x -
substance String - x can correspond to known Delwaq substances
concentration Float64 g m⁻³ x -

2.4 Area

The optional area table is not used during computation, but provides a place to associate areas in the form of polygons to a FlowBoundary. Using this makes it easier to recognize which water or land surfaces are represented by a FlowBoundary.

column type restriction
node_id Int32
geom Polygon or MultiPolygon (optional)

3 Equations

A FlowBoundary can be connected directly to a Basin and prescribes the flow to that Basin. Since the flow_rate cannot be negative a FlowBoundary can only add water to the model.

4 Behavior in allocation

Allocation cannot change the flow of a FlowBoundary. Each time allocation runs, it assumes the flow of the FlowBoundary stays at its current value until the next intervention time, set by intervention_interval in the allocation settings, so it does not anticipate later changes in the timeseries. When the flow changes in between, the water that is actually available differs from what allocation planned with. The flow of a FlowBoundary can be used to supply demands downstream.