gtopt::Flow struct

Exogenous water flow at a hydraulic junction.

Positive direction (direction = +1) models natural river inflow; negative direction (direction = -1) models mandatory minimum discharge releases or evaporation losses.

Public functions

auto is_input() const -> constexpr bool noexcept

Public variables

OptActive active
Activation status (default: active)
OptInt direction
Flow direction: +1 = inflow, −1 = outflow [dimensionless].
STBRealFieldSched discharge
Water discharge schedule [m³/s].
OptSingleId junction
Name name
Human-readable name.
Uid uid
Unique identifier.

Function documentation

constexpr bool gtopt::Flow::is_input() const noexcept

Returns true if flow is directed into the junction (inflow)

Variable documentation

OptSingleId gtopt::Flow::junction

ID of the connected junction (optional for flow-turbine mode)