-
Notifications
You must be signed in to change notification settings - Fork 12
Representation of German district heating systems as subnodes #58
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
base: main
Are you sure you want to change the base?
Conversation
Adding more variables to the exporter
…use for steel in 2045
….manual.yaml file
Industry Steam from Biomass/Hydrogen/Electricity
Preparation for public model Pypsa-DE
- define a default national_co2_budget - allow empty scenario, which falls back to the defaults specified in pypsa.de.yaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very impressive!
I roughly went through prepare_district_heating_subnodes
and add_district_heating_subnodes
. I'd suggest doing another iteration once we've sorted the diff to the master and changes to existing code is clear.
# If head is boolean set it to 40 for default behavior | ||
if isinstance(head, bool): | ||
head = 40 | ||
|
||
# Keep only n largest district heating networks according to head parameter | ||
subnodes_head = subnodes.sort_values( | ||
by="Wärmeeinspeisung in GWh/a", ascending=False | ||
).head(head) | ||
subnodes_head.to_file(snakemake.output.district_heating_subnodes, driver="GeoJSON") | ||
|
||
subnodes_rest = subnodes[~subnodes.index.isin(subnodes_head.index)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be more organic to handle this in prepare_district_heating_subnodes
?
If not: let's avoid snakemake
(or any) globals in local name spaces and pass the filename as an argument.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found it more practical to also keep the smaller systems (not explicitly modeled as nlargest) within the output of prepare_district_heating_subnodes
, as they can be optionally used to constrain storage potentials in mother node.
…implify-scenarios
…hard-coded parameters; resolved variables containing acronyms; isolated nested function; general refactoring
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Closes
This PR transfers and extends the changes made in the deprecated PRs in pypsa-ariadne and former submodule pypsa-eur:
PyPSA/pypsa-ariadne#147
PyPSA/pypsa-ariadne#299
PyPSA/pypsa-eur#1230
Description
We introduce subnodes to represent the n largest district heating networks in Germany, as identified from the open Fernwärmeatlas dataset (available upon request at Fernwärmeatlas under CC BY 4.0 license). Largest means the amount of annual district heating feed-in. The number of these largest networks that are modeled explicitly can be determined using the configuration parameter
sector:district_heating:subnodes:nlargest
. The feature must be enabled by settingsector:district_heating:subnodes:enable
. toTrue
. Otherwise, the feature is deactivated, and the default pypsa-de workflow is executed.The district heating subnodes are attached to the superordinated standard onshore regions, which continue to represent the remaining smaller district heating systems within their respective regions. All essential district heating components, that are attached to the mother node, are mirrored in the subnodes. Exceptions are waste heat from P2X and electrolysis (heat generating links) and DAC (heat-consuming link).
District heating areas
The Fernwärmeatlas does not provide any georeferences for the district heating systems it comprises. Therefore, district heating areas are derived based on the lower administrative units (LAU) corresponding to the cities and if the parameter
sector:district_heating:subnodes:census_areas:enable
is set totrue
the raster dataset of the German census 2022. Ba activating the feaure, the census data is processed to synthesize a cleaned and smoothed set of district heating zones that were validated by eyesight against a couple of the largest German district heating systems.Validation:

In the default configuration, raster tiles from the census with more than 1% district heating are extracted and united into cohesive district heating zones. This threshold value can be chosen differently using the parameter
sector:district_heating:subnodes:census_areas:min_district_heating_share
. It then intersects these zones with the LAU regions applying an overlay and refines the resulting shapes by filtering small areas and applying iterative buffering and merging. The parameters (min_area
[m^2] &buffer_factor
[% of square root of area]) of this processing step can be set usingsector:district_heating:subnodes:census_areas:processing
.The generated district heating areas serve as system-specific geographic reference to yield a more accurate assignment of heat supply potentials (originally implemented in PyPSA/pypsa-eur#1359 and PyPSA/pypsa-eur#1516) and calculation of eligible land e.g. for roll-out of pit storage.
Buses
The cities are represented by their own specific urban central heat buses. These subnodal district heating buses are always referenced in the subnodal components instead of the superordinated urban central heat bus of the mother node.
Loads
The annual feed-in data of the district heating systems, as recorded in the dataset, is used to assign the heat loads to the subnodes, with a corresponding reduction in the load of the mother nodes. These loads fall into the categories "urban central heat" and "low-temperature heat for industry". The ratio between those two loads in the mother node is preserved in the subnode. Also, the ratio between multiple subnodal loads that are attached to the same cluster is preserved. The load of the mother node is an upper bound to the attached subnodal nodes. In the case, that the sum of subnodal loads exceeds the cluster load, the subnodal loads from Fernwärmeatlas are reduced.
Generators
The same generator technologies as in the mother node are available. Currently, they comprise heat vents for district heating curtailment and the geothermal generators, which provide the extraction of geothermal heat, which is bounded by the location-specific potential. The upstream potential calculation receives an adjusted data input, to
Stores
The same store and storage unit options as in the mother nodes are available in the subnodes. Currently, only tank and pit thermal energy storage are represented as store components. In the case of pit thermal energy storage, the limit on the maximum installable capacity is pre-calculated in
prepare_district_heating_subnodes
and set inadd_district_heating_subnodes
if the limit is activated withsector:district_heating:subnodes:limit_ptes_potential:enable
. Setttingsector:district_heating:subnodes:limit_ptes_potential:limit_mother_nodes
astrue
, the storage potential of the mother nodes is also limited to the sum of potentials corresponding to the remaining smaller district heating systems contained within the Fernwärmeatlas data.PTES potential calculation
The land eligibility is based on OSM land cover dataset (10m resolution), the NATURA 2000 protected areas, and the dataset indicating the local groundwater depth by Fan et al (DOI: 10.1126/science.12298). Eligible land
sector:district_heating:subnodes:limit_ptes_potential:osm_landcover_codes
.sector:district_heating:subnodes:limit_ptes_potential:max_groundwater_depth
.sector:district_heating:subnodes:limit_ptes_potential:min_area
The total resulting area returned by the atlite
ExclusionContainer
is divided by 10000m^2 (alsomin_area
parameter) and multiplied by a default capacity value configurable withsector:district_heating:subnodes:limit_ptes_potential:default_capacity
. The parameter is set to 4500 MWh per default to calculate thee_nom_max
. These default values are common parameters found for large pit thermal energy storage in the DEA catalogue (4500 MWh at 70000 m³) and the literature like the review from Xiang et al. (Dronninglund [8100 m² at 60000m³, Hoje-Taastrup 11098 m² at 70000m³).Links
Except from electrolysis, P2H, and DAC technologies, all links affecting the district heating at the mother nodes are also represented at the subnodes. While the urban central heat buses are adjusted to reference the specific subnodal urban central heat bus, other buses remain identical compared to the mother node. Therefore,
Heat pumps
The geolocations of the subnodes are used to calculate the location-specific heat pump efficiencies (modified onshore regions are passed to rules
build_temperature_profiles
,build_central_heating_temperature_profiles
,build_cop_profiles
).Existing CHP plants
When a brownfield approach is followed, the existing CHP capacities from the MaStR database are allocated to the subnodes based on their geolocation. For mapping, the census-based district heating areas are used. Through a modification in the
add_existing_baseyear
script ( formerly PyPSA/pypsa-eur#1230), a CHP plant is either added to a subnode or remains in the mother node.Overview on changes
New data sources
/data/fernwaermeatlas
/cities_geolocations.geojson
contains coordinates of cities contained in/fernwaermeatlas.xlsx
, which is an open dataset licensed under CC 4.0. Here it can be explored and requested.Zensusatlas
OSM land cover
Groundwater table depth
New scripts
prepare_district_heating_subnodes
:prepare_subnodes()
refine_dh_areas_from_census_data()
add_ptes_limit()
extend_onshore_regions()
add_district_heating_subnodes
:add_subnodes()
and subfunctionsadd_buses()
,add_loads()
,add_stores()
,add_storage_units()
,add_generators()
, andadd_links()
.existing_heating_distribution
dataframe by subnodes inextend_heating_distribution
. At the moment only zero-capacities are filled to ensure a smooth workflow, as there is no data available on existing capacities in German district heating systems.Further code adjustments
assign_subnode()
inbuild_existing_chp_de
maps CHP plants from MaStR to mother nodes and subnodes.prepare_sector_network
to drop subnodes from temperature xarray and include TES (Add PTES and introduce PTES/TES energy-to-power ratios pypsa-eur#1546)solving
to allow deactivation of constraints using the configadd_brownfield
add_existing_baseyear
add_existing_baseyear
Exemplary district heating balances from myopic run with 7H-27c resolution
Checklist
ariadne_all
completes without errorsexport_ariadne_variables
has been adapted to the changesChangelog.md
main
has been merged into the PRYYYYMMDDdescriptive_title