Skip to content

Commit

Permalink
Merge pull request #1201 from energyLS/endogenous_export
Browse files Browse the repository at this point in the history
Add endogenous export
  • Loading branch information
ekatef authored Nov 28, 2024
2 parents e6e3347 + a347e25 commit ccc3c64
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 17 deletions.
2 changes: 2 additions & 0 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -1155,6 +1155,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 @@ -33,6 +33,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>`__

* Remove elec-based H2 and battery technologies before addition in `prepare_sector_network.py` script and fix bus names for links that models H2 repuspose network `PR #1198 <https://github.com/pypsa-meets-earth/pypsa-earth/pull/1198>`__

**Minor Changes and bug-fixing**
Expand Down
29 changes: 21 additions & 8 deletions scripts/add_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,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

0 comments on commit ccc3c64

Please sign in to comment.