Lifetime of Gas Pipelines (#1162)
* inf lifetime of gas pipelines avoids adding new links each planning horizon * p_nom_extendable for existing gas pipelines is set false if retrofitting to H2 is not allowed * [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>
This commit is contained in:
parent
9b7831974f
commit
23ea16dc14
@ -89,10 +89,6 @@ def add_brownfield(n, n_p, year):
|
||||
# deal with gas network
|
||||
pipe_carrier = ["gas pipeline"]
|
||||
if snakemake.params.H2_retrofit:
|
||||
# drop capacities of previous year to avoid duplicating
|
||||
to_drop = n.links.carrier.isin(pipe_carrier) & (n.links.build_year != year)
|
||||
n.mremove("Link", n.links.loc[to_drop].index)
|
||||
|
||||
# subtract the already retrofitted from today's gas grid capacity
|
||||
h2_retrofitted_fixed_i = n.links[
|
||||
(n.links.carrier == "H2 pipeline retrofitted")
|
||||
@ -115,10 +111,6 @@ def add_brownfield(n, n_p, year):
|
||||
index=pipe_capacity.index
|
||||
).fillna(0)
|
||||
n.links.loc[gas_pipes_i, "p_nom"] = remaining_capacity
|
||||
else:
|
||||
new_pipes = n.links.carrier.isin(pipe_carrier) & (n.links.build_year == year)
|
||||
n.links.loc[new_pipes, "p_nom"] = 0.0
|
||||
n.links.loc[new_pipes, "p_nom_min"] = 0.0
|
||||
|
||||
|
||||
def disable_grid_expansion_if_limit_hit(n):
|
||||
|
@ -1238,12 +1238,14 @@ def add_storage_and_grids(n, costs):
|
||||
gas_pipes["p_nom_min"] = 0.0
|
||||
# 0.1 EUR/MWkm/a to prefer decommissioning to address degeneracy
|
||||
gas_pipes["capital_cost"] = 0.1 * gas_pipes.length
|
||||
gas_pipes["p_nom_extendable"] = True
|
||||
else:
|
||||
gas_pipes["p_nom_max"] = np.inf
|
||||
gas_pipes["p_nom_min"] = gas_pipes.p_nom
|
||||
gas_pipes["capital_cost"] = (
|
||||
gas_pipes.length * costs.at["CH4 (g) pipeline", "fixed"]
|
||||
)
|
||||
gas_pipes["p_nom_extendable"] = False
|
||||
|
||||
n.madd(
|
||||
"Link",
|
||||
@ -1252,14 +1254,14 @@ def add_storage_and_grids(n, costs):
|
||||
bus1=gas_pipes.bus1 + " gas",
|
||||
p_min_pu=gas_pipes.p_min_pu,
|
||||
p_nom=gas_pipes.p_nom,
|
||||
p_nom_extendable=True,
|
||||
p_nom_extendable=gas_pipes.p_nom_extendable,
|
||||
p_nom_max=gas_pipes.p_nom_max,
|
||||
p_nom_min=gas_pipes.p_nom_min,
|
||||
length=gas_pipes.length,
|
||||
capital_cost=gas_pipes.capital_cost,
|
||||
tags=gas_pipes.name,
|
||||
carrier="gas pipeline",
|
||||
lifetime=costs.at["CH4 (g) pipeline", "lifetime"],
|
||||
lifetime=np.inf,
|
||||
)
|
||||
|
||||
# remove fossil generators where there is neither
|
||||
|
Loading…
Reference in New Issue
Block a user