From 2d12f7ddd0c080dd41410b4006f72bf31665ab53 Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Tue, 23 Jan 2024 18:41:52 +0100 Subject: [PATCH 1/2] add air-sourced heat pumps to rural areas --- doc/release_notes.rst | 2 ++ scripts/prepare_sector_network.py | 42 ++++++++++++++++--------------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/doc/release_notes.rst b/doc/release_notes.rst index dc1a9dd1..38b47a31 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -28,6 +28,8 @@ Upcoming Release * Cluster residential and services heat buses by default. Can be disabled with ``cluster_heat_buses: false``. +* Air-sourced heat pumps can now also be built in rural areas. Previously, only + ground-sourced heat pumps were considered for this category. PyPSA-Eur 0.9.0 (5th January 2024) ================================== diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 41ff3ac9..169e2614 100755 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -1803,28 +1803,30 @@ def add_heat(n, costs): ## Add heat pumps - heat_pump_type = "air" if "urban" in name else "ground" + heat_pump_types = ["air"] if "urban" in name else ["ground", "air"] - costs_name = f"{name_type} {heat_pump_type}-sourced heat pump" - efficiency = ( - cop[heat_pump_type][nodes[name]] - if options["time_dep_hp_cop"] - else costs.at[costs_name, "efficiency"] - ) + for heat_pump_type in heat_pump_types: - n.madd( - "Link", - nodes[name], - suffix=f" {name} {heat_pump_type} heat pump", - bus0=nodes[name], - bus1=nodes[name] + f" {name} heat", - carrier=f"{name} {heat_pump_type} heat pump", - efficiency=efficiency, - capital_cost=costs.at[costs_name, "efficiency"] - * costs.at[costs_name, "fixed"], - p_nom_extendable=True, - lifetime=costs.at[costs_name, "lifetime"], - ) + costs_name = f"{name_type} {heat_pump_type}-sourced heat pump" + efficiency = ( + cop[heat_pump_type][nodes[name]] + if options["time_dep_hp_cop"] + else costs.at[costs_name, "efficiency"] + ) + + n.madd( + "Link", + nodes[name], + suffix=f" {name} {heat_pump_type} heat pump", + bus0=nodes[name], + bus1=nodes[name] + f" {name} heat", + carrier=f"{name} {heat_pump_type} heat pump", + efficiency=efficiency, + capital_cost=costs.at[costs_name, "efficiency"] + * costs.at[costs_name, "fixed"], + p_nom_extendable=True, + lifetime=costs.at[costs_name, "lifetime"], + ) if options["tes"]: n.add("Carrier", name + " water tanks") From bdc36dc5da5834275450119ea823916adb247b91 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 23 Jan 2024 17:43:02 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/prepare_sector_network.py | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 169e2614..00b9d39b 100755 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -1806,7 +1806,6 @@ def add_heat(n, costs): heat_pump_types = ["air"] if "urban" in name else ["ground", "air"] for heat_pump_type in heat_pump_types: - costs_name = f"{name_type} {heat_pump_type}-sourced heat pump" efficiency = ( cop[heat_pump_type][nodes[name]]