gtopt/gas_physics.hpp file

Steady-state natural-gas physics used by the gas-network LP.

Pure functions (no LP state) shared by GasPipeLP, GasCompressorLP and GasTurbineLP:

  • Weymouth constant K [bar² / (km³/h)²] of a pipe and the tangent points of its outer approximation (layouts uniform and relative_pressure);
  • line-pack coefficient [km³ / bar];
  • compressor fuel: adiabatic-head fuel fraction, the physics γ of Saldarriaga's LC = γ (β^α − 1) Ψ and its first-order Taylor plane written in squared pressure π = p²;
  • electric-drive conversion κ [MW per km³/h of fuel equivalent];
  • the concave fuel-gas pressure capability P ≤ s π + c of a gas turbine (hard stop + optional derate).

Units: flow km³/h (standard), pressure bar abs, π bar², line pack km³. The formulas mirror the gas-network prototype (gasnet2gtopt) so the native elements reproduce its LP exactly.

Namespaces

namespace gtopt
namespace gtopt::gas

Classes

struct gtopt::gas::CapabilityRow
One concave capability row P ≤ slope · π + intercept.
struct gtopt::gas::CapabilityRows
struct gtopt::gas::PipeGeometry
Pipe geometry / gas properties feeding the Weymouth constant.
struct gtopt::gas::SaldarriagaPlane