From 544f3d309e1546e13ecfe245d5625d29812433a8 Mon Sep 17 00:00:00 2001 From: Koen van Greevenbroek Date: Mon, 13 May 2024 11:33:01 +0000 Subject: [PATCH] Document build year aggregation and new options --- config/config.default.yaml | 4 ++- doc/configtables/clustering.csv | 1 + doc/configtables/sector-opts.csv | 1 + doc/configtables/sector.csv | 3 +++ doc/foresight.rst | 44 +++++++++++++++----------------- doc/release_notes.rst | 6 +++++ 6 files changed, 35 insertions(+), 24 deletions(-) diff --git a/config/config.default.yaml b/config/config.default.yaml index 61ef34e4c..4452c9693 100644 --- a/config/config.default.yaml +++ b/config/config.default.yaml @@ -511,6 +511,7 @@ sector: oil_boilers: false biomass_boiler: true overdimension_individual_heating: 1.1 #to cover demand peaks bigger than data + central_heat_everywhere: false chp: true micro_chp: false solar_thermal: true @@ -521,7 +522,6 @@ sector: dac: true co2_vent: false central_heat_vent: false - central_heat_everywhere: false allam_cycle: false hydrogen_fuel_cell: true hydrogen_turbine: false @@ -567,6 +567,7 @@ sector: electricity_distribution_grid: true electricity_distribution_grid_cost_factor: 1.0 electricity_grid_connection: true + transmission_efficiency_enabled: true transmission_efficiency: DC: efficiency_static: 0.98 @@ -748,6 +749,7 @@ clustering: temporal: resolution_elec: false resolution_sector: false + build_year_aggregation: false # docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#adjustments adjustments: diff --git a/doc/configtables/clustering.csv b/doc/configtables/clustering.csv index 65411738d..2bd91a058 100644 --- a/doc/configtables/clustering.csv +++ b/doc/configtables/clustering.csv @@ -20,3 +20,4 @@ aggregation_strategies,,, temporal,,,Options for temporal resolution -- resolution_elec,--,"{false,``nH``; i.e. ``2H``-``6H``}","Resample the time-resolution by averaging over every ``n`` snapshots in :mod:`prepare_network`. **Warning:** This option should currently only be used with electricity-only networks, not for sector-coupled networks." -- resolution_sector,--,"{false,``nH``; i.e. ``2H``-``6H``}","Resample the time-resolution by averaging over every ``n`` snapshots in :mod:`prepare_sector_network`." +build_year_aggregation,bool,"{'true','false'}","Whether or not to aggregate similar components with different build years before myopic optimisations, and disaggregate after the optimisation." diff --git a/doc/configtables/sector-opts.csv b/doc/configtables/sector-opts.csv index fc9e8c104..1f86b4228 100644 --- a/doc/configtables/sector-opts.csv +++ b/doc/configtables/sector-opts.csv @@ -9,3 +9,4 @@ Trigger, Description, Definition, Status ``A``,Add agriculture sector,,In active use ``dist``+``n``,Add distribution grid with investment costs of ``n`` times costs in ``resources/costs_{cost_year}.csv``,,In active use ``seq``+``n``,Sets the CO2 sequestration potential to ``n`` Mt CO2 per year,,In active use +``aggBuildYear``,Enable build year aggregation (see the ``build_year_aggregation`` option),,In active use diff --git a/doc/configtables/sector.csv b/doc/configtables/sector.csv index 58ccd9bfe..65e6009b3 100644 --- a/doc/configtables/sector.csv +++ b/doc/configtables/sector.csv @@ -72,6 +72,7 @@ resistive_heaters,--,"{true, false}",Add option for transforming electricity int oil_boilers,--,"{true, false}",Add option for transforming oil into heat using boilers biomass_boiler,--,"{true, false}",Add option for transforming biomass into heat using boilers overdimension_individual_heating,--,"float",Add option for overdimensioning individual heating systems by a certain factor. This allows them to cover heat demand peaks e.g. 10% higher than those in the data with a setting of 1.1. +central_heat_everywhere,--,"{true, false}","Model central heating at every location, even when the district heating share at that location is 0." chp,--,"{true, false}",Add option for using Combined Heat and Power (CHP) micro_chp,--,"{true, false}",Add option for using Combined Heat and Power (CHP) for decentral areas. solar_thermal,--,"{true, false}",Add option for using solar thermal to generate heat. @@ -81,6 +82,7 @@ methanation,--,"{true, false}",Add option for transforming hydrogen and CO2 into coal_cc,--,"{true, false}",Add option for coal CHPs with carbon capture dac,--,"{true, false}",Add option for Direct Air Capture (DAC) co2_vent,--,"{true, false}",Add option for vent out CO2 from storages to the atmosphere. +central_heat_vent,--,"{true, false}",Add option to shed excess heat from central heat buses; sometimes needed for model feasibility. allam_cycle,--,"{true, false}",Add option to include `Allam cycle gas power plants `_ hydrogen_fuel_cell,--,"{true, false}",Add option to include hydrogen fuel cell for re-electrification. Assuming OCGT technology costs hydrogen_turbine,--,"{true, false}",Add option to include hydrogen turbine for re-electrification. Assuming OCGT technology costs @@ -119,6 +121,7 @@ electricity_distribution _grid,--,"{true, false}",Add a simplified representatio electricity_distribution _grid_cost_factor,,,Multiplies the investment cost of the electricity distribution grid ,,, electricity_grid _connection,--,"{true, false}",Add the cost of electricity grid connection for onshore wind and solar +transmission_efficiency_enabled,--,"{true, false}",Enable modelling efficiency losses in links; determines whether the following section has any effect. transmission_efficiency,,,Section to specify transmission losses or compression energy demands of bidirectional links. Splits them into two capacity-linked unidirectional links. -- {carrier},--,str,The carrier of the link. -- -- efficiency_static,p.u.,float,Length-independent transmission efficiency. diff --git a/doc/foresight.rst b/doc/foresight.rst index 400f67cee..e1aacedd3 100644 --- a/doc/foresight.rst +++ b/doc/foresight.rst @@ -124,40 +124,38 @@ Grouping years indicates the bins limits for grouping the existing capacities of different technologies. Note that separate bins are defined for the power and heating plants due to different data sources. -``grouping_years_power: [1980, 1985, 1990, 1995, 2000, 2005, 2010, 2015, 2020, -2025, 2030]`` - -``grouping_years_heat: [1980, 1985, 1990, 1995, 2000, 2005, 2010, 2015, 2019]`` - - - - - -**threshold capacity** +.. literalinclude:: ../config/config.default.yaml + :language: yaml + :start-at: existing_capacities: + :end-before: threshold_capacity: If for a technology, node, and grouping bin, the capacity is lower than -threshold_capacity, it is ignored. +``threshold_capacity`` (in MW), it is ignored. -``threshold_capacity: 10`` - - - - -**conventional carriers** +.. literalinclude:: ../config/config.default.yaml + :language: yaml + :start-at: threshold_capacity: + :end-before: default_heating_lifetime: Conventional carriers indicate carriers used in the existing conventional -technologies. +technologies, allowing the selection of which kinds of existing capacities are to be added to the network and which to be left out. By default, all conventional technologies are included. - conventional_carriers: +.. literalinclude:: ../config/config.default.yaml + :language: yaml + :start-at: conventional_carriers: + :end-before: # docs - \- lignite - \- coal +**build year aggregation** - \- oil +The ``build_year_aggregation`` option is found under the ``clustering`` section of the configuration file, and is set to ``false`` by default. By setting this option to ``true``, similar components with different build years aggregated before each optimisation (their capacities summed up, etc.) and disaggregated again after each optimisation. This can lead to drastic improvement in the memory footprint of the optimisations (up to approximately a factor of 5 in common use-cases), especially for optimisations at the later planning horizons. - \- uranium +The aggregation has received some limited testing, and has lead to minimal distortion in results. However, caution is advised in the use of this option. To test if it performs correctly in your use-case, use to ``aggBuildYear`` flag in the ``{sector_opts}`` wildcard to run a version of your model with and without build year aggregation, and see if the results are the same. +As of now, the following requirements must be met for build year aggregation to work correctly: +- Time-step segmentation cannot be used; use uniform time-aggregation instead (e.g. ``6h`` instead of ``2000seg``). (The time-step segmentation could be different for different planning horizons.) +- Turn off transmission efficiencies for links by setting ``transmission_efficiency_enabled`` to ``false`` under the ``sector:`` configuration section. Enabling these introduces the ``reversed`` column in ``n.links`` which, with build year aggregation enabled, leads to a netCDF error upon exporting. +- Make sure that a central heat bus is modelled at every location regardless of district heating fraction by setting ``central_heat_everywhere`` to ``true`` under the ``sector:`` configuration section. Otherwise one might get links (with waste heat) which are connected to central heating in some planning horizons and not in others. Alternatively, turn off all waste heat modelling. diff --git a/doc/release_notes.rst b/doc/release_notes.rst index dbbce3653..c3f840263 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -222,6 +222,12 @@ Upcoming Release * Clarify suffix usage in `add_existing_baseyear`. +* Add an experimental feature to aggregate components by build-year before optimisation, leading to a substantial reduction in memory footprint for said optimisations. + +* Add an option `central_heat_everywhere` to model central heating at every location in the model, even when there is no district heating there. (This option is necessary when using build year aggregation.) + +* Add an option `transmission_efficiency_enabled` to turn off efficiency losses for all carriers. + PyPSA-Eur 0.10.0 (19th February 2024) =====================================