Skip to content

feat: 152 pemmdb hydro#338

Merged
daniel-rdt merged 34 commits intomasterfrom
feat/152-pemmdb-hydro
Jan 23, 2026
Merged

feat: 152 pemmdb hydro#338
daniel-rdt merged 34 commits intomasterfrom
feat/152-pemmdb-hydro

Conversation

@daniel-rdt
Copy link
Copy Markdown
Member

@daniel-rdt daniel-rdt commented Dec 19, 2025

Closes #152.

Changes proposed in this Pull Request

This PR proposes to add TYNDP hydro technologies to the model along with associated PEMMDB capacities and inflows.
The associated technologies will be modelled as follows:

  • Run of River (hydro-ror): Generator with p_max_pu
  • Pondage (hydro-pondage): StorageUnit with fixed max_hours as ratio between Pondage reservoir capacity and turbine capacity, inflows via inflow attribute of StorageUnit
  • Reservoir (hydro-reservoir): StorageUnit with fixed max_hours as ratio between Reservoir reservoir capacity and turbine capacity, inflows via inflow attribute of StorageUnit
  • Pump Storage (hydro-phs): Store with Reservoir capacity (extra bus), Link with turbine capacity and Link with pump capacity, Generator with inflows to Store as p_max_pu. For all but 3 nodes, the pump and turbine capacity differ.
  • Pure Pump Storage (no inflows) (hydro-phs-pure): Store with Reservoir capacity (extra bus), Link with turbine capacity and Link with pump capacity. For all but 4 nodes, the pump and turbine capacity differ.

This PR does not yet include the modelling of additional constraints such as generation / pumping power constraints, generated / pumped energy constraints, or reservoir level constraints. They will be addressed by a follow up PR associated to issue #226.

Tasks

Workflow

As for the implementation of TYNDP conventional thermal technologies and capacities, the addition will be separated into two subsequent steps in prepare_sector_network:

  • Adding the technologies to the model with associated technology and cost assumptions
  • Adding the capacities and hydro inflows

TYNDP Hydro technologies will replace the default Hydro technologies. Therefore, hydro will be removed from the list of renewable_carriers and instead the separate TYNDP hydro techs are included in the list of tyndp_renewable_carriers:

  • hydro-ror
  • hydro-reservoir
  • hydro-pondage
  • hydro-phs
  • hydro-phs-pure

The following changes are made in prepare_sector_network, process_costs and add_brownfield:

  • (new) add_hydro_tyndp: New function that attaches TYNDP hydro technologies to the network without any associated capacities and hydro profiles
  • (new) _add_hydro_capacities: New function inside of add_existing_pemmdb_capacities that adds hydro capacities and profiles to a given PyPSA network for the associated technologies
  • Amended section in add_brownfield that drop conventional cumulative capacities from the previous planning horizon to also drop cumulative previous hydro technologies as hydro is also not modelled as an expandable carrier.
  • Not addressed with this PR are TYNDP specific hydro technology assumptions. TYNDP specific technology assumptions will be addressed via [PARENT] Calibration of parameters: cost assumptions, losses, emission factors and efficiencies #69.

Open issues

Questions:

  • We assume that hydro spillage is generally permitted (e.g. inflows sometimes exceed turbine capacity). Is spillage explicitly modelled in the system? If so, how is it represented?
  • Where can we find hydropower technology assumptions? It is not included in the PEMMDB common data as published for ERAA.

Notes

The following assumptions are taken:

  • Possibility of spillage is assumed, thus inflows are clipped at p_max_pu 1
  • Use default p_max_pu 0 if inflow profile is missing → No inflows

After adding TYNDP hydro technologies and PEMMDB capacities to the model, the capacity benchmarking looks as follows:
2030
image
2040
image

Checklist

  • I tested my contribution locally and it works as intended.
  • Code and workflow changes are sufficiently documented.
  • Changes in configuration options are added in config/config.default.yaml.
  • Changes in configuration options are documented in doc/configtables/*.csv.
  • Changes in configuration options are added in config/test/*.yaml.
  • A release note doc/release_notes.rst is added.
  • Major features are documented with up-to-date information in README and doc/index.rst.

@daniel-rdt daniel-rdt self-assigned this Dec 19, 2025
@daniel-rdt daniel-rdt marked this pull request as ready for review December 22, 2025 14:14
daniel-rdt and others added 5 commits December 22, 2025 15:49
* fix: intermediate fix to make solar_thermal_total not an optional input to be able to use segmentation option

* fix: intermediate fix to use 168H instead of 52SEG as long as segmentation option is compromised

* Revert "fix: intermediate fix to make solar_thermal_total not an optional input to be able to use segmentation option"

This reverts commit afb9617.

* doc: add a note for SEG option not being supported with the current configuration
Copy link
Copy Markdown
Member

@tgilon tgilon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @daniel-rdt for this PR! I have to say that it's really good first round. You'll find my comments below. The only general remark is that I still find it confusing that both capacities and inflows are added in a separate function. However, I know this will be addressed in #286.

Comment thread doc/release_notes.rst Outdated
Comment thread config/config.tyndp.yaml Outdated
Comment thread scripts/prepare_sector_network.py Outdated
Comment thread scripts/prepare_sector_network.py Outdated
Comment thread scripts/prepare_sector_network.py Outdated
Comment thread scripts/add_brownfield.py Outdated
Comment thread scripts/add_brownfield.py Outdated
Comment thread scripts/add_brownfield.py
Comment thread scripts/add_brownfield.py Outdated
Comment thread scripts/add_brownfield.py
@tgilon tgilon added the SB Scenario Building label Jan 9, 2026
@tgilon tgilon added this to the Release v0.5 milestone Jan 9, 2026
@daniel-rdt
Copy link
Copy Markdown
Member Author

Thanks @tgilon. for the comments and thorough review. I addressed all of the comments now. We only have two last open comments where I need to know if that works for you.

Otherwise, regarding the structure of splitting adding the components and the caps/inflows separately, I do agree that it is a bit confusing at times. This was especially true for hydro as, capacities and inflows are linked, so it only makes sense to add both in the same place. This on the other hand means, that in a hypothetical greenfield approach, the previously added "empty" components are not complete even if they are extendable because they are still missing the inflows.

For our purposes, this limitation should be fine however, imo. As you correctly point out, this logic will hopefully be improved with #286.

@daniel-rdt daniel-rdt requested a review from tgilon January 13, 2026 12:37
Copy link
Copy Markdown
Member

@tgilon tgilon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @daniel-rdt for the revisions, looks good to go!

# Conflicts:
#	doc/release_notes.rst
#	envs/default_linux-64.pin.txt
#	envs/default_osx-64.pin.txt
#	envs/default_osx-arm64.pin.txt
#	envs/default_win-64.pin.txt
#	pixi.lock
#	scripts/add_brownfield.py
@daniel-rdt
Copy link
Copy Markdown
Member Author

@tgilon Master has been merged. Not too many merge conflicts, mainly in

  • release_note.rst
  • add_brownfield.py

I did not find an instance that would be directly affected by the data layer changes, as the retrieve and processing was already in master. Would be great if you could have a final look mainly on the changes in the rules if you agree that they are consistent before we merge (and once CI hopefully passes 🤞)

Copy link
Copy Markdown
Member

@tgilon tgilon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good to me! Thank you for the final stretch, ready to be merged after the release

@daniel-rdt daniel-rdt merged commit d925a1e into master Jan 23, 2026
9 checks passed
@daniel-rdt daniel-rdt deleted the feat/152-pemmdb-hydro branch January 23, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

SB Scenario Building

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SUB] Inclusion of TYNDP Hydro technologies from PEMMDB

2 participants