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

Fix myopic optimization for networks with geothermal district heating #1453

Merged
merged 4 commits into from
Jan 24, 2025

Conversation

cpschau
Copy link
Contributor

@cpschau cpschau commented Dec 12, 2024

Changes proposed in this Pull Request

Geothermal heat for district heating was implemented in #1359. However, it was not working for the myopic code. This PR includes two changes, that fix the issue:

  1. The dataframe containing the existing heating distribution was extended to include all provided district heating heat pump sources in build_existing_heating_distribution.
  2. The indices of the heat pumps built in the predecessing planning horizon (relative to the planning horizon to be optimized) were adjusted for the COP correction in add_brownfield. This adjustment had to be done, because some heat pumps initialized in prepare_sector_network potentially disappear from their links_t dataframe if their efficiency equals zero (e.g. in Denmark where geothermal source temperatures can exceed district heating supply temperatures). This correction is done to account for the supply temperature dynamics in district heating and should be further adjusted as described in District heating efficiency gains applied to decentral heat pumps #1451 to depict efficiency gains for heat pumps due to technological learning.

COPs_myopic

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.
  • Sources of newly added data are documented in doc/data_sources.rst.
  • A release note doc/release_notes.rst is added.

Copy link
Contributor

github-actions bot commented Dec 12, 2024

Validator Report

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

❗ Run failed!

Download 'logs' artifact to see more details.

  • master passed! ✅
  • fix_geothermal_myopic failed in: determine_availability_matrix, determine_availability_matrix, determine_availability_matrix, determine_availability_matrix, determine_availability_matrix, determine_availability_matrix, determine_availability_matrix, determine_availability_matrix, determine_availability_matrix
⚠️ Config changes detected!

Results may differ due to these changes:

diff --git a/config/test/config.validator.yaml b/config/test/config.validator.yaml
index 9dc7cccb..a7440dee 100644
--- a/config/test/config.validator.yaml
+++ b/config/test/config.validator.yaml
@@ -1,4 +1,4 @@
-# SPDX-FileCopyrightText: Contributors to PyPSA-Eur <https://github.com/pypsa/pypsa-eur>
+# SPDX-FileCopyrightText: : 2017-2024 The PyPSA-Eur Authors
 #
 # SPDX-License-Identifier: CC0-1.0
 

Model Metrics

Benchmarks Image not available Image not available Image not available

Comparing fix_geothermal_myopic (078a292) with master (ec5f877).
Branch is 3 commits ahead and 15 commits behind.
Last updated on 2025-01-07 14:40:16 CET.

Copy link
Contributor

@amos-schledorn amos-schledorn left a comment

Choose a reason for hiding this comment

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

Thanks for spotting this! Just had minor comments.
Also, could you update the release notes and show a quick before/after comparison of COPs to make sure everything is working as expected? (e.g. a cooked-down version of the last plot in this PR: #1290 )

scripts/add_brownfield.py Outdated Show resolved Hide resolved
Copy link
Member

@fneum fneum left a comment

Choose a reason for hiding this comment

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

Good to go when @amos-schledorn and my comments addressed.

scripts/add_brownfield.py Outdated Show resolved Hide resolved
@amos-schledorn
Copy link
Contributor

Hey @cpschau, sorry I didn't see this earlier: in your plot, it looks like the COP for 2030 build year HPs is a bit higher than the COP for 2020 build year HPs in 2030. But maybe I'm reading this wrong?

@cpschau
Copy link
Contributor Author

cpschau commented Jan 15, 2025

Hey @cpschau, sorry I didn't see this earlier: in your plot, it looks like the COP for 2030 build year HPs is a bit higher than the COP for 2020 build year HPs in 2030. But maybe I'm reading this wrong?

You are reading it right. For the geothermal heat pumps there is a higher average COP, because the 2030 network comprises new urban central heat buses in Albania, Spain, Ireland, and Montenegro, as the district heating share is increasing from 0 to 0.3 (configurable). At these buses the COPs happen to be higher than the 2020 average.

Screenshot from 2025-01-15 10-27-12

@amos-schledorn
Copy link
Contributor

Hey @cpschau, sorry I didn't see this earlier: in your plot, it looks like the COP for 2030 build year HPs is a bit higher than the COP for 2020 build year HPs in 2030. But maybe I'm reading this wrong?

You are reading it right. For the geothermal heat pumps there is a higher average COP, because the 2030 network comprises new urban central heat buses in Albania, Spain, Ireland, and Montenegro, as the district heating share is increasing from 0 to 0.3 (configurable). At these buses the COPs happen to be higher than the 2020 average.

Screenshot from 2025-01-15 10-27-12

Makes sense. Thanks!

@amos-schledorn
Copy link
Contributor

Good to go from my side!

@fneum fneum added this to the v0.14.0 milestone Jan 24, 2025
@fneum fneum merged commit e1299af into master Jan 24, 2025
11 of 12 checks passed
@fneum fneum deleted the fix_geothermal_myopic branch January 24, 2025 08:01
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.

3 participants