From 938fbff5a2eecb4755cf4ff6d058e650c0671bad Mon Sep 17 00:00:00 2001 From: Thomas Gilon Date: Tue, 10 Dec 2024 18:03:45 +0100 Subject: [PATCH 01/19] Add a constraint to limit DAC --- scripts/solve_network.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/solve_network.py b/scripts/solve_network.py index 4b197385d..8832666da 100644 --- a/scripts/solve_network.py +++ b/scripts/solve_network.py @@ -931,6 +931,13 @@ def add_co2_atmosphere_constraint(n, snapshots): n.model.add_constraints(lhs <= rhs, name=f"GlobalConstraint-{name}") +def add_dac_limit(n): + dac=n.links.query("Link.str.contains('DAC')") + lhs=(n.model["Link-p"].loc[:, dac.index] * n.snapshot_weightings.generators).sum() + rhs=20*1e6 / dac.efficiency2.mean() * -1 + n.model.add_constraints(lhs <= rhs, name="DAC limit") + + def extra_functionality(n, snapshots): """ Collects supplementary constraints which will be passed to @@ -966,6 +973,7 @@ def extra_functionality(n, snapshots): add_battery_constraints(n) add_lossy_bidirectional_link_constraints(n) add_pipe_retrofit_constraint(n) + add_dac_limit(n) if n._multi_invest: add_carbon_constraint(n, snapshots) add_carbon_budget_constraint(n, snapshots) From 838a1e83657628c3129a2ca690814709ea1a239d Mon Sep 17 00:00:00 2001 From: Thomas Gilon Date: Wed, 11 Dec 2024 10:16:24 +0100 Subject: [PATCH 02/19] A minor improvements --- scripts/solve_network.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/solve_network.py b/scripts/solve_network.py index 8832666da..14bc71ad7 100644 --- a/scripts/solve_network.py +++ b/scripts/solve_network.py @@ -932,9 +932,12 @@ def add_co2_atmosphere_constraint(n, snapshots): def add_dac_limit(n): + """ + Limit the amount of CO2 captured using DAC. The constraint is formulated tCO2. + """ dac=n.links.query("Link.str.contains('DAC')") - lhs=(n.model["Link-p"].loc[:, dac.index] * n.snapshot_weightings.generators).sum() - rhs=20*1e6 / dac.efficiency2.mean() * -1 + lhs=(n.model["Link-p"].loc[:, dac.index] * n.snapshot_weightings.generators * dac.efficiency2 * -1).sum() + rhs=20*1e6 # ToDo Add a configuration n.model.add_constraints(lhs <= rhs, name="DAC limit") From a50986910214b4de866aa2adacfaaffb2ba8b66b Mon Sep 17 00:00:00 2001 From: daniel-rdt Date: Thu, 12 Dec 2024 12:03:10 +0100 Subject: [PATCH 03/19] add config option for dac limit --- config/config.default.yaml | 1 + scripts/solve_network.py | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/config/config.default.yaml b/config/config.default.yaml index b04df42fd..f979686a6 100644 --- a/config/config.default.yaml +++ b/config/config.default.yaml @@ -615,6 +615,7 @@ sector: methanation: true coal_cc: false dac: true + dac_limit: false # false or limit in MtCO2 co2_vent: false central_heat_vent: false allam_cycle_gas: false diff --git a/scripts/solve_network.py b/scripts/solve_network.py index 14bc71ad7..3a073837c 100644 --- a/scripts/solve_network.py +++ b/scripts/solve_network.py @@ -933,11 +933,11 @@ def add_co2_atmosphere_constraint(n, snapshots): def add_dac_limit(n): """ - Limit the amount of CO2 captured using DAC. The constraint is formulated tCO2. + Limit the amount of CO2 captured using DAC. The constraint is formulated in tCO2. """ - dac=n.links.query("Link.str.contains('DAC')") - lhs=(n.model["Link-p"].loc[:, dac.index] * n.snapshot_weightings.generators * dac.efficiency2 * -1).sum() - rhs=20*1e6 # ToDo Add a configuration + dac = n.links.query("Link.str.contains('DAC')") + lhs = (n.model["Link-p"].loc[:, dac.index] * n.snapshot_weightings.generators * dac.efficiency2 * -1).sum() + rhs = n.config["sector"]["dac_limit"] * 1e6 # DAC limit specified in config in MtCO2 n.model.add_constraints(lhs <= rhs, name="DAC limit") @@ -976,7 +976,8 @@ def extra_functionality(n, snapshots): add_battery_constraints(n) add_lossy_bidirectional_link_constraints(n) add_pipe_retrofit_constraint(n) - add_dac_limit(n) + if config["sector"]["dac"] and config["sector"]["dac_limit"]: + add_dac_limit(n) if n._multi_invest: add_carbon_constraint(n, snapshots) add_carbon_budget_constraint(n, snapshots) From 03d297b53405a9ed7f2931017b7cbcb63dab5426 Mon Sep 17 00:00:00 2001 From: daniel-rdt Date: Thu, 12 Dec 2024 12:06:01 +0100 Subject: [PATCH 04/19] add dac limit config option to form config --- config/config.form.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/config.form.yaml b/config/config.form.yaml index 556d590a8..3703d9bd1 100644 --- a/config/config.form.yaml +++ b/config/config.form.yaml @@ -13,7 +13,7 @@ logging: # docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#run run: prefix: "updated_initial_main_scenarios" - name: "main-mds-vanilla-no-methanation" + name: "main-mds-vanilla-dac-limit-ev40" scenarios: enable: true file: config/scenarios.form.yaml @@ -180,6 +180,8 @@ sector: reduce_space_heat_exogenously_factor: # TODO: check this for Germany (Regulation or Ariadne?) 2035: 0.11 tes: false + dac: true + dac_limit: false # False or limit in MtCO2 marginal_cost_storage: 0. #1e-4 stores: ["H2"] storage_units: ["li-ion battery", "vanadium", "lair", "pair", "iron-air battery"] From b6020f87b30197d6f7013d6e740f92c34ef738b3 Mon Sep 17 00:00:00 2001 From: daniel-rdt Date: Thu, 12 Dec 2024 12:06:44 +0100 Subject: [PATCH 05/19] include scenarios for dac limit test runs --- config/scenarios.form.yaml | 79 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/config/scenarios.form.yaml b/config/scenarios.form.yaml index dc296af95..bb231a7d2 100644 --- a/config/scenarios.form.yaml +++ b/config/scenarios.form.yaml @@ -77,6 +77,85 @@ main-mds-vanilla: stores: ["H2"] storage_units: ["li-ion battery", "iron-air battery"] +main-mds-vanilla-dac-limit-ev35: + electricity: + max_hours: + li-ion battery: [1, 2, 4, 8] + vanadium: [10] + lair: [12] + pair: [24] + H2: [168] + iron-air battery: [100] + sector: + land_transport_electric_share: + 2035: 0.35 # default assumptions + land_transport_ice_share: + 2035: 0.65 + stores: ["H2"] + storage_units: ["li-ion battery", "iron-air battery"] + dac: true + dac_limit: 20 # False or limit in MtCO2 + +main-mds-vanilla-dac-limit-ev40: + electricity: + max_hours: + li-ion battery: [1, 2, 4, 8] + vanadium: [10] + lair: [12] + pair: [24] + H2: [168] + iron-air battery: [100] + sector: + land_transport_electric_share: + 2035: 0.40 # default assumptions + land_transport_ice_share: + 2035: 0.60 + stores: ["H2"] + storage_units: ["li-ion battery", "iron-air battery"] + dac: true + dac_limit: 20 # False or limit in MtCO2 + +main-mds-vanilla-dac-limit-ev45: + electricity: + max_hours: + li-ion battery: [1, 2, 4, 8] + vanadium: [10] + lair: [12] + pair: [24] + H2: [168] + iron-air battery: [100] + sector: + land_transport_electric_share: + 2035: 0.45 # default assumptions + land_transport_ice_share: + 2035: 0.55 + stores: ["H2"] + storage_units: ["li-ion battery", "iron-air battery"] + dac: true + dac_limit: 20 # False or limit in MtCO2 + +main-mds-vanilla-dac-limit-ev45-nuc80: + electricity: + max_hours: + li-ion battery: [1, 2, 4, 8] + vanadium: [10] + lair: [12] + pair: [24] + H2: [168] + iron-air battery: [100] + sector: + land_transport_electric_share: + 2035: 0.45 # default assumptions + land_transport_ice_share: + 2035: 0.55 + stores: ["H2"] + storage_units: ["li-ion battery", "iron-air battery"] + dac: true + dac_limit: 20 # False or limit in MtCO2 + conventional: + nuclear: + p_min_pu: 0.8 + main-no-mds-vanilla: electricity: max_hours: From 481009e977efb88a0eb96dd8b0b356ee31903688 Mon Sep 17 00:00:00 2001 From: daniel-rdt Date: Thu, 12 Dec 2024 12:31:02 +0100 Subject: [PATCH 06/19] added doc and release note --- doc/configtables/sector.csv | 1 + doc/release_notes.rst | 2 ++ 2 files changed, 3 insertions(+) diff --git a/doc/configtables/sector.csv b/doc/configtables/sector.csv index 14888a576..a1520a622 100644 --- a/doc/configtables/sector.csv +++ b/doc/configtables/sector.csv @@ -105,6 +105,7 @@ storage_units,--,List of storage technologies to include as StorageUnit componen methanation,--,"{true, false}",Add option for transforming hydrogen and CO2 into methane using methanation. coal_cc,--,"{true, false}",Add option for coal CHPs with carbon capture dac,--,"{true, false}",Add option for Direct Air Capture (DAC) +dac_limit,--,float or false,Add limit on Direct Air Capture (DAC). Can be either false or limit in MtCO2. co2_vent,--,"{true, false}",Add option for vent out CO2 from storages to the atmosphere. allam_cycle_gas,--,"{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 diff --git a/doc/release_notes.rst b/doc/release_notes.rst index dab0cb6d6..1e6b7ab5a 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -11,6 +11,8 @@ Release Notes Upcoming Release ================ +* Added option to include an exogenous DAC limit specified via the configuration file + * Added Iron-Air battery storage technology and changed nomenclature for lithium-ion battery storages from ``battery`` to ``li-ion battery``. * Feature: Allow CHPs to use different fuel sources such as gas, oil, coal, and methanol. Note that the cost assumptions are based on a gas CHP. From 5c0bbb4649a47f2cd88784ded8026cd968bbc9dd Mon Sep 17 00:00:00 2001 From: Thomas Gilon Date: Thu, 12 Dec 2024 14:53:22 +0100 Subject: [PATCH 07/19] Set dac_limit as a pathway MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Daniel Rüdt <117752024+daniel-rdt@users.noreply.github.com> --- config/config.form.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/config.form.yaml b/config/config.form.yaml index 3703d9bd1..21386aea2 100644 --- a/config/config.form.yaml +++ b/config/config.form.yaml @@ -181,7 +181,9 @@ sector: 2035: 0.11 tes: false dac: true - dac_limit: false # False or limit in MtCO2 + dac_limit: + enable: False + 2035: 20 # limit in MtCO2 marginal_cost_storage: 0. #1e-4 stores: ["H2"] storage_units: ["li-ion battery", "vanadium", "lair", "pair", "iron-air battery"] From fe0438b5d5450c7c3aea61bde9d98fda14afc122 Mon Sep 17 00:00:00 2001 From: martacki Date: Fri, 18 Oct 2024 14:33:38 +0200 Subject: [PATCH 08/19] improve heat dsr documentation --- doc/configtables/sector.csv | 7 +++++-- doc/release_notes.rst | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/configtables/sector.csv b/doc/configtables/sector.csv index 14888a576..61c275a8f 100644 --- a/doc/configtables/sector.csv +++ b/doc/configtables/sector.csv @@ -27,10 +27,13 @@ district_heating,--,,`prepare_sector_network.py `_. Set to 0 for full restriction on HP DSM, default value is 0.27, +residential_heat_restriction_time,--,list of int, Time at which SOC of HPs has to be residential_heat_restriction_value. Defaults to [10, 22] corresponding to 9am and 9pm, cluster_heat_buses,--,"{true, false}",Cluster residential and service heat buses in `prepare_sector_network.py `_ to one to save memory. ,,, -bev_dsm_restriction _value,--,float,Adds a lower state of charge (SOC) limit for battery electric vehicles (BEV) to manage its own energy demand (DSM). Located in `build_transport_demand.py `_. Set to 0 for no restriction on BEV DSM -bev_dsm_restriction _time,--,float,Time at which SOC of BEV has to be dsm_restriction_value +bev_dsm_restriction_value,--,float,Adds a lower state of charge (SOC) limit for battery electric vehicles (BEV) to manage its own energy demand (DSM). Located in `build_transport_demand.py `_. Set to 0 for no restriction on BEV DSM, +bev_dsm_restriction_time,--,float,Time at which SOC of BEV has to be bev_dsm_restriction_value, transport_heating _deadband_upper,°C,float,"The maximum temperature in the vehicle. At higher temperatures, the energy required for cooling in the vehicle increases." transport_heating _deadband_lower,°C,float,"The minimum temperature in the vehicle. At lower temperatures, the energy required for heating in the vehicle increases." ,,, diff --git a/doc/release_notes.rst b/doc/release_notes.rst index dab0cb6d6..ade65c4e8 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -107,6 +107,7 @@ Upcoming Release * Bugfix: vehicle-to-grid dispatch capacity is now limited by the fraction of vehicles participating in demand-side-management, halving the dispatch capacity under the default demand-side management participation rate of 0.5. +* Add demand-side-response (DSR) for the heating sector. PyPSA-Eur 0.13.0 (13th September 2024) ====================================== From 503e3f2ccd4020af290b7daa2eb01a1c12360041 Mon Sep 17 00:00:00 2001 From: martacki Date: Fri, 18 Oct 2024 11:10:35 +0200 Subject: [PATCH 09/19] initial dsm implementation for the heating sector --- config/config.default.yaml | 3 +++ rules/build_sector.smk | 7 +++++ scripts/build_hourly_heat_demand.py | 24 +++++++++++++++++ scripts/prepare_sector_network.py | 41 +++++++++++++++++++++++++++++ 4 files changed, 75 insertions(+) diff --git a/config/config.default.yaml b/config/config.default.yaml index b04df42fd..76ee6b796 100644 --- a/config/config.default.yaml +++ b/config/config.default.yaml @@ -493,6 +493,9 @@ sector: rural: - air - ground + residential_heat_dsm: true + residential_heat_restriction_value: 0.27 + residential_heat_restriction_time: [10, 22] # 9am and 9pm cluster_heat_buses: true heat_demand_cutout: default bev_dsm_restriction_value: 0.75 diff --git a/rules/build_sector.smk b/rules/build_sector.smk index 8afdd791a..e0d6fbab0 100755 --- a/rules/build_sector.smk +++ b/rules/build_sector.smk @@ -170,11 +170,15 @@ rule build_hourly_heat_demand: params: snapshots=config_provider("snapshots"), drop_leap_day=config_provider("enable", "drop_leap_day"), + sector=config_provider("sector"), input: heat_profile="data/heat_load_profile_BDEW.csv", heat_demand=resources("daily_heat_demand_total_base_s_{clusters}.nc"), output: heat_demand=resources("hourly_heat_demand_total_base_s_{clusters}.nc"), + heat_dsm_profile=resources( + "residential_heat_dsm_profile_total_base_s_{clusters}.csv" + ), resources: mem_mb=2000, threads: 8 @@ -1072,6 +1076,9 @@ rule prepare_sector_network: transport_data=resources("transport_data_s_{clusters}.csv"), avail_profile=resources("avail_profile_s_{clusters}.csv"), dsm_profile=resources("dsm_profile_s_{clusters}.csv"), + heat_dsm_profile=resources( + "residential_heat_dsm_profile_total_base_s_{clusters}.csv" + ), co2_totals_name=resources("co2_totals.csv"), co2="data/bundle/eea/UNFCCC_v23.csv", biomass_potentials=resources( diff --git a/scripts/build_hourly_heat_demand.py b/scripts/build_hourly_heat_demand.py index 9bb1f77ff..7c418a3af 100644 --- a/scripts/build_hourly_heat_demand.py +++ b/scripts/build_hourly_heat_demand.py @@ -32,10 +32,25 @@ from itertools import product +import numpy as np import pandas as pd import xarray as xr from _helpers import generate_periodic_profiles, get_snapshots, set_scenario_config +def heat_dsm_profile(nodes, options): + + weekly_profile = np.ones((24 * 7)) + for i in options["residential_heat_restriction_time"]: + weekly_profile[(np.arange(0, 7, 1) * 24 + int(i))] = 0 + + dsm_profile = generate_periodic_profiles( + dt_index=pd.date_range(freq="h", **snakemake.params.snapshots, tz="UTC"), + nodes=nodes, + weekly_profile=weekly_profile, + ) + + return dsm_profile + if __name__ == "__main__": if "snakemake" not in globals(): from _helpers import mock_snakemake @@ -51,6 +66,8 @@ snakemake.params.snapshots, snakemake.params.drop_leap_day ) + options = snakemake.params.sector + daily_space_heat_demand = ( xr.open_dataarray(snakemake.input.heat_demand) .to_pandas() @@ -63,6 +80,7 @@ uses = ["water", "space"] heat_demand = {} + dsm_profile = {} for sector, use in product(sectors, uses): weekday = list(intraday_profiles[f"{sector} {use} weekday"]) weekend = list(intraday_profiles[f"{sector} {use} weekend"]) @@ -77,13 +95,19 @@ heat_demand[f"{sector} {use}"] = ( daily_space_heat_demand * intraday_year_profile ) + if sector == "residential": + dsm_profile[f"{sector} {use}"] = heat_dsm_profile( + daily_space_heat_demand.columns, options + ) else: heat_demand[f"{sector} {use}"] = intraday_year_profile heat_demand = pd.concat(heat_demand, axis=1, names=["sector use", "node"]) + dsm_profile = pd.concat(dsm_profile, axis=1, names=["sector use", "node"]) heat_demand.index.name = "snapshots" ds = heat_demand.stack(future_stack=True).to_xarray() ds.to_netcdf(snakemake.output.heat_demand) + dsm_profile.to_csv(snakemake.output.heat_dsm_profile) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index ea305d174..c833a980a 100755 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2426,6 +2426,47 @@ def add_heat(n: pypsa.Network, costs: pd.DataFrame, cop: xr.DataArray): p_set=heat_load.loc[n.snapshots], ) + if options["residential_heat_dsm"] and heat_system in [ + HeatSystem.RESIDENTIAL_RURAL, + HeatSystem.RESIDENTIAL_URBAN_DECENTRAL, + HeatSystem.URBAN_CENTRAL, + ]: + factor = heat_system.heat_demand_weighting( + urban_fraction=urban_fraction[nodes], dist_fraction=dist_fraction[nodes] + ) + + heat_dsm_profile = pd.read_csv( + snakemake.input.heat_dsm_profile, header=[1], index_col=[0] + )[nodes] + heat_dsm_profile.index = n.snapshots + + e_nom = ( + heat_demand[["residential space"]] + .T.groupby(level=1) + .sum() + .T[nodes] + .multiply(factor) + ) + + heat_dsm_profile = heat_dsm_profile * options["residential_heat_restriction_value"] + e_nom = e_nom.max() + + tes_time_constant_days = options["tes_tau"]["decentral"] + + n.madd( + "Store", + nodes, + suffix=f" {heat_system} heat flexibility", + bus=nodes + f" {heat_system} heat", + carrier="residential heating flexibility", + standing_loss=0, # 1 - np.exp(-1 / 24 / tes_time_constant_days), + e_cyclic=True, + e_nom=e_nom, + e_max_pu=heat_dsm_profile + ) + + logger.info(f"adding heat dsm in {heat_system} heating.") + ## Add heat pumps for heat_source in snakemake.params.heat_pump_sources[ heat_system.system_type.value From be591ecee5ebcf4a27fd1dddb632a165e02de9c1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 09:11:49 +0000 Subject: [PATCH 10/19] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/build_hourly_heat_demand.py | 2 ++ scripts/prepare_sector_network.py | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/build_hourly_heat_demand.py b/scripts/build_hourly_heat_demand.py index 7c418a3af..9eb9dd166 100644 --- a/scripts/build_hourly_heat_demand.py +++ b/scripts/build_hourly_heat_demand.py @@ -37,6 +37,7 @@ import xarray as xr from _helpers import generate_periodic_profiles, get_snapshots, set_scenario_config + def heat_dsm_profile(nodes, options): weekly_profile = np.ones((24 * 7)) @@ -51,6 +52,7 @@ def heat_dsm_profile(nodes, options): return dsm_profile + if __name__ == "__main__": if "snakemake" not in globals(): from _helpers import mock_snakemake diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index c833a980a..5d82d24bf 100755 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2448,7 +2448,9 @@ def add_heat(n: pypsa.Network, costs: pd.DataFrame, cop: xr.DataArray): .multiply(factor) ) - heat_dsm_profile = heat_dsm_profile * options["residential_heat_restriction_value"] + heat_dsm_profile = ( + heat_dsm_profile * options["residential_heat_restriction_value"] + ) e_nom = e_nom.max() tes_time_constant_days = options["tes_tau"]["decentral"] @@ -2459,10 +2461,10 @@ def add_heat(n: pypsa.Network, costs: pd.DataFrame, cop: xr.DataArray): suffix=f" {heat_system} heat flexibility", bus=nodes + f" {heat_system} heat", carrier="residential heating flexibility", - standing_loss=0, # 1 - np.exp(-1 / 24 / tes_time_constant_days), + standing_loss=0, # 1 - np.exp(-1 / 24 / tes_time_constant_days), e_cyclic=True, e_nom=e_nom, - e_max_pu=heat_dsm_profile + e_max_pu=heat_dsm_profile, ) logger.info(f"adding heat dsm in {heat_system} heating.") From f128dd71af2c6ef16336587ab3f21549f5ea6373 Mon Sep 17 00:00:00 2001 From: martacki Date: Fri, 18 Oct 2024 14:25:18 +0200 Subject: [PATCH 11/19] assume thermal losses in buildings and remove heating dsm from default --- config/config.default.yaml | 2 +- scripts/prepare_sector_network.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/config.default.yaml b/config/config.default.yaml index 76ee6b796..9d8891077 100644 --- a/config/config.default.yaml +++ b/config/config.default.yaml @@ -493,7 +493,7 @@ sector: rural: - air - ground - residential_heat_dsm: true + residential_heat_dsm: false residential_heat_restriction_value: 0.27 residential_heat_restriction_time: [10, 22] # 9am and 9pm cluster_heat_buses: true diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 5d82d24bf..7c485a770 100755 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2453,6 +2453,7 @@ def add_heat(n: pypsa.Network, costs: pd.DataFrame, cop: xr.DataArray): ) e_nom = e_nom.max() + # Thermal (standing) losses of buildings assumed to be the same as decentralized water tanks tes_time_constant_days = options["tes_tau"]["decentral"] n.madd( @@ -2461,7 +2462,7 @@ def add_heat(n: pypsa.Network, costs: pd.DataFrame, cop: xr.DataArray): suffix=f" {heat_system} heat flexibility", bus=nodes + f" {heat_system} heat", carrier="residential heating flexibility", - standing_loss=0, # 1 - np.exp(-1 / 24 / tes_time_constant_days), + standing_loss=1-np.exp(-1/24/tes_time_constant_days), e_cyclic=True, e_nom=e_nom, e_max_pu=heat_dsm_profile, From 259d73ff771f0def34a1e85a3fec777ec465b336 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 12:25:44 +0000 Subject: [PATCH 12/19] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/prepare_sector_network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 7c485a770..fb99999a8 100755 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2462,7 +2462,7 @@ def add_heat(n: pypsa.Network, costs: pd.DataFrame, cop: xr.DataArray): suffix=f" {heat_system} heat flexibility", bus=nodes + f" {heat_system} heat", carrier="residential heating flexibility", - standing_loss=1-np.exp(-1/24/tes_time_constant_days), + standing_loss=1 - np.exp(-1 / 24 / tes_time_constant_days), e_cyclic=True, e_nom=e_nom, e_max_pu=heat_dsm_profile, From 4768946696cbf6c4c30e00e9f084ea9b59d1dd98 Mon Sep 17 00:00:00 2001 From: daniel-rdt Date: Thu, 19 Dec 2024 14:34:20 +0100 Subject: [PATCH 13/19] udpate scenarios with test runs --- config/scenarios.form.yaml | 239 ++++++++++++++++++++++++++++++++++++- 1 file changed, 238 insertions(+), 1 deletion(-) diff --git a/config/scenarios.form.yaml b/config/scenarios.form.yaml index bb231a7d2..a9c57dc1d 100644 --- a/config/scenarios.form.yaml +++ b/config/scenarios.form.yaml @@ -197,4 +197,241 @@ main-mds-vanilla-with-grids: storage_units: ["li-ion battery", "iron-air battery"] H2_network: true gas_network: true - H2_retrofit: true \ No newline at end of file + H2_retrofit: true + +baseline-mds-chocolate-daclimit-ev30-dh30: + enable: + final_adjustment: true + co2_budget: + 2035: 0.084 # excluding domestic transport emissions and non co2 energy emissions from scope + electricity: + max_hours: + li-ion battery: [1, 2, 4, 8] + H2: [168] + iron-air battery: [100] + sector: + district_heating: + potential: 0.3 + stores: ["H2"] + storage_units: ["li-ion battery", "vanadium", "lair", "pair", "iron-air battery"] + land_transport_electric_share: + 2035: 0.30 # Compromise: FE input & IEA Global EV data explorer EU (STEPS scenario) + land_transport_ice_share: + 2035: 0 + dac: true + dac_limit: 20 # False or limit in MtCO2 + co2_sequestration_potential: + 2035: 40 + residential_heat_dsm: true + residential_heat_restriction_value: 0.27 + residential_heat_restriction_time: [10, 22] # 9am and 9pm + load: + scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) + +baseline-mds-chocolate-daclimit20-ev30-dh30-seq60: + enable: + final_adjustment: true + co2_budget: + 2035: 0.084 # excluding domestic transport emissions and non co2 energy emissions from scope + electricity: + max_hours: + li-ion battery: [1, 2, 4, 8] + H2: [168] + iron-air battery: [100] + sector: + district_heating: + potential: 0.3 + stores: ["H2"] + storage_units: ["li-ion battery", "vanadium", "lair", "pair", "iron-air battery"] + land_transport_electric_share: + 2035: 0.30 # Compromise: FE input & IEA Global EV data explorer EU (STEPS scenario) + land_transport_ice_share: + 2035: 0 + dac: true + dac_limit: 20 # False or limit in MtCO2 + co2_sequestration_potential: + 2035: 60 + residential_heat_dsm: true + residential_heat_restriction_value: 0.27 + residential_heat_restriction_time: [10, 22] # 9am and 9pm + load: + scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) + +baseline-mds-chocolate-daclimit12-ev30-dh30-seq37: + enable: + final_adjustment: true + co2_budget: + 2035: 0.084 # excluding domestic transport emissions and non co2 energy emissions from scope + electricity: + max_hours: + li-ion battery: [1, 2, 4, 8] + H2: [168] + iron-air battery: [100] + sector: + district_heating: + potential: 0.3 + stores: ["H2"] + storage_units: ["li-ion battery", "vanadium", "lair", "pair", "iron-air battery"] + land_transport_electric_share: + 2035: 0.30 # Compromise: FE input & IEA Global EV data explorer EU (STEPS scenario) + land_transport_ice_share: + 2035: 0 + dac: true + dac_limit: 12.4 # False or limit in MtCO2 + co2_sequestration_potential: + 2035: 37.2 + residential_heat_dsm: true + residential_heat_restriction_value: 0.27 + residential_heat_restriction_time: [10, 22] # 9am and 9pm + load: + scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) + +baseline-mds-chocolate-daclimit20-ev30-dh30-seq40-nomethanation: + enable: + final_adjustment: true + co2_budget: + 2035: 0.084 # excluding domestic transport emissions and non co2 energy emissions from scope + electricity: + max_hours: + li-ion battery: [1, 2, 4, 8] + H2: [168] + iron-air battery: [100] + sector: + district_heating: + potential: 0.3 + stores: ["H2"] + storage_units: ["li-ion battery", "vanadium", "lair", "pair", "iron-air battery"] + land_transport_electric_share: + 2035: 0.30 # Compromise: FE input & IEA Global EV data explorer EU (STEPS scenario) + land_transport_ice_share: + 2035: 0 + dac: true + dac_limit: 20 # False or limit in MtCO2 + methanation: false + co2_sequestration_potential: + 2035: 40 + residential_heat_dsm: true + residential_heat_restriction_value: 0.27 + residential_heat_restriction_time: [10, 22] # 9am and 9pm + load: + scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) + +baseline-mds-chocolate-daclimit20-ev30-dh30-seq60-1H: + enable: + final_adjustment: true + co2_budget: + 2035: 0.084 # excluding domestic transport emissions and non co2 energy emissions from scope + electricity: + max_hours: + li-ion battery: [1, 2, 4, 8] + H2: [168] + iron-air battery: [100] + sector: + district_heating: + potential: 0.3 + stores: ["H2"] + storage_units: ["li-ion battery", "vanadium", "lair", "pair", "iron-air battery"] + land_transport_electric_share: + 2035: 0.30 # Compromise: FE input & IEA Global EV data explorer EU (STEPS scenario) + land_transport_ice_share: + 2035: 0 + dac: true + dac_limit: 20 # False or limit in MtCO2 + co2_sequestration_potential: + 2035: 60 + residential_heat_dsm: true + residential_heat_restriction_value: 0.27 + residential_heat_restriction_time: 10, 22] # 9am and 9pm + load: + scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) + clustering: + temporal: + resolution_sector: 1H + +baseline-mds-strawberry-daclimit20-seq60: + enable: + final_adjustment: true + co2_budget: + 2035: 0.084 # excluding domestic transport emissions and non co2 energy emissions from scope + electricity: + max_hours: + li-ion battery: [1, 2, 4, 8] + H2: [168] + iron-air battery: [100] + sector: + district_heating: + potential: 0.3 + stores: ["H2"] + storage_units: ["li-ion battery", "vanadium", "lair", "pair", "iron-air battery"] + land_transport_electric_share: + 2035: 0.30 # Compromise: FE input & IEA Global EV data explorer EU (STEPS scenario) + land_transport_ice_share: + 2035: 0 + dac: true + dac_limit: 20 # False or limit in MtCO2 + co2_sequestration_potential: + 2035: 60 + residential_heat_dsm: true + residential_heat_restriction_value: 0.27 + residential_heat_restriction_time: [10, 22] # 9am and 9pm + load: + scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) + +baseline-mds-strawberry-daclimit12-seq37: + enable: + final_adjustment: true + co2_budget: + 2035: 0.084 # excluding domestic transport emissions and non co2 energy emissions from scope + electricity: + max_hours: + li-ion battery: [1, 2, 4, 8] + H2: [168] + iron-air battery: [100] + sector: + district_heating: + potential: 0.3 + stores: ["H2"] + storage_units: ["li-ion battery", "vanadium", "lair", "pair", "iron-air battery"] + land_transport_electric_share: + 2035: 0.30 # Compromise: FE input & IEA Global EV data explorer EU (STEPS scenario) + land_transport_ice_share: + 2035: 0 + dac: true + dac_limit: 12.4 # False or limit in MtCO2 + co2_sequestration_potential: + 2035: 37.2 + residential_heat_dsm: true + residential_heat_restriction_value: 0.27 + residential_heat_restriction_time: [10, 22] # 9am and 9pm + load: + scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) + +baseline-mds-strawberry-daclimit20-seq40-nomethanation: + enable: + final_adjustment: true + co2_budget: + 2035: 0.084 # excluding domestic transport emissions and non co2 energy emissions from scope + electricity: + max_hours: + li-ion battery: [1, 2, 4, 8] + H2: [168] + iron-air battery: [100] + sector: + district_heating: + potential: 0.3 + stores: ["H2"] + storage_units: ["li-ion battery", "vanadium", "lair", "pair", "iron-air battery"] + land_transport_electric_share: + 2035: 0.30 # Compromise: FE input & IEA Global EV data explorer EU (STEPS scenario) + land_transport_ice_share: + 2035: 0 + dac: true + dac_limit: 20 # False or limit in MtCO2 + methanation: false + co2_sequestration_potential: + 2035: 40 + residential_heat_dsm: true + residential_heat_restriction_value: 0.27 + residential_heat_restriction_time: [10, 22] # 9am and 9pm + load: + scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) \ No newline at end of file From 3f937fc95254d2adfa3043092c338a0da09bacab Mon Sep 17 00:00:00 2001 From: daniel-rdt Date: Thu, 19 Dec 2024 14:57:37 +0100 Subject: [PATCH 14/19] update implementation for pathway dac limit --- config/config.form.yaml | 2 +- config/scenarios.form.yaml | 16 ++++++++++++---- scripts/solve_network.py | 5 +++-- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/config/config.form.yaml b/config/config.form.yaml index 21386aea2..a1e6f33f5 100644 --- a/config/config.form.yaml +++ b/config/config.form.yaml @@ -182,7 +182,7 @@ sector: tes: false dac: true dac_limit: - enable: False + enable: false 2035: 20 # limit in MtCO2 marginal_cost_storage: 0. #1e-4 stores: ["H2"] diff --git a/config/scenarios.form.yaml b/config/scenarios.form.yaml index bb231a7d2..950fe6bb3 100644 --- a/config/scenarios.form.yaml +++ b/config/scenarios.form.yaml @@ -94,7 +94,9 @@ main-mds-vanilla-dac-limit-ev35: stores: ["H2"] storage_units: ["li-ion battery", "iron-air battery"] dac: true - dac_limit: 20 # False or limit in MtCO2 + dac_limit: + enable: true + 2035: 20 # limit in MtCO2 main-mds-vanilla-dac-limit-ev40: electricity: @@ -113,7 +115,9 @@ main-mds-vanilla-dac-limit-ev40: stores: ["H2"] storage_units: ["li-ion battery", "iron-air battery"] dac: true - dac_limit: 20 # False or limit in MtCO2 + dac_limit: + enable: true + 2035: 20 # limit in MtCO2 main-mds-vanilla-dac-limit-ev45: electricity: @@ -132,7 +136,9 @@ main-mds-vanilla-dac-limit-ev45: stores: ["H2"] storage_units: ["li-ion battery", "iron-air battery"] dac: true - dac_limit: 20 # False or limit in MtCO2 + dac_limit: + enable: true + 2035: 20 # limit in MtCO2 main-mds-vanilla-dac-limit-ev45-nuc80: electricity: @@ -151,7 +157,9 @@ main-mds-vanilla-dac-limit-ev45-nuc80: stores: ["H2"] storage_units: ["li-ion battery", "iron-air battery"] dac: true - dac_limit: 20 # False or limit in MtCO2 + dac_limit: + enable: true + 2035: 20 # limit in MtCO2 conventional: nuclear: p_min_pu: 0.8 diff --git a/scripts/solve_network.py b/scripts/solve_network.py index 3a073837c..9d53c35ac 100644 --- a/scripts/solve_network.py +++ b/scripts/solve_network.py @@ -937,7 +937,8 @@ def add_dac_limit(n): """ dac = n.links.query("Link.str.contains('DAC')") lhs = (n.model["Link-p"].loc[:, dac.index] * n.snapshot_weightings.generators * dac.efficiency2 * -1).sum() - rhs = n.config["sector"]["dac_limit"] * 1e6 # DAC limit specified in config in MtCO2 + optimization_year = int(snakemake.wildcards.planning_horizons) + rhs = n.config["sector"]["dac_limit"][optimization_year] * 1e6 # DAC limit specified in config in MtCO2 n.model.add_constraints(lhs <= rhs, name="DAC limit") @@ -976,7 +977,7 @@ def extra_functionality(n, snapshots): add_battery_constraints(n) add_lossy_bidirectional_link_constraints(n) add_pipe_retrofit_constraint(n) - if config["sector"]["dac"] and config["sector"]["dac_limit"]: + if config["sector"]["dac"] and config["sector"]["dac_limit"]["enable"]: add_dac_limit(n) if n._multi_invest: add_carbon_constraint(n, snapshots) From 64c609693c390b7d0e9ff6e73fa9edc579456b96 Mon Sep 17 00:00:00 2001 From: daniel-rdt Date: Thu, 19 Dec 2024 15:27:21 +0100 Subject: [PATCH 15/19] update dac limit for pathway formulation --- config/scenarios.form.yaml | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/config/scenarios.form.yaml b/config/scenarios.form.yaml index 1fba37687..495774861 100644 --- a/config/scenarios.form.yaml +++ b/config/scenarios.form.yaml @@ -227,7 +227,9 @@ baseline-mds-chocolate-daclimit-ev30-dh30: land_transport_ice_share: 2035: 0 dac: true - dac_limit: 20 # False or limit in MtCO2 + dac_limit: + enable: true + 2035: 20 # limit in MtCO2 co2_sequestration_potential: 2035: 40 residential_heat_dsm: true @@ -256,7 +258,9 @@ baseline-mds-chocolate-daclimit20-ev30-dh30-seq60: land_transport_ice_share: 2035: 0 dac: true - dac_limit: 20 # False or limit in MtCO2 + dac_limit: + enable: true + 2035: 20 # limit in MtCO2 co2_sequestration_potential: 2035: 60 residential_heat_dsm: true @@ -285,7 +289,9 @@ baseline-mds-chocolate-daclimit12-ev30-dh30-seq37: land_transport_ice_share: 2035: 0 dac: true - dac_limit: 12.4 # False or limit in MtCO2 + dac_limit: + enable: true + 2035: 12.4 # limit in MtCO2 co2_sequestration_potential: 2035: 37.2 residential_heat_dsm: true @@ -314,7 +320,9 @@ baseline-mds-chocolate-daclimit20-ev30-dh30-seq40-nomethanation: land_transport_ice_share: 2035: 0 dac: true - dac_limit: 20 # False or limit in MtCO2 + dac_limit: + enable: true + 2035: 20 # limit in MtCO2 methanation: false co2_sequestration_potential: 2035: 40 @@ -344,7 +352,9 @@ baseline-mds-chocolate-daclimit20-ev30-dh30-seq60-1H: land_transport_ice_share: 2035: 0 dac: true - dac_limit: 20 # False or limit in MtCO2 + dac_limit: + enable: true + 2035: 20 # limit in MtCO2 co2_sequestration_potential: 2035: 60 residential_heat_dsm: true @@ -376,7 +386,9 @@ baseline-mds-strawberry-daclimit20-seq60: land_transport_ice_share: 2035: 0 dac: true - dac_limit: 20 # False or limit in MtCO2 + dac_limit: + enable: true + 2035: 20 # limit in MtCO2 co2_sequestration_potential: 2035: 60 residential_heat_dsm: true @@ -405,7 +417,9 @@ baseline-mds-strawberry-daclimit12-seq37: land_transport_ice_share: 2035: 0 dac: true - dac_limit: 12.4 # False or limit in MtCO2 + dac_limit: + enable: true + 2035: 12.4 # limit in MtCO2 co2_sequestration_potential: 2035: 37.2 residential_heat_dsm: true @@ -434,7 +448,9 @@ baseline-mds-strawberry-daclimit20-seq40-nomethanation: land_transport_ice_share: 2035: 0 dac: true - dac_limit: 20 # False or limit in MtCO2 + dac_limit: + enable: true + 2035: 20 # limit in MtCO2 methanation: false co2_sequestration_potential: 2035: 40 From cacf42b414c193060a69b8f60c35759381d53d84 Mon Sep 17 00:00:00 2001 From: daniel-rdt Date: Thu, 19 Dec 2024 20:58:43 +0100 Subject: [PATCH 16/19] strawberry scenario seq37 without methanation --- config/scenarios.form.yaml | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/config/scenarios.form.yaml b/config/scenarios.form.yaml index 495774861..74d284b62 100644 --- a/config/scenarios.form.yaml +++ b/config/scenarios.form.yaml @@ -458,4 +458,36 @@ baseline-mds-strawberry-daclimit20-seq40-nomethanation: residential_heat_restriction_value: 0.27 residential_heat_restriction_time: [10, 22] # 9am and 9pm load: - scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) \ No newline at end of file + scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) + +baseline-mds-strawberry-daclimit12-seq37-nometh: + enable: + final_adjustment: true + co2_budget: + 2035: 0.084 # excluding domestic transport emissions and non co2 energy emissions from scope + electricity: + max_hours: + li-ion battery: [1, 2, 4, 8] + H2: [168] + iron-air battery: [100] + sector: + district_heating: + potential: 0.3 + stores: ["H2"] + storage_units: ["li-ion battery", "vanadium", "lair", "pair", "iron-air battery"] + land_transport_electric_share: + 2035: 0.30 # Compromise: FE input & IEA Global EV data explorer EU (STEPS scenario) + land_transport_ice_share: + 2035: 0 + dac: true + dac_limit: + enable: true + 2035: 12.4 # limit in MtCO2 + methanation: false + co2_sequestration_potential: + 2035: 37.2 + residential_heat_dsm: true + residential_heat_restriction_value: 0.27 + residential_heat_restriction_time: [10, 22] # 9am and 9pm + load: + scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) From 9ef63fce4a01f7190745e60fc63d5a4c909d73c0 Mon Sep 17 00:00:00 2001 From: daniel-rdt Date: Fri, 20 Dec 2024 13:36:38 +0100 Subject: [PATCH 17/19] add 1H scenario run --- config/scenarios.form.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/config/scenarios.form.yaml b/config/scenarios.form.yaml index 74d284b62..798437fac 100644 --- a/config/scenarios.form.yaml +++ b/config/scenarios.form.yaml @@ -491,3 +491,38 @@ baseline-mds-strawberry-daclimit12-seq37-nometh: residential_heat_restriction_time: [10, 22] # 9am and 9pm load: scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) + +baseline-mds-strawberry-daclimit12-seq37-nometh-1H: + enable: + final_adjustment: true + co2_budget: + 2035: 0.084 # excluding domestic transport emissions and non co2 energy emissions from scope + electricity: + max_hours: + li-ion battery: [1, 2, 4, 8] + H2: [168] + iron-air battery: [100] + sector: + district_heating: + potential: 0.3 + stores: ["H2"] + storage_units: ["li-ion battery", "vanadium", "lair", "pair", "iron-air battery"] + land_transport_electric_share: + 2035: 0.30 # Compromise: FE input & IEA Global EV data explorer EU (STEPS scenario) + land_transport_ice_share: + 2035: 0 + dac: true + dac_limit: + enable: true + 2035: 12.4 # limit in MtCO2 + methanation: false + co2_sequestration_potential: + 2035: 37.2 + residential_heat_dsm: true + residential_heat_restriction_value: 0.27 + residential_heat_restriction_time: [10, 22] # 9am and 9pm + load: + scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) + clustering: + temporal: + resolution_sector: 1H \ No newline at end of file From 98bc8db6271f94f41da823f91e89c677b113cef9 Mon Sep 17 00:00:00 2001 From: daniel-rdt Date: Mon, 23 Dec 2024 11:59:23 +0100 Subject: [PATCH 18/19] updated baseline scenario tests --- config/config.form.yaml | 2 +- config/scenarios.form.yaml | 229 +++++++++++++++++++++++++++++++++++++ 2 files changed, 230 insertions(+), 1 deletion(-) diff --git a/config/config.form.yaml b/config/config.form.yaml index 469ce55ec..98ddb9d73 100644 --- a/config/config.form.yaml +++ b/config/config.form.yaml @@ -13,7 +13,7 @@ logging: # docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#run run: prefix: "updated_initial_main_scenarios" - name: "main-mds-vanilla-dac-limit-ev40" + name: "baseline-mds-strawberry-daclimit12-seq22" scenarios: enable: true file: config/scenarios.form.yaml diff --git a/config/scenarios.form.yaml b/config/scenarios.form.yaml index 798437fac..4914ce0da 100644 --- a/config/scenarios.form.yaml +++ b/config/scenarios.form.yaml @@ -523,6 +523,235 @@ baseline-mds-strawberry-daclimit12-seq37-nometh-1H: residential_heat_restriction_time: [10, 22] # 9am and 9pm load: scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) + clustering: + temporal: + resolution_sector: 1H + +baseline-mds-strawberry-daclimit12-seq22-nometh: + enable: + final_adjustment: true + co2_budget: + 2035: 0.084 # excluding domestic transport emissions and non co2 energy emissions from scope + electricity: + max_hours: + li-ion battery: [1, 2, 4, 8] + H2: [168] + iron-air battery: [100] + sector: + district_heating: + potential: 0.3 + stores: ["H2"] + storage_units: ["li-ion battery", "vanadium", "lair", "pair", "iron-air battery"] + land_transport_electric_share: + 2035: 0.30 # Compromise: FE input & IEA Global EV data explorer EU (STEPS scenario) + land_transport_ice_share: + 2035: 0 + dac: true + dac_limit: + enable: true + 2035: 12.4 # limit in MtCO2 + methanation: false + co2_sequestration_potential: + 2035: 22.3 + residential_heat_dsm: true + residential_heat_restriction_value: 0.27 + residential_heat_restriction_time: [10, 22] # 9am and 9pm + load: + scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) + +baseline-mds-strawberry-daclimit12-seq22-nometh-co210: + enable: + final_adjustment: true + co2_budget: + 2035: 0.107 # excluding domestic transport emissions and non co2 energy emissions from scope + electricity: + max_hours: + li-ion battery: [1, 2, 4, 8] + H2: [168] + iron-air battery: [100] + sector: + district_heating: + potential: 0.3 + stores: ["H2"] + storage_units: ["li-ion battery", "vanadium", "lair", "pair", "iron-air battery"] + land_transport_electric_share: + 2035: 0.30 # Compromise: FE input & IEA Global EV data explorer EU (STEPS scenario) + land_transport_ice_share: + 2035: 0 + dac: true + dac_limit: + enable: true + 2035: 12.4 # limit in MtCO2 + methanation: false + co2_sequestration_potential: + 2035: 22.3 + residential_heat_dsm: true + residential_heat_restriction_value: 0.27 + residential_heat_restriction_time: [10, 22] # 9am and 9pm + load: + scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) + +baseline-mds-strawberry-daclimit12-seq22-co210: + enable: + final_adjustment: true + co2_budget: + 2035: 0.107 # excluding domestic transport emissions and non co2 energy emissions from scope + electricity: + max_hours: + li-ion battery: [1, 2, 4, 8] + H2: [168] + iron-air battery: [100] + sector: + district_heating: + potential: 0.3 + stores: ["H2"] + storage_units: ["li-ion battery", "vanadium", "lair", "pair", "iron-air battery"] + land_transport_electric_share: + 2035: 0.30 # Compromise: FE input & IEA Global EV data explorer EU (STEPS scenario) + land_transport_ice_share: + 2035: 0 + dac: true + dac_limit: + enable: true + 2035: 12.4 # limit in MtCO2 + co2_sequestration_potential: + 2035: 22.3 + residential_heat_dsm: true + residential_heat_restriction_value: 0.27 + residential_heat_restriction_time: [10, 22] # 9am and 9pm + load: + scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) + +baseline-mds-strawberry-daclimit12-seq22: + enable: + final_adjustment: true + co2_budget: + 2035: 0.084 # excluding domestic transport emissions and non co2 energy emissions from scope + electricity: + max_hours: + li-ion battery: [1, 2, 4, 8] + H2: [168] + iron-air battery: [100] + sector: + district_heating: + potential: 0.3 + stores: ["H2"] + storage_units: ["li-ion battery", "vanadium", "lair", "pair", "iron-air battery"] + land_transport_electric_share: + 2035: 0.30 # Compromise: FE input & IEA Global EV data explorer EU (STEPS scenario) + land_transport_ice_share: + 2035: 0 + dac: true + dac_limit: + enable: true + 2035: 12.4 # limit in MtCO2 + co2_sequestration_potential: + 2035: 22.3 + residential_heat_dsm: true + residential_heat_restriction_value: 0.27 + residential_heat_restriction_time: [10, 22] # 9am and 9pm + load: + scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) + +baseline-mds-strawberry-daclimit12-seq22-nometh-biomass: + enable: + final_adjustment: true + co2_budget: + 2035: 0.084 # excluding domestic transport emissions and non co2 energy emissions from scope + electricity: + max_hours: + li-ion battery: [1, 2, 4, 8] + H2: [168] + iron-air battery: [100] + sector: + biomass: true + district_heating: + potential: 0.3 + stores: ["H2"] + storage_units: ["li-ion battery", "vanadium", "lair", "pair", "iron-air battery"] + land_transport_electric_share: + 2035: 0.30 # Compromise: FE input & IEA Global EV data explorer EU (STEPS scenario) + land_transport_ice_share: + 2035: 0 + dac: true + dac_limit: + enable: true + 2035: 12.4 # limit in MtCO2 + methanation: false + co2_sequestration_potential: + 2035: 22.3 + residential_heat_dsm: true + residential_heat_restriction_value: 0.27 + residential_heat_restriction_time: [10, 22] # 9am and 9pm + load: + scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) + +baseline-mds-strawberry-daclimit12-seq22-nometh-biomass-nogasppde: + enable: + final_adjustment: true + co2_budget: + 2035: 0.084 # excluding domestic transport emissions and non co2 energy emissions from scope + electricity: + max_hours: + li-ion battery: [1, 2, 4, 8] + H2: [168] + iron-air battery: [100] + powerplants_filter: DateOut >= 2024 and not Fueltype.isin(['Nuclear', 'Hard Coal', 'Lignite']) and not (Country == 'DE' and Fueltype == 'Natural Gas') + custom_powerplants: DateIn <= 2024 and DateOut >= 2024 + sector: + biomass: true + district_heating: + potential: 0.3 + stores: ["H2"] + storage_units: ["li-ion battery", "vanadium", "lair", "pair", "iron-air battery"] + land_transport_electric_share: + 2035: 0.30 # Compromise: FE input & IEA Global EV data explorer EU (STEPS scenario) + land_transport_ice_share: + 2035: 0 + dac: true + dac_limit: + enable: true + 2035: 12.4 # limit in MtCO2 + methanation: false + co2_sequestration_potential: + 2035: 22.3 + residential_heat_dsm: true + residential_heat_restriction_value: 0.27 + residential_heat_restriction_time: [10, 22] # 9am and 9pm + load: + scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) + +baseline-mds-strawberry-daclimit12-seq22-nometh-1H: + enable: + final_adjustment: true + co2_budget: + 2035: 0.084 # excluding domestic transport emissions and non co2 energy emissions from scope + electricity: + max_hours: + li-ion battery: [1, 2, 4, 8] + H2: [168] + iron-air battery: [100] + sector: + district_heating: + potential: 0.3 + stores: ["H2"] + storage_units: ["li-ion battery", "vanadium", "lair", "pair", "iron-air battery"] + land_transport_electric_share: + 2035: 0.30 # Compromise: FE input & IEA Global EV data explorer EU (STEPS scenario) + land_transport_ice_share: + 2035: 0 + dac: true + dac_limit: + enable: true + 2035: 12.4 # limit in MtCO2 + methanation: false + co2_sequestration_potential: + 2035: 22.3 + residential_heat_dsm: true + residential_heat_restriction_value: 0.27 + residential_heat_restriction_time: [10, 22] # 9am and 9pm + load: + scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) clustering: temporal: resolution_sector: 1H \ No newline at end of file From 808416e24545a5a9b2015484ff1ae95f389a50aa Mon Sep 17 00:00:00 2001 From: daniel-rdt Date: Sun, 5 Jan 2025 13:08:10 +0100 Subject: [PATCH 19/19] add hourly baseline scenario runs --- config/config.form.yaml | 4 +- config/scenarios.form.yaml | 109 ++++++++++++++++++++++++++++++++++++- 2 files changed, 108 insertions(+), 5 deletions(-) diff --git a/config/config.form.yaml b/config/config.form.yaml index 98ddb9d73..f7dafc1aa 100644 --- a/config/config.form.yaml +++ b/config/config.form.yaml @@ -12,8 +12,8 @@ logging: # docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#run run: - prefix: "updated_initial_main_scenarios" - name: "baseline-mds-strawberry-daclimit12-seq22" + prefix: "baseline_scenarios" + name: "baseline-mds-nometh-1H" scenarios: enable: true file: config/scenarios.form.yaml diff --git a/config/scenarios.form.yaml b/config/scenarios.form.yaml index 4914ce0da..bc46121ef 100644 --- a/config/scenarios.form.yaml +++ b/config/scenarios.form.yaml @@ -721,11 +721,11 @@ baseline-mds-strawberry-daclimit12-seq22-nometh-biomass-nogasppde: load: scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) -baseline-mds-strawberry-daclimit12-seq22-nometh-1H: +baseline-mds-nometh-1H: enable: final_adjustment: true co2_budget: - 2035: 0.084 # excluding domestic transport emissions and non co2 energy emissions from scope + 2035: 0.107 # excluding domestic transport emissions and non co2 energy emissions from scope electricity: max_hours: li-ion battery: [1, 2, 4, 8] @@ -737,7 +737,42 @@ baseline-mds-strawberry-daclimit12-seq22-nometh-1H: stores: ["H2"] storage_units: ["li-ion battery", "vanadium", "lair", "pair", "iron-air battery"] land_transport_electric_share: - 2035: 0.30 # Compromise: FE input & IEA Global EV data explorer EU (STEPS scenario) + 2035: 0.30 # FE input + land_transport_ice_share: + 2035: 0 + dac: true + dac_limit: + enable: true + 2035: 12.4 # limit in MtCO2 + methanation: false + co2_sequestration_potential: + 2035: 22.3 + residential_heat_dsm: true + residential_heat_restriction_value: 0.27 + residential_heat_restriction_time: [10, 22] # 9am and 9pm + load: + scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) + clustering: + temporal: + resolution_sector: 1H + +baseline-nomds-nometh-1H: + enable: + final_adjustment: true + co2_budget: + 2035: 0.107 # excluding domestic transport emissions and non co2 energy emissions from scope + electricity: + max_hours: + li-ion battery: [1, 2, 4, 8] + H2: [168] + iron-air battery: [100] + sector: + district_heating: + potential: 0.3 + stores: [] + storage_units: ["li-ion battery", "vanadium", "lair", "pair"] + land_transport_electric_share: + 2035: 0.30 # FE input land_transport_ice_share: 2035: 0 dac: true @@ -752,6 +787,74 @@ baseline-mds-strawberry-daclimit12-seq22-nometh-1H: residential_heat_restriction_time: [10, 22] # 9am and 9pm load: scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) + clustering: + temporal: + resolution_sector: 1H + +baseline-mds-1H: + enable: + final_adjustment: true + co2_budget: + 2035: 0.107 # excluding domestic transport emissions and non co2 energy emissions from scope + electricity: + max_hours: + li-ion battery: [1, 2, 4, 8] + H2: [168] + iron-air battery: [100] + sector: + district_heating: + potential: 0.3 + stores: ["H2"] + storage_units: ["li-ion battery", "vanadium", "lair", "pair", "iron-air battery"] + land_transport_electric_share: + 2035: 0.30 # FE input + land_transport_ice_share: + 2035: 0 + dac: true + dac_limit: + enable: true + 2035: 12.4 # limit in MtCO2 + co2_sequestration_potential: + 2035: 22.3 + residential_heat_dsm: true + residential_heat_restriction_value: 0.27 + residential_heat_restriction_time: [10, 22] # 9am and 9pm + load: + scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) + clustering: + temporal: + resolution_sector: 1H + +baseline-nomds-1H: + enable: + final_adjustment: true + co2_budget: + 2035: 0.107 # excluding domestic transport emissions and non co2 energy emissions from scope + electricity: + max_hours: + li-ion battery: [1, 2, 4, 8] + H2: [168] + iron-air battery: [100] + sector: + district_heating: + potential: 0.3 + stores: [] + storage_units: ["li-ion battery", "vanadium", "lair", "pair"] + land_transport_electric_share: + 2035: 0.30 # FE input + land_transport_ice_share: + 2035: 0 + dac: true + dac_limit: + enable: true + 2035: 12.4 # limit in MtCO2 + co2_sequestration_potential: + 2035: 22.3 + residential_heat_dsm: true + residential_heat_restriction_value: 0.27 + residential_heat_restriction_time: [10, 22] # 9am and 9pm + load: + scaling_factor: 1.26 # electricity load increase PyPSA 2013 to 2035 (https://www.agora-energiewende.de/fileadmin/Projekte/2021/2021_11_DE_KNStrom2035/2022-06-23_Praesentation_Klimaneutrales_Stromsystem_2035.pdf) clustering: temporal: resolution_sector: 1H \ No newline at end of file