link losses: exponential rather than linear model
This commit is contained in:
parent
e4eff27e50
commit
d7cb13246b
@ -478,11 +478,14 @@ sector:
|
||||
electricity_distribution_grid: true
|
||||
electricity_distribution_grid_cost_factor: 1.0
|
||||
electricity_grid_connection: true
|
||||
transmission_losses:
|
||||
# per 1000 km
|
||||
DC: 0
|
||||
H2 pipeline: 0
|
||||
gas pipeline: 0
|
||||
transmission_efficiency:
|
||||
DC:
|
||||
efficiency_static: 0.98
|
||||
efficiency_per_1000km: 0.977
|
||||
H2 pipeline:
|
||||
efficiency_per_1000km: 0.979
|
||||
gas pipeline:
|
||||
efficiency_per_1000km: 0.977
|
||||
H2_network: true
|
||||
gas_network: false
|
||||
H2_retrofit: false
|
||||
|
@ -3280,22 +3280,27 @@ def set_temporal_aggregation(n, opts, solver_name):
|
||||
return n
|
||||
|
||||
|
||||
def lossy_bidirectional_links(n, carrier, losses_per_thousand_km=0.0):
|
||||
def lossy_bidirectional_links(n, carrier, efficiencies={}):
|
||||
"Split bidirectional links into two unidirectional links to include transmission losses."
|
||||
|
||||
carrier_i = n.links.query("carrier == @carrier").index
|
||||
|
||||
if not losses_per_thousand_km or carrier_i.empty:
|
||||
if not any(v != 1. for v in efficiencies.values()) or carrier_i.empty:
|
||||
return
|
||||
|
||||
efficiency_static = efficiencies.get("efficiency_static", 1)
|
||||
efficiency_per_1000km = efficiencies.get("efficiency_per_1000km", 1)
|
||||
|
||||
logger.info(
|
||||
f"Specified losses for {carrier} transmission. Splitting bidirectional links."
|
||||
f"Specified losses for {carrier} transmission"
|
||||
f"(static: {efficiency_static}, per 1000km: {efficiency_per_1000km})."
|
||||
"Splitting bidirectional links."
|
||||
)
|
||||
|
||||
carrier_i = n.links.query("carrier == @carrier").index
|
||||
n.links.loc[carrier_i, "p_min_pu"] = 0
|
||||
n.links.loc[carrier_i, "efficiency"] = (
|
||||
1 - n.links.loc[carrier_i, "length"] * losses_per_thousand_km / 1e3
|
||||
efficiency_static * efficiency_per_1000km ** (n.links.loc[carrier_i, "length"] / 1e3)
|
||||
)
|
||||
rev_links = (
|
||||
n.links.loc[carrier_i].copy().rename({"bus0": "bus1", "bus1": "bus0"}, axis=1)
|
||||
@ -3474,7 +3479,7 @@ if __name__ == "__main__":
|
||||
if options["electricity_grid_connection"]:
|
||||
add_electricity_grid_connection(n, costs)
|
||||
|
||||
for k, v in options["transmission_losses"].items():
|
||||
for k, v in options["transmission_efficiency"].items():
|
||||
lossy_bidirectional_links(n, k, v)
|
||||
|
||||
# Workaround: Remove lines with conflicting (and unrealistic) properties
|
||||
|
Loading…
Reference in New Issue
Block a user