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

Add ramping limit options for conventional powerplants in prepare_sector_network. #28

Merged
merged 5 commits into from
Nov 29, 2024

Conversation

virio-andreyana
Copy link

Closes #20

Changes proposed in this Pull Request

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.

@daniel-rdt
Copy link
Collaborator

Looks good from my side. Thanks @virio-andreyana! Some notes:

  • Let's add this to the default config as well to make it compatible with upstreaming the changes at some point
  • This would include adding the changes to the doc files and adding the source for the default assumptions
  • The ramp limit should also be added following the same logic in the 'add_existing_baseyear script' here:
    n.add(
    "Link",
    new_capacity.index,
    suffix=name_suffix,
    bus0=bus0,
    bus1=new_capacity.index,
    bus2="co2 atmosphere",
    carrier=generator,
    marginal_cost=costs.at[generator, "efficiency"]
    * costs.at[generator, "VOM"], # NB: VOM is per MWel
    capital_cost=costs.at[generator, "efficiency"]
    * costs.at[generator, "fixed"], # NB: fixed cost is per MWel
    p_nom=new_capacity / costs.at[generator, "efficiency"],
    efficiency=costs.at[generator, "efficiency"],
    efficiency2=costs.at[carrier[generator], "CO2 intensity"],
    build_year=grouping_year,
    lifetime=lifetime_assets.loc[new_capacity.index],
    )
  • I am considering if we should include the p_min_pu for nuclear power plants as well here and call this PR something like improvement of nuclear power plant modeling

@virio-andreyana
Copy link
Author

I just found a subtle way to include this without adding any new code within the script.
so at the end of prepare_network.py and prepare_sector_network.py there is this function maybe_adjust_costs_and_potentials() which leads to modify_attribute() which then can update any components in a PyPSA based on the config adjustment. So for example:

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#adjustments
adjustment:
  electricity:
    absolute:
      Generator:
        nuclear:
          ramp_limit_up: 0.5
          ramp_limit_up: 0.5
          p_min_pu: 0.5
  sector:
    absolute:
      Link:
        nuclear:
          ramp_limit_up: 0.5
          ramp_limit_up: 0.5
          p_min_pu: 0.5

automatically add what we want without changing any of the scripts. What do you think @daniel-rdt ? If you agree, I'll clean everything up and just put this in config.default.yaml instead.

@virio-andreyana
Copy link
Author

Ready for review @tgilon @daniel-rdt. I've neglected my previous suggestion and continue with this one.

@daniel-rdt
Copy link
Collaborator

I need some more time to review this thoroughly. Thus, I will not merge this into the dev branch yet and will start the updated run without the ramping and p_min_pu. We can decide after and include it then.

Copy link

@tgilon tgilon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of having all the nuclear tweaks at the same place in conventional.

@virio-andreyana
Copy link
Author

add @tgilon suggestion

@tgilon
Copy link

tgilon commented Nov 29, 2024

" France, a nuclear power plant is able to ramp up or down between 100% and 20% of nominal power in half an hour, and again after at least two hours, twice a day."

source : https://edf.hal.science/hal-01977209v1/document

Copy link
Collaborator

@daniel-rdt daniel-rdt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated p_min_puto 20% and removed ramping limits based on EDF source as quoted by @tgilon:

" France, a nuclear power plant is able to ramp up or down between 100% and 20% of nominal power in half an hour, and again after at least two hours, twice a day."

source : https://edf.hal.science/hal-01977209v1/document

@daniel-rdt daniel-rdt merged commit 1922ab7 into form_energy_storage_dev Nov 29, 2024
p_min_pu=cf_conventional.get(generator,{}).get("p_min_pu",0),
ramp_limit_up=cf_conventional.get(generator,{}).get("ramp_limit_up",np.nan),
ramp_limit_down=cf_conventional.get(generator,{}).get("ramp_limit_down",np.nan),
)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI @daniel-rdt Spacing before ) has been changed

@daniel-rdt daniel-rdt deleted the feature/add-custom-ramp-lim branch February 27, 2025 16:17
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.

3 participants