gtopt::GasOptions struct

Network-level gas properties (options.gas_options).

Public functions

auto linepack_is_cyclic() const -> bool noexcept
void merge(const GasOptions& other)
auto slp_initial_flow_fraction() const -> double noexcept
auto slp_max_iterations() const -> int noexcept
auto slp_min_flow_fraction() const -> double noexcept
auto slp_omega() const -> double noexcept
auto slp_proximal_cost_value() const -> double noexcept
auto slp_tol() const -> double noexcept
auto specific_gravity() const -> double noexcept
auto temperature() const -> double noexcept
auto z() const -> double noexcept

Public variables

OptReal compressibility
Z, default 0.9.
OptReal gas_specific_gravity
G (air = 1), default 0.6.
OptReal gas_temperature
Flowing temperature [K], default 288.15.
OptBool linepack_cyclic
OptReal slp_damping
Damping ω of f₀ ← f₀ + ω (f − f₀) (default 0.5; 1 = no damping).
OptReal slp_initial_flow
OptInt slp_iterations
OptReal slp_min_flow
Minimum |f₀| as a fraction of the pipe's fmax (default 1e-3).
OptReal slp_proximal_cost
OptReal slp_tolerance
Stop when max |f − f₀| / max(|f₀|, f_min) < tolerance (1e-4).

Variable documentation

OptBool gtopt::GasOptions::linepack_cyclic

Line pack closes each stage with at least its initial value (default true); false lets the pack be drawn down. The pack is not carried between stages (each stage restarts from linepack_ini), so false is accepted only with a single stage (validate_planning rejects it otherwise).

OptReal gtopt::GasOptions::slp_initial_flow

Default |f₀| as a fraction of fmax when a pipe has no reference_flow (default 0.1).

OptInt gtopt::GasOptions::slp_iterations

Sequential-LP passes re-linearising weymouth_mode: linearized pipes at the last solution (monolithic; default 0 = single pass).

OptReal gtopt::GasOptions::slp_proximal_cost

Cost ρ of the SLP proximal term ρ |f̄ − f₀| (default 1e-6, 0 = off): picks, among equal-cost LP vertices, the one nearest f₀.