Network Model#
GreenBubble represents an industrial cluster as a multi-energy network built with PyPSA and solved as a linear programme via Linopy. This page describes the network structure, the optimisation problem, and how the two fit together.
—
Multi-energy representation#
The cluster is modelled as a set of buses — one per energy carrier. Components (generators, conversion units, storage) connect to these buses via links, stores, and loads.
Carrier |
Unit |
Role in the network |
|---|---|---|
Electricity |
MWel |
Grid connection, wind, solar, electrolysis input, internal distribution |
Hydrogen |
MWH₂ |
Electrolysis output, methanation / methanol feed, internal distribution |
CO₂ |
tCO₂/h |
Captured from biogas, consumed by methanation and methanol synthesis |
Biomethane (CH₄) |
MWCH₄ |
Biogas upgrading output, methanation output, product delivery |
Methanol |
tMeOH/h |
Methanol synthesis output, product delivery |
Heat — medium temperature |
MWth |
Waste heat from conversion processes, biomass drying |
Heat — district heating (DH) |
MWth |
Optional sale to external DH grid |
Heat — low temperature |
MWth |
Low-grade heat from cooling loops |
Biomass (moist / pellets) |
MWbio |
Biogas feedstock |
Each carrier may have multiple buses representing distinct physical locations or pressure levels (e.g. H₂ at the electrolyser vs. H₂ at the methanation inlet). Internal pipes and compressors are explicit links with their own efficiency losses and, optionally, expandable capacity.
PyPSA component types#
Component |
Use in GreenBubble |
|---|---|
|
Renewable electricity sources (wind, solar) and biogas input; may be extendable (greenfield) or capacity-fixed (brownfield) |
|
All conversion processes: electrolysis, methanation, methanol synthesis, biogas engine, belt dryer, compressors. A link can have up to five outputs (bus0 … bus4), enabling combined heat-and-power units |
|
Energy buffers where carrier is stored without direct dispatch control: CO₂ tanks, product delivery buffers |
|
Storage with explicit charge/discharge dispatch: batteries, H₂ vessels, thermal stores |
|
Demand time series for each product and internal energy consumer |
Technology activation is controlled by the n_flags dict in
config/config.default.yaml. Setting a flag to false removes all
components of that technology group from the network before the solve — no
parameters need to change elsewhere.
Optimisation problem#
GreenBubble solves a single linear programme that simultaneously determines optimal installed capacities and hourly dispatch over a full year (8 760 time steps at 1-hour resolution).
Objective function
Minimise total annualised system cost (or maximise revenue, depending on the
targets.driver setting):
Cost mode (
driver: 'demand'): minimise capital cost + operating cost subject to fixed annual production requirements.Revenue mode (
driver: 'price'): maximise net revenue from product sales minus system costs; production becomes an upper bound rather than a constraint.
Capital costs are annualised using the discount rate and component lifetime from the technology-cost database. Operating costs include variable O&M and fuel purchases.
Key constraints
Energy balance at every bus and every hour (enforced by PyPSA/Linopy)
Capacity bounds:
p_nom_min ≤ p_nom ≤ p_nom_maxper componentRamp limits:
|p(t) - p(t-1)| ≤ ramp_limit × p_nomfor selected technologies (electrolysis, methanation, methanol synthesis)Minimum load:
p(t) ≥ min_load × p_nomfor online unitsAnnual product targets: total production ≥ demand (demand mode) or ≤ capacity × 8760 (price mode)
RFNBO constraints: optional additionality/temporal correlation requirements on electrolytic hydrogen (see RFNBO compliance)
CO₂ balance: captured CO₂ = consumed CO₂ (closed internal loop with optional liquefaction and sequestration)
Renewable export cap:
RE export ≤ max_RE_to_grid × (internal use + export)
Solver
The LP is passed to HiGHS (open-source) or Gurobi via Linopy.
Solver profiles with pre-tuned tolerance and thread settings are defined in
scripts/solver_profiles.py.
Brownfield vs. greenfield#
Each technology can be configured independently in n_config.default.yaml:
initial capacity > 0+expansion: false→ brownfield fixed asset (costs zeroed, capacity locked)initial capacity > 0+expansion: true→ brownfield with expansion allowed above the initial installed sizeinitial capacity: 0+expansion: true→ greenfield (capacity is a free variable from zero)
This allows modelling real plants at GreenLab Skive (or any other site) by setting existing capacities for known assets while leaving greenfield expansion open for new investments.
Output files#
After the solve, the optimised PyPSA network is exported to:
outputs/<run>/<network_name>/
networks/
<network>_PRE.nc ← pre-optimisation network (built by build_network)
<network>_OPT.nc ← post-optimisation network with p_nom_opt, dispatch TS
plots/
... ← dispatch figures, capacity charts, shadow prices