From 527c77824c8eba0695327fb60b9cff23df0d3744 Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Thu, 5 Jan 2023 16:41:49 +0100 Subject: [PATCH 1/6] allow carbon capture in biogas upgrading (closes #49) --- scripts/prepare_sector_network.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index b6c052be..540b3f23 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -1874,10 +1874,12 @@ def add_biomass(n, costs): bus0=spatial.gas.biogas, bus1=spatial.gas.nodes, bus2="co2 atmosphere", + bus3="co2 stored", carrier="biogas to gas", capital_cost=costs.loc["biogas upgrading", "fixed"], marginal_cost=costs.loc["biogas upgrading", "VOM"], efficiency2=-costs.at['gas', 'CO2 intensity'], + efficiency3=costs.at["biogas", "CO2 stored"], p_nom_extendable=True ) From fd81058008b3532ecba0145e60541bea5e08f343 Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Tue, 2 Jan 2024 18:35:10 +0100 Subject: [PATCH 2/6] add VOM of PtX processes (closes #747) --- doc/release_notes.rst | 2 ++ scripts/prepare_sector_network.py | 20 +++++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/doc/release_notes.rst b/doc/release_notes.rst index c319bce9..494abde1 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -44,6 +44,8 @@ Upcoming Release network has been moved from ``focus_weights:`` to ``clustering: focus_weights:``. Backwards compatibility to old config files is maintained. +* Add VOM as marginal cost to PtX processes. + * The ``mock_snakemake`` function can now be used with a Snakefile from a different directory using the new ``root_dir`` argument. * Merged option to extend geographical scope to Ukraine and Moldova. These diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 1dc2b3ef..8620d240 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -813,6 +813,7 @@ def add_ammonia(n, costs): efficiency2=-cf_industry["MWh_H2_per_tNH3_electrolysis"] / cf_industry["MWh_elec_per_tNH3_electrolysis"], # input: MW_H2 per MW_elec capital_cost=costs.at["Haber-Bosch", "fixed"] / MWh_elec_per_MWh_NH3, + marginal_cost=costs.at["Haber-Bosch", "VOM"] / MWh_elec_per_MWh_NH3, lifetime=costs.at["Haber-Bosch", "lifetime"], ) @@ -1023,7 +1024,7 @@ def insert_gas_distribution_costs(n, costs): f"Inserting gas distribution grid with investment cost factor of {f_costs}" ) - capital_cost = costs.loc["electricity distribution grid"]["fixed"] * f_costs + capital_cost = costs.at["electricity distribution grid", "fixed"] * f_costs # gas boilers gas_b = n.links.index[ @@ -1100,6 +1101,7 @@ def add_storage_and_grids(n, costs): efficiency=costs.at["OCGT", "efficiency"], capital_cost=costs.at["OCGT", "fixed"] * costs.at["OCGT", "efficiency"], # NB: fixed cost is per MWel + marginal_cost=costs.at["OCGT", "VOM"], lifetime=costs.at["OCGT", "lifetime"], ) @@ -2168,8 +2170,8 @@ def add_biomass(n, costs): bus1=spatial.gas.nodes, bus2="co2 atmosphere", carrier="biogas to gas", - capital_cost=costs.loc["biogas upgrading", "fixed"], - marginal_cost=costs.loc["biogas upgrading", "VOM"], + capital_cost=costs.at["biogas upgrading", "fixed"], + marginal_cost=costs.at["biogas upgrading", "VOM"], efficiency2=-costs.at["gas", "CO2 intensity"], p_nom_extendable=True, ) @@ -2318,7 +2320,7 @@ def add_biomass(n, costs): + costs.at["BtL", "CO2 stored"], p_nom_extendable=True, capital_cost=costs.at["BtL", "fixed"], - marginal_cost=costs.at["BtL", "efficiency"] * costs.loc["BtL", "VOM"], + marginal_cost=costs.at["BtL", "efficiency"] * costs.at["BtL", "VOM"], ) # TODO: Update with energy penalty @@ -2339,7 +2341,7 @@ def add_biomass(n, costs): p_nom_extendable=True, capital_cost=costs.at["BtL", "fixed"] + costs.at["biomass CHP capture", "fixed"] * costs.at["BtL", "CO2 stored"], - marginal_cost=costs.at["BtL", "efficiency"] * costs.loc["BtL", "VOM"], + marginal_cost=costs.at["BtL", "efficiency"] * costs.at["BtL", "VOM"], ) # BioSNG from solid biomass @@ -2358,7 +2360,7 @@ def add_biomass(n, costs): + costs.at["BioSNG", "CO2 stored"], p_nom_extendable=True, capital_cost=costs.at["BioSNG", "fixed"], - marginal_cost=costs.at["BioSNG", "efficiency"] * costs.loc["BioSNG", "VOM"], + marginal_cost=costs.at["BioSNG", "efficiency"] * costs.at["BioSNG", "VOM"], ) # TODO: Update with energy penalty for CC @@ -2382,7 +2384,7 @@ def add_biomass(n, costs): capital_cost=costs.at["BioSNG", "fixed"] + costs.at["biomass CHP capture", "fixed"] * costs.at["BioSNG", "CO2 stored"], - marginal_cost=costs.at["BioSNG", "efficiency"] * costs.loc["BioSNG", "VOM"], + marginal_cost=costs.at["BioSNG", "efficiency"] * costs.at["BioSNG", "VOM"], ) @@ -2615,6 +2617,8 @@ def add_industry(n, costs): p_min_pu=options.get("min_part_load_methanolisation", 0), capital_cost=costs.at["methanolisation", "fixed"] * options["MWh_MeOH_per_MWh_H2"], # EUR/MW_H2/a + marginal_cost=options["MWh_MeOH_per_MWh_H2"] + * costs.at["methanolisation", "VOM"], lifetime=costs.at["methanolisation", "lifetime"], efficiency=options["MWh_MeOH_per_MWh_H2"], efficiency2=-options["MWh_MeOH_per_MWh_H2"] / options["MWh_MeOH_per_MWh_e"], @@ -2732,6 +2736,8 @@ def add_industry(n, costs): efficiency=costs.at["Fischer-Tropsch", "efficiency"], capital_cost=costs.at["Fischer-Tropsch", "fixed"] * costs.at["Fischer-Tropsch", "efficiency"], # EUR/MW_H2/a + marginal_cost=costs.at["Fischer-Tropsch", "efficiency"] + * costs.at["Fischer-Tropsch", "VOM"], efficiency2=-costs.at["oil", "CO2 intensity"] * costs.at["Fischer-Tropsch", "efficiency"], p_nom_extendable=True, From 6714858e177ca9a040862906e9b326ce22ecca6a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 2 Jan 2024 17:47:46 +0000 Subject: [PATCH 3/6] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/prepare_sector_network.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 139e4836..62bca811 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2163,7 +2163,6 @@ def add_biomass(n, costs): e_initial=solid_biomass_potentials_spatial, ) - n.madd( "Link", spatial.gas.biogas_to_gas, @@ -2178,10 +2177,9 @@ def add_biomass(n, costs): efficiency=costs.at["biogas", "efficiency"], efficiency2=-costs.at["gas", "CO2 intensity"], efficiency3=costs.at["biogas", "CO2 stored"], - p_nom_extendable=True + p_nom_extendable=True, ) - if options.get("biomass_upgrading_cc"): # Assuming for costs that the CO2 from upgrading is pure, such as in amine scrubbing. I.e., with and without CC is # equivalent. Adding biomass CHP capture because biogas is often small-scale and decentral so further From 9884dee7a0737aa2eca00e60828659b02fa0cecc Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Tue, 2 Jan 2024 18:48:52 +0100 Subject: [PATCH 4/6] remove biogas upgrading CC in normal link --- scripts/prepare_sector_network.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 139e4836..1d6e4ab0 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2170,14 +2170,12 @@ def add_biomass(n, costs): bus0=spatial.gas.biogas, bus1=spatial.gas.nodes, bus2="co2 atmosphere", - bus3="co2 stored", carrier="biogas to gas", capital_cost=costs.at["biogas", "fixed"] + costs.at["biogas upgrading", "fixed"], marginal_cost=costs.at["biogas upgrading", "VOM"], efficiency=costs.at["biogas", "efficiency"], efficiency2=-costs.at["gas", "CO2 intensity"], - efficiency3=costs.at["biogas", "CO2 stored"], p_nom_extendable=True ) From b0cca00b7088767e46806dcebd64800d73247d42 Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Tue, 2 Jan 2024 18:51:03 +0100 Subject: [PATCH 5/6] add documentation and release note for biogas upgrading CC --- config/config.default.yaml | 2 ++ doc/configtables/sector.csv | 1 + doc/release_notes.rst | 2 ++ 3 files changed, 5 insertions(+) diff --git a/config/config.default.yaml b/config/config.default.yaml index 37664ad6..dd36f1d8 100644 --- a/config/config.default.yaml +++ b/config/config.default.yaml @@ -497,6 +497,7 @@ sector: gas_distribution_grid_cost_factor: 1.0 biomass_spatial: false biomass_transport: false + biomass_upgrading_cc: false conventional_generation: OCGT: gas biomass_to_liquid: false @@ -778,6 +779,7 @@ plotting: fossil gas: '#e05b09' natural gas: '#e05b09' biogas to gas: '#e36311' + biogas to gas CC: '#e51245' CCGT: '#a85522' CCGT marginal: '#a85522' allam: '#B98F76' diff --git a/doc/configtables/sector.csv b/doc/configtables/sector.csv index 856ea074..890b448c 100644 --- a/doc/configtables/sector.csv +++ b/doc/configtables/sector.csv @@ -118,6 +118,7 @@ gas_distribution_grid _cost_factor,,,Multiplier for the investment cost of the g ,,, biomass_spatial,--,"{true, false}",Add option for resolving biomass demand regionally biomass_transport,--,"{true, false}",Add option for transporting solid biomass between nodes +biomass_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 diff --git a/doc/release_notes.rst b/doc/release_notes.rst index c319bce9..cfb67d77 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -46,6 +46,8 @@ Upcoming Release * The ``mock_snakemake`` function can now be used with a Snakefile from a different directory using the new ``root_dir`` argument. +* Add option to capture CO2 contained in biogas when upgrading (``sector: biogas_to_gas_cc``). + * Merged option to extend geographical scope to Ukraine and Moldova. These countries are excluded by default and is currently constrained to power-sector only parts of the workflow. A special config file From a10a60b95139f1cead8158607fc12cb0b5c5b069 Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Tue, 2 Jan 2024 18:52:22 +0100 Subject: [PATCH 6/6] rename setting from biomass_upgrading_cc to biogas_upgrading_cc --- config/config.default.yaml | 2 +- doc/configtables/sector.csv | 2 +- scripts/prepare_sector_network.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config.default.yaml b/config/config.default.yaml index dd36f1d8..7bfd3f01 100644 --- a/config/config.default.yaml +++ b/config/config.default.yaml @@ -497,7 +497,7 @@ sector: gas_distribution_grid_cost_factor: 1.0 biomass_spatial: false biomass_transport: false - biomass_upgrading_cc: false + biogas_upgrading_cc: false conventional_generation: OCGT: gas biomass_to_liquid: false diff --git a/doc/configtables/sector.csv b/doc/configtables/sector.csv index 890b448c..280c1906 100644 --- a/doc/configtables/sector.csv +++ b/doc/configtables/sector.csv @@ -118,7 +118,7 @@ gas_distribution_grid _cost_factor,,,Multiplier for the investment cost of the g ,,, biomass_spatial,--,"{true, false}",Add option for resolving biomass demand regionally biomass_transport,--,"{true, false}",Add option for transporting solid biomass between nodes -biomass_upgrading_cc,--,"{true, false}",Add option to capture CO2 from biomass upgrading +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 diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 2f4ce271..aaaf3773 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2178,7 +2178,7 @@ def add_biomass(n, costs): p_nom_extendable=True, ) - if options.get("biomass_upgrading_cc"): + if options.get("biogas_upgrading_cc"): # Assuming for costs that the CO2 from upgrading is pure, such as in amine scrubbing. I.e., with and without CC is # equivalent. Adding biomass CHP capture because biogas is often small-scale and decentral so further # from e.g. CO2 grid or buyers. This is a proxy for the added cost for e.g. a raw biogas pipeline to a central upgrading facility