From e932466b05668a8ee41c472512c465bc95e0f285 Mon Sep 17 00:00:00 2001 From: cpschau Date: Tue, 9 Jul 2024 12:05:50 +0200 Subject: [PATCH 1/5] FT and electrolyis waste heat for DH as float --- config/config.default.yaml | 4 ++-- scripts/prepare_sector_network.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/config.default.yaml b/config/config.default.yaml index ee61d366a..b97bd3095 100644 --- a/config/config.default.yaml +++ b/config/config.default.yaml @@ -571,12 +571,12 @@ sector: min_part_load_fischer_tropsch: 0.5 min_part_load_methanolisation: 0.3 min_part_load_methanation: 0.3 - use_fischer_tropsch_waste_heat: true + use_fischer_tropsch_waste_heat: 0.2 use_haber_bosch_waste_heat: true use_methanolisation_waste_heat: true use_methanation_waste_heat: true use_fuel_cell_waste_heat: true - use_electrolysis_waste_heat: true + use_electrolysis_waste_heat: 0.2 electricity_transmission_grid: true electricity_distribution_grid: true electricity_distribution_grid_cost_factor: 1.0 diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 9292e3488..c9dd0a6f3 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -3350,7 +3350,7 @@ def add_waste_heat(n): ) n.links.loc[urban_central + " Fischer-Tropsch", "efficiency3"] = ( 0.95 - n.links.loc[urban_central + " Fischer-Tropsch", "efficiency"] - ) + ) * options["use_fischer_tropsch_waste_heat"] if options["use_methanation_waste_heat"] and "Sabatier" in link_carriers: n.links.loc[urban_central + " Sabatier", "bus3"] = ( @@ -3399,7 +3399,7 @@ def add_waste_heat(n): ) n.links.loc[urban_central + " H2 Electrolysis", "efficiency2"] = ( 0.84 - n.links.loc[urban_central + " H2 Electrolysis", "efficiency"] - ) + ) * options["use_electrolysis_waste_heat"] if options["use_fuel_cell_waste_heat"] and "H2 Fuel Cell" in link_carriers: n.links.loc[urban_central + " H2 Fuel Cell", "bus2"] = ( From f19279e7e0ad3804d84cc60c6f0b7e384c8d0b56 Mon Sep 17 00:00:00 2001 From: cpschau Date: Tue, 9 Jul 2024 14:02:45 +0200 Subject: [PATCH 2/5] Add other waste heat technologies, and adjust share --- config/config.default.yaml | 13 +++++++------ scripts/prepare_sector_network.py | 24 ++++++++++++------------ 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/config/config.default.yaml b/config/config.default.yaml index b97bd3095..fe6ec45bb 100644 --- a/config/config.default.yaml +++ b/config/config.default.yaml @@ -571,12 +571,13 @@ sector: min_part_load_fischer_tropsch: 0.5 min_part_load_methanolisation: 0.3 min_part_load_methanation: 0.3 - use_fischer_tropsch_waste_heat: 0.2 - use_haber_bosch_waste_heat: true - use_methanolisation_waste_heat: true - use_methanation_waste_heat: true - use_fuel_cell_waste_heat: true - use_electrolysis_waste_heat: 0.2 + use_waste_heat: + fischer_tropsch: 0.25 + haber_bosch: 0.25 + methanolisation: 0.25 + methanation: 0.25 + fuel_cell: 0.25 + electrolysis: 0.25 electricity_transmission_grid: true electricity_distribution_grid: true electricity_distribution_grid_cost_factor: 1.0 diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index c9dd0a6f3..ca723e2b8 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -3342,7 +3342,7 @@ def add_waste_heat(n): # TODO what is the 0.95 and should it be a config option? if ( - options["use_fischer_tropsch_waste_heat"] + options["use_waste_heat"].get("fischer_tropsch", 1) and "Fischer-Tropsch" in link_carriers ): n.links.loc[urban_central + " Fischer-Tropsch", "bus3"] = ( @@ -3350,18 +3350,18 @@ def add_waste_heat(n): ) n.links.loc[urban_central + " Fischer-Tropsch", "efficiency3"] = ( 0.95 - n.links.loc[urban_central + " Fischer-Tropsch", "efficiency"] - ) * options["use_fischer_tropsch_waste_heat"] + ) * options["use_waste_heat"].get("fischer_tropsch", 1) - if options["use_methanation_waste_heat"] and "Sabatier" in link_carriers: + if options["use_waste_heat"].get("methanation", 1) and "Sabatier" in link_carriers: n.links.loc[urban_central + " Sabatier", "bus3"] = ( urban_central + " urban central heat" ) n.links.loc[urban_central + " Sabatier", "efficiency3"] = ( 0.95 - n.links.loc[urban_central + " Sabatier", "efficiency"] - ) + )* options["use_waste_heat"].get("methanation", 1) # DEA quotes 15% of total input (11% of which are high-value heat) - if options["use_haber_bosch_waste_heat"] and "Haber-Bosch" in link_carriers: + if options["use_waste_heat"].get("haber_bosch", 1) and "Haber-Bosch" in link_carriers: n.links.loc[urban_central + " Haber-Bosch", "bus3"] = ( urban_central + " urban central heat" ) @@ -3375,10 +3375,10 @@ def add_waste_heat(n): ) n.links.loc[urban_central + " Haber-Bosch", "efficiency3"] = ( 0.15 * total_energy_input / electricity_input - ) + )* options["use_waste_heat"].get("haber_bosch", 1) if ( - options["use_methanolisation_waste_heat"] + options["use_waste_heat"].get("methanolisation", 1) and "methanolisation" in link_carriers ): n.links.loc[urban_central + " methanolisation", "bus4"] = ( @@ -3387,11 +3387,11 @@ def add_waste_heat(n): n.links.loc[urban_central + " methanolisation", "efficiency4"] = ( costs.at["methanolisation", "heat-output"] / costs.at["methanolisation", "hydrogen-input"] - ) + )* options["use_waste_heat"].get("methanolisation", 1) # TODO integrate usable waste heat efficiency into technology-data from DEA if ( - options.get("use_electrolysis_waste_heat", False) + options["use_waste_heat"].get("electrolysis", 1) and "H2 Electrolysis" in link_carriers ): n.links.loc[urban_central + " H2 Electrolysis", "bus2"] = ( @@ -3399,15 +3399,15 @@ def add_waste_heat(n): ) n.links.loc[urban_central + " H2 Electrolysis", "efficiency2"] = ( 0.84 - n.links.loc[urban_central + " H2 Electrolysis", "efficiency"] - ) * options["use_electrolysis_waste_heat"] + ) * options["use_waste_heat"].get("electrolysis", 1) - if options["use_fuel_cell_waste_heat"] and "H2 Fuel Cell" in link_carriers: + if options["use_waste_heat"].get("fuel_cell", 1) and "H2 Fuel Cell" in link_carriers: n.links.loc[urban_central + " H2 Fuel Cell", "bus2"] = ( urban_central + " urban central heat" ) n.links.loc[urban_central + " H2 Fuel Cell", "efficiency2"] = ( 0.95 - n.links.loc[urban_central + " H2 Fuel Cell", "efficiency"] - ) + )* options["use_waste_heat"].get("fuel_cell", 1) def add_agriculture(n, costs): From fe5487e27700161e1ccda323a457671c3e24b1d5 Mon Sep 17 00:00:00 2001 From: cpschau Date: Tue, 9 Jul 2024 14:05:43 +0200 Subject: [PATCH 3/5] adjust parameters in config update from wildcards --- scripts/_helpers.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/_helpers.py b/scripts/_helpers.py index a3b77c1c0..0bf92e396 100644 --- a/scripts/_helpers.py +++ b/scripts/_helpers.py @@ -644,12 +644,12 @@ def update_config_from_wildcards(config, w, inplace=True): config["sector"]["H2_network"] = False if "nowasteheat" in opts: - config["sector"]["use_fischer_tropsch_waste_heat"] = False - config["sector"]["use_methanolisation_waste_heat"] = False - config["sector"]["use_haber_bosch_waste_heat"] = False - config["sector"]["use_methanation_waste_heat"] = False - config["sector"]["use_fuel_cell_waste_heat"] = False - config["sector"]["use_electrolysis_waste_heat"] = False + config["sector"]["use_waste_heat"]["fischer_tropsch"] = False + config["sector"]["use_waste_heat"]["methanolisation"] = False + config["sector"]["use_waste_heat"]["haber_bosch"] = False + config["sector"]["use_waste_heat"]["methanation"] = False + config["sector"]["use_waste_heat"]["fuel_cell"] = False + config["sector"]["use_waste_heat"]["electrolysis"] = False if "nodistrict" in opts: config["sector"]["district_heating"]["progress"] = 0.0 From 1de4db5f9cd282a858c2fd744ad6fe6cdaa1f118 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 12:08:55 +0000 Subject: [PATCH 4/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/prepare_sector_network.py | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index ca723e2b8..8efab3632 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -3352,16 +3352,22 @@ def add_waste_heat(n): 0.95 - n.links.loc[urban_central + " Fischer-Tropsch", "efficiency"] ) * options["use_waste_heat"].get("fischer_tropsch", 1) - if options["use_waste_heat"].get("methanation", 1) and "Sabatier" in link_carriers: + if ( + options["use_waste_heat"].get("methanation", 1) + and "Sabatier" in link_carriers + ): n.links.loc[urban_central + " Sabatier", "bus3"] = ( urban_central + " urban central heat" ) n.links.loc[urban_central + " Sabatier", "efficiency3"] = ( 0.95 - n.links.loc[urban_central + " Sabatier", "efficiency"] - )* options["use_waste_heat"].get("methanation", 1) + ) * options["use_waste_heat"].get("methanation", 1) # DEA quotes 15% of total input (11% of which are high-value heat) - if options["use_waste_heat"].get("haber_bosch", 1) and "Haber-Bosch" in link_carriers: + if ( + options["use_waste_heat"].get("haber_bosch", 1) + and "Haber-Bosch" in link_carriers + ): n.links.loc[urban_central + " Haber-Bosch", "bus3"] = ( urban_central + " urban central heat" ) @@ -3375,7 +3381,7 @@ def add_waste_heat(n): ) n.links.loc[urban_central + " Haber-Bosch", "efficiency3"] = ( 0.15 * total_energy_input / electricity_input - )* options["use_waste_heat"].get("haber_bosch", 1) + ) * options["use_waste_heat"].get("haber_bosch", 1) if ( options["use_waste_heat"].get("methanolisation", 1) @@ -3387,11 +3393,11 @@ def add_waste_heat(n): n.links.loc[urban_central + " methanolisation", "efficiency4"] = ( costs.at["methanolisation", "heat-output"] / costs.at["methanolisation", "hydrogen-input"] - )* options["use_waste_heat"].get("methanolisation", 1) + ) * options["use_waste_heat"].get("methanolisation", 1) # TODO integrate usable waste heat efficiency into technology-data from DEA if ( - options["use_waste_heat"].get("electrolysis", 1) + options["use_waste_heat"].get("electrolysis", 1) and "H2 Electrolysis" in link_carriers ): n.links.loc[urban_central + " H2 Electrolysis", "bus2"] = ( @@ -3401,13 +3407,16 @@ def add_waste_heat(n): 0.84 - n.links.loc[urban_central + " H2 Electrolysis", "efficiency"] ) * options["use_waste_heat"].get("electrolysis", 1) - if options["use_waste_heat"].get("fuel_cell", 1) and "H2 Fuel Cell" in link_carriers: + if ( + options["use_waste_heat"].get("fuel_cell", 1) + and "H2 Fuel Cell" in link_carriers + ): n.links.loc[urban_central + " H2 Fuel Cell", "bus2"] = ( urban_central + " urban central heat" ) n.links.loc[urban_central + " H2 Fuel Cell", "efficiency2"] = ( 0.95 - n.links.loc[urban_central + " H2 Fuel Cell", "efficiency"] - )* options["use_waste_heat"].get("fuel_cell", 1) + ) * options["use_waste_heat"].get("fuel_cell", 1) def add_agriculture(n, costs): From 530671ec07f5d09e922d750b1a84dfdb6ad57b5c Mon Sep 17 00:00:00 2001 From: cpschau Date: Tue, 9 Jul 2024 14:25:29 +0200 Subject: [PATCH 5/5] add release note --- doc/release_notes.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/release_notes.rst b/doc/release_notes.rst index 461e4d1a5..a45153bd4 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -10,6 +10,8 @@ Release Notes Upcoming Release ================ +* Allow for more conservative waste heat usage assumptions in district heating using a scaling factor for respective link efficiencies + * In simplifying polygons in :mod:`build_shapes` default to no tolerance. * Set non-zero capital_cost for methanol stores to avoid unrealistic storage sizes