Turbine struct
#include <gtopt/turbine.hpp>
Hydroelectric turbine converting water flow into electrical power.
A turbine draws water from a waterway, converts it at efficiency × production_factor into electrical power at the linked generator, and passes the remaining flow to the downstream junction of the waterway.
When main_reservoir is specified, the turbine's conversion rate may be updated dynamically by the SDDP solver using the piecewise-linear production factor curve from the corresponding ReservoirProductionFactor element.
Public static variables
- static LPClassName class_name
Public variables
- OptActive active
- Operational status (default: active when unset).
- OptTRealFieldSched capacity
- OptName description
- OptBool drain
- OptTRealFieldSched efficiency
- OptSingleId flow
- SingleId generator
- OptSingleId junction_a
- OptSingleId junction_b
- OptSingleId main_reservoir
- Name name
- OptTRealFieldSched production_factor
- OptName type
- Optional element type / category tag (free-text).
- Uid uid
- Unique turbine identifier.
- OptSingleId waterway
Variable documentation
static LPClassName gtopt:: Turbine:: class_name
Canonical class-name constant used in LP row labels and config fields like VariableScale::class_name. Single source of truth — TurbineLP exposes no separate ClassName member; callers reach the constant via Turbine::class_name directly (or TurbineLP::Element::class_name in generic contexts).
OptTRealFieldSched gtopt:: Turbine:: capacity
Maximum turbine flow [m³/s] — caps the per-block flow column (waterway.flow, flow.discharge, or built-in Turbine/flow) via a per-block ≤ capacity row. Note this is a FLOW bound, not a power bound: the corresponding power cap is capacity × efficiency × production_factor [MW]. Accepts the same value forms as production_factor.
OptName gtopt:: Turbine:: description
Optional free-text description (e.g. conversion provenance from PLP / PLEXOS).
OptTRealFieldSched gtopt:: Turbine:: efficiency
Turbine efficiency [p.u., dimensionless] (default 1.0). Effective conversion rate is efficiency × production_factor. Accepts the same value forms as production_factor.
OptSingleId gtopt:: Turbine:: flow
Flow uid or name (alternative to waterway for pasada / run-of- river units). When set, the turbine reads the fixed discharge directly from the Flow element's schedule [m³/s]. Aperture updates change the discharge so the turbine power bound varies across scenarios. Highest priority of the three connection modes.
OptSingleId gtopt:: Turbine:: junction_a
Upstream (intake) junction reference (uid or name) — enables the built-in waterway mode when set. The turbine then owns its own per-block flow column Turbine/flow (units m³/s) that debits this junction's water balance. Mutually exclusive with flow; takes priority over waterway when both are set.
OptSingleId gtopt:: Turbine:: junction_b
Downstream junction reference (uid or name) — OPTIONAL companion to junction_a in built-in waterway mode. When set, the turbine credits this junction's balance with +1.0 × flow (lossless penstock). When unset, the turbined flow drains out of the modelled system (terminal / run-to-sea plants — no synthetic ocean junction needed).
OptSingleId gtopt:: Turbine:: main_reservoir
Optional reservoir uid or name whose volume drives the turbine's conversion rate (hydraulic-head effects). When set, the SDDP solver updates the conversion-rate LP coefficient at each forward-pass iteration using the current reservoir volume and the matching ReservoirProductionFactor element's piecewise- linear curve. The matching element must reference this turbine's UID in its turbine field and the reservoir's UID in its reservoir field.
OptTRealFieldSched gtopt:: Turbine:: production_factor
Water-to-power production factor [MW·s/m³ = MW / (m³/s)]. Multiplied by efficiency to form the effective conversion rate in the LP. Accepts scalar, [stage] 1-D array, or a filename string referencing a Parquet/CSV schedule under input_directory/Turbine/.
OptSingleId gtopt:: Turbine:: waterway
Waterway uid or name to read the flow from (legacy "waterway" connection mode). IGNORED when flow or junction_a is set — mode priority: flow > junctions > waterway. When active, the turbine's conversion row binds the generator's power to waterway.flow_cols (units m³/s).