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

Add endogenous export #1201

Merged
merged 12 commits into from
Nov 28, 2024
Merged
2 changes: 2 additions & 0 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -1152,6 +1152,8 @@ rule add_export:
store=config["export"]["store"],
store_capital_costs=config["export"]["store_capital_costs"],
export_profile=config["export"]["export_profile"],
export_endogenous=config["export"]["endogenous"],
endogenous_price=config["export"]["endogenous_price"],
snapshots=config["snapshots"],
costs=config["costs"],
input:
Expand Down
8 changes: 5 additions & 3 deletions config.default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: CC0-1.0

version: 0.4.1
version: 0.4.2
tutorial: false

logging:
Expand Down Expand Up @@ -456,10 +456,12 @@ fossil_reserves:
oil: 100 #TWh Maybe redundant

export:
h2export: [10] # Yearly export demand in TWh
endogenous: false # If true, the export demand is endogenously determined by the model
endogenous_price: 400 # EUR/MWh # Market price, for wich the hydrogen for endogenous exports is sold. Only considered, if ["export"]["endogenous"] is set to true.
store: true # [True, False] # specifies whether an export store to balance demand is implemented
store_capital_costs: "no_costs" # ["standard_costs", "no_costs"] # specifies the costs of the export store. "standard_costs" takes CAPEX of "hydrogen storage tank type 1 including compressor"
export_profile: "ship" # use "ship" or "constant"
h2export: [10] # Yearly export demand in TWh. Only considered, if ["export"]["endogenous"] is set to false
export_profile: "ship" # use "ship" or "constant". Only considered, if ["export"]["endogenous"] is set to false
ship:
ship_capacity: 0.4 # TWh # 0.05 TWh for new ones, 0.003 TWh for Susio Frontier, 0.4 TWh according to Hampp2021: "Corresponds to 11360 t H2 (l) with LHV of 33.3333 Mwh/t_H2. Cihlar et al 2020 based on IEA 2019, Table 3-B"
travel_time: 288 # hours # From Agadir to Rotterdam and back (12*24)
Expand Down
2 changes: 1 addition & 1 deletion config.tutorial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: CC0-1.0

version: 0.4.1
version: 0.4.2
tutorial: true


Expand Down
2 changes: 2 additions & 0 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ E.g. if a new rule becomes available describe how to use it `make test` and in o

* Enable sector rules import in subworkflow `PR #1178 <https://github.com/pypsa-meets-earth/pypsa-earth/pull/1178>`__

* Include option of endogenous export, which optimizes the export quantity based on price signals `PR #1201 <https://github.com/pypsa-meets-earth/pypsa-earth/pull/1201>`__

**Minor Changes and bug-fixing**

* The default configuration for `electricity:estimate_renewable_capacities:year` was updated from 2020 to 2023. `PR #1106 <https://github.com/pypsa-meets-earth/pypsa-earth/pull/1106>`__
Expand Down
29 changes: 21 additions & 8 deletions scripts/add_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,27 @@ def add_export(n, hydrogen_buses_ports, export_profile):
elif snakemake.params.store == False:
pass

# add load
n.add(
"Load",
"H2 export load",
bus="H2 export bus",
carrier="H2",
p_set=export_profile,
)
if snakemake.params.export_endogenous:
# add endogenous export by implementing a negative generation
n.add(
"Generator",
"H2 export load",
bus="H2 export bus",
carrier="H2",
sign=-1,
p_nom_extendable=True,
marginal_cost=snakemake.params.endogenous_price * (-1),
)

else:
# add exogenous export by implementing a load
n.add(
"Load",
"H2 export load",
bus="H2 export bus",
carrier="H2",
p_set=export_profile,
)

return

Expand Down
12 changes: 7 additions & 5 deletions test/config.test_myopic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: AGPL-3.0-or-later

version: 0.4.1
version: 0.4.2
logging_level: INFO
tutorial: true

Expand Down Expand Up @@ -69,10 +69,12 @@ fossil_reserves:


export:
h2export: [120] # Yearly export demand in TWh
store: true # [True, False] # specifies wether an export store to balance demand is implemented
store_capital_costs: "no_costs" # ["standard_costs", "no_costs"] # specifies the costs of the export store "standard_costs" takes CAPEX of "hydrogen storage tank type 1 including compressor"
export_profile: "ship" # use "ship" or "constant"
endogenous: false # If true, the export demand is endogenously determined by the model
endogenous_price: 400 # EUR/MWh # Market price, for wich the hydrogen for endogenous exports is sold. Only considered, if ["export"]["endogenous"] is set to true.
store: true # [True, False] # specifies whether an export store to balance demand is implemented
store_capital_costs: "no_costs" # ["standard_costs", "no_costs"] # specifies the costs of the export store. "standard_costs" takes CAPEX of "hydrogen storage tank type 1 including compressor"
h2export: [120] # Yearly export demand in TWh. Only considered, if ["export"]["endogenous"] is set to false
export_profile: "ship" # use "ship" or "constant". Only considered, if ["export"]["endogenous"] is set to false
ship:
ship_capacity: 0.4 # TWh # 0.05 TWh for new ones, 0.003 TWh for Susio Frontier, 0.4 TWh according to Hampp2021: "Corresponds to 11360 t H2 (l) with LHV of 33.3333 Mwh/t_H2. Cihlar et al 2020 based on IEA 2019, Table 3-B"
travel_time: 288 # hours # From Agadir to Rotterdam and back (12*24)
Expand Down
Loading