diff --git a/Snakefile b/Snakefile index 9ab7d2f1..9babe249 100644 --- a/Snakefile +++ b/Snakefile @@ -189,7 +189,7 @@ rule build_industrial_production_per_country_tomorrow: input: industrial_production_per_country="resources/industrial_production_per_country.csv" output: - industrial_production_per_country_tomorrow="resources/industrial_production_per_country_tomorrow.csv" + industrial_production_per_country_tomorrow="resources/industrial_production_per_country_tomorrow_{planning_horizons}.csv" threads: 1 resources: mem_mb=1000 script: 'scripts/build_industrial_production_per_country_tomorrow.py' @@ -214,9 +214,9 @@ rule build_industrial_distribution_key: rule build_industrial_production_per_node: input: industrial_distribution_key="resources/industrial_distribution_key_elec_s{simpl}_{clusters}.csv", - industrial_production_per_country_tomorrow="resources/industrial_production_per_country_tomorrow.csv" + industrial_production_per_country_tomorrow="resources/industrial_production_per_country_tomorrow_{planning_horizons}.csv" output: - industrial_production_per_node="resources/industrial_production_elec_s{simpl}_{clusters}.csv" + industrial_production_per_node="resources/industrial_production_elec_s{simpl}_{clusters}_{planning_horizons}.csv" threads: 1 resources: mem_mb=1000 script: 'scripts/build_industrial_production_per_node.py' @@ -225,10 +225,10 @@ rule build_industrial_production_per_node: rule build_industrial_energy_demand_per_node: input: industry_sector_ratios="resources/industry_sector_ratios.csv", - industrial_production_per_node="resources/industrial_production_elec_s{simpl}_{clusters}.csv", + industrial_production_per_node="resources/industrial_production_elec_s{simpl}_{clusters}_{planning_horizons}.csv", industrial_energy_demand_per_node_today="resources/industrial_energy_demand_today_elec_s{simpl}_{clusters}.csv" output: - industrial_energy_demand_per_node="resources/industrial_energy_demand_elec_s{simpl}_{clusters}.csv" + industrial_energy_demand_per_node="resources/industrial_energy_demand_elec_s{simpl}_{clusters}_{planning_horizons}.csv" threads: 1 resources: mem_mb=1000 script: 'scripts/build_industrial_energy_demand_per_node.py' @@ -260,9 +260,9 @@ rule build_industrial_energy_demand_per_node_today: rule build_industrial_energy_demand_per_country: input: industry_sector_ratios="resources/industry_sector_ratios.csv", - industrial_production_per_country="resources/industrial_production_per_country_tomorrow.csv" + industrial_production_per_country="resources/industrial_production_per_country_tomorrow_{planning_horizons}.csv" output: - industrial_energy_demand_per_country="resources/industrial_energy_demand_per_country.csv" + industrial_energy_demand_per_country="resources/industrial_energy_demand_per_country_{planning_horizons}.csv" threads: 1 resources: mem_mb=1000 script: 'scripts/build_industrial_energy_demand_per_country.py' @@ -271,9 +271,9 @@ rule build_industrial_energy_demand_per_country: rule build_industrial_demand: input: clustered_pop_layout="resources/pop_layout_elec_s{simpl}_{clusters}.csv", - industrial_demand_per_country="resources/industrial_energy_demand_per_country.csv" + industrial_demand_per_country="resources/industrial_energy_demand_per_country_{planning_horizons}.csv" output: - industrial_demand="resources/industrial_demand_elec_s{simpl}_{clusters}.csv" + industrial_demand="resources/industrial_demand_elec_s{simpl}_{clusters}_{planning_horizons}.csv" threads: 1 resources: mem_mb=1000 script: 'scripts/build_industrial_demand.py' @@ -315,7 +315,7 @@ rule prepare_sector_network: busmap=pypsaeur("resources/busmap_elec_s{simpl}_{clusters}.csv"), clustered_pop_layout="resources/pop_layout_elec_s{simpl}_{clusters}.csv", simplified_pop_layout="resources/pop_layout_elec_s{simpl}.csv", - industrial_demand="resources/industrial_energy_demand_elec_s{simpl}_{clusters}.csv", + industrial_demand="resources/industrial_energy_demand_elec_s{simpl}_{clusters}_{planning_horizons}.csv", heat_demand_urban="resources/heat_demand_urban_elec_s{simpl}_{clusters}.nc", heat_demand_rural="resources/heat_demand_rural_elec_s{simpl}_{clusters}.nc", heat_demand_total="resources/heat_demand_total_elec_s{simpl}_{clusters}.nc", diff --git a/config.default.yaml b/config.default.yaml index 26937853..70dfc009 100644 --- a/config.default.yaml +++ b/config.default.yaml @@ -230,10 +230,32 @@ solving: mem: 30000 #memory in MB; 20 GB enough for 50+B+I+H2; 100 GB for 181+B+I+H2 industry: - 'St_primary_fraction' : 0.3 # fraction of steel produced via primary route (DRI + EAF) versus secondary route (EAF); today fraction is 0.6 + 'St_primary_fraction' : # fraction of steel produced via primary route versus secondary route (scrap+EAF); today fraction is 0.6 + 2020: 0.6 + 2025: 0.55 + 2030: 0.5 + 2035: 0.45 + 2040: 0.4 + 2045: 0.35 + 2050: 0.3 + 'DRI_fraction' : # fraction of the primary route converted to DRI + EAF + 2020: 0 + 2025: 0 + 2030: 0.05 + 2035: 0.2 + 2040: 0.4 + 2045: 0.7 + 2050: 1 'H2_DRI' : 1.7 #H2 consumption in Direct Reduced Iron (DRI), MWh_H2,LHV/ton_Steel from 51kgH2/tSt in Vogl et al (2018) doi:10.1016/j.jclepro.2018.08.279 'elec_DRI' : 0.322 #electricity consumption in Direct Reduced Iron (DRI) shaft, MWh/tSt HYBRIT brochure https://ssabwebsitecdn.azureedge.net/-/media/hybrit/files/hybrit_brochure.pdf - 'Al_primary_fraction' : 0.2 # fraction of aluminium produced via the primary route versus scrap; today fraction is 0.4 + 'Al_primary_fraction' : # fraction of aluminium produced via the primary route versus scrap; today fraction is 0.4 + 2020: 0.4 + 2025: 0.375 + 2030: 0.35 + 2035: 0.325 + 2040: 0.3 + 2045: 0.25 + 2050: 0.2 'MWh_CH4_per_tNH3_SMR' : 10.8 # 2012's demand from https://ec.europa.eu/docsroom/documents/4165/attachments/1/translations/en/renditions/pdf 'MWh_elec_per_tNH3_SMR' : 0.7 # same source, assuming 94-6% split methane-elec of total energy demand 11.5 MWh/tNH3 'MWh_H2_per_tNH3_electrolysis' : 6.5 # from https://doi.org/10.1016/j.joule.2018.04.017, around 0.197 tH2/tHN3 (>3/17 since some H2 lost and used for energy) diff --git a/doc/release_notes.rst b/doc/release_notes.rst index e5bd8d10..ebdbdd7c 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -6,7 +6,8 @@ Future release ============== * Include new features here. -The share of shipping transformed into hydrogen fuel cell can be now defined for different years in the ``config.yaml`` file. The carbon emission from the remaining share is treated as a negative load on the atmospheric carbon dioxide bus, just like aviation and land transport emissions. +* The share of shipping transformed into hydrogen fuel cell can be now defined for different years in the ``config.yaml`` file. The carbon emission from the remaining share is treated as a negative load on the atmospheric carbon dioxide bus, just like aviation and land transport emissions. +* The transformation of the Steel and Aluminium production can be now defined for different years in the ``config.yaml`` file. PyPSA-Eur-Sec 0.5.0 (21st May 2021) =================================== diff --git a/scripts/build_industrial_production_per_country_tomorrow.py b/scripts/build_industrial_production_per_country_tomorrow.py index bc66077c..4bb9fab3 100644 --- a/scripts/build_industrial_production_per_country_tomorrow.py +++ b/scripts/build_industrial_production_per_country_tomorrow.py @@ -1,23 +1,34 @@ import pandas as pd +def get_parameter(item): + """Check whether it depends on investment year""" + if type(item) is dict: + return item[investment_year] + else: + return item +investment_year=int(snakemake.wildcards.planning_horizons[-4:]) + industrial_production = pd.read_csv(snakemake.input.industrial_production_per_country, index_col=0) total_steel = industrial_production[["Integrated steelworks","Electric arc"]].sum(axis=1) -fraction_primary_stays_primary = snakemake.config["industry"]["St_primary_fraction"]*total_steel.sum()/industrial_production["Integrated steelworks"].sum() +St_primary_fraction=get_parameter(snakemake.config["industry"]["St_primary_fraction"]) +DRI_fraction=get_parameter(snakemake.config["industry"]["DRI_fraction"]) +fraction_primary_stays_primary = St_primary_fraction*total_steel.sum()/industrial_production["Integrated steelworks"].sum() industrial_production.insert(2, "DRI + Electric arc", - fraction_primary_stays_primary*industrial_production["Integrated steelworks"]) + DRI_fraction*fraction_primary_stays_primary*industrial_production["Integrated steelworks"]) -industrial_production["Electric arc"] = total_steel - industrial_production["DRI + Electric arc"] -industrial_production["Integrated steelworks"] = 0. +industrial_production["Integrated steelworks"] = (1-DRI_fraction)*fraction_primary_stays_primary*industrial_production["Integrated steelworks"] +industrial_production["Electric arc"] = total_steel - industrial_production["DRI + Electric arc"] - industrial_production["Integrated steelworks"] +Al_primary_fraction=get_parameter(snakemake.config["industry"]["Al_primary_fraction"]) total_aluminium = industrial_production[["Aluminium - primary production","Aluminium - secondary production"]].sum(axis=1) -fraction_primary_stays_primary = snakemake.config["industry"]["Al_primary_fraction"]*total_aluminium.sum()/industrial_production["Aluminium - primary production"].sum() +fraction_primary_stays_primary = Al_primary_fraction*total_aluminium.sum()/industrial_production["Aluminium - primary production"].sum() industrial_production["Aluminium - primary production"] = fraction_primary_stays_primary*industrial_production["Aluminium - primary production"] industrial_production["Aluminium - secondary production"] = total_aluminium - industrial_production["Aluminium - primary production"]