Skip to main content

Outlet

The Outlet lets water flow downstream with a prescribed flow rate. It is similar to the Pump, except that water only flows down, by gravity.

When PID controlled, the Outlet must point towards the controlled Basin in terms of links.

1 Schematic

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

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("Outlet")

3 Tables

3.1 Static

Code
include("../../../utils/gen_docs_table.jl")
const OUTLET_RESTRICTIONS = Dict(:flow_rate => "non-negative")
table_from_schema(Ribasim.Schema.Outlet.Static; restrictions = OUTLET_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 Outlet 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.Outlet.Time; restrictions = OUTLET_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 Outlet is very similar to the Pump, but it has an extra reduction factor for physical constraints:

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

  • \(Q\) is the actual Outlet flow rate.
  • \(Q_\text{set}\) is the Outlet’s target flow_rate.
  • \(Q_{\min}\) and \(Q_{\max}\) are the Outlet 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 depth_threshold.
  • \(\phi_\text{level}\) is the product of the reduction factors that smoothly reduce flow based on these criteria:
    • The upstream level goes from downstream_level + level_difference_threshold to downstream_level.
    • 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.