Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features/#352 add methanolisation #378

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/egon/data/datasets/industrial_gas_demand.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class IndustrialGasDemandeGon100RE(Dataset):
#:
name: str = "IndustrialGasDemandeGon100RE"
#:
version: str = "0.0.3"
version: str = "0.0.4"

def __init__(self, dependencies):
super().__init__(
Expand Down Expand Up @@ -503,6 +503,13 @@ def insert_industrial_gas_demand_egon100RE():
"DE0 0 Fischer-Tropsch")].index].mul(
solved_network.snapshot_weightings.generators,
axis= 0).sum().sum()
# Add h2 demand of methanolisation process from pypsa-eur
+ solved_network.links_t.p0[
solved_network.links.loc[
solved_network.links.index.str.contains(
"DE0 0 methanolisation")].index].mul(
solved_network.snapshot_weightings.generators,
axis= 0).sum().sum()
)
except KeyError:
H2_total_PES = 42090000
Expand Down
10 changes: 8 additions & 2 deletions src/egon/data/datasets/pypsaeur/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,17 +529,23 @@ def neighbor_reduction():
network_solved.buses.loc[foreign_buses.index].index
)

# Add H2 demand of Fischer-Tropsch process to industrial H2 demands
# Add H2 demand of Fischer-Tropsch process and methanolisation
# to industrial H2 demands
industrial_hydrogen = network_prepared.loads.loc[
network_prepared.loads.carrier== "H2 for industry"]
fischer_tropsch = network_solved.links_t.p0[
network_solved.links.loc[
network_solved.links.carrier=="Fischer-Tropsch"].index
].mul(network_solved.snapshot_weightings.generators, axis=0).sum()
methanolisation = network_solved.links_t.p0[
network_solved.links.loc[
network_solved.links.carrier=="methanolisation"].index
].mul(network_solved.snapshot_weightings.generators, axis=0).sum()
for i, row in industrial_hydrogen.iterrows():
network_prepared.loads.loc[i, "p_set"] += fischer_tropsch[
fischer_tropsch.index.str.startswith(row.bus[:5])].sum()/8760

network_prepared.loads.loc[i, "p_set"] += methanolisation[
methanolisation.index.str.startswith(row.bus[:5])].sum()/8760
# drop foreign lines and links from the 2nd row

network_solved.lines = network_solved.lines.drop(
Expand Down
Loading