Improve consistency of nuclear modelling #1540
Open
+72
−18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes proposed in this Pull Request
This PR proposes to improve the consistency of nuclear power plants through the different foresight options (i.e. overnight, myopic and perfect) and the electricity only configuration. Depending on the configuration, the nuclear power plants are modelled as
Generator
(added inscripts/add_electricity.py
) orLink
(added inscripts/add_existing_baseyear.py
). The configuration sectionpypsa_eur:generator
currently includesnuclear
. This is an issue for myopic and perfect foresight optimisation.For test cases using
add_existing_baseyear
, existing nuclear power plants exist both asGenerator
andLink
in the system. This is observed for myopic optimisations and can be observed on perfect foresight depending of the configuration ofset_all_phase_outs()
inscripts/prepare_perfect_foresight.py
(here).To test the different cases, I use the
config/test/
configuration files (via themake test
rule from theMakefile
). By default, the data doesn't cover all cases thoroughly. To improve the test, theDateOut
of one of the nuclear power plants needs to be set after the last planning horizon (e.g. 2100). This is done by adding this in here (i.e. line 165 ofscripts/build_powerplants.py
).The hardcoded nuclear phase out in
set_all_phase_outs()
also needs to be commented out (as the test case uses Belgium) here (i.e. line 348 ofscripts/prepare_perfect_foresight.py
).Here is a summary of my observations. A test case shouldn't model nuclear with two types of components:
Removing the argument
nuclear
frompypsa_eur:generator
inconfig/config.default.yaml
is an option. It removes nuclear power plants modelled asGenerator
in all sector coupled studies. We get the expected behaviour for all the test cases expect for the overnight one (config/test/config.overnight.yaml
). To recover the expected behaviour, I'm introducingconfig/config.default.overnight.yaml
to model nuclear power plants asGenerator
in this specific case.This update gives the following:
A second issue is the
p_max_pu
value. When usingGenerator
, the workflow uses by default the country specific values given indata/nuclear_p_max_pu.csv
. This is not the case forLink
, where the value is set to 1 by default. To solve this, some code is introduced inadd_power_capacities_installed_before_baseyear()
.Checklist
envs/environment.yaml
.config/config.default.yaml
.doc/configtables/*.csv
.doc/data_sources.rst
.doc/release_notes.rst
is added.