Skip to content

Commit 6fcc484

Browse files
committed
remove accidentally duplicated code
1 parent 7108b5a commit 6fcc484

File tree

1 file changed

+0
-154
lines changed

1 file changed

+0
-154
lines changed

scripts/prepare_sector_network.py

Lines changed: 0 additions & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -3539,160 +3539,6 @@ def add_heat(
35393539
lifetime=costs.at[costs_name_heat_pump, "lifetime"],
35403540
)
35413541

3542-
if options["tes"]:
3543-
n.add("Carrier", f"{heat_system} water tanks")
3544-
3545-
n.add(
3546-
"Bus",
3547-
nodes + f" {heat_system} water tanks",
3548-
location=nodes,
3549-
carrier=f"{heat_system} water tanks",
3550-
unit="MWh_th",
3551-
)
3552-
3553-
energy_to_power_ratio_water_tanks = costs.at[
3554-
heat_system.central_or_decentral + " water tank storage",
3555-
"energy to power ratio",
3556-
]
3557-
3558-
n.add(
3559-
"Link",
3560-
nodes + f" {heat_system} water tanks charger",
3561-
bus0=nodes + f" {heat_system} heat",
3562-
bus1=nodes + f" {heat_system} water tanks",
3563-
efficiency=costs.at[
3564-
heat_system.central_or_decentral + " water tank charger",
3565-
"efficiency",
3566-
],
3567-
carrier=f"{heat_system} water tanks charger",
3568-
p_nom_extendable=True,
3569-
marginal_cost=costs.at["water tank charger", "marginal_cost"],
3570-
lifetime=costs.at[
3571-
heat_system.central_or_decentral + " water tank storage", "lifetime"
3572-
],
3573-
)
3574-
3575-
n.add(
3576-
"Link",
3577-
nodes + f" {heat_system} water tanks discharger",
3578-
bus0=nodes + f" {heat_system} water tanks",
3579-
bus1=nodes + f" {heat_system} heat",
3580-
carrier=f"{heat_system} water tanks discharger",
3581-
efficiency=costs.at[
3582-
heat_system.central_or_decentral + " water tank discharger",
3583-
"efficiency",
3584-
],
3585-
p_nom_extendable=True,
3586-
lifetime=costs.at[
3587-
heat_system.central_or_decentral + " water tank storage", "lifetime"
3588-
],
3589-
)
3590-
3591-
n.links.loc[
3592-
nodes + f" {heat_system} water tanks charger", "energy to power ratio"
3593-
] = energy_to_power_ratio_water_tanks
3594-
3595-
tes_time_constant_days = options["tes_tau"][
3596-
heat_system.central_or_decentral
3597-
]
3598-
3599-
n.add(
3600-
"Store",
3601-
nodes + f" {heat_system} water tanks",
3602-
bus=nodes + f" {heat_system} water tanks",
3603-
e_cyclic=True,
3604-
e_nom_extendable=True,
3605-
carrier=f"{heat_system} water tanks",
3606-
standing_loss=1 - np.exp(-1 / 24 / tes_time_constant_days),
3607-
capital_cost=costs.at[
3608-
heat_system.central_or_decentral + " water tank storage",
3609-
"capital_cost",
3610-
],
3611-
overnight_cost=costs.at[
3612-
heat_system.central_or_decentral + " water tank storage",
3613-
"investment",
3614-
],
3615-
lifetime=costs.at[
3616-
heat_system.central_or_decentral + " water tank storage", "lifetime"
3617-
],
3618-
)
3619-
3620-
if heat_system == HeatSystem.URBAN_CENTRAL:
3621-
n.add("Carrier", f"{heat_system} water pits")
3622-
3623-
n.add(
3624-
"Bus",
3625-
nodes + f" {heat_system} water pits",
3626-
location=nodes,
3627-
carrier=f"{heat_system} water pits",
3628-
unit="MWh_th",
3629-
)
3630-
3631-
energy_to_power_ratio_water_pit = costs.at[
3632-
"central water pit storage", "energy to power ratio"
3633-
]
3634-
3635-
n.add(
3636-
"Link",
3637-
nodes + f" {heat_system} water pits charger",
3638-
bus0=nodes + f" {heat_system} heat",
3639-
bus1=nodes + f" {heat_system} water pits",
3640-
efficiency=costs.at[
3641-
"central water pit charger",
3642-
"efficiency",
3643-
],
3644-
carrier=f"{heat_system} water pits charger",
3645-
p_nom_extendable=True,
3646-
lifetime=costs.at["central water pit storage", "lifetime"],
3647-
marginal_cost=costs.at[
3648-
"central water pit charger", "marginal_cost"
3649-
],
3650-
)
3651-
3652-
n.add(
3653-
"Link",
3654-
nodes + f" {heat_system} water pits discharger",
3655-
bus0=nodes + f" {heat_system} water pits",
3656-
bus1=nodes + f" {heat_system} heat",
3657-
carrier=f"{heat_system} water pits discharger",
3658-
efficiency=costs.at[
3659-
"central water pit discharger",
3660-
"efficiency",
3661-
],
3662-
p_nom_extendable=True,
3663-
lifetime=costs.at["central water pit storage", "lifetime"],
3664-
)
3665-
n.links.loc[
3666-
nodes + f" {heat_system} water pits charger",
3667-
"energy to power ratio",
3668-
] = energy_to_power_ratio_water_pit
3669-
3670-
if options["district_heating"]["ptes"]["dynamic_capacity"]:
3671-
# Load pre-calculated e_max_pu profiles
3672-
e_max_pu_data = xr.open_dataarray(ptes_e_max_pu_file)
3673-
e_max_pu = (
3674-
e_max_pu_data.sel(name=nodes)
3675-
.to_pandas()
3676-
.reindex(index=n.snapshots)
3677-
)
3678-
else:
3679-
e_max_pu = 1
3680-
3681-
n.add(
3682-
"Store",
3683-
nodes,
3684-
suffix=f" {heat_system} water pits",
3685-
bus=nodes + f" {heat_system} water pits",
3686-
e_cyclic=True,
3687-
e_nom_extendable=True,
3688-
e_max_pu=e_max_pu,
3689-
carrier=f"{heat_system} water pits",
3690-
standing_loss=1 - np.exp(-1 / 24 / tes_time_constant_days),
3691-
capital_cost=costs.at["central water pit storage", "capital_cost"],
3692-
overnight_cost=costs.at["central water pit storage", "investment"],
3693-
lifetime=costs.at["central water pit storage", "lifetime"],
3694-
)
3695-
36963542
if options["resistive_heaters"]:
36973543
key = f"{heat_system.central_or_decentral} resistive heater"
36983544

0 commit comments

Comments
 (0)