ec: attach hydrogen pipelines (#108)

This commit is contained in:
Fabian Neumann 2019-12-02 12:22:30 +01:00 committed by GitHub
parent 036d44418d
commit 7ddc153bd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 46 additions and 3 deletions

View File

@ -37,6 +37,7 @@ electricity:
Generator: [OCGT]
StorageUnit: [battery, H2]
Store: [] # battery, H2
Link: []
max_hours:
battery: 6

View File

@ -34,6 +34,7 @@ electricity:
Generator: [OCGT]
StorageUnit: [battery, H2]
Store: [] #battery, H2
Link: []
max_hours:
battery: 6

View File

@ -96,6 +96,12 @@ fuel cell,2030,lifetime,20,years,NREL http://www.nrel.gov/docs/fy09osti/45873.pd
fuel cell,2030,efficiency,0.58,per unit,NREL http://www.nrel.gov/docs/fy09osti/45873.pdf; budischak2013 conservative 2020
hydrogen storage,2030,investment,11.2,USD/kWh,budischak2013
hydrogen storage,2030,lifetime,20,years,budischak2013
hydrogen underground storage,2030,investment,0.5,EUR/kWh,maximum from https://www.nrel.gov/docs/fy10osti/46719.pdf
hydrogen underground storage,2030,lifetime,40,years,http://www.acatech.de/fileadmin/user_upload/Baumstruktur_nach_Website/Acatech/root/de/Publikationen/Materialien/ESYS_Technologiesteckbrief_Energiespeicher.pdf
H2 pipeline,2030,investment,267,EUR/MW/km,Welder et al https://doi.org/10.1016/j.ijhydene.2018.12.156
H2 pipeline,2030,lifetime,40,years,Krieg2012 http://juser.fz-juelich.de/record/136392/files/Energie%26Umwelt_144.pdf
H2 pipeline,2030,FOM,5,%/year,Krieg2012 http://juser.fz-juelich.de/record/136392/files/Energie%26Umwelt_144.pdf
H2 pipeline,2030,efficiency,0.98,per unit,Krieg2012 http://juser.fz-juelich.de/record/136392/files/Energie%26Umwelt_144.pdf
methanation,2030,investment,1000,EUR/kWH2,Schaber thesis
methanation,2030,lifetime,25,years,Schaber thesis
methanation,2030,FOM,3,%/year,Schaber thesis

1 technology year parameter value unit source
96 fuel cell 2030 efficiency 0.58 per unit NREL http://www.nrel.gov/docs/fy09osti/45873.pdf; budischak2013 conservative 2020
97 hydrogen storage 2030 investment 11.2 USD/kWh budischak2013
98 hydrogen storage 2030 lifetime 20 years budischak2013
99 hydrogen underground storage 2030 investment 0.5 EUR/kWh maximum from https://www.nrel.gov/docs/fy10osti/46719.pdf
100 hydrogen underground storage 2030 lifetime 40 years http://www.acatech.de/fileadmin/user_upload/Baumstruktur_nach_Website/Acatech/root/de/Publikationen/Materialien/ESYS_Technologiesteckbrief_Energiespeicher.pdf
101 H2 pipeline 2030 investment 267 EUR/MW/km Welder et al https://doi.org/10.1016/j.ijhydene.2018.12.156
102 H2 pipeline 2030 lifetime 40 years Krieg2012 http://juser.fz-juelich.de/record/136392/files/Energie%26Umwelt_144.pdf
103 H2 pipeline 2030 FOM 5 %/year Krieg2012 http://juser.fz-juelich.de/record/136392/files/Energie%26Umwelt_144.pdf
104 H2 pipeline 2030 efficiency 0.98 per unit Krieg2012 http://juser.fz-juelich.de/record/136392/files/Energie%26Umwelt_144.pdf
105 methanation 2030 investment 1000 EUR/kWH2 Schaber thesis
106 methanation 2030 lifetime 25 years Schaber thesis
107 methanation 2030 FOM 3 %/year Schaber thesis

View File

@ -7,6 +7,7 @@ extendable_carriers,,,
-- Generator,--,"Any subset of {'OCGT','CCGT'}","Places extendable conventional power plants (OCGT and/or CCGT) where gas power plants are located today without capacity limits."
-- StorageUnit,--,"Any subset of {'battery','H2'}","Adds extendable storage units (battery and/or hydrogen) at every node/bus after clustering without capacity limits and with zero initial capacity."
-- Store,--,"Any subset of {'battery','H2'}","Adds extendable storage units (battery and/or hydrogen) at every node/bus after clustering without capacity limits and with zero initial capacity."
-- Link,--,"Any subset of {'H2 pipeline'}","Adds extendable links (H2 pipelines only) at every connection where there are lines or HVDC links without capacity limits and with zero initial capacity. Hydrogen pipelines require hydrogen storage to be modelled as ``Store``."
max_hours,,,
-- battery,h,float,"Maximum state of charge capacity of the battery in terms of hours at full output capacity ``p_nom``. Cf. `PyPSA documentation <https://pypsa.readthedocs.io/en/latest/components.html#storage-unit>`_."
-- H2,h,float,"Maximum state of charge capacity of the hydrogen storage in terms of hours at full output capacity ``p_nom``. Cf. `PyPSA documentation <https://pypsa.readthedocs.io/en/latest/components.html#storage-unit>`_."

1 Unit Values Description
7 -- Generator -- Any subset of {'OCGT','CCGT'} Places extendable conventional power plants (OCGT and/or CCGT) where gas power plants are located today without capacity limits.
8 -- StorageUnit -- Any subset of {'battery','H2'} Adds extendable storage units (battery and/or hydrogen) at every node/bus after clustering without capacity limits and with zero initial capacity.
9 -- Store -- Any subset of {'battery','H2'} Adds extendable storage units (battery and/or hydrogen) at every node/bus after clustering without capacity limits and with zero initial capacity.
10 -- Link -- Any subset of {'H2 pipeline'} Adds extendable links (H2 pipelines only) at every connection where there are lines or HVDC links without capacity limits and with zero initial capacity. Hydrogen pipelines require hydrogen storage to be modelled as ``Store``.
11 max_hours
12 -- battery h float Maximum state of charge capacity of the battery in terms of hours at full output capacity ``p_nom``. Cf. `PyPSA documentation <https://pypsa.readthedocs.io/en/latest/components.html#storage-unit>`_.
13 -- H2 h float Maximum state of charge capacity of the hydrogen storage in terms of hours at full output capacity ``p_nom``. Cf. `PyPSA documentation <https://pypsa.readthedocs.io/en/latest/components.html#storage-unit>`_.

View File

@ -50,8 +50,9 @@ logger = logging.getLogger(__name__)
from _helpers import configure_logging
import pandas as pd
import numpy as np
import pypsa
from add_electricity import (load_costs, normed, add_nice_carrier_names,
from add_electricity import (load_costs, add_nice_carrier_names,
_add_missing_carriers_from_costs)
idx = pd.IndexSlice
@ -139,6 +140,37 @@ def attach_stores(n, costs):
capital_cost=costs.at['battery inverter', 'capital_cost'],
p_nom_extendable=True)
def attach_hydrogen_pipelines(n, costs):
elec_opts = snakemake.config['electricity']
ext_carriers = elec_opts['extendable_carriers']
as_stores = ext_carriers.get('Store', [])
if 'H2 pipeline' not in ext_carriers.get('Link',[]): return
assert 'H2' in as_stores, ("Attaching hydrogen pipelines requires hydrogen "
"storage to be modelled as Store-Link-Bus combination. See "
"`config.yaml` at `electricity: extendable_carriers: Store:`.")
# determine bus pairs
attrs = ["bus0","bus1","length"]
candidates = pd.concat([n.lines[attrs], n.links.query('carrier=="DC"')[attrs]])\
.reset_index(drop=True)
# remove bus pair duplicates regardless of order of bus0 and bus1
h2_links = candidates[~pd.DataFrame(np.sort(candidates[['bus0', 'bus1']])).duplicated()]
h2_links.index = h2_links.apply(lambda c: f"H2 pipeline {c.bus0}-{c.bus1}", axis=1)
# add pipelines
n.madd("Link",
h2_links.index,
bus0=h2_links.bus0.values + " H2",
bus1=h2_links.bus1.values + " H2",
p_min_pu=-1,
p_nom_extendable=True,
length=h2_links.length.values,
capital_cost=costs.at['H2 pipeline','capital_cost']*h2_links.length,
efficiency=costs.at['H2 pipeline','efficiency'],
carrier="H2 pipeline")
if __name__ == "__main__":
# Detect running outside of snakemake and mock snakemake for testing
@ -160,6 +192,7 @@ if __name__ == "__main__":
attach_storageunits(n, costs)
attach_stores(n, costs)
attach_hydrogen_pipelines(n, costs)
add_nice_carrier_names(n, config=snakemake.config)

View File

@ -32,8 +32,9 @@ electricity:
extendable_carriers:
Generator: [OCGT]
StorageUnit: [battery, H2]
Store: [] #battery, H2
StorageUnit: [battery]
Store: [H2]
Link: [H2 pipeline]
max_hours:
battery: 6