From ae825d82dcebae7ab67f591329fe8e6140a96d72 Mon Sep 17 00:00:00 2001 From: Fabian Date: Fri, 26 Jan 2024 12:10:39 +0100 Subject: [PATCH 1/3] prepare_sector_network: reorder buses for dac components --- doc/release_notes.rst | 2 ++ scripts/add_electricity.py | 2 +- scripts/prepare_sector_network.py | 22 +++++++++++----------- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/doc/release_notes.rst b/doc/release_notes.rst index 93d1a268f..94d5c55f0 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -37,6 +37,8 @@ Upcoming Release * Add the option to customise map projection in plotting config. +* The order of buses (bus0, bus1, ...) for DAC components has changed to meet the convention of the other components. Therefore, `bus0` refers to the electricity bus (input), `bus1` to the heat bus (input), 'bus2' to the CO2 atmosphere bus (input), and `bus3` to the CO2 storage bus (output). + PyPSA-Eur 0.9.0 (5th January 2024) ================================== diff --git a/scripts/add_electricity.py b/scripts/add_electricity.py index c9e5abca7..8a1086bd8 100755 --- a/scripts/add_electricity.py +++ b/scripts/add_electricity.py @@ -288,7 +288,7 @@ def attach_load(n, regions, load, nuts3_shapes, ua_md_gdp, countries, scaling=1. ua_md_gdp = pd.read_csv(ua_md_gdp, dtype={"name": "str"}).set_index("name") - logger.info(f"Load data scaled with scalling factor {scaling}.") + logger.info(f"Load data scaled by factor {scaling}.") opsd_load *= scaling nuts3 = gpd.read_file(nuts3_shapes).set_index("index") diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index d24feb794..3ea8c8dd6 100755 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -710,27 +710,27 @@ def add_dac(n, costs): heat_buses = n.buses.index[n.buses.carrier.isin(heat_carriers)] locations = n.buses.location[heat_buses] - efficiency2 = -( + electricity_input = ( costs.at["direct air capture", "electricity-input"] + costs.at["direct air capture", "compression-electricity-input"] - ) - efficiency3 = -( + ) # MWh_el / tCO2 + heat_input = ( costs.at["direct air capture", "heat-input"] - costs.at["direct air capture", "compression-heat-output"] - ) + ) # MWh_th / tCO2 n.madd( "Link", heat_buses.str.replace(" heat", " DAC"), - bus0="co2 atmosphere", - bus1=spatial.co2.df.loc[locations, "nodes"].values, - bus2=locations.values, - bus3=heat_buses, + bus0=locations.values, + bus1=heat_buses, + bus2="co2 atmosphere", + bus3=spatial.co2.df.loc[locations, "nodes"].values, carrier="DAC", capital_cost=costs.at["direct air capture", "fixed"], - efficiency=1.0, - efficiency2=efficiency2, - efficiency3=efficiency3, + efficiency=-heat_input / electricity_input, + efficiency2=-electricity_input, + efficiency3=electricity_input, p_nom_extendable=True, lifetime=costs.at["direct air capture", "lifetime"], ) From ae1b83121d0dfc4afcd0206f1ae1b0a2cf5808be Mon Sep 17 00:00:00 2001 From: Fabian Date: Fri, 26 Jan 2024 23:20:03 +0100 Subject: [PATCH 2/3] prepare_sector: fix dac co2 input/output efficiencies --- scripts/prepare_sector_network.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 3ea8c8dd6..52b805d45 100755 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -729,8 +729,8 @@ def add_dac(n, costs): carrier="DAC", capital_cost=costs.at["direct air capture", "fixed"], efficiency=-heat_input / electricity_input, - efficiency2=-electricity_input, - efficiency3=electricity_input, + efficiency2=-1 / electricity_input, + efficiency3=1 / electricity_input, p_nom_extendable=True, lifetime=costs.at["direct air capture", "lifetime"], ) From 7b0356803f07267be1d4bee8b2a1c1e5f16f052b Mon Sep 17 00:00:00 2001 From: Fabian Date: Mon, 29 Jan 2024 09:01:08 +0100 Subject: [PATCH 3/3] prepare_sector: adjust DAC costs --- 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 3fa46605a..9fba84eab 100755 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -727,7 +727,7 @@ def add_dac(n, costs): bus2="co2 atmosphere", bus3=spatial.co2.df.loc[locations, "nodes"].values, carrier="DAC", - capital_cost=costs.at["direct air capture", "fixed"], + capital_cost=costs.at["direct air capture", "fixed"] / electricity_input, efficiency=-heat_input / electricity_input, efficiency2=-1 / electricity_input, efficiency3=1 / electricity_input,