EnergyModelsGasNetworks extends the EnergyModelsX ecosystem with pressure-feasible gas transport and pooling of blended gases (e.g. hydrogen–methane). It adds pressure potentials, Weymouth-based link constraints, and quality tracking to EnergyModelsBase.
- Pressure variables and bounds for nodes and links via
ResourcePressureandAbstractPressureData. - Weymouth flow–pressure constraints: Taylor cuts for single-component gases, piecewise-affine planes for blended gases.
- Pooling formulation with component tracking and quality bounds (Alfaki & Haugland, 2013).
- Helper controls for PWA generation (
set_optimizer_pwa!,set_step_pressure!) and data structures for blend/pressure metadata.
] add EnergyModelsGasNetworksChoose a solver stack appropriate to your use case:
- Single-component pressure: any MIP solver (e.g.
HiGHS). - Pooling or blended-gas pressure: nonconvex MINLP stack (e.g.
Alpine+Ipopt+ a MIP solver).
See the Quick Start for step-by-step instructions.
Run the bundled examples from a REPL:
julia> using EnergyModelsGasNetworks
julia> exdir = joinpath(pkgdir(EnergyModelsGasNetworks), "examples")
julia> include(joinpath(exdir, "single_pressure.jl")) # pressure drop with Taylor cuts
julia> include(joinpath(exdir, "pooling.jl")) # hydrogen–methane blendingEach script builds a case, sets an optimiser, solves, and prints key flows/pressures or proportions using PrettyTables.
Full docs live under docs/ and cover installation, examples, background, and the public API.
Developed with support from the European Union’s Clean Hydrogen Partnership project SHIMMER (grant 101111888).