Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hydrogen Gas Turbines and Retrofitting of Gas Turbines #151

Merged
merged 34 commits into from
Aug 9, 2024

Conversation

toniseibold
Copy link
Contributor

@toniseibold toniseibold commented Aug 2, 2024

Adding the following configs

electricity:
  H2_plants_DE:
    enable: true
    retrofit_CH4_to_H2:
      enable: true
      efficiency_loss: 0.05
      cost_increase: 0.15
      start: 2025
      force: 2035

modify_prenetwork

  • if `config["H2_plants_DE"]["enable"] the extendable links for OCGT, CCGT and gas CHPs in the current planning horizon are copied and added so hydrogen turbines can be built as well
  • if the retrofitting of existing OCGT, CCGT, gas CHPs in enabled, existing gas plant links are copied and added as retrofitted H2 links (boundary condition is set in additional functionality) from config["start"]on
  • if the config["force"] is set, from the force year on, all OCGT, CCGT, gas CHPs links from config["start"] on are dropped and only the hydrogen links exist

additional_functionality

  • in case that config["retrofit_CH4_to_H2"]["enable"] is set, gas plant links and hydrogen retro links are added as a boundary condition in a way, that the installed capacity of both must be lower equal than the former installed capacity of gas plants

Open issues:

  • check the efficiency decrease
  • check the costs for retrofitting

@toniseibold toniseibold marked this pull request as draft August 2, 2024 12:22
if params["force"] >= year:
logger.info("Retrofitting already forced.")

if params["start"] <= year:
Copy link
Member

Choose a reason for hiding this comment

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

this should be elif?

@toniseibold
Copy link
Contributor Author

Model results for 3H resolution KN2045_Bal_v4 scenario:
image
Open Cycle capacity agrees with the latest model run but model is now also favoring H2 gas turbines:
image

@toniseibold toniseibold marked this pull request as ready for review August 6, 2024 06:41
toniseibold and others added 21 commits August 6, 2024 08:41
I.e. separate DE oil primary from DE oil.
* using exclusively config_provider

* moving bc to solving config

* style changes

* minor style changes

* cosmetic changes

* add back default values of constraints

* remove unused function arguments

* small fix for exporter

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Michael Lindner <michaellindner@posteo.de>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* minor changes for running single node network

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* include retrofitted and Kernnetz pipelines for hydrogen import boundary condition

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* bugfixing mock_snakemake and fullfilling prerequisites for review

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Copy link
Collaborator

@lindnemi lindnemi left a comment

Choose a reason for hiding this comment

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

looking very good, just two minor style suggestions then it can be merged

h2_plants.bus0 = h2_plants.bus0.str.replace("gas", "H2")
h2_plants.bus2 = ""
h2_plants.efficiency -= params["efficiency_loss"]
h2_plants.efficiency2 = 1 # default value
Copy link
Collaborator

Choose a reason for hiding this comment

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

it's a bit strange that the default value is 0 for H2 plants, but 1 for H2 retro plants

config/config.yaml Outdated Show resolved Hide resolved
@lindnemi
Copy link
Collaborator

lindnemi commented Aug 8, 2024

I just noticed that there are several more variables in the exporter that need to be adjusted, e.g. capacity|hydrogen and secondary energy input. basically all lines which have "H2 Fuel Cell" in master

@lindnemi
Copy link
Collaborator

lindnemi commented Aug 8, 2024

i updated the exporter

however, the workflow is still failing because of a bug in make_summary. We should figure that out before merging 🤔

@lindnemi
Copy link
Collaborator

lindnemi commented Aug 9, 2024

plot_summary was failing because the H2 plants were connected to a non-existent DE H2 bus, and the retrotfitted ones to an equally non existent DE H2 retro bus. I corrected these to the spatially resolved DE1 N H2 buses.

I really wonder why the optimization went through at all and did not brake. @nworbmot @toniseibold

In the 365H resolution no gas or H2 turbines get built. If this stays the same for 3H we will have to force in the Kraftwerkstrategie plants:

Capacity-Additions-Electricity-Gas

Capacity-Additions-Electricity-Hydrogen

The hydrogen capacity is all fuel cells at the moment.

However, we do see urban central gas boilers being built. Maybe those should be retrofitted to H2 as well?
Capacity-Additions-Heat-Gas

@lindnemi lindnemi merged commit d21a5c2 into main Aug 9, 2024
2 checks passed
Copy link

github-actions bot commented Aug 9, 2024

Validator Report

I am the Validator. Download all artifacts here.
I'll be back and edit this comment for each new commit.

Config
prefix: 20240809H2_plants_retrofit

Result plots comparison
Base branch Feature branch
primary_energy.png Image not found Image not found
secondary_energy.png Image not found Image not found
final_energy.png Image not found Image not found
Result files comparison
Numeric Status NMAE MAPE
H2_plants_retrofit/KN2045_Bal_v4/csvs/price_statistics.csv ⚠️ New
H2_plants_retrofit/KN2045_Bal_v4/csvs/cumulative_cost.csv ⚠️ New
H2_plants_retrofit/KN2045_Bal_v4/csvs/weighted_prices.csv ⚠️ New
H2_plants_retrofit/KN2045_Bal_v4/csvs/nodal_cfs.csv ⚠️ New
H2_plants_retrofit/KN2045_Bal_v4/csvs/cfs.csv ⚠️ New
H2_plants_retrofit/KN2045_Bal_v4/csvs/nodal_capacities.csv ⚠️ New
H2_plants_retrofit/KN2045_Bal_v4/csvs/capacities.csv ⚠️ New
H2_plants_retrofit/KN2045_Bal_v4/csvs/energy.csv ⚠️ New
H2_plants_retrofit/KN2045_Bal_v4/csvs/curtailment.csv ⚠️ New
H2_plants_retrofit/KN2045_Bal_v4/csvs/costs.csv ⚠️ New
H2_plants_retrofit/KN2045_Bal_v4/csvs/nodal_supply_energy.csv ⚠️ New
H2_plants_retrofit/KN2045_Bal_v4/csvs/supply_energy.csv ⚠️ New
H2_plants_retrofit/KN2045_Bal_v4/csvs/supply.csv ⚠️ New
H2_plants_retrofit/KN2045_Bal_v4/csvs/metrics.csv ⚠️ New
H2_plants_retrofit/KN2045_Bal_v4/csvs/market_values.csv ⚠️ New
H2_plants_retrofit/KN2045_Bal_v4/csvs/nodal_costs.csv ⚠️ New
H2_plants_retrofit/KN2045_Bal_v4/csvs/prices.csv ⚠️ New

MAPE: Mean Absolute Percentage Error
NMAE: Mean Absolute Error on Min-Max Normalized Data
Status Thresholds: NMAE > 0.05 and MAPE > 5%

Comparing retrofit_gas_plants (67b8ffd) with main (d21a5c2).
Branch is 34 commits ahead and 1 commits behind main.
Last updated on 2024-08-13 12:02:57 CEST.

toniseibold added a commit that referenced this pull request Sep 23, 2024
* first stab at enabling H2 and H2 retrofit gas plants

* forcing gas turbines from one year on

* fixing efficiency of hydrogen gas turbines

* bug fixing params

* dropping gas plants after forcing them to retrofit

* make unravelling of oil bus consistent with new refineries

I.e. separate DE oil primary from DE oil.

* update exporter

* ci: add validator

* select images and add repo owner path

* Update PULL_REQUEST_TEMPLATE.md

* Update Changelog.md

* update submodule

* Update .pre-commit-config.yaml

* remove reuse check

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Using config_provider for additional functionality exclusively (#154)

* using exclusively config_provider

* moving bc to solving config

* style changes

* minor style changes

* cosmetic changes

* add back default values of constraints

* remove unused function arguments

* small fix for exporter

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Michael Lindner <michaellindner@posteo.de>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Create .git-blame-ignore-revs (#158)

* minor changes for running single node network (#160)

* minor changes for running single node network

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Fix hydrogen import boundary condition (#159)

* include retrofitted and Kernnetz pipelines for hydrogen import boundary condition

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* bugfixing mock_snakemake and fullfilling prerequisites for review

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* first stab at enabling H2 and H2 retrofit gas plants

* forcing gas turbines from one year on

* fix merge bugs

* change exporter to report hydrogen plants

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* change name of retrofitted H2

* updating exporter

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix bus0 auf H2 plants

* finish rename of h2 retrofit

* default efficiency = 1

---------

Co-authored-by: Tom Brown <tom@nworbmot.org>
Co-authored-by: Michael Lindner <michaellindner@posteo.de>
Co-authored-by: lkstrp <lkstrp@pm.me>
Co-authored-by: Micha <michaellindner@pik-potsdam.de>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Julian Geis <j.geis@tu-berlin.de>
@toniseibold toniseibold deleted the retrofit_gas_plants branch October 25, 2024 11:00
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.

5 participants