Skip to content

Commit

Permalink
Merge pull request #1009 from openego/features/#984-gas-costs
Browse files Browse the repository at this point in the history
  • Loading branch information
AmeliaNadal committed Feb 16, 2023
2 parents 052c734 + aae5358 commit 7a7ea34
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 24 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,8 @@ Bug Fixes
* Overwrite capacities for conventional power plants with data from nep
list
`#403 <https://github.com/openego/eGon-data/issues/403>`_
* Correct gas technology costs for eGon100RE
`#984 <https://github.com/openego/eGon-data/issues/984>`_
* Adjust p_nom and marginal cost for OCGT in eGon2035
`#863 <https://github.com/openego/eGon-data/issues/863>`_
* Mismatch of building bus_ids from cts_heat_demand_building_share
Expand Down
2 changes: 1 addition & 1 deletion src/egon/data/datasets/hydrogen_etrago/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class HydrogenGridEtrago(Dataset):
def __init__(self, dependencies):
super().__init__(
name="HydrogenGridEtrago",
version="0.0.1",
version="0.0.2",
dependencies=dependencies,
tasks=(insert_h2_pipelines,),
)
6 changes: 3 additions & 3 deletions src/egon/data/datasets/hydrogen_etrago/h2_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def insert_h2_pipelines():
new_pipelines["p_nom_extendable"] = True
new_pipelines["length"] = new_pipelines.to_crs(epsg=3035).geometry.length

# ToDo: insert capital cost data
# Insert capital cost data
new_pipelines["capital_cost"] = (
scn_params["capital_cost"]["H2_pipeline"]
* new_pipelines["length"]
Expand Down Expand Up @@ -143,12 +143,12 @@ def insert_h2_pipelines():
"""
select UpdateGeometrySRID('grid', 'egon_etrago_h2_link', 'topo', 4326) ;
INSERT INTO grid.egon_etrago_link (scn_name,
INSERT INTO grid.egon_etrago_link (scn_name, capital_cost,
link_id, carrier,
bus0, bus1,
p_nom_extendable, length,
geom, topo)
SELECT scn_name,
SELECT scn_name, capital_cost,
link_id, carrier,
bus0, bus1,
p_nom_extendable, length,
Expand Down
4 changes: 2 additions & 2 deletions src/egon/data/datasets/pypsaeursec/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ def neighbor_reduction():

# Correct geometry for non AC buses
carriers = set(neighbors.carrier.to_list())
carriers.remove("AC")
carriers = [e for e in carriers if e not in ("AC", "biogas")]
non_AC_neighbors = pd.DataFrame()
for c in carriers:
c_neighbors = neighbors[neighbors.carrier == c].set_index(
Expand Down Expand Up @@ -799,7 +799,7 @@ def links_to_etrago(neighbor_links, scn="eGon100RE", extendable=True):
]

# delete unwanted carriers for eTraGo
excluded_carriers = ["gas for industry CC", "SMR CC"]
excluded_carriers = ["gas for industry CC", "SMR CC", "biogas to gas"]
neighbor_links = neighbor_links[
~neighbor_links.carrier.isin(excluded_carriers)
]
Expand Down
64 changes: 46 additions & 18 deletions src/egon/data/datasets/scenario_parameters/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ def gas(scenario):
parameters["efficiency"] = {
"power_to_H2": read_costs(costs, "electrolysis", "efficiency"),
"H2_to_power": read_costs(costs, "fuel cell", "efficiency"),
"CH4_to_H2": read_costs(costs, "SMR", "efficiency"), # CC?
"CH4_to_H2": read_costs(costs, "SMR", "efficiency"),
"H2_feedin": 1,
"H2_to_CH4": read_costs(costs, "methanation", "efficiency"),
"OCGT": read_costs(costs, "OCGT", "efficiency"),
Expand All @@ -508,9 +508,8 @@ def gas(scenario):
parameters["overnight_cost"] = {
"power_to_H2": read_costs(costs, "electrolysis", "investment"),
"H2_to_power": read_costs(costs, "fuel cell", "investment"),
"CH4_to_H2": read_costs(costs, "SMR", "investment"), # CC?
"CH4_to_H2": read_costs(costs, "SMR", "investment"),
"H2_to_CH4": read_costs(costs, "methanation", "investment"),
# what about H2 compressors?
"H2_feedin": 0,
"H2_underground": read_costs(
costs, "hydrogen storage underground", "investment"
Expand All @@ -527,9 +526,8 @@ def gas(scenario):
parameters["lifetime"] = {
"power_to_H2": read_costs(costs, "electrolysis", "lifetime"),
"H2_to_power": read_costs(costs, "fuel cell", "lifetime"),
"CH4_to_H2": read_costs(costs, "SMR", "lifetime"), # CC?
"CH4_to_H2": read_costs(costs, "SMR", "lifetime"),
"H2_to_CH4": read_costs(costs, "methanation", "lifetime"),
# what about H2 compressors?
"H2_underground": read_costs(
costs, "hydrogen storage underground", "lifetime"
),
Expand Down Expand Up @@ -568,6 +566,7 @@ def gas(scenario):
elif scenario == "eGon100RE":

costs = read_csv(2050)
interest_rate = 0.07 # [p.u.]

parameters = {
"main_gas_carrier": "H2",
Expand All @@ -585,17 +584,35 @@ def gas(scenario):
parameters["efficiency"] = {
"power_to_H2": read_costs(costs, "electrolysis", "efficiency"),
"H2_to_power": read_costs(costs, "fuel cell", "efficiency"),
"CH4_to_H2": read_costs(costs, "SMR", "efficiency"), # CC?
"CH4_to_H2": read_costs(costs, "SMR", "efficiency"),
"H2_to_CH4": read_costs(costs, "methanation", "efficiency"),
"OCGT": read_costs(costs, "OCGT", "efficiency"),
}

# Insert FOM in %
parameters["FOM"] = {
"H2_underground": read_costs(
costs, "hydrogen storage underground", "FOM"
),
"H2_overground": read_costs(
costs, "hydrogen storage tank incl. compressor", "FOM"
),
"power_to_H2": read_costs(costs, "electrolysis", "FOM"),
"H2_to_power": read_costs(costs, "fuel cell", "FOM"),
"CH4_to_H2": read_costs(costs, "SMR", "FOM"),
"H2_to_CH4": read_costs(costs, "methanation", "FOM"),
"H2_pipeline": read_costs(costs, "H2 (g) pipeline", "FOM"),
"H2_pipeline_retrofit": read_costs(
costs, "H2 (g) pipeline repurposed", "FOM"
),
}

# Insert overnight investment costs
parameters["overnight_cost"] = {
"power_to_H2": read_costs(costs, "electrolysis", "investment"),
"H2_to_power": read_costs(costs, "fuel cell", "investment"),
"CH4_to_H2": read_costs(costs, "SMR", "investment"), # CC?
"CH4_to_H2": read_costs(costs, "SMR", "investment"),
"H2_to_CH4": read_costs(costs, "methanation", "investment"),
# what about H2 compressors?
"H2_underground": read_costs(
costs, "hydrogen storage underground", "investment"
),
Expand All @@ -614,9 +631,8 @@ def gas(scenario):
parameters["lifetime"] = {
"power_to_H2": read_costs(costs, "electrolysis", "lifetime"),
"H2_to_power": read_costs(costs, "fuel cell", "lifetime"),
"CH4_to_H2": read_costs(costs, "SMR", "lifetime"), # CC?
"CH4_to_H2": read_costs(costs, "SMR", "lifetime"),
"H2_to_CH4": read_costs(costs, "methanation", "lifetime"),
# what about H2 compressors?
"H2_underground": read_costs(
costs, "hydrogen storage underground", "lifetime"
),
Expand All @@ -633,18 +649,30 @@ def gas(scenario):
parameters["capital_cost"] = {}

for comp in parameters["overnight_cost"].keys():
parameters["capital_cost"][comp] = annualize_capital_costs(
parameters["overnight_cost"][comp],
parameters["lifetime"][comp],
global_settings("eGon2035")["interest_rate"],
parameters["capital_cost"][comp] = (
annualize_capital_costs(
parameters["overnight_cost"][comp],
parameters["lifetime"][comp],
interest_rate,
)
+ parameters["overnight_cost"][comp]
* (parameters["FOM"][comp] / 100)
)

for comp in ["H2_to_power", "H2_to_CH4"]:
parameters["capital_cost"][comp] = (
annualize_capital_costs(
parameters["overnight_cost"][comp],
parameters["lifetime"][comp],
interest_rate,
)
+ parameters["overnight_cost"][comp]
* (parameters["FOM"][comp] / 100)
) * parameters["efficiency"][comp]

parameters["marginal_cost"] = {
# "CH4": global_settings(scenario)["fuel_costs"]["gas"]
# + global_settings(scenario)["co2_costs"]
# * global_settings(scenario)["co2_emissions"]["gas"],
"OCGT": read_costs(costs, "OCGT", "VOM"),
"biogas": global_settings(scenario)["fuel_costs"]["gas"],
"biogas": read_costs(costs, "biogas", "fuel"),
"chp_gas": read_costs(costs, "central gas CHP", "VOM"),
}

Expand Down

0 comments on commit 7a7ea34

Please sign in to comment.