Skip to content

Feat/172 add h2 demand#230

Merged
daniel-rdt merged 54 commits intomasterfrom
feat/172-add-h2-demand
Dec 8, 2025
Merged

Feat/172 add h2 demand#230
daniel-rdt merged 54 commits intomasterfrom
feat/172-add-h2-demand

Conversation

@lisazeyen
Copy link
Copy Markdown
Collaborator

@lisazeyen lisazeyen commented Nov 19, 2025

Closes #173 and #172.

Changes proposed in this Pull Request

Adding exogenous hydrogen demand to the network and modelling the NT scenario with only one hydrogen zone.

Tasks

  • move definition of Z1 and Z2 buses to spatial function
  • make H2 topology a switch in the config instead of dependency on tnydp scenario name

Workflow

Add configurable hydrogen topology for TYNDP scenarios

This PR introduces a new configuration setting h2_zones_tyndp (bool) that controls whether the hydrogen topology is modeled as a single zone or split into two separate zones (Z1 and Z2). This flexibility was added to accommodate potential changes in TYNDP methodology across different cycles. Currently, the configuration works with the available input data: DE/GA scenarios use a split topology (true), while NT uses a single zone (false).

Implementation details:

In define_spatial, the function now creates Z1 and Z2 hydrogen buses based on the selected topology configuration. When modeling a single zone, the Z1 bus is defined as an empty index. The naming convention for buses and assets follows the previous approach: the split topology uses the suffix "H2 Z1/Z2", while the single-zone configuration simply uses "H2".

In prepare_sector_network, a new function add_h2_demand_tyndp has been added to process and attach exogenous hydrogen demand data to the network.

Asset attachment

Asset Category Asset Type Split Topology (Z1/Z2) Single Zone
H2 Production Electrolysis Z1, Z2 H2
SMR (optional) Z1 H2
SMR CC (optional) Z1 H2
ATR (optional) Z1 H2
H2 Reconversion Fuel cells (optional) Z2 H2
H2 turbines (optional) Z2 H2
Methanation (optional) Z2 H2
H2 Storage H2 tanks Z1
Salt caverns Z2 H2

Results for H2 Balance and Oil Balance

oil_energy_balance_comparison H2_energy_balance_comparison

Open issues

  • currently the industry sector is still considered for the NT scenarios, resulting in an additional demand for hydrogen to produce synthetic fuels (Fischer-Tropsch). This issue will be closed by PR feat: attach methane demand to network for NT #220
  • for the benchmarking the aggregated exogenous hydrogen demand needs to be split for NT into industry/transport/...
  • add H2 tanks also in NT scenario?

Notes

Checklist

  • I tested my contribution locally and it works as intended.
  • Code and workflow changes are sufficiently documented.
  • Changed dependencies are added to envs/environment.yaml.
  • 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.
  • Open-TYNDP SPDX license header added to all touched files.
  • Sources of newly added data are documented in doc/data_sources.rst.
  • New rules are documented in the appropriate doc/*.rst files.
  • A release note doc/release_notes.rst is added.
  • Major features are documented with up-to-date information in README and doc/index.rst.
  • For any new/added Python scripts: Module docstring is added describing what the script does, its input data, and its output data.

@lisazeyen lisazeyen marked this pull request as ready for review November 20, 2025 10:39
@lisazeyen lisazeyen requested a review from daniel-rdt November 20, 2025 10:40
@lisazeyen lisazeyen self-assigned this Nov 20, 2025
@lisazeyen
Copy link
Copy Markdown
Collaborator Author

@daniel-rdt thanks for the review! I addressed all your review comments.

Copy link
Copy Markdown
Member

@daniel-rdt daniel-rdt left a comment

Choose a reason for hiding this comment

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

Hi @lisazeyen, Thomas and I ran into one naming issue with the added H2 load. We either need to change or remove the nice name for H2 if we keep H2 as the carrier for the load. Alternatively, we could change the carrier for the load to smth like H2 exogenous demand and add the carrier with a dedicated color. Any thoughts?

Otherwise, thank you for addressing the comments, the PR works great and looks almost ready now, only two more small comments.

Comment thread scripts/prepare_sector_network.py
Comment thread scripts/prepare_sector_network.py
Comment thread config/config.tyndp.yaml Outdated
@lisazeyen
Copy link
Copy Markdown
Collaborator Author

Hi @lisazeyen, Thomas and I ran into one naming issue with the added H2 load. We either need to change or remove the nice name for H2 if we keep H2 as the carrier for the load. Alternatively, we could change the carrier for the load to smth like H2 exogenous demand and add the carrier with a dedicated color. Any thoughts?

Otherwise, thank you for addressing the comments, the PR works great and looks almost ready now, only two more small comments.

Thanks @daniel-rdt for the review and carrier renaming! I've addressed all your comments. Let me know if the FT link renaming works for you.

@daniel-rdt
Copy link
Copy Markdown
Member

daniel-rdt commented Nov 26, 2025

Thanks @daniel-rdt for the review and carrier renaming! I've addressed all your comments. Let me know if the FT link renaming works for you.

Great, the renamed FT links should work well, thanks @lisazeyen :)

Regarding the edge case of no defined TYNDP scenario, I was wondering if we should already make the demand input optional in prepare_sector_network, so that the build_tyndp_h2_demand rule will not have to be executed at all.
This would mean that in the default config we define:

tyndp_scenario: false  # 'NT', 'DE', 'GA' or false

and then for the input of prepare_sector_network we could use branch:

h2_demand=branch(
            config_provider("tyndp_scenario"),
            resources("h2_demand_tyndp_{planning_horizons}.csv"),
            [],
        ),

Likewise, we could do the same for the gas_demand input:

gas_demand=branch(
            config_provider("tyndp_scenario"),
            resources("gas_demand_tyndp_{planning_horizons}.csv"),
            [],
        ),

I think that should work and clean up the dag a little for non-TYNDP runs

@daniel-rdt daniel-rdt mentioned this pull request Nov 27, 2025
20 tasks
@lisazeyen
Copy link
Copy Markdown
Collaborator Author

lisazeyen commented Nov 28, 2025

Thanks @daniel-rdt for the review and carrier renaming! I've addressed all your comments. Let me know if the FT link renaming works for you.

Great, the renamed FT links should work well, thanks @lisazeyen :)

Regarding the edge case of no defined TYNDP scenario, I was wondering if we should already make the demand input optional in prepare_sector_network, so that the build_tyndp_h2_demand rule will not have to be executed at all. This would mean that in the default config we define:

tyndp_scenario: false  # 'NT', 'DE', 'GA' or false

and then for the input of prepare_sector_network we could use branch:

h2_demand=branch(
            config_provider("tyndp_scenario"),
            resources("h2_demand_tyndp_{planning_horizons}.csv"),
            [],
        ),

Likewise, we could do the same for the gas_demand input:

gas_demand=branch(
            config_provider("tyndp_scenario"),
            resources("gas_demand_tyndp_{planning_horizons}.csv"),
            [],
        ),

I think that should work and clean up the dag a little for non-TYNDP runs

I like the idea! Let's do it in a separate PR! I have openend an issue #245 for that

@lisazeyen
Copy link
Copy Markdown
Collaborator Author

@daniel-rdt I have addressed all your comments, can you have a final look?

Copy link
Copy Markdown
Member

@daniel-rdt daniel-rdt 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 @lisazeyen. Everything looks great now! I am not sure why the whole sector.csv file is marked as diff but I checked the docs and it is looking like it should!

Let's wait for the Biomass PR first and then LGTM 🎊

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure why the whole files is marked as a diff.

@daniel-rdt daniel-rdt linked an issue Nov 28, 2025 that may be closed by this pull request
@tgilon tgilon mentioned this pull request Dec 5, 2025
15 tasks
 Conflicts:
	config/config.default.yaml
	config/config.tyndp.yaml
	config/scenarios.tyndp.yaml
	doc/configtables/sector.csv
@daniel-rdt daniel-rdt merged commit d98a9ec into master Dec 8, 2025
5 checks passed
@daniel-rdt daniel-rdt deleted the feat/172-add-h2-demand branch December 8, 2025 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adjust H2 Topology for NT Senario [SUB] Add exogenous hydrogen demand in prepare_sector_network

3 participants