Package Overview

This page sketches the two pillars of EnergyModelsGasNetworks: gas transport based on flow-pressure relationship and quality-tracking pooling.

The detailed documentation on the methodology behind EnergyModelsGasNetworks can be found in Theoretical Background.

Flow–pressure coupling

  • Potentials on nodes and links. Defining resources of type ResourcePressure activates the flow-pressure constraints (see Internal Constraints) on nodes and links. Potentials can be bounded with FixPressureData, MaxPressureData, or MinPressureData.
  • Weymouth relationship. For single-component flows, the pressure-flow curve is linearised with the first-order Taylor. The defined cuts will be defined between the minimum and maximum inlet pressures stored in PressureLinkData. For blended gases, the non-convex surface is outer-approximated with planes generated by PiecewiseAffineApprox.
  • Optimiser The PWA planes require a MIP-capable solver; set it with set_optimizer_pwa! (e.g., HiGHS, Xpress, Gurobi) before building the model. The discretisation step of the pressure grid for the approximations can be tuned via set_step_pressure!.

Pooling and quality tracking

  • Pooling formulation. Defining a resource of type ResourcePooling stores a blended resource and its subresources. Subresources can be of type ResourceCarrier or ResourcePressure. The former activates only the pooling formulation, the latter the pooling formuation and flow-pressure constraints.
  • Quality limits. RefBlendData (for nodes) and BlendLinkData (for links) subtypes specify maximum and minimum qualities for subresource at nodes or links. Quality is enforced at pooling nodes and sinks, and component proportions are tracked so they can be reused by the pressure formulation of blended gases.