Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add lfp, vanadium, lair, pair battery technologies as storage units #21

Merged
5 changes: 4 additions & 1 deletion config/config.default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,15 @@ electricity:

max_hours:
li-ion battery: [6]
vanadium: [10]
lair: [12]
pair: [24]
H2: [168]
iron-air battery: [100]

extendable_carriers:
Generator: [solar, solar-hsat, onwind, offwind-ac, offwind-dc, offwind-float, OCGT, CCGT]
StorageUnit: [] # li-ion battery, H2
StorageUnit: [] # li-ion battery, H2, lfp, vanadium, lair, pair
Store: [li-ion battery, H2]
Link: [] # H2 pipeline

Expand Down
26 changes: 24 additions & 2 deletions config/config.form.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ co2_budget:
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#electricity
electricity:
max_hours:
li-ion battery: [4, 6]
li-ion battery: [1, 2, 4, 8]
vanadium: [10]
lair: [12]
pair: [24]
H2: [168]
iron-air battery: [100]
extendable_carriers:
Expand All @@ -92,6 +95,11 @@ atlite:
dy: 0.3
time: ['2013', '2013']

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#renewable
renewable:
hydro:
PHS_max_hours: 10

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#lines
lines:
dynamic_line_rating:
Expand Down Expand Up @@ -155,7 +163,7 @@ sector:
tes: true
marginal_cost_storage: 0. #1e-4
stores: ["H2"]
storage_units: ["li-ion battery", "iron-air battery"]
storage_units: ["li-ion battery", "vanadium", "lair", "pair", "iron-air battery"]
hydrogen_fuel_cell: true
hydrogen_turbine: false
hydrogen_underground_storage: true
Expand Down Expand Up @@ -213,3 +221,17 @@ clustering:
DE: 0.6
temporal:
resolution_sector: 100H #2920SEG # TODO: low for development, change this later

costs:
efficiency:
Compressed-Air-Adiabatic-bicharger: 0.7745
investment:
iron-air battery: 23.5

plotting:
tech_colors:
# all battery variation:
lfp: '#ace37f'
vanadium: '#9B111E'
lair: '#87CEEB'
pair: '#003366'
85 changes: 80 additions & 5 deletions scripts/add_electricity.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,85 @@ def costs_for_storage(store, link1, link2=None, max_hours=1.0):
max_hours=max_hour,
)
# cost for default li-ion battery which will be the first max_hour archetype
costs.loc[f"li-ion battery"] = costs_for_storage(
costs.loc["li-ion battery"] = costs_for_storage(
costs.loc["battery storage"],
costs.loc["battery inverter"],
max_hours=max_hours["li-ion battery"][0],
)

for max_hour in max_hours["iron-air battery"]:
costs.loc[f"iron-air battery {max_hour}h"] = costs_for_storage(
costs.loc["iron-air battery"],
costs.loc["iron-air battery charge"],
costs.loc["iron-air battery discharge"],
max_hours=max_hour,
)

# cost for default iron-air battery which will be the first max_hour archetype
costs.loc["iron-air battery"] = costs_for_storage(
costs.loc["iron-air battery"],
costs.loc["iron-air battery charge"],
costs.loc["iron-air battery discharge"],
max_hours=max_hours["iron-air battery"][0],
)

for max_hour in max_hours["lfp"]:
costs.loc[f"lfp {max_hour}h"] = costs_for_storage(
costs.loc["Lithium-Ion-LFP-store"],
costs.loc["Lithium-Ion-LFP-bicharger"],
max_hours=max_hour,
)
# cost for default li-ion battery which will be the first max_hour archetype
costs.loc["lfp"] = costs_for_storage(
costs.loc["Lithium-Ion-LFP-store"],
costs.loc["Lithium-Ion-LFP-bicharger"],
max_hours=max_hours["lfp"][0],
)

for max_hour in max_hours["vanadium"]:
costs.loc[f"vanadium {max_hour}h"] = costs_for_storage(
costs.loc["Vanadium-Redox-Flow-store"],
costs.loc["Vanadium-Redox-Flow-bicharger"],
max_hours=max_hour,
)

# cost for default vanadium which will be the first max_hour archetype
costs.loc["vanadium"] = costs_for_storage(
costs.loc["Vanadium-Redox-Flow-store"],
costs.loc["Vanadium-Redox-Flow-bicharger"],
max_hours=max_hours["vanadium"][0],
)

for max_hour in max_hours["lair"]:
costs.loc[f"lair {max_hour}h"] = costs_for_storage(
costs.loc["Liquid-Air-store"],
costs.loc["Liquid-Air-charger"],
costs.loc["Liquid-Air-discharger"],
max_hours=max_hour,
)

# cost for default liquid air which will be the first max_hour archetype
costs.loc["lair"] = costs_for_storage(
costs.loc["Liquid-Air-store"],
costs.loc["Liquid-Air-charger"],
costs.loc["Liquid-Air-discharger"],
max_hours=max_hours["lair"][0],
)

for max_hour in max_hours["pair"]:
costs.loc[f"pair {max_hour}h"] = costs_for_storage(
costs.loc["Compressed-Air-Adiabatic-store"],
costs.loc["Compressed-Air-Adiabatic-bicharger"],
max_hours=max_hour,
)

# cost for default CAES which will be the first max_hour archetype
costs.loc["pair"] = costs_for_storage(
costs.loc["Compressed-Air-Adiabatic-store"],
costs.loc["Compressed-Air-Adiabatic-bicharger"],
max_hours=max_hours["pair"][0],
)

for max_hour in max_hours["H2"]:
costs.loc[f"H2 {max_hour}h"] = costs_for_storage(
costs.loc["hydrogen storage underground"],
Expand All @@ -309,7 +382,7 @@ def costs_for_storage(store, link1, link2=None, max_hours=1.0):
max_hours=max_hour,
)
# cost for default H2 underground storage which will be the first max_hour archetype
costs.loc[f"H2"] = costs_for_storage(
costs.loc["H2"] = costs_for_storage(
costs.loc["hydrogen storage underground"],
costs.loc["fuel cell"],
costs.loc["electrolysis"],
Expand Down Expand Up @@ -889,8 +962,10 @@ def attach_storageunits(n, costs, extendable_carriers, max_hours):

buses_i = n.buses.index

lookup_store = {"H2": "electrolysis", "li-ion battery": "battery inverter"}
lookup_dispatch = {"H2": "fuel cell", "li-ion battery": "battery inverter"}
lookup_store = {"H2": "electrolysis", "li-ion battery": "battery inverter", "iron-air battery": "iron-air battery charge", "lfp": "Lithium-Ion-LFP-bicharger",
"vanadium": "Vanadium-Redox-Flow-bicharger", "lair": "Liquid-Air-charger", "pair": "Compressed-Air-Adiabatic-bicharger"}
lookup_dispatch = {"H2": "fuel cell", "li-ion battery": "battery inverter", "iron-air battery": "iron-air battery discharge", "lfp": "Lithium-Ion-LFP-bicharger",
"vanadium": "Vanadium-Redox-Flow-bicharger", "lair": "Liquid-Air-discharger", "pair": "Compressed-Air-Adiabatic-bicharger"}

for carrier in carriers:
roundtrip_correction = 0.5 if carrier == "li-ion battery" else 1
Expand Down Expand Up @@ -1000,7 +1075,7 @@ def attach_stores(n, costs, extendable_carriers):
p_nom_extendable=True,
marginal_cost=costs.at["battery inverter", "marginal_cost"],
)


if __name__ == "__main__":
if "snakemake" not in globals():
Expand Down
38 changes: 35 additions & 3 deletions scripts/prepare_sector_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -1128,6 +1128,36 @@ def costs_for_storage(store, link1=None, link2=None, max_hours=1.0):
costs.loc["home battery inverter"],
max_hours=max_hour,
)

for max_hour in max_hours["lfp"]:
costs.loc[f"lfp {max_hour}h"] = costs_for_storage(
costs.loc["Lithium-Ion-LFP-store"],
costs.loc["Lithium-Ion-LFP-bicharger"],
max_hours=max_hour,
)

for max_hour in max_hours["vanadium"]:
costs.loc[f"vanadium {max_hour}h"] = costs_for_storage(
costs.loc["Vanadium-Redox-Flow-store"],
costs.loc["Vanadium-Redox-Flow-bicharger"],
max_hours=max_hour,
)

for max_hour in max_hours["lair"]:
costs.loc[f"lair {max_hour}h"] = costs_for_storage(
costs.loc["Liquid-Air-store"],
costs.loc["Liquid-Air-charger"],
costs.loc["Liquid-Air-discharger"],
max_hours=max_hour,
)

for max_hour in max_hours["pair"]:
costs.loc[f"pair {max_hour}h"] = costs_for_storage(
costs.loc["Compressed-Air-Adiabatic-store"],
costs.loc["Compressed-Air-Adiabatic-bicharger"],
max_hours=max_hour,
)

for max_hour in max_hours["iron-air battery"]:
costs.loc[f"iron-air battery storage {max_hour}h"] = costs_for_storage(
costs.loc["iron-air battery"],
Expand Down Expand Up @@ -1470,7 +1500,7 @@ def add_storageunits(n, costs, carriers, max_hours):
nodes = pop_layout.index

# check for not implemented storage technologies
implemented = ["H2", "li-ion battery", "iron-air battery"]
implemented = ["H2", "li-ion battery", "iron-air battery", "lfp", "vanadium", "lair", "pair"]
not_implemented = list(set(carriers).difference(implemented))
available_carriers = list(set(carriers).intersection(implemented))
if len(not_implemented) > 0:
Expand All @@ -1480,8 +1510,10 @@ def add_storageunits(n, costs, carriers, max_hours):
missing_carriers = list(set(available_carriers).difference(n.carriers.index))
n.add("Carrier", missing_carriers)

lookup_store = {"H2": "electrolysis", "li-ion battery": "battery inverter", "iron-air battery": "iron-air battery charge"}
lookup_dispatch = {"H2": "fuel cell", "li-ion battery": "battery inverter", "iron-air battery": "iron-air battery discharge"}
lookup_store = {"H2": "electrolysis", "li-ion battery": "battery inverter", "iron-air battery": "iron-air battery charge",
"lfp": "Lithium-Ion-LFP-bicharger", "vanadium": "Vanadium-Redox-Flow-bicharger", "lair": "Liquid-Air-charger", "pair": "Compressed-Air-Adiabatic-bicharger"}
lookup_dispatch = {"H2": "fuel cell", "li-ion battery": "battery inverter", "iron-air battery": "iron-air battery discharge",
"lfp": "Lithium-Ion-LFP-bicharger", "vanadium": "Vanadium-Redox-Flow-bicharger", "lair": "Liquid-Air-discharger", "pair": "Compressed-Air-Adiabatic-bicharger"}

for carrier in available_carriers:
for max_hour in max_hours[carrier]:
Expand Down