From 0edf566e3fd0bc9f1dbb0cc6db29a94362efa3e3 Mon Sep 17 00:00:00 2001 From: AmosSchledorn Date: Mon, 29 Jul 2024 14:36:30 +0200 Subject: [PATCH] attempt to handle heat_pump_sources dynamically --- config/config.default.yaml | 6 ++++++ rules/build_sector.smk | 28 ++++++++++++++++------------ 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/config/config.default.yaml b/config/config.default.yaml index 5827bffb..f68ff960 100644 --- a/config/config.default.yaml +++ b/config/config.default.yaml @@ -416,6 +416,12 @@ sector: heat_exchanger_pinch_point_temperature_difference: 5 #K isentropic_compressor_efficiency: 0.8 heat_loss: 0.0 + heat_pump_sources: + central_heating: + - air + decentral_heating: + - air + - ground 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 5f8d5817..d6f959f3 100644 --- a/rules/build_sector.smk +++ b/rules/build_sector.smk @@ -232,22 +232,26 @@ rule build_cop_profiles: heat_pump_cop_approximation_central_heating=config_provider( "sector", "district_heating", "heat_pump_cop_approximation" ), + heat_pump_sources=config_provider("sector", "heat_pump_sources"), input: temp_soil_total=resources("temp_soil_total_elec_s{simpl}_{clusters}.nc"), temp_air_total=resources("temp_air_total_elec_s{simpl}_{clusters}.nc"), output: - cop_air_decentral_heating=resources( - "cop_air_decentral_heating_elec_s{simpl}_{clusters}.nc" - ), - cop_soil_decentral_heating=resources( - "cop_soil_decentral_heating_elec_s{simpl}_{clusters}.nc" - ), - cop_air_central_heating=resources( - "cop_air_central_heating_elec_s{simpl}_{clusters}.nc" - ), - cop_soil_central_heating=resources( - "cop_soil_central_heating_elec_s{simpl}_{clusters}.nc" - ), + **{f"cop_{source}_{sink}": resources( + "cop_" + source + "_" + {sink} + "_" + "elec_s{simpl}_{clusters}.nc" + ) for sink, source in config_provider("sector", "heat_pump_sources").items()}, + # cop_air_decentral_heating=resources( + # "cop_air_decentral_heating_elec_s{simpl}_{clusters}.nc" + # ), + # cop_soil_decentral_heating=resources( + # "cop_soil_decentral_heating_elec_s{simpl}_{clusters}.nc" + # ), + # cop_air_central_heating=resources( + # "cop_air_central_heating_elec_s{simpl}_{clusters}.nc" + # ), + # cop_soil_central_heating=resources( + # "cop_soil_central_heating_elec_s{simpl}_{clusters}.nc" + # ), resources: mem_mb=20000, log: