Skip to content

Commit

Permalink
Document build year aggregation and new options
Browse files Browse the repository at this point in the history
  • Loading branch information
koen-vg committed May 13, 2024
1 parent 78da616 commit 544f3d3
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 24 deletions.
4 changes: 3 additions & 1 deletion config/config.default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions doc/configtables/clustering.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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."
1 change: 1 addition & 0 deletions doc/configtables/sector-opts.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions doc/configtables/sector.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 <https://en.wikipedia.org/wiki/Allam_power_cycle>`_
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
Expand Down Expand Up @@ -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.
Expand Down
44 changes: 21 additions & 23 deletions doc/foresight.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.



Expand Down
6 changes: 6 additions & 0 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
=====================================

Expand Down

0 comments on commit 544f3d3

Please sign in to comment.