[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
0205d3efbf
commit
a892f0c0ec
@ -3473,25 +3473,28 @@ def add_enhanced_geothermal(
|
|||||||
p_nom_extendable=True,
|
p_nom_extendable=True,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
n.links.at[bus + " geothermal organic rankine cycle", "efficiency"] = efficiency_orc
|
n.links.at[
|
||||||
|
bus + " geothermal organic rankine cycle", "efficiency"
|
||||||
|
] = efficiency_orc
|
||||||
|
|
||||||
if snakemake.params.sector["enhanced_geothermal_flexible"]:
|
if snakemake.params.sector["enhanced_geothermal_flexible"]:
|
||||||
|
|
||||||
# this StorageUnit represents flexible operation using the geothermal reservoir.
|
# this StorageUnit represents flexible operation using the geothermal reservoir.
|
||||||
# Hence, it is intuitively wrong to install it at the surface bus,
|
# Hence, it is intuitively wrong to install it at the surface bus,
|
||||||
# this is however the more lean and computationally efficient solution.
|
# this is however the more lean and computationally efficient solution.
|
||||||
|
|
||||||
max_hours = snakemake.params.sector["enhanced_geothermal_reservoir_max_hours"]
|
max_hours = snakemake.params.sector[
|
||||||
|
"enhanced_geothermal_reservoir_max_hours"
|
||||||
|
]
|
||||||
boost = snakemake.params.sector["enhanced_geothermal_reservoir_max_boost"]
|
boost = snakemake.params.sector["enhanced_geothermal_reservoir_max_boost"]
|
||||||
|
|
||||||
max_hours = max_hours * boost
|
max_hours = max_hours * boost
|
||||||
n.add(
|
n.add(
|
||||||
"StorageUnit",
|
"StorageUnit",
|
||||||
bus + ' geothermal reservoir',
|
bus + " geothermal reservoir",
|
||||||
bus=f"geothermal heat surface {bus}",
|
bus=f"geothermal heat surface {bus}",
|
||||||
carrier="geothermal heat",
|
carrier="geothermal heat",
|
||||||
p_nom_extendable=True,
|
p_nom_extendable=True,
|
||||||
p_min_pu=-1. - boost,
|
p_min_pu=-1.0 - boost,
|
||||||
max_hours=max_hours,
|
max_hours=max_hours,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -779,15 +779,13 @@ def add_geothermal_chp_constraint(n):
|
|||||||
|
|
||||||
|
|
||||||
def add_flexible_egs_constraint(n):
|
def add_flexible_egs_constraint(n):
|
||||||
well_index = n.links.loc[n.links.carrier == 'geothermal heat'].index
|
well_index = n.links.loc[n.links.carrier == "geothermal heat"].index
|
||||||
storage_index = n.storage_units.loc[n.storage_units.carrier == 'geothermal heat '].index
|
storage_index = n.storage_units.loc[
|
||||||
|
n.storage_units.carrier == "geothermal heat "
|
||||||
|
].index
|
||||||
|
|
||||||
p_nom_rhs = (
|
p_nom_rhs = n.model["Link-p_nom"].loc[well_index]
|
||||||
n.model["Link-p_nom"].loc[well_index]
|
p_nom_lhs = n.model["StorageUnit-p_nom"].loc[storage_index]
|
||||||
)
|
|
||||||
p_nom_lhs = (
|
|
||||||
n.model["StorageUnit-p_nom"].loc[storage_index]
|
|
||||||
)
|
|
||||||
|
|
||||||
n.model.add_constraints(
|
n.model.add_constraints(
|
||||||
p_nom_lhs <= p_nom_rhs,
|
p_nom_lhs <= p_nom_rhs,
|
||||||
|
Loading…
Reference in New Issue
Block a user