Code
include("../../../utils/plot_connector_schematic.jl")
plot_connector_schematic(: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.
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.
| 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 | - |
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.
| 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 | - |
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}) \]
flow_rate.min_flow_rate and max_flow_rate.depth_threshold.downstream_level + level_difference_threshold to downstream_level.min_upstream_level + level_difference_threshold to min_upstream_level.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.