Skip to content

feat:add support for aquifer thermal energy storage (ATES)#1665

Merged
amos-schledorn merged 32 commits intomasterfrom
add-ates
May 16, 2025
Merged

feat:add support for aquifer thermal energy storage (ATES)#1665
amos-schledorn merged 32 commits intomasterfrom
add-ates

Conversation

@amos-schledorn
Copy link
Copy Markdown
Contributor

@amos-schledorn amos-schledorn commented Apr 30, 2025

Changes proposed in this Pull Request

This PR adds support for ATES.

  • Highly productive porous aquifers (see BGR) within 1000m of future district heating areas (Manz et al) are assumed suitable areas.
  • The computation of energetic storage potentials from suitable areas is loosely based on Jackson et al. using average forward and return temperatures as temperture differentials.
  • CAPEX for ATES chargers and dischargers are assumed a fraction (by default 0.75) of geothermal heat source CAPEX.
  • An annual recovery factor (default 0.6, eyeballed from different sources, e.g. Collgignon et al. and Kleyböcker et al. ) is used to compute constant hourly standing losses.
  • ATES stores are not associated with investment costs but limited by the available storage potentials.

Notes

  • This feature simplifies ATES quite substantially. Most importantly, ATES feasibility is not purely determined by whether an aquifer is highly productive and porous, see e.g. Stemmle et al..
  • To my current knowledge, standing losses (thermal recovery) and investment costs vary depending on the location. We're ignoring that here and make both a user input.
  • Future work: We could consider using the same data on future district heating areas to limit potentials for other heat sources.

Todos in addition to checklist

  • Final runs and feature description

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.

Testing

config (DE, DK, NL; 5h-12c)

scenario:
  clusters:
  - 12

clustering:
  resolution_sector: 5h

sector:
  district_heating:
    ates:
      allow: true

countries: ['DE', 'DK', 'NL']

electricity:
  renewable_carriers: [solar, solar-hsat, onwind, offwind-ac, offwind-dc, offwind-float]

DH dispatch

without ATES

image

####with ATES
image

System costs

Without ATES

195.676 bn Eur

With ATES

193.235 bn Eur

ATES potential

  • DE: 864 GWh
  • DK: 46 GWh
  • NL: 133 GWh
    (this nicely fits with the fact that most ATES systems worldwide are installed in the Netherlands)

@amos-schledorn amos-schledorn marked this pull request as draft April 30, 2025 17:06
@amos-schledorn amos-schledorn changed the title Add support for aquifer thermal energy storage (ATES) feat:add support for aquifer thermal energy storage (ATES) Apr 30, 2025
@amos-schledorn amos-schledorn requested a review from Copilot May 2, 2025 15:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for aquifer thermal energy storage (ATES) by extending existing TES components and configuration options. Key changes include updating regex patterns in TES charger/discharger constraints, adding new network components (carrier, bus, links, and storage) for ATES in the heat sector, and introducing new ATES configuration options and plotting colors.

Reviewed Changes

Copilot reviewed 6 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
scripts/solve_network.py Updated TES charger/discharger regex patterns to include ATES terms
scripts/prepare_sector_network.py Added new ATES components (carrier, bus, links, and store) into heat
config/plotting.default.yaml Added plotting colors for aquifer storage elements
config/config.default.yaml Introduced new ATES configuration parameters
.github/workflows/test.yaml Added a command to uninstall inhouse packages before installation
Files not reviewed (4)
  • doc/configtables/sector.csv: Language not supported
  • doc/release_notes.rst: Language not supported
  • rules/build_sector.smk: Language not supported
  • rules/retrieve.smk: Language not supported

@amos-schledorn amos-schledorn marked this pull request as ready for review May 2, 2025 17:12
@amos-schledorn amos-schledorn requested review from Copilot and fneum May 2, 2025 17:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces support for aquifer thermal energy storage (ATES) into the network model. The changes add new string patterns in the TES charger ratio constraints, include new ATES parameters in the sector network preparation, and update plotting and configuration files accordingly.

  • Updated TES charger and discharger index matching to include “aquifer storage”
  • Added new parameters and network components (bus, link, store) to support ATES in the heat sector
  • Introduced corresponding plotting colors and default configuration values for ATES

Reviewed Changes

Copilot reviewed 5 out of 10 changed files in this pull request and generated no comments.

File Description
scripts/solve_network.py Modified TES constraints to support aquifer storage naming patterns
scripts/prepare_sector_network.py Added network components and parameters to support ATES
config/plotting.default.yaml Added plotting colors for aquifer storage components
config/config.default.yaml Introduced new ATES configuration options
Files not reviewed (5)
  • doc/configtables/sector.csv: Language not supported
  • doc/data-retrieval.rst: Language not supported
  • doc/release_notes.rst: Language not supported
  • rules/build_sector.smk: Language not supported
  • rules/retrieve.smk: Language not supported
Comments suppressed due to low confidence (2)

scripts/solve_network.py:906

  • Ensure that the addition of the 'aquifer storage charger' pattern conforms with the naming convention used for dischargers so that the pairing logic in TES constraints functions correctly. Consider adding unit tests to verify that corresponding charger and discharger identifiers align as expected.
n.links.index.str.contains("water tanks charger|water pits charger|aquifer storage charger")

scripts/prepare_sector_network.py:3209

  • [nitpick] Confirm that dividing the geothermal heat source capital cost by 2 for ATES chargers and dischargers is the intended design choice, and add an inline comment to explain the rationale for future maintainability.
capital_cost=costs.at["central geothermal heat source", "capital_cost"] * ates_capex_as_fraction_of_geothermal_heat_source / 2,

@amos-schledorn
Copy link
Copy Markdown
Contributor Author

The CI is failing rather oddly. Maybe this is related to the changes in import paths?

@amos-schledorn
Copy link
Copy Markdown
Contributor Author

The CI is failing rather oddly. Maybe this is related to the changes in import paths?
-> This seems resolved now with an updated master branch.

@TomKae00
Copy link
Copy Markdown
Contributor

TomKae00 commented May 7, 2025

Looks good to me! My only suggestion is to introduce a maximum storage temperature, similar to how PTES handles it, and calculate capacity dynamically to avoid unrealistic storage behavior or overestimating potential. But this could also be part in follow up PR.

@amos-schledorn
Copy link
Copy Markdown
Contributor Author

Looks good to me! My only suggestion is to introduce a maximum storage temperature, similar to how PTES handles it, and calculate capacity dynamically to avoid unrealistic storage behavior or overestimating potential. But this could also be part in follow up PR.

Thanks for the review! I've noted that down and I'd suggest solving this generically for all TES technologies in a future feature.

Copy link
Copy Markdown
Contributor

@cpschau cpschau left a comment

Choose a reason for hiding this comment

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

Amazing job @amos-schledorn! I think this is a great feature to finally get a first draft of ATES into the model. Overall, the code looks very clean with very descriptive variable names, thorough data checks, and logging. Only have some minor suggestions, most of them are rather stylistic and debatable.

- Introduced supplemental heating options for pit thermal energy storage (PTES) in district heating configurations.
- Updated configuration files to include parameters for enabling supplemental heating and booster heat pumps.
- Enhanced plotting configurations to visualize PTES heat pump data.
- Implemented PTES temperature approximator to calculate top temperatures and determine supplemental heating needs.
- Refactored scripts to integrate PTES operations and capacity calculations.
- Updated heat system definitions to accommodate PTES as a heat source.
- Modified sector network preparation to include PTES direct utilization profiles and supplemental heating logic.
- Removed obsolete TES capacity scripts in favor of the new PTES implementation.
@amos-schledorn amos-schledorn requested review from Copilot and cpschau May 16, 2025 14:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces aquifer thermal energy storage (ATES) support for district heating, adding both simulation components and configuration options.

  • Added ATES components (charger, discharger, store) in the network model.
  • Extended configuration files, data retrieval rules, and documentation to support ATES parameters and data.
  • Updated plotting and pre-commit configurations to reflect the new ATES nomenclature.

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/solve_network.py Extended regex filters to include ATES charger and discharger links.
scripts/prepare_sector_network.py Added network components (Carrier, Bus, Link, Store) for ATES.
rules/retrieve.smk Introduced a new rule for retrieving aquifer shapefile data from BGR.
rules/build_sector.smk Added a new rule to build ATES potentials based on aquifer data.
doc/release_notes.rst Documented the new ATES feature with usage notes.
doc/data-retrieval.rst Updated data retrieval details for aquifer data.
doc/configtables/sector.csv Added configuration entries for ATES parameters.
config/* Updated various configuration files to activate ATES by default.
config/plotting.default.yaml Added plotting colors for ATES elements.
config/config.default.yaml Introduced default settings for ATES.
.pre-commit-config.yaml Adjusted codespell ignore list to include additional keywords.
Comments suppressed due to low confidence (1)

scripts/prepare_sector_network.py:3146

  • Ensure that the CSV file loaded via 'ates_e_nom_max' consistently provides the 'ates_potential' column for all nodes to prevent potential key lookup errors during network construction.
e_nom_max=pd.read_csv(ates_e_nom_max, index_col=0)["ates_potential"][nodes]

Copy link
Copy Markdown
Contributor

@cpschau cpschau left a comment

Choose a reason for hiding this comment

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

LGTM, from my side this is ready to be merged!

@amos-schledorn
Copy link
Copy Markdown
Contributor Author

LGTM, from my side this is ready to be merged!

Fantastic, thanks for the review!

@amos-schledorn amos-schledorn merged commit 72289c9 into master May 16, 2025
12 checks passed
@amos-schledorn amos-schledorn deleted the add-ates branch May 16, 2025 16:11
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