Skip to content

Commit

Permalink
Merge pull request #218 from pypsa-meets-earth/fix_yearly_H2_constraint
Browse files Browse the repository at this point in the history
fetch electrolysis efficiency from network
  • Loading branch information
energyLS authored Aug 17, 2023
2 parents 2152939 + 681943b commit d94d7da
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions scripts/solve_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,11 @@ def H2_export_yearly_constraint(n):
]

if include_country_load:
elec_efficiency = (
n.links.filter(like="Electrolysis", axis=0).loc[:, "efficiency"].mean()
)
rhs = (
h2_export * (1 / 0.7) + load
h2_export * (1 / elec_efficiency) + load
) # 0.7 is approximation of electrloyzer efficiency # TODO obtain value from network
else:
rhs = h2_export * (1 / 0.7)
Expand Down Expand Up @@ -478,14 +481,14 @@ def add_existing(n):
snakemake = mock_snakemake(
"solve_network",
simpl="",
clusters="10",
clusters="12",
ll="c1.0",
opts="Co2L0.60",
opts="Co2L",
planning_horizons="2030",
sopts="300H",
discountrate=0.15,
sopts="24H",
discountrate=0.071,
demand="DF",
h2export="60",
h2export="120",
)

sets_path_to_root("pypsa-earth-sec")
Expand Down

0 comments on commit d94d7da

Please sign in to comment.