From 56f2b581bfceaf4be67bf55ea6ba76aa4dd68bc3 Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Fri, 30 Aug 2024 18:06:41 +0200 Subject: [PATCH] Add emissions and fuel consumption from fuel refinieries (#1253) * Add emissions and fuel consumption from fuel refinieries * [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> --- config/config.default.yaml | 3 ++ doc/configtables/industry.csv | 1 + doc/release_notes.rst | 3 ++ scripts/prepare_sector_network.py | 49 ++++++++++++++++++++++++++----- 4 files changed, 48 insertions(+), 8 deletions(-) diff --git a/config/config.default.yaml b/config/config.default.yaml index 2026c11f..4290760e 100644 --- a/config/config.default.yaml +++ b/config/config.default.yaml @@ -798,6 +798,7 @@ industry: MWh_MeOH_per_tMeOH: 5.528 hotmaps_locate_missing: false reference_year: 2019 + oil_refining_emissions: 0.013 # docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#costs @@ -1078,6 +1079,8 @@ plotting: gas pipeline new: '#a87c62' # oil oil: '#c9c9c9' + oil primary: '#d2d2d2' + oil refining: '#e6e6e6' imported oil: '#a3a3a3' oil boiler: '#adadad' residential rural oil boiler: '#a9a9a9' diff --git a/doc/configtables/industry.csv b/doc/configtables/industry.csv index 4187e118..fd80e804 100644 --- a/doc/configtables/industry.csv +++ b/doc/configtables/industry.csv @@ -35,3 +35,4 @@ MWh_CH4_per_tMeOH,MWhCH4/tMeOH,float,"The energy amount of methane needed to pro MWh_MeOH_per_tMeOH,LHV,float,"The energy amount per ton of methanol. From `DECHEMA (2017) `_, page 74." hotmaps_locate_missing,--,"{true,false}",Locate industrial sites without valid locations based on city and countries. reference_year,year,YYYY,The year used as the baseline for industrial energy demand and production. Data extracted from `JRC-IDEES 2015 `_ +oil_refining_emissions,tCO2/MWh,float,"The emissions from oil fuel processing (e.g. oil in petrochemical refinieries). The default value of 0.013 tCO2/MWh is based on DE statistics for 2019; the EU value is very similar." diff --git a/doc/release_notes.rst b/doc/release_notes.rst index e912da2d..0508252f 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -11,6 +11,9 @@ Release Notes Upcoming Release ================ +* Added option to specify emissions fuel processing (e.g. oil in petrochemical + refinieries) with setting ``industry: oil_refining_emissions:``. + * Bugfix for passing function arguments in rule :mod:`solve_operations_network`. * Represent Kosovo (XK) as separate country. diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 9d099e07..5f579c5d 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -573,14 +573,47 @@ 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, - bus=nodes, - p_nom_extendable=True, - carrier=carrier, - marginal_cost=costs.at[carrier, "fuel"], - ) + suffix = "" + + if carrier == "oil" and cf_industry["oil_refining_emissions"] > 0: + + n.madd( + "Bus", + nodes + " primary", + location=location, + carrier=carrier + " primary", + unit=unit, + ) + + n.madd( + "Link", + nodes + " refining", + bus0=nodes + " primary", + bus1=nodes, + bus2="co2 atmosphere", + location=location, + carrier=carrier + " refining", + p_nom=1e6, + efficiency=1 + - ( + cf_industry["oil_refining_emissions"] + / costs.at[carrier, "CO2 intensity"] + ), + efficiency2=cf_industry["oil_refining_emissions"], + ) + + suffix = " primary" + + else: + + n.madd( + "Generator", + nodes + suffix, + bus=nodes + suffix, + p_nom_extendable=True, + carrier=carrier + suffix, + marginal_cost=costs.at[carrier, "fuel"], + ) # TODO: PyPSA-Eur merge issue