From 23ea16dc1401f8ac006bf658e6c5ddaec14cea9c Mon Sep 17 00:00:00 2001 From: Toni Seibold <153275395+toniseibold@users.noreply.github.com> Date: Mon, 29 Jul 2024 09:47:08 +0200 Subject: [PATCH 1/4] Lifetime of Gas Pipelines (#1162) * inf lifetime of gas pipelines avoids adding new links each planning horizon * p_nom_extendable for existing gas pipelines is set false if retrofitting to H2 is not allowed * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- scripts/add_brownfield.py | 8 -------- scripts/prepare_sector_network.py | 6 ++++-- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/scripts/add_brownfield.py b/scripts/add_brownfield.py index 672f9e62..72dd1c88 100644 --- a/scripts/add_brownfield.py +++ b/scripts/add_brownfield.py @@ -89,10 +89,6 @@ def add_brownfield(n, n_p, year): # deal with gas network pipe_carrier = ["gas pipeline"] if snakemake.params.H2_retrofit: - # drop capacities of previous year to avoid duplicating - to_drop = n.links.carrier.isin(pipe_carrier) & (n.links.build_year != year) - n.mremove("Link", n.links.loc[to_drop].index) - # subtract the already retrofitted from today's gas grid capacity h2_retrofitted_fixed_i = n.links[ (n.links.carrier == "H2 pipeline retrofitted") @@ -115,10 +111,6 @@ def add_brownfield(n, n_p, year): index=pipe_capacity.index ).fillna(0) n.links.loc[gas_pipes_i, "p_nom"] = remaining_capacity - else: - new_pipes = n.links.carrier.isin(pipe_carrier) & (n.links.build_year == year) - n.links.loc[new_pipes, "p_nom"] = 0.0 - n.links.loc[new_pipes, "p_nom_min"] = 0.0 def disable_grid_expansion_if_limit_hit(n): diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index b86f9557..970a1a0a 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -1238,12 +1238,14 @@ def add_storage_and_grids(n, costs): gas_pipes["p_nom_min"] = 0.0 # 0.1 EUR/MWkm/a to prefer decommissioning to address degeneracy gas_pipes["capital_cost"] = 0.1 * gas_pipes.length + gas_pipes["p_nom_extendable"] = True else: gas_pipes["p_nom_max"] = np.inf gas_pipes["p_nom_min"] = gas_pipes.p_nom gas_pipes["capital_cost"] = ( gas_pipes.length * costs.at["CH4 (g) pipeline", "fixed"] ) + gas_pipes["p_nom_extendable"] = False n.madd( "Link", @@ -1252,14 +1254,14 @@ def add_storage_and_grids(n, costs): bus1=gas_pipes.bus1 + " gas", p_min_pu=gas_pipes.p_min_pu, p_nom=gas_pipes.p_nom, - p_nom_extendable=True, + p_nom_extendable=gas_pipes.p_nom_extendable, p_nom_max=gas_pipes.p_nom_max, p_nom_min=gas_pipes.p_nom_min, length=gas_pipes.length, capital_cost=gas_pipes.capital_cost, tags=gas_pipes.name, carrier="gas pipeline", - lifetime=costs.at["CH4 (g) pipeline", "lifetime"], + lifetime=np.inf, ) # remove fossil generators where there is neither From f5fe0d062c136c86c92717f9fc311c76786972de Mon Sep 17 00:00:00 2001 From: Micha Date: Mon, 29 Jul 2024 09:50:02 +0200 Subject: [PATCH 2/4] Rename ev battery master (#1116) * rename EV battery * add release note * adjust tech colors * fix for battery renaming in plot_summary --------- Co-authored-by: Fabian Neumann --- config/config.default.yaml | 2 +- doc/release_notes.rst | 2 ++ scripts/prepare_perfect_foresight.py | 2 +- scripts/prepare_sector_network.py | 8 ++++---- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/config/config.default.yaml b/config/config.default.yaml index 4641837e..f1ab5f31 100644 --- a/config/config.default.yaml +++ b/config/config.default.yaml @@ -1054,7 +1054,7 @@ plotting: V2G: '#e5ffa8' land transport EV: '#baf238' land transport demand: '#38baf2' - Li ion: '#baf238' + EV battery: '#baf238' # hot water storage water tanks: '#e69487' residential rural water tanks: '#f7b7a3' diff --git a/doc/release_notes.rst b/doc/release_notes.rst index fa0473fc..383287a6 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -10,6 +10,8 @@ Release Notes Upcoming Release ================ +* Renamed the carrier of batteries in BEVs from `battery storage` to `EV battery` and the corresponding bus carrier from `Li ion` to `EV battery`. This is to avoid confusion with stationary battery storage. + * Changed default assumptions about waste heat usage from PtX and fuel cells in district heating. The default value for the link efficiency scaling factor was changed from 100% to 25%. It can be set to other values in the configuration ``sector: use_TECHNOLOGY_waste_heat``. diff --git a/scripts/prepare_perfect_foresight.py b/scripts/prepare_perfect_foresight.py index c5e4caf9..efc95700 100644 --- a/scripts/prepare_perfect_foresight.py +++ b/scripts/prepare_perfect_foresight.py @@ -250,7 +250,7 @@ def adjust_stores(n): n.stores.loc[cyclic_i, "e_cyclic_per_period"] = True n.stores.loc[cyclic_i, "e_cyclic"] = False # non cyclic store assumptions - non_cyclic_store = ["co2", "co2 stored", "solid biomass", "biogas", "Li ion"] + non_cyclic_store = ["co2", "co2 stored", "solid biomass", "biogas", "EV battery"] co2_i = n.stores[n.stores.carrier.isin(non_cyclic_store)].index n.stores.loc[co2_i, "e_cyclic_per_period"] = False n.stores.loc[co2_i, "e_cyclic"] = False diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 970a1a0a..eaaf207d 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -1543,14 +1543,14 @@ def add_EVs( temperature, ): - n.add("Carrier", "Li ion") + n.add("Carrier", "EV battery") n.madd( "Bus", spatial.nodes, suffix=" EV battery", location=spatial.nodes, - carrier="Li ion", + carrier="EV battery", unit="MWh_el", ) @@ -1623,9 +1623,9 @@ def add_EVs( n.madd( "Store", spatial.nodes, - suffix=" battery storage", + suffix=" EV battery", bus=spatial.nodes + " EV battery", - carrier="battery storage", + carrier="EV battery", e_cyclic=True, e_nom=e_nom, e_max_pu=1, From 160cb011ccd4a63762d4798585803fd1d440ea5f Mon Sep 17 00:00:00 2001 From: Amos Schledorn <60692940+amosschle@users.noreply.github.com> Date: Mon, 29 Jul 2024 11:30:44 +0200 Subject: [PATCH 3/4] Update doc/configtables/sector.csv Co-authored-by: Fabian Neumann --- doc/configtables/sector.csv | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/configtables/sector.csv b/doc/configtables/sector.csv index 17dae5e0..e14da557 100644 --- a/doc/configtables/sector.csv +++ b/doc/configtables/sector.csv @@ -10,10 +10,10 @@ district_heating,--,,`prepare_sector_network.py `_ to one to save memory. From 69b01e670fce9b43e2b2b7dd99a3b0bd2d965d2e Mon Sep 17 00:00:00 2001 From: Amos Schledorn <60692940+amosschle@users.noreply.github.com> Date: Mon, 29 Jul 2024 11:33:28 +0200 Subject: [PATCH 4/4] Update config/config.default.yaml Co-authored-by: Fabian Neumann --- config/config.default.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/config/config.default.yaml b/config/config.default.yaml index fbaa965b..5827bffb 100644 --- a/config/config.default.yaml +++ b/config/config.default.yaml @@ -408,7 +408,6 @@ sector: 2045: 0.8 2050: 1.0 district_heating_loss: 0.15 - # check these numbers! forward_temperature: 90 #C return_temperature: 50 #C heat_source_cooling: 6 #K