Skip to content

Commit

Permalink
Merge branch 'PyPSA:master' into osm-network-fast
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbyxng committed Jul 11, 2024
2 parents e0ae315 + c50a377 commit 801daf5
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 24 deletions.
13 changes: 7 additions & 6 deletions config/config.default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -575,12 +575,13 @@ sector:
min_part_load_fischer_tropsch: 0.5
min_part_load_methanolisation: 0.3
min_part_load_methanation: 0.3
use_fischer_tropsch_waste_heat: true
use_haber_bosch_waste_heat: true
use_methanolisation_waste_heat: true
use_methanation_waste_heat: true
use_fuel_cell_waste_heat: true
use_electrolysis_waste_heat: true
use_waste_heat:
fischer_tropsch: 0.25
haber_bosch: 0.25
methanolisation: 0.25
methanation: 0.25
fuel_cell: 0.25
electrolysis: 0.25
electricity_transmission_grid: true
electricity_distribution_grid: true
electricity_distribution_grid_cost_factor: 1.0
Expand Down
4 changes: 4 additions & 0 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Release Notes
Upcoming Release
================

* Changed default assumptions about waste heat usage from PtX and fuel cells in district heating.
The default value for the link efficiency scaling factor was changed from 100% to 25%.
It can be set to other values in the configuration ``sector: use_waste_heat:``.

* In simplifying polygons in :mod:`build_shapes` default to no tolerance.

* Set non-zero capital_cost for methanol stores to avoid unrealistic storage sizes
Expand Down
12 changes: 6 additions & 6 deletions scripts/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,12 +644,12 @@ def update_config_from_wildcards(config, w, inplace=True):
config["sector"]["H2_network"] = False

if "nowasteheat" in opts:
config["sector"]["use_fischer_tropsch_waste_heat"] = False
config["sector"]["use_methanolisation_waste_heat"] = False
config["sector"]["use_haber_bosch_waste_heat"] = False
config["sector"]["use_methanation_waste_heat"] = False
config["sector"]["use_fuel_cell_waste_heat"] = False
config["sector"]["use_electrolysis_waste_heat"] = False
config["sector"]["use_waste_heat"]["fischer_tropsch"] = False
config["sector"]["use_waste_heat"]["methanolisation"] = False
config["sector"]["use_waste_heat"]["haber_bosch"] = False
config["sector"]["use_waste_heat"]["methanation"] = False
config["sector"]["use_waste_heat"]["fuel_cell"] = False
config["sector"]["use_waste_heat"]["electrolysis"] = False

if "nodistrict" in opts:
config["sector"]["district_heating"]["progress"] = 0.0
Expand Down
33 changes: 21 additions & 12 deletions scripts/prepare_sector_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -3342,26 +3342,32 @@ def add_waste_heat(n):

# TODO what is the 0.95 and should it be a config option?
if (
options["use_fischer_tropsch_waste_heat"]
options["use_waste_heat"].get("fischer_tropsch", 1)
and "Fischer-Tropsch" in link_carriers
):
n.links.loc[urban_central + " Fischer-Tropsch", "bus3"] = (
urban_central + " urban central heat"
)
n.links.loc[urban_central + " Fischer-Tropsch", "efficiency3"] = (
0.95 - n.links.loc[urban_central + " Fischer-Tropsch", "efficiency"]
)
) * options["use_waste_heat"].get("fischer_tropsch", 1)

if options["use_methanation_waste_heat"] and "Sabatier" in link_carriers:
if (
options["use_waste_heat"].get("methanation", 1)
and "Sabatier" in link_carriers
):
n.links.loc[urban_central + " Sabatier", "bus3"] = (
urban_central + " urban central heat"
)
n.links.loc[urban_central + " Sabatier", "efficiency3"] = (
0.95 - n.links.loc[urban_central + " Sabatier", "efficiency"]
)
) * options["use_waste_heat"].get("methanation", 1)

# DEA quotes 15% of total input (11% of which are high-value heat)
if options["use_haber_bosch_waste_heat"] and "Haber-Bosch" in link_carriers:
if (
options["use_waste_heat"].get("haber_bosch", 1)
and "Haber-Bosch" in link_carriers
):
n.links.loc[urban_central + " Haber-Bosch", "bus3"] = (
urban_central + " urban central heat"
)
Expand All @@ -3375,10 +3381,10 @@ def add_waste_heat(n):
)
n.links.loc[urban_central + " Haber-Bosch", "efficiency3"] = (
0.15 * total_energy_input / electricity_input
)
) * options["use_waste_heat"].get("haber_bosch", 1)

if (
options["use_methanolisation_waste_heat"]
options["use_waste_heat"].get("methanolisation", 1)
and "methanolisation" in link_carriers
):
n.links.loc[urban_central + " methanolisation", "bus4"] = (
Expand All @@ -3387,27 +3393,30 @@ def add_waste_heat(n):
n.links.loc[urban_central + " methanolisation", "efficiency4"] = (
costs.at["methanolisation", "heat-output"]
/ costs.at["methanolisation", "hydrogen-input"]
)
) * options["use_waste_heat"].get("methanolisation", 1)

# TODO integrate usable waste heat efficiency into technology-data from DEA
if (
options.get("use_electrolysis_waste_heat", False)
options["use_waste_heat"].get("electrolysis", 1)
and "H2 Electrolysis" in link_carriers
):
n.links.loc[urban_central + " H2 Electrolysis", "bus2"] = (
urban_central + " urban central heat"
)
n.links.loc[urban_central + " H2 Electrolysis", "efficiency2"] = (
0.84 - n.links.loc[urban_central + " H2 Electrolysis", "efficiency"]
)
) * options["use_waste_heat"].get("electrolysis", 1)

if options["use_fuel_cell_waste_heat"] and "H2 Fuel Cell" in link_carriers:
if (
options["use_waste_heat"].get("fuel_cell", 1)
and "H2 Fuel Cell" in link_carriers
):
n.links.loc[urban_central + " H2 Fuel Cell", "bus2"] = (
urban_central + " urban central heat"
)
n.links.loc[urban_central + " H2 Fuel Cell", "efficiency2"] = (
0.95 - n.links.loc[urban_central + " H2 Fuel Cell", "efficiency"]
)
) * options["use_waste_heat"].get("fuel_cell", 1)


def add_agriculture(n, costs):
Expand Down

0 comments on commit 801daf5

Please sign in to comment.