From c7ce47dffdfb0a31625d602e7ab1c2517e4cd6d3 Mon Sep 17 00:00:00 2001 From: millingermarkus Date: Wed, 3 Jul 2024 09:22:09 +0200 Subject: [PATCH 01/28] Energy penalty for solid biomass CHP --- scripts/prepare_sector_network.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index dfa06cac..6735fd7e 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2417,28 +2417,22 @@ def add_biomass(n, costs): bus4=spatial.co2.df.loc[urban_central, "nodes"].values, carrier="urban central solid biomass CHP CC", p_nom_extendable=True, - capital_cost=costs.at[key, "fixed"] * costs.at[key, "efficiency"] + capital_cost=costs.at[key + " CC", "fixed"] * costs.at[key + " CC", "efficiency"] + costs.at["biomass CHP capture", "fixed"] * costs.at["solid biomass", "CO2 intensity"], - marginal_cost=costs.at[key, "VOM"], - efficiency=costs.at[key, "efficiency"] + marginal_cost=costs.at[key + " CC", "VOM"], + efficiency=costs.at[key + " CC", "efficiency"] - costs.at["solid biomass", "CO2 intensity"] * ( costs.at["biomass CHP capture", "electricity-input"] + costs.at["biomass CHP capture", "compression-electricity-input"] ), - efficiency2=costs.at[key, "efficiency-heat"] - + costs.at["solid biomass", "CO2 intensity"] - * ( - costs.at["biomass CHP capture", "heat-output"] - + costs.at["biomass CHP capture", "compression-heat-output"] - - costs.at["biomass CHP capture", "heat-input"] - ), + efficiency2=costs.at[key + " CC", "efficiency-heat"], efficiency3=-costs.at["solid biomass", "CO2 intensity"] * costs.at["biomass CHP capture", "capture_rate"], efficiency4=costs.at["solid biomass", "CO2 intensity"] * costs.at["biomass CHP capture", "capture_rate"], - lifetime=costs.at[key, "lifetime"], + lifetime=costs.at[key + " CC", "lifetime"], ) if options["biomass_boiler"]: From b5ff1e8f9c935d89cebd87da9f2692f6bb3d3e2b Mon Sep 17 00:00:00 2001 From: millingermarkus Date: Wed, 3 Jul 2024 09:38:08 +0200 Subject: [PATCH 02/28] Added note on carbon capture for BioSNG and BtL --- scripts/prepare_sector_network.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 6735fd7e..18ed90c4 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2478,7 +2478,8 @@ def add_biomass(n, costs): marginal_cost=costs.at["BtL", "efficiency"] * costs.at["BtL", "VOM"], ) - # TODO: Update with energy penalty + #Assuming that acid gas removal (incl. CO2) from syngas i performed with Rectisol + #process (Methanol) and that electricity demand for this is included in the base process n.madd( "Link", spatial.biomass.nodes, @@ -2518,7 +2519,8 @@ def add_biomass(n, costs): marginal_cost=costs.at["BioSNG", "efficiency"] * costs.at["BioSNG", "VOM"], ) - # TODO: Update with energy penalty for CC + # Assuming that acid gas removal (incl. CO2) from syngas i performed with Rectisol + # process (Methanol) and that electricity demand for this is included in the base process n.madd( "Link", spatial.biomass.nodes, From 76e15d6862636d7c134f28e7ca28d0dab4e9c678 Mon Sep 17 00:00:00 2001 From: millingermarkus Date: Wed, 3 Jul 2024 09:42:15 +0200 Subject: [PATCH 03/28] Carbon capture capital cost for waste CHP --- scripts/prepare_sector_network.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 18ed90c4..461a6db6 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -3100,7 +3100,9 @@ def add_industry(n, costs): carrier="waste CHP CC", p_nom_extendable=True, capital_cost=costs.at["waste CHP CC", "fixed"] - * costs.at["waste CHP CC", "efficiency"], + * costs.at["waste CHP CC", "efficiency"] + + costs.at['biomass CHP capture', 'fixed'] + * costs.at['oil', 'CO2 intensity'], marginal_cost=costs.at["waste CHP CC", "VOM"], efficiency=costs.at["waste CHP CC", "efficiency"], efficiency2=costs.at["waste CHP CC", "efficiency-heat"], From 53328e89f2a6df6d2ba269141645488fe069aaad Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 3 Jul 2024 08:07:29 +0000 Subject: [PATCH 04/28] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/prepare_sector_network.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 461a6db6..18d0d1a3 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2417,7 +2417,8 @@ def add_biomass(n, costs): bus4=spatial.co2.df.loc[urban_central, "nodes"].values, carrier="urban central solid biomass CHP CC", p_nom_extendable=True, - capital_cost=costs.at[key + " CC", "fixed"] * costs.at[key + " CC", "efficiency"] + capital_cost=costs.at[key + " CC", "fixed"] + * costs.at[key + " CC", "efficiency"] + costs.at["biomass CHP capture", "fixed"] * costs.at["solid biomass", "CO2 intensity"], marginal_cost=costs.at[key + " CC", "VOM"], @@ -2478,8 +2479,8 @@ def add_biomass(n, costs): marginal_cost=costs.at["BtL", "efficiency"] * costs.at["BtL", "VOM"], ) - #Assuming that acid gas removal (incl. CO2) from syngas i performed with Rectisol - #process (Methanol) and that electricity demand for this is included in the base process + # Assuming that acid gas removal (incl. CO2) from syngas i performed with Rectisol + # process (Methanol) and that electricity demand for this is included in the base process n.madd( "Link", spatial.biomass.nodes, @@ -3101,8 +3102,8 @@ def add_industry(n, costs): p_nom_extendable=True, capital_cost=costs.at["waste CHP CC", "fixed"] * costs.at["waste CHP CC", "efficiency"] - + costs.at['biomass CHP capture', 'fixed'] - * costs.at['oil', 'CO2 intensity'], + + costs.at["biomass CHP capture", "fixed"] + * costs.at["oil", "CO2 intensity"], marginal_cost=costs.at["waste CHP CC", "VOM"], efficiency=costs.at["waste CHP CC", "efficiency"], efficiency2=costs.at["waste CHP CC", "efficiency-heat"], From 84ddfea91ee97064df58eaa51b56bf95337e8b80 Mon Sep 17 00:00:00 2001 From: millingermarkus Date: Wed, 3 Jul 2024 12:38:16 +0200 Subject: [PATCH 05/28] Added electrobiofuels --- config/config.default.yaml | 2 ++ scripts/prepare_sector_network.py | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/config/config.default.yaml b/config/config.default.yaml index ee61d366..60eff164 100644 --- a/config/config.default.yaml +++ b/config/config.default.yaml @@ -606,6 +606,7 @@ sector: conventional_generation: OCGT: gas biomass_to_liquid: false + electrobiofuels: false biosng: false limit_max_growth: enable: false @@ -1030,6 +1031,7 @@ plotting: services rural biomass boiler: '#c6cf98' services urban decentral biomass boiler: '#dde5b5' biomass to liquid: '#32CD32' + electrobiofuels: 'red' BioSNG: '#123456' # power transmission lines: '#6c9459' diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index dfa06cac..1a1f97c0 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2505,6 +2505,36 @@ def add_biomass(n, costs): marginal_cost=costs.at["BtL", "efficiency"] * costs.at["BtL", "VOM"], ) + #Electrobiofuels (BtL with hydrogen addition to make more use of biogenic carbon). + #Combination of efuels and biomass to liquid, both based on Fischer-Tropsch. + #Experimental version - use with caution + if options['electrobiofuels'] and options.get("biomass_spatial", options["biomass_transport"]): + efuel_scale_factor = costs.at['BtL', 'C stored'] + n.madd( + "Link", + spatial.biomass.nodes, + suffix=" electrobiofuels", + bus0=spatial.biomass.nodes, + bus1=spatial.oil.nodes, + bus2=spatial.h2.nodes, + bus3="co2 atmosphere", + carrier="electrobiofuels", + lifetime=costs.at['electrobiofuels', 'lifetime'], + efficiency=costs.at['electrobiofuels', 'efficiency-biomass'], + efficiency2=-costs.at['electrobiofuels', 'efficiency-hydrogen'], + efficiency3=-costs.at['solid biomass', 'CO2 intensity'] + costs.at['BtL', 'CO2 stored'] + * (1 - costs.at['Fischer-Tropsch', 'capture rate']), + p_nom_extendable=True, + capital_cost=costs.at['BtL', 'fixed'] + * costs.at['BtL', 'efficiency'] / costs.at['electrobiofuels', 'efficiency-biomass'] + + efuel_scale_factor * costs.at['Fischer-Tropsch', 'fixed'] + * costs.at['Fischer-Tropsch', 'efficiency'] / costs.at['electrobiofuels', 'efficiency-hydrogen'], + marginal_cost=costs.at['BtL', 'VOM'] + * costs.at['BtL', 'efficiency'] / costs.at['electrobiofuels', 'efficiency-biomass'] + + efuel_scale_factor * costs.at['Fischer-Tropsch', 'VOM'] + * costs.at['Fischer-Tropsch', 'efficiency'] / costs.at['electrobiofuels', 'efficiency-hydrogen'] + ) + # BioSNG from solid biomass if options["biosng"]: n.madd( From b934653b65581b17ae462487f5cdcbed08c97b1d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 3 Jul 2024 10:42:04 +0000 Subject: [PATCH 06/28] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/prepare_sector_network.py | 45 ++++++++++++++++++------------- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 1a1f97c0..50d8e134 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2505,11 +2505,13 @@ def add_biomass(n, costs): marginal_cost=costs.at["BtL", "efficiency"] * costs.at["BtL", "VOM"], ) - #Electrobiofuels (BtL with hydrogen addition to make more use of biogenic carbon). - #Combination of efuels and biomass to liquid, both based on Fischer-Tropsch. - #Experimental version - use with caution - if options['electrobiofuels'] and options.get("biomass_spatial", options["biomass_transport"]): - efuel_scale_factor = costs.at['BtL', 'C stored'] + # Electrobiofuels (BtL with hydrogen addition to make more use of biogenic carbon). + # Combination of efuels and biomass to liquid, both based on Fischer-Tropsch. + # Experimental version - use with caution + if options["electrobiofuels"] and options.get( + "biomass_spatial", options["biomass_transport"] + ): + efuel_scale_factor = costs.at["BtL", "C stored"] n.madd( "Link", spatial.biomass.nodes, @@ -2519,20 +2521,27 @@ def add_biomass(n, costs): bus2=spatial.h2.nodes, bus3="co2 atmosphere", carrier="electrobiofuels", - lifetime=costs.at['electrobiofuels', 'lifetime'], - efficiency=costs.at['electrobiofuels', 'efficiency-biomass'], - efficiency2=-costs.at['electrobiofuels', 'efficiency-hydrogen'], - efficiency3=-costs.at['solid biomass', 'CO2 intensity'] + costs.at['BtL', 'CO2 stored'] - * (1 - costs.at['Fischer-Tropsch', 'capture rate']), + lifetime=costs.at["electrobiofuels", "lifetime"], + efficiency=costs.at["electrobiofuels", "efficiency-biomass"], + efficiency2=-costs.at["electrobiofuels", "efficiency-hydrogen"], + efficiency3=-costs.at["solid biomass", "CO2 intensity"] + + costs.at["BtL", "CO2 stored"] + * (1 - costs.at["Fischer-Tropsch", "capture rate"]), p_nom_extendable=True, - capital_cost=costs.at['BtL', 'fixed'] - * costs.at['BtL', 'efficiency'] / costs.at['electrobiofuels', 'efficiency-biomass'] - + efuel_scale_factor * costs.at['Fischer-Tropsch', 'fixed'] - * costs.at['Fischer-Tropsch', 'efficiency'] / costs.at['electrobiofuels', 'efficiency-hydrogen'], - marginal_cost=costs.at['BtL', 'VOM'] - * costs.at['BtL', 'efficiency'] / costs.at['electrobiofuels', 'efficiency-biomass'] - + efuel_scale_factor * costs.at['Fischer-Tropsch', 'VOM'] - * costs.at['Fischer-Tropsch', 'efficiency'] / costs.at['electrobiofuels', 'efficiency-hydrogen'] + capital_cost=costs.at["BtL", "fixed"] + * costs.at["BtL", "efficiency"] + / costs.at["electrobiofuels", "efficiency-biomass"] + + efuel_scale_factor + * costs.at["Fischer-Tropsch", "fixed"] + * costs.at["Fischer-Tropsch", "efficiency"] + / costs.at["electrobiofuels", "efficiency-hydrogen"], + marginal_cost=costs.at["BtL", "VOM"] + * costs.at["BtL", "efficiency"] + / costs.at["electrobiofuels", "efficiency-biomass"] + + efuel_scale_factor + * costs.at["Fischer-Tropsch", "VOM"] + * costs.at["Fischer-Tropsch", "efficiency"] + / costs.at["electrobiofuels", "efficiency-hydrogen"], ) # BioSNG from solid biomass From 270ce82b9f22dce831dfd87c03e5068eb07e0e07 Mon Sep 17 00:00:00 2001 From: Markus Millinger <50738187+millingermarkus@users.noreply.github.com> Date: Thu, 4 Jul 2024 09:30:22 +0200 Subject: [PATCH 07/28] Cost correction --- scripts/prepare_sector_network.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 50d8e134..b0155a99 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2530,18 +2530,14 @@ def add_biomass(n, costs): p_nom_extendable=True, capital_cost=costs.at["BtL", "fixed"] * costs.at["BtL", "efficiency"] - / costs.at["electrobiofuels", "efficiency-biomass"] + efuel_scale_factor * costs.at["Fischer-Tropsch", "fixed"] - * costs.at["Fischer-Tropsch", "efficiency"] - / costs.at["electrobiofuels", "efficiency-hydrogen"], + * costs.at["Fischer-Tropsch", "efficiency"], marginal_cost=costs.at["BtL", "VOM"] * costs.at["BtL", "efficiency"] - / costs.at["electrobiofuels", "efficiency-biomass"] + efuel_scale_factor * costs.at["Fischer-Tropsch", "VOM"] - * costs.at["Fischer-Tropsch", "efficiency"] - / costs.at["electrobiofuels", "efficiency-hydrogen"], + * costs.at["Fischer-Tropsch", "efficiency"], ) # BioSNG from solid biomass From 192a8eb14bb2fb03d81d04e4a10e7695fac03615 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 4 Jul 2024 07:30:50 +0000 Subject: [PATCH 08/28] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/prepare_sector_network.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index b0155a99..8132f343 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2528,13 +2528,11 @@ def add_biomass(n, costs): + costs.at["BtL", "CO2 stored"] * (1 - costs.at["Fischer-Tropsch", "capture rate"]), p_nom_extendable=True, - capital_cost=costs.at["BtL", "fixed"] - * costs.at["BtL", "efficiency"] + capital_cost=costs.at["BtL", "fixed"] * costs.at["BtL", "efficiency"] + efuel_scale_factor * costs.at["Fischer-Tropsch", "fixed"] * costs.at["Fischer-Tropsch", "efficiency"], - marginal_cost=costs.at["BtL", "VOM"] - * costs.at["BtL", "efficiency"] + marginal_cost=costs.at["BtL", "VOM"] * costs.at["BtL", "efficiency"] + efuel_scale_factor * costs.at["Fischer-Tropsch", "VOM"] * costs.at["Fischer-Tropsch", "efficiency"], From 821eb07e986696c4b9b4bd1071e3804fa948c143 Mon Sep 17 00:00:00 2001 From: Markus Millinger <50738187+millingermarkus@users.noreply.github.com> Date: Thu, 4 Jul 2024 09:59:45 +0200 Subject: [PATCH 09/28] Correct costs of BtL and BioSNG --- scripts/prepare_sector_network.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 18d0d1a3..6862df97 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2475,8 +2475,8 @@ def add_biomass(n, costs): efficiency2=-costs.at["solid biomass", "CO2 intensity"] + costs.at["BtL", "CO2 stored"], p_nom_extendable=True, - capital_cost=costs.at["BtL", "fixed"], - marginal_cost=costs.at["BtL", "efficiency"] * costs.at["BtL", "VOM"], + capital_cost=costs.at["BtL", "fixed"] * costs.at["BtL", "efficiency"], + marginal_cost=costs.at["BtL", "VOM"] * costs.at["BtL", "efficiency"], ) # Assuming that acid gas removal (incl. CO2) from syngas i performed with Rectisol @@ -2496,9 +2496,9 @@ def add_biomass(n, costs): + costs.at["BtL", "CO2 stored"] * (1 - costs.at["BtL", "capture rate"]), efficiency3=costs.at["BtL", "CO2 stored"] * costs.at["BtL", "capture rate"], p_nom_extendable=True, - capital_cost=costs.at["BtL", "fixed"] + capital_cost=costs.at["BtL", "fixed"] * costs.at["BtL", "efficiency"] + costs.at["biomass CHP capture", "fixed"] * costs.at["BtL", "CO2 stored"], - marginal_cost=costs.at["BtL", "efficiency"] * costs.at["BtL", "VOM"], + marginal_cost=costs.at["BtL", "VOM"] * costs.at["BtL", "efficiency"], ) # BioSNG from solid biomass @@ -2516,8 +2516,8 @@ def add_biomass(n, costs): efficiency3=-costs.at["solid biomass", "CO2 intensity"] + costs.at["BioSNG", "CO2 stored"], p_nom_extendable=True, - capital_cost=costs.at["BioSNG", "fixed"], - marginal_cost=costs.at["BioSNG", "efficiency"] * costs.at["BioSNG", "VOM"], + capital_cost=costs.at["BioSNG", "fixed"] * costs.at["BioSNG", "efficiency"], + marginal_cost=costs.at["BioSNG", "VOM"] * costs.at["BioSNG", "efficiency"], ) # Assuming that acid gas removal (incl. CO2) from syngas i performed with Rectisol @@ -2539,10 +2539,10 @@ def add_biomass(n, costs): + costs.at["BioSNG", "CO2 stored"] * (1 - costs.at["BioSNG", "capture rate"]), p_nom_extendable=True, - capital_cost=costs.at["BioSNG", "fixed"] + capital_cost=costs.at["BioSNG", "fixed"] * costs.at["BioSNG", "efficiency"] + costs.at["biomass CHP capture", "fixed"] * costs.at["BioSNG", "CO2 stored"], - marginal_cost=costs.at["BioSNG", "efficiency"] * costs.at["BioSNG", "VOM"], + marginal_cost=costs.at["BioSNG", "VOM"] * costs.at["BioSNG", "efficiency"], ) From c71fa78bfa4fe7471817416387837cf66623209c Mon Sep 17 00:00:00 2001 From: millingermarkus Date: Thu, 4 Jul 2024 10:18:19 +0200 Subject: [PATCH 10/28] Added biomass imports to prepare sector network --- config/config.default.yaml | 6 ++++ scripts/prepare_sector_network.py | 46 +++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/config/config.default.yaml b/config/config.default.yaml index ee61d366..a618ed95 100644 --- a/config/config.default.yaml +++ b/config/config.default.yaml @@ -628,6 +628,11 @@ sector: max_boost: 0.25 var_cf: true sustainability_factor: 0.0025 + solid_biomass_import: + enable: false + price: 54 #EUR/MWh + max_amount: 5 #EJ + upstream_emissions_factor: .1 #share of solid biomass CO2 emissions at full combustion # docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#industry industry: @@ -1017,6 +1022,7 @@ plotting: biogas: '#e3d37d' biomass: '#baa741' solid biomass: '#baa741' + solid biomass import: '#d5ca8d' solid biomass transport: '#baa741' solid biomass for industry: '#7a6d26' solid biomass for industry CC: '#47411c' diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index dfa06cac..8332858a 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2285,6 +2285,52 @@ def add_biomass(n, costs): e_initial=solid_biomass_potentials_spatial, ) + if options["solid_biomass_import"].get("enable", False): + biomass_import_price = options["solid_biomass_import"]["price"] + biomass_import_max_amount = round(options["solid_biomass_import"]["max_amount"] + * 1e9 / 3.6,0) #EJ --> MWh + biomass_import_upstream_emissions = round(options["solid_biomass_import"]["upstream_emissions_factor"] + * costs.at['solid biomass', 'CO2 intensity'],4) + + print("Adding biomass import with cost", biomass_import_price, + "EUR/MWh, a limit of", options["solid_biomass_import"]["max_amount"], + "EJ, and embedded emissions of", + options["solid_biomass_import"]["upstream_emissions_factor"] * 100, '%') + + n.add("Carrier", "solid biomass import") + + n.madd( + "Bus", + ["EU solid biomass import"], + location="EU", + carrier="solid biomass import" + ) + + n.madd( + "Store", + ["solid biomass import"], + bus=["EU solid biomass import"], + carrier="solid biomass import", + e_nom=biomass_import_max_amount, + marginal_cost=biomass_import_price, + e_initial=biomass_import_max_amount + ) + + n.madd( + "Link", + spatial.biomass.nodes, + suffix=" solid biomass import", + bus0=["EU solid biomass import"], + bus1=spatial.biomass.nodes, + bus2="co2 atmosphere", + carrier="solid biomass import", + efficiency=1., + efficiency2=biomass_import_upstream_emissions, + p_nom_extendable=True + ) + + + n.madd( "Link", spatial.gas.biogas_to_gas, From ee6d8b1e42788ad9bad8ef8f89c1303e9ceaf851 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 4 Jul 2024 08:22:21 +0000 Subject: [PATCH 11/28] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/prepare_sector_network.py | 35 ++++++++++++++++++------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 8332858a..d7ca791c 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2287,15 +2287,24 @@ def add_biomass(n, costs): if options["solid_biomass_import"].get("enable", False): biomass_import_price = options["solid_biomass_import"]["price"] - biomass_import_max_amount = round(options["solid_biomass_import"]["max_amount"] - * 1e9 / 3.6,0) #EJ --> MWh - biomass_import_upstream_emissions = round(options["solid_biomass_import"]["upstream_emissions_factor"] - * costs.at['solid biomass', 'CO2 intensity'],4) + biomass_import_max_amount = round( + options["solid_biomass_import"]["max_amount"] * 1e9 / 3.6, 0 + ) # EJ --> MWh + biomass_import_upstream_emissions = round( + options["solid_biomass_import"]["upstream_emissions_factor"] + * costs.at["solid biomass", "CO2 intensity"], + 4, + ) - print("Adding biomass import with cost", biomass_import_price, - "EUR/MWh, a limit of", options["solid_biomass_import"]["max_amount"], - "EJ, and embedded emissions of", - options["solid_biomass_import"]["upstream_emissions_factor"] * 100, '%') + print( + "Adding biomass import with cost", + biomass_import_price, + "EUR/MWh, a limit of", + options["solid_biomass_import"]["max_amount"], + "EJ, and embedded emissions of", + options["solid_biomass_import"]["upstream_emissions_factor"] * 100, + "%", + ) n.add("Carrier", "solid biomass import") @@ -2303,7 +2312,7 @@ def add_biomass(n, costs): "Bus", ["EU solid biomass import"], location="EU", - carrier="solid biomass import" + carrier="solid biomass import", ) n.madd( @@ -2313,7 +2322,7 @@ def add_biomass(n, costs): carrier="solid biomass import", e_nom=biomass_import_max_amount, marginal_cost=biomass_import_price, - e_initial=biomass_import_max_amount + e_initial=biomass_import_max_amount, ) n.madd( @@ -2324,13 +2333,11 @@ def add_biomass(n, costs): bus1=spatial.biomass.nodes, bus2="co2 atmosphere", carrier="solid biomass import", - efficiency=1., + efficiency=1.0, efficiency2=biomass_import_upstream_emissions, - p_nom_extendable=True + p_nom_extendable=True, ) - - n.madd( "Link", spatial.gas.biogas_to_gas, From 5c7bb2bf51304855d932da91b00c0a3ef7dbbfcf Mon Sep 17 00:00:00 2001 From: millingermarkus Date: Thu, 4 Jul 2024 11:16:00 +0200 Subject: [PATCH 12/28] Add option to exclude fossil fuels --- config/config.default.yaml | 1 + scripts/prepare_sector_network.py | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/config/config.default.yaml b/config/config.default.yaml index ee61d366..fb89878f 100644 --- a/config/config.default.yaml +++ b/config/config.default.yaml @@ -407,6 +407,7 @@ sector: biomass: true industry: true agriculture: true + fossil_fuels: true district_heating: potential: 0.6 progress: diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index dfa06cac..afef5c8f 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -542,11 +542,19 @@ def add_carrier_buses(n, carrier, nodes=None): capital_cost=capital_cost, ) + fossils = ['coal', 'gas', 'oil', 'lignite'] + if not options.get('fossil_fuels',True) and carrier in fossils: + print('Not adding fossil ', carrier) + extendable = False + else: + print('Adding fossil ', carrier) + extendable = True + n.madd( "Generator", nodes, bus=nodes, - p_nom_extendable=True, + p_nom_extendable=extendable, carrier=carrier, marginal_cost=costs.at[carrier, "fuel"], ) @@ -2894,12 +2902,17 @@ def add_industry(n, costs): carrier="oil", ) + if not options.get('fossil_fuels', True): + extendable = False + else: + extendable = True + if "oil" not in n.generators.carrier.unique(): n.madd( "Generator", spatial.oil.nodes, bus=spatial.oil.nodes, - p_nom_extendable=True, + p_nom_extendable=extendable, carrier="oil", marginal_cost=costs.at["oil", "fuel"], ) From 5ca27837f37654e04c519081f40658215bec2c84 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 4 Jul 2024 09:20:58 +0000 Subject: [PATCH 13/28] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/prepare_sector_network.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index afef5c8f..e4fc3299 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -542,12 +542,12 @@ def add_carrier_buses(n, carrier, nodes=None): capital_cost=capital_cost, ) - fossils = ['coal', 'gas', 'oil', 'lignite'] - if not options.get('fossil_fuels',True) and carrier in fossils: - print('Not adding fossil ', carrier) + fossils = ["coal", "gas", "oil", "lignite"] + if not options.get("fossil_fuels", True) and carrier in fossils: + print("Not adding fossil ", carrier) extendable = False else: - print('Adding fossil ', carrier) + print("Adding fossil ", carrier) extendable = True n.madd( @@ -2902,7 +2902,7 @@ def add_industry(n, costs): carrier="oil", ) - if not options.get('fossil_fuels', True): + if not options.get("fossil_fuels", True): extendable = False else: extendable = True From 4c1ec3559dc91ecb1dea4d32d2e593c530a549d2 Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Wed, 31 Jul 2024 11:53:20 +0200 Subject: [PATCH 14/28] some small adjustments to run as single node model (#1183) * some small adjustments to run as single node model * [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/cluster_gas_network.py | 3 +++ scripts/prepare_sector_network.py | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/cluster_gas_network.py b/scripts/cluster_gas_network.py index 6d4e6c48..b95c4580 100755 --- a/scripts/cluster_gas_network.py +++ b/scripts/cluster_gas_network.py @@ -58,6 +58,9 @@ def build_clustered_gas_network(df, bus_regions, length_factor=1.25): # drop pipes within the same region df = df.loc[df.bus1 != df.bus0] + if df.empty: + return df + # recalculate lengths as center to center * length factor df["length"] = df.apply( lambda p: length_factor diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index eaaf207d..5b28c1b4 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2775,10 +2775,11 @@ def add_industry(n, costs): ) domestic_navigation = pop_weighted_energy_totals.loc[ - nodes, "total domestic navigation" + nodes, ["total domestic navigation"] ].squeeze() international_navigation = ( - pd.read_csv(snakemake.input.shipping_demand, index_col=0).squeeze() * nyears + pd.read_csv(snakemake.input.shipping_demand, index_col=0).squeeze(axis=1) + * nyears ) all_navigation = domestic_navigation + international_navigation p_set = all_navigation * 1e6 / nhours @@ -3946,12 +3947,11 @@ if __name__ == "__main__": snakemake = mock_snakemake( "prepare_sector_network", - # configfiles="test/config.overnight.yaml", simpl="", opts="", - clusters="37", - ll="v1.0", - sector_opts="730H-T-H-B-I-A-dist1", + clusters="1", + ll="vopt", + sector_opts="", planning_horizons="2050", ) From b2d346f02cdeb3f16f15c258a98cf864c33f7a2a Mon Sep 17 00:00:00 2001 From: lisazeyen Date: Thu, 1 Aug 2024 17:47:21 +0200 Subject: [PATCH 15/28] some simplifications --- scripts/prepare_sector_network.py | 34 +++++++++++-------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 35de1fe7..cdd12866 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -543,21 +543,16 @@ def add_carrier_buses(n, carrier, nodes=None): ) fossils = ["coal", "gas", "oil", "lignite"] - if not options.get("fossil_fuels", True) and carrier in fossils: - print("Not adding fossil ", carrier) - extendable = False - else: - print("Adding fossil ", carrier) - extendable = True - - n.madd( - "Generator", - nodes, - bus=nodes, - p_nom_extendable=extendable, - carrier=carrier, - marginal_cost=costs.at[carrier, "fuel"], - ) + if options.get("fossil_fuels", True) and carrier in fossils: + + n.madd( + "Generator", + nodes, + bus=nodes, + p_nom_extendable=True, + carrier=carrier, + marginal_cost=costs.at[carrier, "fuel"], + ) # TODO: PyPSA-Eur merge issue @@ -2906,17 +2901,12 @@ def add_industry(n, costs): carrier="oil", ) - if not options.get("fossil_fuels", True): - extendable = False - else: - extendable = True - - if "oil" not in n.generators.carrier.unique(): + if options.get("fossil_fuels", True) and "oil" not in n.generators.carrier.unique(): n.madd( "Generator", spatial.oil.nodes, bus=spatial.oil.nodes, - p_nom_extendable=extendable, + p_nom_extendable=True, carrier="oil", marginal_cost=costs.at["oil", "fuel"], ) From 3eb8b163049b595a91ef5e5036f7f239e68c8145 Mon Sep 17 00:00:00 2001 From: lisazeyen Date: Thu, 1 Aug 2024 17:47:41 +0200 Subject: [PATCH 16/28] add description for new config setting --- doc/configtables/sector.csv | 311 ++++++++++++++++++------------------ 1 file changed, 156 insertions(+), 155 deletions(-) diff --git a/doc/configtables/sector.csv b/doc/configtables/sector.csv index 5045cecd..89c0e55c 100644 --- a/doc/configtables/sector.csv +++ b/doc/configtables/sector.csv @@ -1,155 +1,156 @@ -,Unit,Values,Description -transport,--,"{true, false}",Flag to include transport sector. -heating,--,"{true, false}",Flag to include heating sector. -biomass,--,"{true, false}",Flag to include biomass sector. -industry,--,"{true, false}",Flag to include industry sector. -agriculture,--,"{true, false}",Flag to include agriculture sector. -district_heating,--,,`prepare_sector_network.py `_ --- potential,--,float,maximum fraction of urban demand which can be supplied by district heating. Ignored where below current fraction. --- progress,--,Dictionary with planning horizons as keys., Increase of today's district heating demand to potential maximum district heating share. Progress = 0 means today's district heating share. Progress = 1 means maximum fraction of urban demand is supplied by district heating --- district_heating_loss,--,float,Share increase in district heat demand in urban central due to heat losses -cluster_heat_buses,--,"{true, false}",Cluster residential and service heat buses in `prepare_sector_network.py `_ to one to save memory. -,,, -bev_dsm_restriction _value,--,float,Adds a lower state of charge (SOC) limit for battery electric vehicles (BEV) to manage its own energy demand (DSM). Located in `build_transport_demand.py `_. Set to 0 for no restriction on BEV DSM -bev_dsm_restriction _time,--,float,Time at which SOC of BEV has to be dsm_restriction_value -transport_heating _deadband_upper,°C,float,"The maximum temperature in the vehicle. At higher temperatures, the energy required for cooling in the vehicle increases." -transport_heating _deadband_lower,°C,float,"The minimum temperature in the vehicle. At lower temperatures, the energy required for heating in the vehicle increases." -,,, -ICE_lower_degree_factor,--,float,Share increase in energy demand in internal combustion engine (ICE) for each degree difference between the cold environment and the minimum temperature. -ICE_upper_degree_factor,--,float,Share increase in energy demand in internal combustion engine (ICE) for each degree difference between the hot environment and the maximum temperature. -EV_lower_degree_factor,--,float,Share increase in energy demand in electric vehicles (EV) for each degree difference between the cold environment and the minimum temperature. -EV_upper_degree_factor,--,float,Share increase in energy demand in electric vehicles (EV) for each degree difference between the hot environment and the maximum temperature. -bev_dsm,--,"{true, false}",Add the option for battery electric vehicles (BEV) to participate in demand-side management (DSM) -,,, -bev_availability,--,float,The share for battery electric vehicles (BEV) that are able to do demand side management (DSM) -bev_energy,--,float,The average size of battery electric vehicles (BEV) in MWh -bev_charge_efficiency,--,float,Battery electric vehicles (BEV) charge and discharge efficiency -bev_charge_rate,MWh,float,The power consumption for one electric vehicle (EV) in MWh. Value derived from 3-phase charger with 11 kW. -bev_avail_max,--,float,The maximum share plugged-in availability for passenger electric vehicles. -bev_avail_mean,--,float,The average share plugged-in availability for passenger electric vehicles. -v2g,--,"{true, false}",Allows feed-in to grid from EV battery -land_transport_fuel_cell _share,--,Dictionary with planning horizons as keys.,The share of vehicles that uses fuel cells in a given year -land_transport_electric _share,--,Dictionary with planning horizons as keys.,The share of vehicles that uses electric vehicles (EV) in a given year -land_transport_ice _share,--,Dictionary with planning horizons as keys.,The share of vehicles that uses internal combustion engines (ICE) in a given year. What is not EV or FCEV is oil-fuelled ICE. -transport_electric_efficiency,MWh/100km,float,The conversion efficiencies of electric vehicles in transport -transport_fuel_cell_efficiency,MWh/100km,float,The H2 conversion efficiencies of fuel cells in transport -transport_ice_efficiency,MWh/100km,float,The oil conversion efficiencies of internal combustion engine (ICE) in transport -agriculture_machinery _electric_share,--,float,The share for agricultural machinery that uses electricity -agriculture_machinery _oil_share,--,float,The share for agricultural machinery that uses oil -agriculture_machinery _fuel_efficiency,--,float,The efficiency of electric-powered machinery in the conversion of electricity to meet agricultural needs. -agriculture_machinery _electric_efficiency,--,float,The efficiency of oil-powered machinery in the conversion of oil to meet agricultural needs. -Mwh_MeOH_per_MWh_H2,LHV,float,"The energy amount of the produced methanol per energy amount of hydrogen. From `DECHEMA (2017) `_, page 64." -MWh_MeOH_per_tCO2,LHV,float,"The energy amount of the produced methanol per ton of CO2. From `DECHEMA (2017) `_, page 66." -MWh_MeOH_per_MWh_e,LHV,float,"The energy amount of the produced methanol per energy amount of electricity. From `DECHEMA (2017) `_, page 64." -shipping_hydrogen _liquefaction,--,"{true, false}",Whether to include liquefaction costs for hydrogen demand in shipping. -,,, -shipping_hydrogen_share,--,Dictionary with planning horizons as keys.,The share of ships powered by hydrogen in a given year -shipping_methanol_share,--,Dictionary with planning horizons as keys.,The share of ships powered by methanol in a given year -shipping_oil_share,--,Dictionary with planning horizons as keys.,The share of ships powered by oil in a given year -shipping_methanol _efficiency,--,float,The efficiency of methanol-powered ships in the conversion of methanol to meet shipping needs (propulsion). The efficiency increase from oil can be 10-15% higher according to the `IEA `_ -,,, -shipping_oil_efficiency,--,float,The efficiency of oil-powered ships in the conversion of oil to meet shipping needs (propulsion). Base value derived from 2011 -aviation_demand_factor,--,float,The proportion of demand for aviation compared to today's consumption -HVC_demand_factor,--,float,The proportion of demand for high-value chemicals compared to today's consumption -,,, -time_dep_hp_cop,--,"{true, false}",Consider the time dependent coefficient of performance (COP) of the heat pump -heat_pump_sink_T,°C,float,The temperature heat sink used in heat pumps based on DTU / large area radiators. The value is conservatively high to cover hot water and space heating in poorly-insulated buildings -reduce_space_heat _exogenously,--,"{true, false}",Influence on space heating demand by a certain factor (applied before losses in district heating). -reduce_space_heat _exogenously_factor,--,Dictionary with planning horizons as keys.,"A positive factor can mean renovation or demolition of a building. If the factor is negative, it can mean an increase in floor area, increased thermal comfort, population growth. The default factors are determined by the `Eurocalc Homes and buildings decarbonization scenario `_" -retrofitting,,, --- retro_endogen,--,"{true, false}",Add retrofitting as an endogenous system which co-optimise space heat savings. --- cost_factor,--,float,Weight costs for building renovation --- interest_rate,--,float,The interest rate for investment in building components --- annualise_cost,--,"{true, false}",Annualise the investment costs of retrofitting --- tax_weighting,--,"{true, false}",Weight the costs of retrofitting depending on taxes in countries --- construction_index,--,"{true, false}",Weight the costs of retrofitting depending on labour/material costs per country -tes,--,"{true, false}",Add option for storing thermal energy in large water pits associated with district heating systems and individual thermal energy storage (TES) -tes_tau,,,The time constant used to calculate the decay of thermal energy in thermal energy storage (TES): 1- :math:`e^{-1/24τ}`. --- decentral,days,float,The time constant in decentralized thermal energy storage (TES) --- central,days,float,The time constant in centralized thermal energy storage (TES) -boilers,--,"{true, false}",Add option for transforming gas into heat using gas boilers -resistive_heaters,--,"{true, false}",Add option for transforming electricity into heat using resistive heaters (independently from gas boilers) -oil_boilers,--,"{true, false}",Add option for transforming oil into heat using boilers -biomass_boiler,--,"{true, false}",Add option for transforming biomass into heat using boilers -overdimension_individual_heating,--,"float",Add option for overdimensioning individual heating systems by a certain factor. This allows them to cover heat demand peaks e.g. 10% higher than those in the data with a setting of 1.1. -chp,--,"{true, false}",Add option for using Combined Heat and Power (CHP) -micro_chp,--,"{true, false}",Add option for using Combined Heat and Power (CHP) for decentral areas. -solar_thermal,--,"{true, false}",Add option for using solar thermal to generate heat. -solar_cf_correction,--,float,The correction factor for the value provided by the solar thermal profile calculations -marginal_cost_storage,currency/MWh ,float,The marginal cost of discharging batteries in distributed grids -methanation,--,"{true, false}",Add option for transforming hydrogen and CO2 into methane using methanation. -coal_cc,--,"{true, false}",Add option for coal CHPs with carbon capture -dac,--,"{true, false}",Add option for Direct Air Capture (DAC) -co2_vent,--,"{true, false}",Add option for vent out CO2 from storages to the atmosphere. -allam_cycle,--,"{true, false}",Add option to include `Allam cycle gas power plants `_ -hydrogen_fuel_cell,--,"{true, false}",Add option to include hydrogen fuel cell for re-electrification. Assuming OCGT technology costs -hydrogen_turbine,--,"{true, false}",Add option to include hydrogen turbine for re-electrification. Assuming OCGT technology costs -SMR,--,"{true, false}",Add option for transforming natural gas into hydrogen and CO2 using Steam Methane Reforming (SMR) -SMR CC,--,"{true, false}",Add option for transforming natural gas into hydrogen and CO2 using Steam Methane Reforming (SMR) and Carbon Capture (CC) -regional_methanol_demand,--,"{true, false}",Spatially resolve methanol demand. Set to true if regional CO2 constraints needed. -regional_oil_demand,--,"{true, false}",Spatially resolve oil demand. Set to true if regional CO2 constraints needed. -regional_co2 _sequestration_potential,,, --- enable,--,"{true, false}",Add option for regionally-resolved geological carbon dioxide sequestration potentials based on `CO2StoP `_. --- attribute,--,string or list,Name (or list of names) of the attribute(s) for the sequestration potential --- include_onshore,--,"{true, false}",Add options for including onshore sequestration potentials --- min_size,Gt ,float,Any sites with lower potential than this value will be excluded --- max_size,Gt ,float,The maximum sequestration potential for any one site. --- years_of_storage,years,float,The years until potential exhausted at optimised annual rate -co2_sequestration_potential,MtCO2/a,float,The potential of sequestering CO2 in Europe per year -co2_sequestration_cost,currency/tCO2,float,The cost of sequestering a ton of CO2 -co2_sequestration_lifetime,years,int,The lifetime of a CO2 sequestration site -co2_spatial,--,"{true, false}","Add option to spatially resolve carrier representing stored carbon dioxide. This allows for more detailed modelling of CCUTS, e.g. regarding the capturing of industrial process emissions, usage as feedstock for electrofuels, transport of carbon dioxide, and geological sequestration sites." -,,, -co2network,--,"{true, false}",Add option for planning a new carbon dioxide transmission network -co2_network_cost_factor,p.u.,float,The cost factor for the capital cost of the carbon dioxide transmission network -,,, -cc_fraction,--,float,The default fraction of CO2 captured with post-combustion capture -hydrogen_underground _storage,--,"{true, false}",Add options for storing hydrogen underground. Storage potential depends regionally. -hydrogen_underground _storage_locations,,"{onshore, nearshore, offshore}","The location where hydrogen underground storage can be located. Onshore, nearshore, offshore means it must be located more than 50 km away from the sea, within 50 km of the sea, or within the sea itself respectively." -,,, -ammonia,--,"{true, false, regional}","Add ammonia as a carrrier. It can be either true (copperplated NH3), false (no NH3 carrier) or ""regional"" (regionalised NH3 without network)" -min_part_load_fischer _tropsch,per unit of p_nom ,float,The minimum unit dispatch (``p_min_pu``) for the Fischer-Tropsch process -min_part_load _methanolisation,per unit of p_nom ,float,The minimum unit dispatch (``p_min_pu``) for the methanolisation process -,,, -use_fischer_tropsch _waste_heat,--,"{true, false}",Add option for using waste heat of Fischer Tropsch in district heating networks -use_fuel_cell_waste_heat,--,"{true, false}",Add option for using waste heat of fuel cells in district heating networks -use_electrolysis_waste _heat,--,"{true, false}",Add option for using waste heat of electrolysis in district heating networks -electricity_transmission _grid,--,"{true, false}",Switch for enabling/disabling the electricity transmission grid. -electricity_distribution _grid,--,"{true, false}",Add a simplified representation of the exchange capacity between transmission and distribution grid level through a link. -electricity_distribution _grid_cost_factor,,,Multiplies the investment cost of the electricity distribution grid -,,, -electricity_grid _connection,--,"{true, false}",Add the cost of electricity grid connection for onshore wind and solar -transmission_efficiency,,,Section to specify transmission losses or compression energy demands of bidirectional links. Splits them into two capacity-linked unidirectional links. --- {carrier},--,str,The carrier of the link. --- -- efficiency_static,p.u.,float,Length-independent transmission efficiency. --- -- efficiency_per_1000km,p.u. per 1000 km,float,Length-dependent transmission efficiency ($\eta^{\text{length}}$) --- -- compression_per_1000km,p.u. per 1000 km,float,Length-dependent electricity demand for compression ($\eta \cdot \text{length}$) implemented as multi-link to local electricity bus. -H2_network,--,"{true, false}",Add option for new hydrogen pipelines -gas_network,--,"{true, false}","Add existing natural gas infrastructure, incl. LNG terminals, production and entry-points. The existing gas network is added with a lossless transport model. A length-weighted `k-edge augmentation algorithm `_ can be run to add new candidate gas pipelines such that all regions of the model can be connected to the gas network. When activated, all the gas demands are regionally disaggregated as well." -H2_retrofit,--,"{true, false}",Add option for retrofiting existing pipelines to transport hydrogen. -H2_retrofit_capacity _per_CH4,--,float,"The ratio for H2 capacity per original CH4 capacity of retrofitted pipelines. The `European Hydrogen Backbone (April, 2020) p.15 `_ 60% of original natural gas capacity could be used in cost-optimal case as H2 capacity." -gas_network_connectivity _upgrade ,--,float,The number of desired edge connectivity (k) in the length-weighted `k-edge augmentation algorithm `_ used for the gas network -gas_distribution_grid,--,"{true, false}",Add a gas distribution grid -gas_distribution_grid _cost_factor,,,Multiplier for the investment cost of the gas distribution grid -,,, -biomass_spatial,--,"{true, false}",Add option for resolving biomass demand regionally -biomass_transport,--,"{true, false}",Add option for transporting solid biomass between nodes -biogas_upgrading_cc,--,"{true, false}",Add option to capture CO2 from biomass upgrading -conventional_generation,,,Add a more detailed description of conventional carriers. Any power generation requires the consumption of fuel from nodes representing that fuel. -biomass_to_liquid,--,"{true, false}",Add option for transforming solid biomass into liquid fuel with the same properties as oil -biosng,--,"{true, false}",Add option for transforming solid biomass into synthesis gas with the same properties as natural gas -limit_max_growth,,, --- enable,--,"{true, false}",Add option to limit the maximum growth of a carrier --- factor,p.u.,float,The maximum growth factor of a carrier (e.g. 1.3 allows 30% larger than max historic growth) --- max_growth,,, --- -- {carrier},GW,float,The historic maximum growth of a carrier --- max_relative_growth,,, --- -- {carrier},p.u.,float,The historic maximum relative growth of a carrier -,,, -enhanced_geothermal,,, --- enable,--,"{true, false}",Add option to include Enhanced Geothermal Systems --- flexible,--,"{true, false}",Add option for flexible operation (see Ricks et al. 2024) --- max_hours,--,int,The maximum hours the reservoir can be charged under flexible operation --- max_boost,--,float,The maximum boost in power output under flexible operation --- var_cf,--,"{true, false}",Add option for variable capacity factor (see Ricks et al. 2024) --- sustainability_factor,--,float,Share of sourced heat that is replenished by the earth's core (see details in `build_egs_potentials.py `_) +,Unit,Values,Description +transport,--,"{true, false}",Flag to include transport sector. +heating,--,"{true, false}",Flag to include heating sector. +biomass,--,"{true, false}",Flag to include biomass sector. +industry,--,"{true, false}",Flag to include industry sector. +agriculture,--,"{true, false}",Flag to include agriculture sector. +fossil_fuels,--,"{true, false}","Flag to include imports of fossil fuels ( [""coal"", ""gas"", ""oil"", ""lignite""])" +district_heating,--,,`prepare_sector_network.py `_ +-- potential,--,float,maximum fraction of urban demand which can be supplied by district heating. Ignored where below current fraction. +-- progress,--,Dictionary with planning horizons as keys., Increase of today's district heating demand to potential maximum district heating share. Progress = 0 means today's district heating share. Progress = 1 means maximum fraction of urban demand is supplied by district heating +-- district_heating_loss,--,float,Share increase in district heat demand in urban central due to heat losses +cluster_heat_buses,--,"{true, false}",Cluster residential and service heat buses in `prepare_sector_network.py `_ to one to save memory. +,,, +bev_dsm_restriction _value,--,float,Adds a lower state of charge (SOC) limit for battery electric vehicles (BEV) to manage its own energy demand (DSM). Located in `build_transport_demand.py `_. Set to 0 for no restriction on BEV DSM +bev_dsm_restriction _time,--,float,Time at which SOC of BEV has to be dsm_restriction_value +transport_heating _deadband_upper,°C,float,"The maximum temperature in the vehicle. At higher temperatures, the energy required for cooling in the vehicle increases." +transport_heating _deadband_lower,°C,float,"The minimum temperature in the vehicle. At lower temperatures, the energy required for heating in the vehicle increases." +,,, +ICE_lower_degree_factor,--,float,Share increase in energy demand in internal combustion engine (ICE) for each degree difference between the cold environment and the minimum temperature. +ICE_upper_degree_factor,--,float,Share increase in energy demand in internal combustion engine (ICE) for each degree difference between the hot environment and the maximum temperature. +EV_lower_degree_factor,--,float,Share increase in energy demand in electric vehicles (EV) for each degree difference between the cold environment and the minimum temperature. +EV_upper_degree_factor,--,float,Share increase in energy demand in electric vehicles (EV) for each degree difference between the hot environment and the maximum temperature. +bev_dsm,--,"{true, false}",Add the option for battery electric vehicles (BEV) to participate in demand-side management (DSM) +,,, +bev_availability,--,float,The share for battery electric vehicles (BEV) that are able to do demand side management (DSM) +bev_energy,--,float,The average size of battery electric vehicles (BEV) in MWh +bev_charge_efficiency,--,float,Battery electric vehicles (BEV) charge and discharge efficiency +bev_charge_rate,MWh,float,The power consumption for one electric vehicle (EV) in MWh. Value derived from 3-phase charger with 11 kW. +bev_avail_max,--,float,The maximum share plugged-in availability for passenger electric vehicles. +bev_avail_mean,--,float,The average share plugged-in availability for passenger electric vehicles. +v2g,--,"{true, false}",Allows feed-in to grid from EV battery +land_transport_fuel_cell _share,--,Dictionary with planning horizons as keys.,The share of vehicles that uses fuel cells in a given year +land_transport_electric _share,--,Dictionary with planning horizons as keys.,The share of vehicles that uses electric vehicles (EV) in a given year +land_transport_ice _share,--,Dictionary with planning horizons as keys.,The share of vehicles that uses internal combustion engines (ICE) in a given year. What is not EV or FCEV is oil-fuelled ICE. +transport_electric_efficiency,MWh/100km,float,The conversion efficiencies of electric vehicles in transport +transport_fuel_cell_efficiency,MWh/100km,float,The H2 conversion efficiencies of fuel cells in transport +transport_ice_efficiency,MWh/100km,float,The oil conversion efficiencies of internal combustion engine (ICE) in transport +agriculture_machinery _electric_share,--,float,The share for agricultural machinery that uses electricity +agriculture_machinery _oil_share,--,float,The share for agricultural machinery that uses oil +agriculture_machinery _fuel_efficiency,--,float,The efficiency of electric-powered machinery in the conversion of electricity to meet agricultural needs. +agriculture_machinery _electric_efficiency,--,float,The efficiency of oil-powered machinery in the conversion of oil to meet agricultural needs. +Mwh_MeOH_per_MWh_H2,LHV,float,"The energy amount of the produced methanol per energy amount of hydrogen. From `DECHEMA (2017) `_, page 64." +MWh_MeOH_per_tCO2,LHV,float,"The energy amount of the produced methanol per ton of CO2. From `DECHEMA (2017) `_, page 66." +MWh_MeOH_per_MWh_e,LHV,float,"The energy amount of the produced methanol per energy amount of electricity. From `DECHEMA (2017) `_, page 64." +shipping_hydrogen _liquefaction,--,"{true, false}",Whether to include liquefaction costs for hydrogen demand in shipping. +,,, +shipping_hydrogen_share,--,Dictionary with planning horizons as keys.,The share of ships powered by hydrogen in a given year +shipping_methanol_share,--,Dictionary with planning horizons as keys.,The share of ships powered by methanol in a given year +shipping_oil_share,--,Dictionary with planning horizons as keys.,The share of ships powered by oil in a given year +shipping_methanol _efficiency,--,float,The efficiency of methanol-powered ships in the conversion of methanol to meet shipping needs (propulsion). The efficiency increase from oil can be 10-15% higher according to the `IEA `_ +,,, +shipping_oil_efficiency,--,float,The efficiency of oil-powered ships in the conversion of oil to meet shipping needs (propulsion). Base value derived from 2011 +aviation_demand_factor,--,float,The proportion of demand for aviation compared to today's consumption +HVC_demand_factor,--,float,The proportion of demand for high-value chemicals compared to today's consumption +,,, +time_dep_hp_cop,--,"{true, false}",Consider the time dependent coefficient of performance (COP) of the heat pump +heat_pump_sink_T,°C,float,The temperature heat sink used in heat pumps based on DTU / large area radiators. The value is conservatively high to cover hot water and space heating in poorly-insulated buildings +reduce_space_heat _exogenously,--,"{true, false}",Influence on space heating demand by a certain factor (applied before losses in district heating). +reduce_space_heat _exogenously_factor,--,Dictionary with planning horizons as keys.,"A positive factor can mean renovation or demolition of a building. If the factor is negative, it can mean an increase in floor area, increased thermal comfort, population growth. The default factors are determined by the `Eurocalc Homes and buildings decarbonization scenario `_" +retrofitting,,, +-- retro_endogen,--,"{true, false}",Add retrofitting as an endogenous system which co-optimise space heat savings. +-- cost_factor,--,float,Weight costs for building renovation +-- interest_rate,--,float,The interest rate for investment in building components +-- annualise_cost,--,"{true, false}",Annualise the investment costs of retrofitting +-- tax_weighting,--,"{true, false}",Weight the costs of retrofitting depending on taxes in countries +-- construction_index,--,"{true, false}",Weight the costs of retrofitting depending on labour/material costs per country +tes,--,"{true, false}",Add option for storing thermal energy in large water pits associated with district heating systems and individual thermal energy storage (TES) +tes_tau,,,The time constant used to calculate the decay of thermal energy in thermal energy storage (TES): 1- :math:`e^{-1/24τ}`. +-- decentral,days,float,The time constant in decentralized thermal energy storage (TES) +-- central,days,float,The time constant in centralized thermal energy storage (TES) +boilers,--,"{true, false}",Add option for transforming gas into heat using gas boilers +resistive_heaters,--,"{true, false}",Add option for transforming electricity into heat using resistive heaters (independently from gas boilers) +oil_boilers,--,"{true, false}",Add option for transforming oil into heat using boilers +biomass_boiler,--,"{true, false}",Add option for transforming biomass into heat using boilers +overdimension_individual_heating,--,float,Add option for overdimensioning individual heating systems by a certain factor. This allows them to cover heat demand peaks e.g. 10% higher than those in the data with a setting of 1.1. +chp,--,"{true, false}",Add option for using Combined Heat and Power (CHP) +micro_chp,--,"{true, false}",Add option for using Combined Heat and Power (CHP) for decentral areas. +solar_thermal,--,"{true, false}",Add option for using solar thermal to generate heat. +solar_cf_correction,--,float,The correction factor for the value provided by the solar thermal profile calculations +marginal_cost_storage,currency/MWh ,float,The marginal cost of discharging batteries in distributed grids +methanation,--,"{true, false}",Add option for transforming hydrogen and CO2 into methane using methanation. +coal_cc,--,"{true, false}",Add option for coal CHPs with carbon capture +dac,--,"{true, false}",Add option for Direct Air Capture (DAC) +co2_vent,--,"{true, false}",Add option for vent out CO2 from storages to the atmosphere. +allam_cycle,--,"{true, false}",Add option to include `Allam cycle gas power plants `_ +hydrogen_fuel_cell,--,"{true, false}",Add option to include hydrogen fuel cell for re-electrification. Assuming OCGT technology costs +hydrogen_turbine,--,"{true, false}",Add option to include hydrogen turbine for re-electrification. Assuming OCGT technology costs +SMR,--,"{true, false}",Add option for transforming natural gas into hydrogen and CO2 using Steam Methane Reforming (SMR) +SMR CC,--,"{true, false}",Add option for transforming natural gas into hydrogen and CO2 using Steam Methane Reforming (SMR) and Carbon Capture (CC) +regional_methanol_demand,--,"{true, false}",Spatially resolve methanol demand. Set to true if regional CO2 constraints needed. +regional_oil_demand,--,"{true, false}",Spatially resolve oil demand. Set to true if regional CO2 constraints needed. +regional_co2 _sequestration_potential,,, +-- enable,--,"{true, false}",Add option for regionally-resolved geological carbon dioxide sequestration potentials based on `CO2StoP `_. +-- attribute,--,string or list,Name (or list of names) of the attribute(s) for the sequestration potential +-- include_onshore,--,"{true, false}",Add options for including onshore sequestration potentials +-- min_size,Gt ,float,Any sites with lower potential than this value will be excluded +-- max_size,Gt ,float,The maximum sequestration potential for any one site. +-- years_of_storage,years,float,The years until potential exhausted at optimised annual rate +co2_sequestration_potential,MtCO2/a,float,The potential of sequestering CO2 in Europe per year +co2_sequestration_cost,currency/tCO2,float,The cost of sequestering a ton of CO2 +co2_sequestration_lifetime,years,int,The lifetime of a CO2 sequestration site +co2_spatial,--,"{true, false}","Add option to spatially resolve carrier representing stored carbon dioxide. This allows for more detailed modelling of CCUTS, e.g. regarding the capturing of industrial process emissions, usage as feedstock for electrofuels, transport of carbon dioxide, and geological sequestration sites." +,,, +co2network,--,"{true, false}",Add option for planning a new carbon dioxide transmission network +co2_network_cost_factor,p.u.,float,The cost factor for the capital cost of the carbon dioxide transmission network +,,, +cc_fraction,--,float,The default fraction of CO2 captured with post-combustion capture +hydrogen_underground _storage,--,"{true, false}",Add options for storing hydrogen underground. Storage potential depends regionally. +hydrogen_underground _storage_locations,,"{onshore, nearshore, offshore}","The location where hydrogen underground storage can be located. Onshore, nearshore, offshore means it must be located more than 50 km away from the sea, within 50 km of the sea, or within the sea itself respectively." +,,, +ammonia,--,"{true, false, regional}","Add ammonia as a carrrier. It can be either true (copperplated NH3), false (no NH3 carrier) or ""regional"" (regionalised NH3 without network)" +min_part_load_fischer _tropsch,per unit of p_nom ,float,The minimum unit dispatch (``p_min_pu``) for the Fischer-Tropsch process +min_part_load _methanolisation,per unit of p_nom ,float,The minimum unit dispatch (``p_min_pu``) for the methanolisation process +,,, +use_fischer_tropsch _waste_heat,--,"{true, false}",Add option for using waste heat of Fischer Tropsch in district heating networks +use_fuel_cell_waste_heat,--,"{true, false}",Add option for using waste heat of fuel cells in district heating networks +use_electrolysis_waste _heat,--,"{true, false}",Add option for using waste heat of electrolysis in district heating networks +electricity_transmission _grid,--,"{true, false}",Switch for enabling/disabling the electricity transmission grid. +electricity_distribution _grid,--,"{true, false}",Add a simplified representation of the exchange capacity between transmission and distribution grid level through a link. +electricity_distribution _grid_cost_factor,,,Multiplies the investment cost of the electricity distribution grid +,,, +electricity_grid _connection,--,"{true, false}",Add the cost of electricity grid connection for onshore wind and solar +transmission_efficiency,,,Section to specify transmission losses or compression energy demands of bidirectional links. Splits them into two capacity-linked unidirectional links. +-- {carrier},--,str,The carrier of the link. +-- -- efficiency_static,p.u.,float,Length-independent transmission efficiency. +-- -- efficiency_per_1000km,p.u. per 1000 km,float,Length-dependent transmission efficiency ($\eta^{\text{length}}$) +-- -- compression_per_1000km,p.u. per 1000 km,float,Length-dependent electricity demand for compression ($\eta \cdot \text{length}$) implemented as multi-link to local electricity bus. +H2_network,--,"{true, false}",Add option for new hydrogen pipelines +gas_network,--,"{true, false}","Add existing natural gas infrastructure, incl. LNG terminals, production and entry-points. The existing gas network is added with a lossless transport model. A length-weighted `k-edge augmentation algorithm `_ can be run to add new candidate gas pipelines such that all regions of the model can be connected to the gas network. When activated, all the gas demands are regionally disaggregated as well." +H2_retrofit,--,"{true, false}",Add option for retrofiting existing pipelines to transport hydrogen. +H2_retrofit_capacity _per_CH4,--,float,"The ratio for H2 capacity per original CH4 capacity of retrofitted pipelines. The `European Hydrogen Backbone (April, 2020) p.15 `_ 60% of original natural gas capacity could be used in cost-optimal case as H2 capacity." +gas_network_connectivity _upgrade ,--,float,The number of desired edge connectivity (k) in the length-weighted `k-edge augmentation algorithm `_ used for the gas network +gas_distribution_grid,--,"{true, false}",Add a gas distribution grid +gas_distribution_grid _cost_factor,,,Multiplier for the investment cost of the gas distribution grid +,,, +biomass_spatial,--,"{true, false}",Add option for resolving biomass demand regionally +biomass_transport,--,"{true, false}",Add option for transporting solid biomass between nodes +biogas_upgrading_cc,--,"{true, false}",Add option to capture CO2 from biomass upgrading +conventional_generation,,,Add a more detailed description of conventional carriers. Any power generation requires the consumption of fuel from nodes representing that fuel. +biomass_to_liquid,--,"{true, false}",Add option for transforming solid biomass into liquid fuel with the same properties as oil +biosng,--,"{true, false}",Add option for transforming solid biomass into synthesis gas with the same properties as natural gas +limit_max_growth,,, +-- enable,--,"{true, false}",Add option to limit the maximum growth of a carrier +-- factor,p.u.,float,The maximum growth factor of a carrier (e.g. 1.3 allows 30% larger than max historic growth) +-- max_growth,,, +-- -- {carrier},GW,float,The historic maximum growth of a carrier +-- max_relative_growth,,, +-- -- {carrier},p.u.,float,The historic maximum relative growth of a carrier +,,, +enhanced_geothermal,,, +-- enable,--,"{true, false}",Add option to include Enhanced Geothermal Systems +-- flexible,--,"{true, false}",Add option for flexible operation (see Ricks et al. 2024) +-- max_hours,--,int,The maximum hours the reservoir can be charged under flexible operation +-- max_boost,--,float,The maximum boost in power output under flexible operation +-- var_cf,--,"{true, false}",Add option for variable capacity factor (see Ricks et al. 2024) +-- sustainability_factor,--,float,Share of sourced heat that is replenished by the earth's core (see details in `build_egs_potentials.py `_) From 9a6505d889fac25483c70ccad3ec24d4eb66c474 Mon Sep 17 00:00:00 2001 From: lisazeyen Date: Thu, 1 Aug 2024 17:50:22 +0200 Subject: [PATCH 17/28] add release notes --- doc/release_notes.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/release_notes.rst b/doc/release_notes.rst index 383287a6..1908d739 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -10,6 +10,8 @@ Release Notes Upcoming Release ================ +* Add flag ``sector: fossil_fuels`` in config to remove the option of importing fossil fuels + * 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. From de3f679f33a3af4e4d03f6dba851d74beb8e2123 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2024 15:54:22 +0000 Subject: [PATCH 18/28] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- 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 cdd12866..520a2090 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -544,7 +544,7 @@ def add_carrier_buses(n, carrier, nodes=None): fossils = ["coal", "gas", "oil", "lignite"] if options.get("fossil_fuels", True) and carrier in fossils: - + n.madd( "Generator", nodes, From baa8a827f559b392b57adafbad59fe6cd2c7fb31 Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Fri, 2 Aug 2024 11:42:30 +0200 Subject: [PATCH 19/28] change FRESNA references to PyPSA --- README.md | 4 ++-- doc/foresight.rst | 2 +- doc/preparation.rst | 2 +- scripts/build_powerplants.py | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d5a72b77..5c918c9a 100644 --- a/README.md +++ b/README.md @@ -65,10 +65,10 @@ The dataset consists of: (alternating current lines at and above 220kV voltage level and all high voltage direct current lines) and 3803 substations. - The open power plant database - [powerplantmatching](https://github.com/FRESNA/powerplantmatching). + [powerplantmatching](https://github.com/PyPSA/powerplantmatching). - Electrical demand time series from the [OPSD project](https://open-power-system-data.org/). -- Renewable time series based on ERA5 and SARAH, assembled using the [atlite tool](https://github.com/FRESNA/atlite). +- Renewable time series based on ERA5 and SARAH, assembled using the [atlite tool](https://github.com/PyPSA/atlite). - Geographical potentials for wind and solar generators based on land use (CORINE) and excluding nature reserves (Natura2000) are computed with the [atlite library](https://github.com/PyPSA/atlite). A sector-coupled extension adds demand diff --git a/doc/foresight.rst b/doc/foresight.rst index 400f67ce..43a93ead 100644 --- a/doc/foresight.rst +++ b/doc/foresight.rst @@ -242,7 +242,7 @@ Rule overview file `__ generated by pypsa-eur which, in turn, is based on the `powerplantmatching - `__ database. + `__ database. Existing wind and solar capacities are retrieved from `IRENA annual statistics `__ and distributed among the diff --git a/doc/preparation.rst b/doc/preparation.rst index 669f3392..4585f4db 100644 --- a/doc/preparation.rst +++ b/doc/preparation.rst @@ -25,7 +25,7 @@ With these and the externally extracted ENTSO-E online map topology Then the process continues by calculating conventional power plant capacities, potentials, and per-unit availability time series for variable renewable energy carriers and hydro power plants with the following rules: -- :mod:`build_powerplants` for today's thermal power plant capacities using `powerplantmatching `__ allocating these to the closest substation for each powerplant, +- :mod:`build_powerplants` for today's thermal power plant capacities using `powerplantmatching `__ allocating these to the closest substation for each powerplant, - :mod:`build_ship_raster` for building shipping traffic density, - :mod:`build_renewable_profiles` for the hourly capacity factors and installation potentials constrained by land-use in each substation's Voronoi cell for PV, onshore and offshore wind, and - :mod:`build_hydro_profile` for the hourly per-unit hydro power availability time series. diff --git a/scripts/build_powerplants.py b/scripts/build_powerplants.py index 4e2bb88f..bde2bd38 100755 --- a/scripts/build_powerplants.py +++ b/scripts/build_powerplants.py @@ -6,7 +6,7 @@ # coding: utf-8 """ Retrieves conventional powerplant capacities and locations from -`powerplantmatching `_, assigns +`powerplantmatching `_, assigns these to buses and creates a ``.csv`` file. It is possible to amend the powerplant database with custom entries provided in ``data/custom_powerplants.csv``. @@ -30,17 +30,17 @@ Inputs ------ - ``networks/base.nc``: confer :ref:`base`. -- ``data/custom_powerplants.csv``: custom powerplants in the same format as `powerplantmatching `_ provides +- ``data/custom_powerplants.csv``: custom powerplants in the same format as `powerplantmatching `_ provides Outputs ------- -- ``resource/powerplants.csv``: A list of conventional power plants (i.e. neither wind nor solar) with fields for name, fuel type, technology, country, capacity in MW, duration, commissioning year, retrofit year, latitude, longitude, and dam information as documented in the `powerplantmatching README `_; additionally it includes information on the closest substation/bus in ``networks/base.nc``. +- ``resource/powerplants.csv``: A list of conventional power plants (i.e. neither wind nor solar) with fields for name, fuel type, technology, country, capacity in MW, duration, commissioning year, retrofit year, latitude, longitude, and dam information as documented in the `powerplantmatching README `_; additionally it includes information on the closest substation/bus in ``networks/base.nc``. .. image:: img/powerplantmatching.png :scale: 30 % - **Source:** `powerplantmatching on GitHub `_ + **Source:** `powerplantmatching on GitHub `_ Description ----------- From 8bfca9ce696d930b823e4df784c665b8cab23aff Mon Sep 17 00:00:00 2001 From: lisazeyen Date: Fri, 2 Aug 2024 14:05:42 +0200 Subject: [PATCH 20/28] enable electrobiofuels also without biomass spatially resolved --- scripts/prepare_sector_network.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 7ecdb836..81acb418 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -200,7 +200,7 @@ def define_spatial(nodes, options): spatial.geothermal_heat = SimpleNamespace() spatial.geothermal_heat.nodes = ["EU enhanced geothermal systems"] spatial.geothermal_heat.locations = ["EU"] - + return spatial @@ -2514,13 +2514,14 @@ def add_biomass(n, costs): # Electrobiofuels (BtL with hydrogen addition to make more use of biogenic carbon). # Combination of efuels and biomass to liquid, both based on Fischer-Tropsch. # Experimental version - use with caution - if options["electrobiofuels"] and options.get( - "biomass_spatial", options["biomass_transport"] - ): + if options["electrobiofuels"]: + efuel_scale_factor = costs.at["BtL", "C stored"] + name = (pd.Index(spatial.biomass.nodes) + " " + + pd.Index(spatial.h2.nodes.str.replace(" H2", ""))) n.madd( "Link", - spatial.biomass.nodes, + name, suffix=" electrobiofuels", bus0=spatial.biomass.nodes, bus1=spatial.oil.nodes, From c7a186863e6ca2ed336cc0fc19bf194914910a1b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 2 Aug 2024 12:07:16 +0000 Subject: [PATCH 21/28] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/prepare_sector_network.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 81acb418..37d1299c 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -200,7 +200,7 @@ def define_spatial(nodes, options): spatial.geothermal_heat = SimpleNamespace() spatial.geothermal_heat.nodes = ["EU enhanced geothermal systems"] spatial.geothermal_heat.locations = ["EU"] - + return spatial @@ -2517,8 +2517,11 @@ def add_biomass(n, costs): if options["electrobiofuels"]: efuel_scale_factor = costs.at["BtL", "C stored"] - name = (pd.Index(spatial.biomass.nodes) + " " - + pd.Index(spatial.h2.nodes.str.replace(" H2", ""))) + name = ( + pd.Index(spatial.biomass.nodes) + + " " + + pd.Index(spatial.h2.nodes.str.replace(" H2", "")) + ) n.madd( "Link", name, From 9c35a6716cf7763ed3a5f387ed414e39d86c5050 Mon Sep 17 00:00:00 2001 From: lisazeyen Date: Fri, 2 Aug 2024 14:11:26 +0200 Subject: [PATCH 22/28] add documentation for new config option --- doc/configtables/sector.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/configtables/sector.csv b/doc/configtables/sector.csv index 89c0e55c..f6e52116 100644 --- a/doc/configtables/sector.csv +++ b/doc/configtables/sector.csv @@ -138,6 +138,7 @@ biomass_transport,--,"{true, false}",Add option for transporting solid biomass b biogas_upgrading_cc,--,"{true, false}",Add option to capture CO2 from biomass upgrading conventional_generation,,,Add a more detailed description of conventional carriers. Any power generation requires the consumption of fuel from nodes representing that fuel. biomass_to_liquid,--,"{true, false}",Add option for transforming solid biomass into liquid fuel with the same properties as oil +electrobiofuels,--,"{true, false}","Add option for transforming solid biomass and hydrogen into liquid fuel to make more use of biogenic carbon, as a combination of BtL and Fischer-Tropsch" biosng,--,"{true, false}",Add option for transforming solid biomass into synthesis gas with the same properties as natural gas limit_max_growth,,, -- enable,--,"{true, false}",Add option to limit the maximum growth of a carrier From 39c502f29a9b82b073c2b9f5d65bd36837c793cc Mon Sep 17 00:00:00 2001 From: lisazeyen Date: Fri, 2 Aug 2024 14:13:21 +0200 Subject: [PATCH 23/28] 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 1908d739..4293541b 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -10,6 +10,8 @@ Release Notes Upcoming Release ================ +* Add option to produce electrobiofuels from solid biomass and hydrogen, as a combination of BtL and Fischer-Tropsch to make more use of the biogenic carbon + * Add flag ``sector: fossil_fuels`` in config to remove the option of importing fossil fuels * 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. From eb81cfb7148e7603eda54ebd90017687bd4d2fdb Mon Sep 17 00:00:00 2001 From: lisazeyen Date: Fri, 2 Aug 2024 15:13:47 +0200 Subject: [PATCH 24/28] change units from EJ->TWh and clean up --- config/config.default.yaml | 2 +- scripts/prepare_sector_network.py | 29 +++++++++++------------------ 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/config/config.default.yaml b/config/config.default.yaml index a618ed95..f549752f 100644 --- a/config/config.default.yaml +++ b/config/config.default.yaml @@ -631,7 +631,7 @@ sector: solid_biomass_import: enable: false price: 54 #EUR/MWh - max_amount: 5 #EJ + max_amount: 1390 # TWh upstream_emissions_factor: .1 #share of solid biomass CO2 emissions at full combustion # docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#industry diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index d7ca791c..53af5858 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2287,24 +2287,17 @@ def add_biomass(n, costs): if options["solid_biomass_import"].get("enable", False): biomass_import_price = options["solid_biomass_import"]["price"] - biomass_import_max_amount = round( - options["solid_biomass_import"]["max_amount"] * 1e9 / 3.6, 0 - ) # EJ --> MWh - biomass_import_upstream_emissions = round( - options["solid_biomass_import"]["upstream_emissions_factor"] - * costs.at["solid biomass", "CO2 intensity"], - 4, - ) - - print( - "Adding biomass import with cost", - biomass_import_price, - "EUR/MWh, a limit of", - options["solid_biomass_import"]["max_amount"], - "EJ, and embedded emissions of", - options["solid_biomass_import"]["upstream_emissions_factor"] * 100, - "%", + # convert TWh in MWh + biomass_import_max_amount = options["solid_biomass_import"]["max_amount"] * 1e6 + biomass_import_upstream_emissions = options["solid_biomass_import"]["upstream_emissions_factor"] + + logger.info( + "Adding biomass import with cost %.2f EUR/MWh, a limit of %.2f TWh, and embedded emissions of %.2f%%", + biomass_import_price, + options["solid_biomass_import"]["max_amount"], + biomass_import_upstream_emissions * 100 ) + n.add("Carrier", "solid biomass import") @@ -2334,7 +2327,7 @@ def add_biomass(n, costs): bus2="co2 atmosphere", carrier="solid biomass import", efficiency=1.0, - efficiency2=biomass_import_upstream_emissions, + efficiency2=biomass_import_upstream_emissions* costs.at["solid biomass", "CO2 intensity"], p_nom_extendable=True, ) From 4d9ba02e187aeae5d06db742ebbadce3dbe03987 Mon Sep 17 00:00:00 2001 From: lisazeyen Date: Fri, 2 Aug 2024 15:22:39 +0200 Subject: [PATCH 25/28] add doc for new config --- doc/configtables/sector.csv | 315 ++++++++++++++++++------------------ 1 file changed, 160 insertions(+), 155 deletions(-) diff --git a/doc/configtables/sector.csv b/doc/configtables/sector.csv index 059c4233..21d56422 100644 --- a/doc/configtables/sector.csv +++ b/doc/configtables/sector.csv @@ -1,155 +1,160 @@ -,Unit,Values,Description -transport,--,"{true, false}",Flag to include transport sector. -heating,--,"{true, false}",Flag to include heating sector. -biomass,--,"{true, false}",Flag to include biomass sector. -industry,--,"{true, false}",Flag to include industry sector. -agriculture,--,"{true, false}",Flag to include agriculture sector. -district_heating,--,,`prepare_sector_network.py `_ --- potential,--,float,maximum fraction of urban demand which can be supplied by district heating --- progress,--,Dictionary with planning horizons as keys., Increase of today's district heating demand to potential maximum district heating share. Progress = 0 means today's district heating share. Progress = 1 means maximum fraction of urban demand is supplied by district heating --- district_heating_loss,--,float,Share increase in district heat demand in urban central due to heat losses -cluster_heat_buses,--,"{true, false}",Cluster residential and service heat buses in `prepare_sector_network.py `_ to one to save memory. -,,, -bev_dsm_restriction _value,--,float,Adds a lower state of charge (SOC) limit for battery electric vehicles (BEV) to manage its own energy demand (DSM). Located in `build_transport_demand.py `_. Set to 0 for no restriction on BEV DSM -bev_dsm_restriction _time,--,float,Time at which SOC of BEV has to be dsm_restriction_value -transport_heating _deadband_upper,°C,float,"The maximum temperature in the vehicle. At higher temperatures, the energy required for cooling in the vehicle increases." -transport_heating _deadband_lower,°C,float,"The minimum temperature in the vehicle. At lower temperatures, the energy required for heating in the vehicle increases." -,,, -ICE_lower_degree_factor,--,float,Share increase in energy demand in internal combustion engine (ICE) for each degree difference between the cold environment and the minimum temperature. -ICE_upper_degree_factor,--,float,Share increase in energy demand in internal combustion engine (ICE) for each degree difference between the hot environment and the maximum temperature. -EV_lower_degree_factor,--,float,Share increase in energy demand in electric vehicles (EV) for each degree difference between the cold environment and the minimum temperature. -EV_upper_degree_factor,--,float,Share increase in energy demand in electric vehicles (EV) for each degree difference between the hot environment and the maximum temperature. -bev_dsm,--,"{true, false}",Add the option for battery electric vehicles (BEV) to participate in demand-side management (DSM) -,,, -bev_availability,--,float,The share for battery electric vehicles (BEV) that are able to do demand side management (DSM) -bev_energy,--,float,The average size of battery electric vehicles (BEV) in MWh -bev_charge_efficiency,--,float,Battery electric vehicles (BEV) charge and discharge efficiency -bev_charge_rate,MWh,float,The power consumption for one electric vehicle (EV) in MWh. Value derived from 3-phase charger with 11 kW. -bev_avail_max,--,float,The maximum share plugged-in availability for passenger electric vehicles. -bev_avail_mean,--,float,The average share plugged-in availability for passenger electric vehicles. -v2g,--,"{true, false}",Allows feed-in to grid from EV battery -land_transport_fuel_cell _share,--,Dictionary with planning horizons as keys.,The share of vehicles that uses fuel cells in a given year -land_transport_electric _share,--,Dictionary with planning horizons as keys.,The share of vehicles that uses electric vehicles (EV) in a given year -land_transport_ice _share,--,Dictionary with planning horizons as keys.,The share of vehicles that uses internal combustion engines (ICE) in a given year. What is not EV or FCEV is oil-fuelled ICE. -transport_electric_efficiency,MWh/100km,float,The conversion efficiencies of electric vehicles in transport -transport_fuel_cell_efficiency,MWh/100km,float,The H2 conversion efficiencies of fuel cells in transport -transport_ice_efficiency,MWh/100km,float,The oil conversion efficiencies of internal combustion engine (ICE) in transport -agriculture_machinery _electric_share,--,float,The share for agricultural machinery that uses electricity -agriculture_machinery _oil_share,--,float,The share for agricultural machinery that uses oil -agriculture_machinery _fuel_efficiency,--,float,The efficiency of electric-powered machinery in the conversion of electricity to meet agricultural needs. -agriculture_machinery _electric_efficiency,--,float,The efficiency of oil-powered machinery in the conversion of oil to meet agricultural needs. -Mwh_MeOH_per_MWh_H2,LHV,float,"The energy amount of the produced methanol per energy amount of hydrogen. From `DECHEMA (2017) `_, page 64." -MWh_MeOH_per_tCO2,LHV,float,"The energy amount of the produced methanol per ton of CO2. From `DECHEMA (2017) `_, page 66." -MWh_MeOH_per_MWh_e,LHV,float,"The energy amount of the produced methanol per energy amount of electricity. From `DECHEMA (2017) `_, page 64." -shipping_hydrogen _liquefaction,--,"{true, false}",Whether to include liquefaction costs for hydrogen demand in shipping. -,,, -shipping_hydrogen_share,--,Dictionary with planning horizons as keys.,The share of ships powered by hydrogen in a given year -shipping_methanol_share,--,Dictionary with planning horizons as keys.,The share of ships powered by methanol in a given year -shipping_oil_share,--,Dictionary with planning horizons as keys.,The share of ships powered by oil in a given year -shipping_methanol _efficiency,--,float,The efficiency of methanol-powered ships in the conversion of methanol to meet shipping needs (propulsion). The efficiency increase from oil can be 10-15% higher according to the `IEA `_ -,,, -shipping_oil_efficiency,--,float,The efficiency of oil-powered ships in the conversion of oil to meet shipping needs (propulsion). Base value derived from 2011 -aviation_demand_factor,--,float,The proportion of demand for aviation compared to today's consumption -HVC_demand_factor,--,float,The proportion of demand for high-value chemicals compared to today's consumption -,,, -time_dep_hp_cop,--,"{true, false}",Consider the time dependent coefficient of performance (COP) of the heat pump -heat_pump_sink_T,°C,float,The temperature heat sink used in heat pumps based on DTU / large area radiators. The value is conservatively high to cover hot water and space heating in poorly-insulated buildings -reduce_space_heat _exogenously,--,"{true, false}",Influence on space heating demand by a certain factor (applied before losses in district heating). -reduce_space_heat _exogenously_factor,--,Dictionary with planning horizons as keys.,"A positive factor can mean renovation or demolition of a building. If the factor is negative, it can mean an increase in floor area, increased thermal comfort, population growth. The default factors are determined by the `Eurocalc Homes and buildings decarbonization scenario `_" -retrofitting,,, --- retro_endogen,--,"{true, false}",Add retrofitting as an endogenous system which co-optimise space heat savings. --- cost_factor,--,float,Weight costs for building renovation --- interest_rate,--,float,The interest rate for investment in building components --- annualise_cost,--,"{true, false}",Annualise the investment costs of retrofitting --- tax_weighting,--,"{true, false}",Weight the costs of retrofitting depending on taxes in countries --- construction_index,--,"{true, false}",Weight the costs of retrofitting depending on labour/material costs per country -tes,--,"{true, false}",Add option for storing thermal energy in large water pits associated with district heating systems and individual thermal energy storage (TES) -tes_tau,,,The time constant used to calculate the decay of thermal energy in thermal energy storage (TES): 1- :math:`e^{-1/24τ}`. --- decentral,days,float,The time constant in decentralized thermal energy storage (TES) --- central,days,float,The time constant in centralized thermal energy storage (TES) -boilers,--,"{true, false}",Add option for transforming gas into heat using gas boilers -resistive_heaters,--,"{true, false}",Add option for transforming electricity into heat using resistive heaters (independently from gas boilers) -oil_boilers,--,"{true, false}",Add option for transforming oil into heat using boilers -biomass_boiler,--,"{true, false}",Add option for transforming biomass into heat using boilers -overdimension_individual_heating,--,"float",Add option for overdimensioning individual heating systems by a certain factor. This allows them to cover heat demand peaks e.g. 10% higher than those in the data with a setting of 1.1. -chp,--,"{true, false}",Add option for using Combined Heat and Power (CHP) -micro_chp,--,"{true, false}",Add option for using Combined Heat and Power (CHP) for decentral areas. -solar_thermal,--,"{true, false}",Add option for using solar thermal to generate heat. -solar_cf_correction,--,float,The correction factor for the value provided by the solar thermal profile calculations -marginal_cost_storage,currency/MWh ,float,The marginal cost of discharging batteries in distributed grids -methanation,--,"{true, false}",Add option for transforming hydrogen and CO2 into methane using methanation. -coal_cc,--,"{true, false}",Add option for coal CHPs with carbon capture -dac,--,"{true, false}",Add option for Direct Air Capture (DAC) -co2_vent,--,"{true, false}",Add option for vent out CO2 from storages to the atmosphere. -allam_cycle,--,"{true, false}",Add option to include `Allam cycle gas power plants `_ -hydrogen_fuel_cell,--,"{true, false}",Add option to include hydrogen fuel cell for re-electrification. Assuming OCGT technology costs -hydrogen_turbine,--,"{true, false}",Add option to include hydrogen turbine for re-electrification. Assuming OCGT technology costs -SMR,--,"{true, false}",Add option for transforming natural gas into hydrogen and CO2 using Steam Methane Reforming (SMR) -SMR CC,--,"{true, false}",Add option for transforming natural gas into hydrogen and CO2 using Steam Methane Reforming (SMR) and Carbon Capture (CC) -regional_methanol_demand,--,"{true, false}",Spatially resolve methanol demand. Set to true if regional CO2 constraints needed. -regional_oil_demand,--,"{true, false}",Spatially resolve oil demand. Set to true if regional CO2 constraints needed. -regional_co2 _sequestration_potential,,, --- enable,--,"{true, false}",Add option for regionally-resolved geological carbon dioxide sequestration potentials based on `CO2StoP `_. --- attribute,--,string or list,Name (or list of names) of the attribute(s) for the sequestration potential --- include_onshore,--,"{true, false}",Add options for including onshore sequestration potentials --- min_size,Gt ,float,Any sites with lower potential than this value will be excluded --- max_size,Gt ,float,The maximum sequestration potential for any one site. --- years_of_storage,years,float,The years until potential exhausted at optimised annual rate -co2_sequestration_potential,MtCO2/a,float,The potential of sequestering CO2 in Europe per year -co2_sequestration_cost,currency/tCO2,float,The cost of sequestering a ton of CO2 -co2_sequestration_lifetime,years,int,The lifetime of a CO2 sequestration site -co2_spatial,--,"{true, false}","Add option to spatially resolve carrier representing stored carbon dioxide. This allows for more detailed modelling of CCUTS, e.g. regarding the capturing of industrial process emissions, usage as feedstock for electrofuels, transport of carbon dioxide, and geological sequestration sites." -,,, -co2network,--,"{true, false}",Add option for planning a new carbon dioxide transmission network -co2_network_cost_factor,p.u.,float,The cost factor for the capital cost of the carbon dioxide transmission network -,,, -cc_fraction,--,float,The default fraction of CO2 captured with post-combustion capture -hydrogen_underground _storage,--,"{true, false}",Add options for storing hydrogen underground. Storage potential depends regionally. -hydrogen_underground _storage_locations,,"{onshore, nearshore, offshore}","The location where hydrogen underground storage can be located. Onshore, nearshore, offshore means it must be located more than 50 km away from the sea, within 50 km of the sea, or within the sea itself respectively." -,,, -ammonia,--,"{true, false, regional}","Add ammonia as a carrrier. It can be either true (copperplated NH3), false (no NH3 carrier) or ""regional"" (regionalised NH3 without network)" -min_part_load_fischer _tropsch,per unit of p_nom ,float,The minimum unit dispatch (``p_min_pu``) for the Fischer-Tropsch process -min_part_load _methanolisation,per unit of p_nom ,float,The minimum unit dispatch (``p_min_pu``) for the methanolisation process -,,, -use_fischer_tropsch _waste_heat,--,"{true, false}",Add option for using waste heat of Fischer Tropsch in district heating networks -use_fuel_cell_waste_heat,--,"{true, false}",Add option for using waste heat of fuel cells in district heating networks -use_electrolysis_waste _heat,--,"{true, false}",Add option for using waste heat of electrolysis in district heating networks -electricity_transmission _grid,--,"{true, false}",Switch for enabling/disabling the electricity transmission grid. -electricity_distribution _grid,--,"{true, false}",Add a simplified representation of the exchange capacity between transmission and distribution grid level through a link. -electricity_distribution _grid_cost_factor,,,Multiplies the investment cost of the electricity distribution grid -,,, -electricity_grid _connection,--,"{true, false}",Add the cost of electricity grid connection for onshore wind and solar -transmission_efficiency,,,Section to specify transmission losses or compression energy demands of bidirectional links. Splits them into two capacity-linked unidirectional links. --- {carrier},--,str,The carrier of the link. --- -- efficiency_static,p.u.,float,Length-independent transmission efficiency. --- -- efficiency_per_1000km,p.u. per 1000 km,float,Length-dependent transmission efficiency ($\eta^{\text{length}}$) --- -- compression_per_1000km,p.u. per 1000 km,float,Length-dependent electricity demand for compression ($\eta \cdot \text{length}$) implemented as multi-link to local electricity bus. -H2_network,--,"{true, false}",Add option for new hydrogen pipelines -gas_network,--,"{true, false}","Add existing natural gas infrastructure, incl. LNG terminals, production and entry-points. The existing gas network is added with a lossless transport model. A length-weighted `k-edge augmentation algorithm `_ can be run to add new candidate gas pipelines such that all regions of the model can be connected to the gas network. When activated, all the gas demands are regionally disaggregated as well." -H2_retrofit,--,"{true, false}",Add option for retrofiting existing pipelines to transport hydrogen. -H2_retrofit_capacity _per_CH4,--,float,"The ratio for H2 capacity per original CH4 capacity of retrofitted pipelines. The `European Hydrogen Backbone (April, 2020) p.15 `_ 60% of original natural gas capacity could be used in cost-optimal case as H2 capacity." -gas_network_connectivity _upgrade ,--,float,The number of desired edge connectivity (k) in the length-weighted `k-edge augmentation algorithm `_ used for the gas network -gas_distribution_grid,--,"{true, false}",Add a gas distribution grid -gas_distribution_grid _cost_factor,,,Multiplier for the investment cost of the gas distribution grid -,,, -biomass_spatial,--,"{true, false}",Add option for resolving biomass demand regionally -biomass_transport,--,"{true, false}",Add option for transporting solid biomass between nodes -biogas_upgrading_cc,--,"{true, false}",Add option to capture CO2 from biomass upgrading -conventional_generation,,,Add a more detailed description of conventional carriers. Any power generation requires the consumption of fuel from nodes representing that fuel. -biomass_to_liquid,--,"{true, false}",Add option for transforming solid biomass into liquid fuel with the same properties as oil -biosng,--,"{true, false}",Add option for transforming solid biomass into synthesis gas with the same properties as natural gas -limit_max_growth,,, --- enable,--,"{true, false}",Add option to limit the maximum growth of a carrier --- factor,p.u.,float,The maximum growth factor of a carrier (e.g. 1.3 allows 30% larger than max historic growth) --- max_growth,,, --- -- {carrier},GW,float,The historic maximum growth of a carrier --- max_relative_growth,,, --- -- {carrier},p.u.,float,The historic maximum relative growth of a carrier -,,, -enhanced_geothermal,,, --- enable,--,"{true, false}",Add option to include Enhanced Geothermal Systems --- flexible,--,"{true, false}",Add option for flexible operation (see Ricks et al. 2024) --- max_hours,--,int,The maximum hours the reservoir can be charged under flexible operation --- max_boost,--,float,The maximum boost in power output under flexible operation --- var_cf,--,"{true, false}",Add option for variable capacity factor (see Ricks et al. 2024) --- sustainability_factor,--,float,Share of sourced heat that is replenished by the earth's core (see details in `build_egs_potentials.py `_) +,Unit,Values,Description +transport,--,"{true, false}",Flag to include transport sector. +heating,--,"{true, false}",Flag to include heating sector. +biomass,--,"{true, false}",Flag to include biomass sector. +industry,--,"{true, false}",Flag to include industry sector. +agriculture,--,"{true, false}",Flag to include agriculture sector. +district_heating,--,,`prepare_sector_network.py `_ +-- potential,--,float,maximum fraction of urban demand which can be supplied by district heating +-- progress,--,Dictionary with planning horizons as keys., Increase of today's district heating demand to potential maximum district heating share. Progress = 0 means today's district heating share. Progress = 1 means maximum fraction of urban demand is supplied by district heating +-- district_heating_loss,--,float,Share increase in district heat demand in urban central due to heat losses +cluster_heat_buses,--,"{true, false}",Cluster residential and service heat buses in `prepare_sector_network.py `_ to one to save memory. +,,, +bev_dsm_restriction _value,--,float,Adds a lower state of charge (SOC) limit for battery electric vehicles (BEV) to manage its own energy demand (DSM). Located in `build_transport_demand.py `_. Set to 0 for no restriction on BEV DSM +bev_dsm_restriction _time,--,float,Time at which SOC of BEV has to be dsm_restriction_value +transport_heating _deadband_upper,°C,float,"The maximum temperature in the vehicle. At higher temperatures, the energy required for cooling in the vehicle increases." +transport_heating _deadband_lower,°C,float,"The minimum temperature in the vehicle. At lower temperatures, the energy required for heating in the vehicle increases." +,,, +ICE_lower_degree_factor,--,float,Share increase in energy demand in internal combustion engine (ICE) for each degree difference between the cold environment and the minimum temperature. +ICE_upper_degree_factor,--,float,Share increase in energy demand in internal combustion engine (ICE) for each degree difference between the hot environment and the maximum temperature. +EV_lower_degree_factor,--,float,Share increase in energy demand in electric vehicles (EV) for each degree difference between the cold environment and the minimum temperature. +EV_upper_degree_factor,--,float,Share increase in energy demand in electric vehicles (EV) for each degree difference between the hot environment and the maximum temperature. +bev_dsm,--,"{true, false}",Add the option for battery electric vehicles (BEV) to participate in demand-side management (DSM) +,,, +bev_availability,--,float,The share for battery electric vehicles (BEV) that are able to do demand side management (DSM) +bev_energy,--,float,The average size of battery electric vehicles (BEV) in MWh +bev_charge_efficiency,--,float,Battery electric vehicles (BEV) charge and discharge efficiency +bev_charge_rate,MWh,float,The power consumption for one electric vehicle (EV) in MWh. Value derived from 3-phase charger with 11 kW. +bev_avail_max,--,float,The maximum share plugged-in availability for passenger electric vehicles. +bev_avail_mean,--,float,The average share plugged-in availability for passenger electric vehicles. +v2g,--,"{true, false}",Allows feed-in to grid from EV battery +land_transport_fuel_cell _share,--,Dictionary with planning horizons as keys.,The share of vehicles that uses fuel cells in a given year +land_transport_electric _share,--,Dictionary with planning horizons as keys.,The share of vehicles that uses electric vehicles (EV) in a given year +land_transport_ice _share,--,Dictionary with planning horizons as keys.,The share of vehicles that uses internal combustion engines (ICE) in a given year. What is not EV or FCEV is oil-fuelled ICE. +transport_electric_efficiency,MWh/100km,float,The conversion efficiencies of electric vehicles in transport +transport_fuel_cell_efficiency,MWh/100km,float,The H2 conversion efficiencies of fuel cells in transport +transport_ice_efficiency,MWh/100km,float,The oil conversion efficiencies of internal combustion engine (ICE) in transport +agriculture_machinery _electric_share,--,float,The share for agricultural machinery that uses electricity +agriculture_machinery _oil_share,--,float,The share for agricultural machinery that uses oil +agriculture_machinery _fuel_efficiency,--,float,The efficiency of electric-powered machinery in the conversion of electricity to meet agricultural needs. +agriculture_machinery _electric_efficiency,--,float,The efficiency of oil-powered machinery in the conversion of oil to meet agricultural needs. +Mwh_MeOH_per_MWh_H2,LHV,float,"The energy amount of the produced methanol per energy amount of hydrogen. From `DECHEMA (2017) `_, page 64." +MWh_MeOH_per_tCO2,LHV,float,"The energy amount of the produced methanol per ton of CO2. From `DECHEMA (2017) `_, page 66." +MWh_MeOH_per_MWh_e,LHV,float,"The energy amount of the produced methanol per energy amount of electricity. From `DECHEMA (2017) `_, page 64." +shipping_hydrogen _liquefaction,--,"{true, false}",Whether to include liquefaction costs for hydrogen demand in shipping. +,,, +shipping_hydrogen_share,--,Dictionary with planning horizons as keys.,The share of ships powered by hydrogen in a given year +shipping_methanol_share,--,Dictionary with planning horizons as keys.,The share of ships powered by methanol in a given year +shipping_oil_share,--,Dictionary with planning horizons as keys.,The share of ships powered by oil in a given year +shipping_methanol _efficiency,--,float,The efficiency of methanol-powered ships in the conversion of methanol to meet shipping needs (propulsion). The efficiency increase from oil can be 10-15% higher according to the `IEA `_ +,,, +shipping_oil_efficiency,--,float,The efficiency of oil-powered ships in the conversion of oil to meet shipping needs (propulsion). Base value derived from 2011 +aviation_demand_factor,--,float,The proportion of demand for aviation compared to today's consumption +HVC_demand_factor,--,float,The proportion of demand for high-value chemicals compared to today's consumption +,,, +time_dep_hp_cop,--,"{true, false}",Consider the time dependent coefficient of performance (COP) of the heat pump +heat_pump_sink_T,°C,float,The temperature heat sink used in heat pumps based on DTU / large area radiators. The value is conservatively high to cover hot water and space heating in poorly-insulated buildings +reduce_space_heat _exogenously,--,"{true, false}",Influence on space heating demand by a certain factor (applied before losses in district heating). +reduce_space_heat _exogenously_factor,--,Dictionary with planning horizons as keys.,"A positive factor can mean renovation or demolition of a building. If the factor is negative, it can mean an increase in floor area, increased thermal comfort, population growth. The default factors are determined by the `Eurocalc Homes and buildings decarbonization scenario `_" +retrofitting,,, +-- retro_endogen,--,"{true, false}",Add retrofitting as an endogenous system which co-optimise space heat savings. +-- cost_factor,--,float,Weight costs for building renovation +-- interest_rate,--,float,The interest rate for investment in building components +-- annualise_cost,--,"{true, false}",Annualise the investment costs of retrofitting +-- tax_weighting,--,"{true, false}",Weight the costs of retrofitting depending on taxes in countries +-- construction_index,--,"{true, false}",Weight the costs of retrofitting depending on labour/material costs per country +tes,--,"{true, false}",Add option for storing thermal energy in large water pits associated with district heating systems and individual thermal energy storage (TES) +tes_tau,,,The time constant used to calculate the decay of thermal energy in thermal energy storage (TES): 1- :math:`e^{-1/24τ}`. +-- decentral,days,float,The time constant in decentralized thermal energy storage (TES) +-- central,days,float,The time constant in centralized thermal energy storage (TES) +boilers,--,"{true, false}",Add option for transforming gas into heat using gas boilers +resistive_heaters,--,"{true, false}",Add option for transforming electricity into heat using resistive heaters (independently from gas boilers) +oil_boilers,--,"{true, false}",Add option for transforming oil into heat using boilers +biomass_boiler,--,"{true, false}",Add option for transforming biomass into heat using boilers +overdimension_individual_heating,--,float,Add option for overdimensioning individual heating systems by a certain factor. This allows them to cover heat demand peaks e.g. 10% higher than those in the data with a setting of 1.1. +chp,--,"{true, false}",Add option for using Combined Heat and Power (CHP) +micro_chp,--,"{true, false}",Add option for using Combined Heat and Power (CHP) for decentral areas. +solar_thermal,--,"{true, false}",Add option for using solar thermal to generate heat. +solar_cf_correction,--,float,The correction factor for the value provided by the solar thermal profile calculations +marginal_cost_storage,currency/MWh ,float,The marginal cost of discharging batteries in distributed grids +methanation,--,"{true, false}",Add option for transforming hydrogen and CO2 into methane using methanation. +coal_cc,--,"{true, false}",Add option for coal CHPs with carbon capture +dac,--,"{true, false}",Add option for Direct Air Capture (DAC) +co2_vent,--,"{true, false}",Add option for vent out CO2 from storages to the atmosphere. +allam_cycle,--,"{true, false}",Add option to include `Allam cycle gas power plants `_ +hydrogen_fuel_cell,--,"{true, false}",Add option to include hydrogen fuel cell for re-electrification. Assuming OCGT technology costs +hydrogen_turbine,--,"{true, false}",Add option to include hydrogen turbine for re-electrification. Assuming OCGT technology costs +SMR,--,"{true, false}",Add option for transforming natural gas into hydrogen and CO2 using Steam Methane Reforming (SMR) +SMR CC,--,"{true, false}",Add option for transforming natural gas into hydrogen and CO2 using Steam Methane Reforming (SMR) and Carbon Capture (CC) +regional_methanol_demand,--,"{true, false}",Spatially resolve methanol demand. Set to true if regional CO2 constraints needed. +regional_oil_demand,--,"{true, false}",Spatially resolve oil demand. Set to true if regional CO2 constraints needed. +regional_co2 _sequestration_potential,,, +-- enable,--,"{true, false}",Add option for regionally-resolved geological carbon dioxide sequestration potentials based on `CO2StoP `_. +-- attribute,--,string or list,Name (or list of names) of the attribute(s) for the sequestration potential +-- include_onshore,--,"{true, false}",Add options for including onshore sequestration potentials +-- min_size,Gt ,float,Any sites with lower potential than this value will be excluded +-- max_size,Gt ,float,The maximum sequestration potential for any one site. +-- years_of_storage,years,float,The years until potential exhausted at optimised annual rate +co2_sequestration_potential,MtCO2/a,float,The potential of sequestering CO2 in Europe per year +co2_sequestration_cost,currency/tCO2,float,The cost of sequestering a ton of CO2 +co2_sequestration_lifetime,years,int,The lifetime of a CO2 sequestration site +co2_spatial,--,"{true, false}","Add option to spatially resolve carrier representing stored carbon dioxide. This allows for more detailed modelling of CCUTS, e.g. regarding the capturing of industrial process emissions, usage as feedstock for electrofuels, transport of carbon dioxide, and geological sequestration sites." +,,, +co2network,--,"{true, false}",Add option for planning a new carbon dioxide transmission network +co2_network_cost_factor,p.u.,float,The cost factor for the capital cost of the carbon dioxide transmission network +,,, +cc_fraction,--,float,The default fraction of CO2 captured with post-combustion capture +hydrogen_underground _storage,--,"{true, false}",Add options for storing hydrogen underground. Storage potential depends regionally. +hydrogen_underground _storage_locations,,"{onshore, nearshore, offshore}","The location where hydrogen underground storage can be located. Onshore, nearshore, offshore means it must be located more than 50 km away from the sea, within 50 km of the sea, or within the sea itself respectively." +,,, +ammonia,--,"{true, false, regional}","Add ammonia as a carrrier. It can be either true (copperplated NH3), false (no NH3 carrier) or ""regional"" (regionalised NH3 without network)" +min_part_load_fischer _tropsch,per unit of p_nom ,float,The minimum unit dispatch (``p_min_pu``) for the Fischer-Tropsch process +min_part_load _methanolisation,per unit of p_nom ,float,The minimum unit dispatch (``p_min_pu``) for the methanolisation process +,,, +use_fischer_tropsch _waste_heat,--,"{true, false}",Add option for using waste heat of Fischer Tropsch in district heating networks +use_fuel_cell_waste_heat,--,"{true, false}",Add option for using waste heat of fuel cells in district heating networks +use_electrolysis_waste _heat,--,"{true, false}",Add option for using waste heat of electrolysis in district heating networks +electricity_transmission _grid,--,"{true, false}",Switch for enabling/disabling the electricity transmission grid. +electricity_distribution _grid,--,"{true, false}",Add a simplified representation of the exchange capacity between transmission and distribution grid level through a link. +electricity_distribution _grid_cost_factor,,,Multiplies the investment cost of the electricity distribution grid +,,, +electricity_grid _connection,--,"{true, false}",Add the cost of electricity grid connection for onshore wind and solar +transmission_efficiency,,,Section to specify transmission losses or compression energy demands of bidirectional links. Splits them into two capacity-linked unidirectional links. +-- {carrier},--,str,The carrier of the link. +-- -- efficiency_static,p.u.,float,Length-independent transmission efficiency. +-- -- efficiency_per_1000km,p.u. per 1000 km,float,Length-dependent transmission efficiency ($\eta^{\text{length}}$) +-- -- compression_per_1000km,p.u. per 1000 km,float,Length-dependent electricity demand for compression ($\eta \cdot \text{length}$) implemented as multi-link to local electricity bus. +H2_network,--,"{true, false}",Add option for new hydrogen pipelines +gas_network,--,"{true, false}","Add existing natural gas infrastructure, incl. LNG terminals, production and entry-points. The existing gas network is added with a lossless transport model. A length-weighted `k-edge augmentation algorithm `_ can be run to add new candidate gas pipelines such that all regions of the model can be connected to the gas network. When activated, all the gas demands are regionally disaggregated as well." +H2_retrofit,--,"{true, false}",Add option for retrofiting existing pipelines to transport hydrogen. +H2_retrofit_capacity _per_CH4,--,float,"The ratio for H2 capacity per original CH4 capacity of retrofitted pipelines. The `European Hydrogen Backbone (April, 2020) p.15 `_ 60% of original natural gas capacity could be used in cost-optimal case as H2 capacity." +gas_network_connectivity _upgrade ,--,float,The number of desired edge connectivity (k) in the length-weighted `k-edge augmentation algorithm `_ used for the gas network +gas_distribution_grid,--,"{true, false}",Add a gas distribution grid +gas_distribution_grid _cost_factor,,,Multiplier for the investment cost of the gas distribution grid +,,, +biomass_spatial,--,"{true, false}",Add option for resolving biomass demand regionally +biomass_transport,--,"{true, false}",Add option for transporting solid biomass between nodes +biogas_upgrading_cc,--,"{true, false}",Add option to capture CO2 from biomass upgrading +conventional_generation,,,Add a more detailed description of conventional carriers. Any power generation requires the consumption of fuel from nodes representing that fuel. +biomass_to_liquid,--,"{true, false}",Add option for transforming solid biomass into liquid fuel with the same properties as oil +biosng,--,"{true, false}",Add option for transforming solid biomass into synthesis gas with the same properties as natural gas +limit_max_growth,,, +-- enable,--,"{true, false}",Add option to limit the maximum growth of a carrier +-- factor,p.u.,float,The maximum growth factor of a carrier (e.g. 1.3 allows 30% larger than max historic growth) +-- max_growth,,, +-- -- {carrier},GW,float,The historic maximum growth of a carrier +-- max_relative_growth,,, +-- -- {carrier},p.u.,float,The historic maximum relative growth of a carrier +,,, +enhanced_geothermal,,, +-- enable,--,"{true, false}",Add option to include Enhanced Geothermal Systems +-- flexible,--,"{true, false}",Add option for flexible operation (see Ricks et al. 2024) +-- max_hours,--,int,The maximum hours the reservoir can be charged under flexible operation +-- max_boost,--,float,The maximum boost in power output under flexible operation +-- var_cf,--,"{true, false}",Add option for variable capacity factor (see Ricks et al. 2024) +-- sustainability_factor,--,float,Share of sourced heat that is replenished by the earth's core (see details in `build_egs_potentials.py `_) +solid_biomass_import,,, +-- enable,--,"{true, false}",Add option to include solid biomass imports +-- price,currency/MWh,float,Price for importing solid biomass +-- max_amount,Twh,float,Maximum solid biomass import potential +-- upstream_emissions_factor,p.u.,float,Upstream emissions of solid biomass imports From 440f3e4a7f6cea53585d41f129dc4b9d08e68901 Mon Sep 17 00:00:00 2001 From: lisazeyen Date: Fri, 2 Aug 2024 15:26:32 +0200 Subject: [PATCH 26/28] add release notes --- doc/release_notes.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/release_notes.rst b/doc/release_notes.rst index 4293541b..d2453bb1 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -10,7 +10,9 @@ Release Notes Upcoming Release ================ -* Add option to produce electrobiofuels from solid biomass and hydrogen, as a combination of BtL and Fischer-Tropsch to make more use of the biogenic carbon +* Add option to import solid biomass + +* Add option to produce electrobiofuels (flag ``electrobiofuels`) from solid biomass and hydrogen, as a combination of BtL and Fischer-Tropsch to make more use of the biogenic carbon * Add flag ``sector: fossil_fuels`` in config to remove the option of importing fossil fuels From e28c66e43c03476470e7d425c80536993b632aa0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 2 Aug 2024 13:27:40 +0000 Subject: [PATCH 27/28] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/prepare_sector_network.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index a3de3f20..09055525 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2295,15 +2295,16 @@ def add_biomass(n, costs): biomass_import_price = options["solid_biomass_import"]["price"] # convert TWh in MWh biomass_import_max_amount = options["solid_biomass_import"]["max_amount"] * 1e6 - biomass_import_upstream_emissions = options["solid_biomass_import"]["upstream_emissions_factor"] - + biomass_import_upstream_emissions = options["solid_biomass_import"][ + "upstream_emissions_factor" + ] + logger.info( - "Adding biomass import with cost %.2f EUR/MWh, a limit of %.2f TWh, and embedded emissions of %.2f%%", - biomass_import_price, - options["solid_biomass_import"]["max_amount"], - biomass_import_upstream_emissions * 100 + "Adding biomass import with cost %.2f EUR/MWh, a limit of %.2f TWh, and embedded emissions of %.2f%%", + biomass_import_price, + options["solid_biomass_import"]["max_amount"], + biomass_import_upstream_emissions * 100, ) - n.add("Carrier", "solid biomass import") @@ -2333,7 +2334,8 @@ def add_biomass(n, costs): bus2="co2 atmosphere", carrier="solid biomass import", efficiency=1.0, - efficiency2=biomass_import_upstream_emissions* costs.at["solid biomass", "CO2 intensity"], + efficiency2=biomass_import_upstream_emissions + * costs.at["solid biomass", "CO2 intensity"], p_nom_extendable=True, ) From ddf0da2687a541c9147c9293744b706352cc69fd Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Sun, 4 Aug 2024 16:01:51 +0200 Subject: [PATCH 28/28] base_network: bugfix - bring voronoi cells in correct order --- scripts/base_network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/base_network.py b/scripts/base_network.py index 118e7dba..8172b332 100644 --- a/scripts/base_network.py +++ b/scripts/base_network.py @@ -808,7 +808,7 @@ def voronoi(points, outline, crs=4326): voronoi = gpd.GeoDataFrame(geometry=voronoi) joined = gpd.sjoin_nearest(pts, voronoi, how="right") - return joined.dissolve(by="Bus").squeeze() + return joined.dissolve(by="Bus").reindex(points.index).squeeze() def build_bus_shapes(n, country_shapes, offshore_shapes, countries):