Skip to content
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

Improve consistency of nuclear modelling #1540

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tgilon
Copy link
Contributor

@tgilon tgilon commented Feb 11, 2025

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 in scripts/add_electricity.py) or Link (added in scripts/add_existing_baseyear.py). The configuration section pypsa_eur:generator currently includes nuclear. This is an issue for myopic and perfect foresight optimisation.

For test cases using add_existing_baseyear, existing nuclear power plants exist both as Generator and Linkin the system. This is observed for myopic optimisations and can be observed on perfect foresight depending of the configuration of set_all_phase_outs() in scripts/prepare_perfect_foresight.py(here).

To test the different cases, I use the config/test/ configuration files (via the make test rule from the Makefile). By default, the data doesn't cover all cases thoroughly. To improve the test, the DateOut 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 of scripts/build_powerplants.py).

    ppl.loc[ppl.query("Name=='Doel'").index, "DateOut"] = 2100

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 of scripts/prepare_perfect_foresight.py).

Here is a summary of my observations. A test case shouldn't model nuclear with two types of components:

Test case Generator Link
config.electricity.yaml x
config.overnight.yaml x
config.myopic.yaml x x
config.perfect.yaml x x

Removing the argument nuclear from pypsa_eur:generatorin config/config.default.yaml is an option. It removes nuclear power plants modelled as Generator 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 introducing config/config.default.overnight.yaml to model nuclear power plants as Generator in this specific case.

This update gives the following:

Test case Generator Link
config.electricity.yaml x
config.overnight.yaml x
config.myopic.yaml x
config.perfect.yaml x

A second issue is the p_max_puvalue. When using Generator, the workflow uses by default the country specific values given in data/nuclear_p_max_pu.csv. This is not the case for Link, where the value is set to 1 by default. To solve this, some code is introduced in add_power_capacities_installed_before_baseyear().

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.

@tgilon tgilon marked this pull request as ready for review February 11, 2025 16:27
@tgilon
Copy link
Contributor Author

tgilon commented Feb 11, 2025

@daniel-rdt FYI

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.

1 participant