final corrections, improved docs
This commit is contained in:
parent
2801b00100
commit
2f1d6d20b1
@ -269,8 +269,8 @@ rule build_solar_thermal_profiles:
|
|||||||
output:
|
output:
|
||||||
solar_thermal=resources("solar_thermal_{scope}_elec_s{simpl}_{clusters}.nc"),
|
solar_thermal=resources("solar_thermal_{scope}_elec_s{simpl}_{clusters}.nc"),
|
||||||
resources:
|
resources:
|
||||||
mem_mb=8000,
|
mem_mb=20000,
|
||||||
threads: 1
|
threads: 16
|
||||||
log:
|
log:
|
||||||
logs("build_solar_thermal_profiles_{scope}_s{simpl}_{clusters}.log"),
|
logs("build_solar_thermal_profiles_{scope}_s{simpl}_{clusters}.log"),
|
||||||
benchmark:
|
benchmark:
|
||||||
|
@ -981,7 +981,7 @@ def insert_electricity_distribution_grid(n, costs):
|
|||||||
.get("efficiency_static")
|
.get("efficiency_static")
|
||||||
):
|
):
|
||||||
logger.info(
|
logger.info(
|
||||||
f"Deducting distribution losses from electricity demand: {100*(1-efficiency)}%"
|
f"Deducting distribution losses from electricity demand: {np.around(100*(1-efficiency), decimals=2)}%"
|
||||||
)
|
)
|
||||||
n.loads_t.p_set.loc[:, n.loads.carrier == "electricity"] *= efficiency
|
n.loads_t.p_set.loc[:, n.loads.carrier == "electricity"] *= efficiency
|
||||||
|
|
||||||
@ -3742,6 +3742,12 @@ def add_enhanced_geothermal(n, egs_potentials, egs_overlap, costs):
|
|||||||
logger.warning(
|
logger.warning(
|
||||||
"'add_enhanced_geothermal' not implemented for multiple geothermal nodes."
|
"'add_enhanced_geothermal' not implemented for multiple geothermal nodes."
|
||||||
)
|
)
|
||||||
|
logger.info(
|
||||||
|
"EGS implemented with 2020 CAPEX from Aghahosseini et al 2021: 'From hot rock to...'."
|
||||||
|
)
|
||||||
|
logger.info(
|
||||||
|
"Recommended usage scales CAPEX to future cost expectations using config 'adjustments'."
|
||||||
|
)
|
||||||
|
|
||||||
egs_config = snakemake.params["sector"]["enhanced_geothermal"]
|
egs_config = snakemake.params["sector"]["enhanced_geothermal"]
|
||||||
costs_config = snakemake.config["costs"]
|
costs_config = snakemake.config["costs"]
|
||||||
@ -3780,7 +3786,7 @@ def add_enhanced_geothermal(n, egs_potentials, egs_overlap, costs):
|
|||||||
orc_capital_cost = (orc_annuity + FOM / (1 + FOM)) * orc_capex * Nyears
|
orc_capital_cost = (orc_annuity + FOM / (1 + FOM)) * orc_capex * Nyears
|
||||||
|
|
||||||
efficiency_orc = costs.at["organic rankine cycle", "efficiency"]
|
efficiency_orc = costs.at["organic rankine cycle", "efficiency"]
|
||||||
efficiency_dh = costs.at["geothermal", "efficiency residential heat"]
|
efficiency_dh = costs.at["geothermal", "district heat-input"]
|
||||||
|
|
||||||
# p_nom_max conversion GW -> MW
|
# p_nom_max conversion GW -> MW
|
||||||
egs_potentials["p_nom_max"] = egs_potentials["p_nom_max"] * 1000.0
|
egs_potentials["p_nom_max"] = egs_potentials["p_nom_max"] * 1000.0
|
||||||
@ -3791,7 +3797,6 @@ def add_enhanced_geothermal(n, egs_potentials, egs_overlap, costs):
|
|||||||
n.madd(
|
n.madd(
|
||||||
"Bus",
|
"Bus",
|
||||||
spatial.geothermal_heat.nodes,
|
spatial.geothermal_heat.nodes,
|
||||||
location=spatial.geothermal_heat.locations,
|
|
||||||
carrier="geothermal heat",
|
carrier="geothermal heat",
|
||||||
unit="MWh_th",
|
unit="MWh_th",
|
||||||
)
|
)
|
||||||
@ -3894,7 +3899,8 @@ def add_enhanced_geothermal(n, egs_potentials, egs_overlap, costs):
|
|||||||
carrier="geothermal district heat",
|
carrier="geothermal district heat",
|
||||||
capital_cost=orc_capital_cost
|
capital_cost=orc_capital_cost
|
||||||
* efficiency_orc
|
* efficiency_orc
|
||||||
* costs.at["geothermal", "district heating cost"],
|
* costs.at["geothermal", "district heat surcharge"]
|
||||||
|
/ 100.0,
|
||||||
efficiency=efficiency_dh,
|
efficiency=efficiency_dh,
|
||||||
p_nom_extendable=True,
|
p_nom_extendable=True,
|
||||||
)
|
)
|
||||||
|
@ -1032,7 +1032,7 @@ def extra_functionality(n, snapshots):
|
|||||||
else:
|
else:
|
||||||
add_co2_atmosphere_constraint(n, snapshots)
|
add_co2_atmosphere_constraint(n, snapshots)
|
||||||
|
|
||||||
if config["sector"]["enhanced_geothermal_flexible"]:
|
if config["sector"]["enhanced_geothermal"]["enable"]:
|
||||||
add_flexible_egs_constraint(n)
|
add_flexible_egs_constraint(n)
|
||||||
|
|
||||||
if snakemake.params.custom_extra_functionality:
|
if snakemake.params.custom_extra_functionality:
|
||||||
@ -1102,6 +1102,8 @@ def solve_network(n, config, solving, **kwargs):
|
|||||||
n.model.print_infeasibilities()
|
n.model.print_infeasibilities()
|
||||||
raise RuntimeError("Solving status 'infeasible'")
|
raise RuntimeError("Solving status 'infeasible'")
|
||||||
|
|
||||||
|
return n
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
if "snakemake" not in globals():
|
if "snakemake" not in globals():
|
||||||
|
Loading…
Reference in New Issue
Block a user