apply option for retrofitted pipe capacity per CH4 capacity in solve_network

This commit is contained in:
Fabian Neumann 2021-08-04 10:49:06 +02:00
parent 6507526d22
commit e1f1d71b8d
2 changed files with 10 additions and 5 deletions

View File

@ -222,6 +222,9 @@ sector:
electricity_grid_connection: true # only applies to onshore wind and utility PV
gas_network: true
H2_retrofit: true # if set to True existing gas pipes can be retrofitted to H2 pipes
# according to hydrogen backbone strategy (April, 2020) p.15
# https://gasforclimate2050.eu/wp-content/uploads/2020/07/2020_European-Hydrogen-Backbone_Report.pdf
# 60% of original natural gas capacity could be used in cost-optimal case as H2 capacity
H2_retrofit_capacity_per_CH4: 0.6 # ratio for H2 capacity per original CH4 capacity of retrofitted pipelines
gas_distribution_grid: true
gas_distribution_grid_cost_factor: 1.0 #multiplies cost in data/costs.csv

View File

@ -162,11 +162,13 @@ def add_pipe_retrofit_constraint(n):
link_p_nom = get_var(n, "Link", "p_nom")
pipe_capacity = n.links.loc[gas_pipes_i, 'p_nom']
# according to hydrogen backbone strategy (April, 2020) p.15
# https://gasforclimate2050.eu/wp-content/uploads/2020/07/2020_European-Hydrogen-Backbone_Report.pdf
# 60% of original natural gas capacity could be used in cost-optimal case as H2 capacity
lhs = linexpr((1/0.6, link_p_nom.loc[h2_retrofitted_i].rename(index=lambda x: x.replace("H2 pipeline retrofitted", "Gas pipeline"))),
(1, link_p_nom.loc[gas_pipes_i]))
CH4_per_H2 = 1 / n.config["sector"]["H2_retrofit_capacity_per_CH4"]
lhs = linexpr(
(CH4_per_H2, link_p_nom.loc[h2_retrofitted_i].rename(index=lambda x: x.replace("H2 pipeline retrofitted", "Gas pipeline"))),
(1, link_p_nom.loc[gas_pipes_i])
)
define_constraints(n, lhs, "=", pipe_capacity, 'Link', 'pipe_retrofit')