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

Fixes for new CHP fuel config; list biomass among fuels #1414

Merged
merged 1 commit into from
Nov 8, 2024
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
6 changes: 4 additions & 2 deletions config/config.default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -599,8 +599,10 @@ sector:
central: 1.0
chp:
enable: true
fuel: gas # for all fuels the same techno economic data from gas CHP is taken
micro_chp: false
fuel:
- solid biomass # For solid biomass, CHP with and without CC are added
- gas # For all other fuels the same techno economic data from gas CHP is taken
micro_chp: false # Only gas is used for micro_chp
solar_thermal: true
solar_cf_correction: 0.788457 # = >>> 1/1.2683
marginal_cost_storage: 0. #1e-4
Expand Down
4 changes: 2 additions & 2 deletions doc/configtables/sector.csv
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ overdimension_heat_generators,,,Add option for overdimensioning heating systems
-- central,--,float,The factor for overdimensioning (increasing CAPEX) central heating systems
chp,--,,
-- enable,--,"{true, false}",Add option for using Combined Heat and Power (CHP)
-- fuel,--,string or list of fuels,"Possible options are all fuels which have an exisitng bus and their CO2 intensity is given in the technology data. Currently possible are ""gas"", ""oil"", ""methanol"", ""lignite"", ""coal"". For all fuels, the techno-economic data from gas CHP is used."
micro_chp,--,"{true, false}",Add option for using Combined Heat and Power (CHP) for decentral areas.
-- fuel,--,list of fuels,"Possible options are all fuels which have an existing bus and their CO2 intensity is given in the technology data. Currently possible are ""gas"", ""oil"", ""methanol"", ""lignite"", ""coal"" as well as ""solid biomass"". For all fuels except solid biomass, the techno-economic data from gas CHP is used. For the special case of solid biomass fuel, both CHP plants with and without carbon capture are added."
-- micro_chp,--,"{true, false}",Add option for using gas-fired Combined Heat and Power (CHP) for decentral areas.
solar_thermal,--,"{true, false}",Add option for using solar thermal to generate heat.
solar_cf_correction,--,float,The correction factor for the value provided by the solar thermal profile calculations
marginal_cost_storage,"currency/MWh ",float,The marginal cost of discharging batteries in distributed grids
Expand Down
2 changes: 1 addition & 1 deletion doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Release Notes
Upcoming Release
================

* Feature: Allow CHPs to use different fuel sources such as gas, oil, coal, and methanol. Note that the cost assumptions are based on a gas CHP.
* Feature: Allow CHPs to use different fuel sources such as gas, oil, coal, and methanol. Note that the cost assumptions are based on a gas CHP (except for solid biomass-fired CHP).

* Improve `sanitize_carrier`` function by filling in colors of missing carriers with colors mapped after using the function `rename_techs`.

Expand Down
19 changes: 12 additions & 7 deletions scripts/prepare_sector_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -2283,10 +2283,11 @@ def add_heat(n: pypsa.Network, costs: pd.DataFrame, cop: xr.DataArray):
)

if options["chp"]["enable"] and heat_system == HeatSystem.URBAN_CENTRAL:
# add gas CHP; biomass CHP is added in biomass section
fuels = options["chp"]["fuel"]
fuels = np.atleast_1d(fuels)
for fuel in fuels:
# add non-biomass CHP; biomass CHP is added in biomass section
for fuel in options["chp"]["fuel"]:
if fuel == "solid biomass":
# Solid biomass CHP is added in add_biomass
continue
fuel_nodes = getattr(spatial, fuel).df
n.add(
"Link",
Expand Down Expand Up @@ -2346,8 +2347,8 @@ def add_heat(n: pypsa.Network, costs: pd.DataFrame, cop: xr.DataArray):
)

if (
options["chp"]
and options["micro_chp"]
options["chp"]["enable"]
and options["chp"]["micro_chp"]
and heat_system.value != "urban central"
):
n.add(
Expand Down Expand Up @@ -2909,7 +2910,11 @@ def add_biomass(n, costs):

# AC buses with district heating
urban_central = n.buses.index[n.buses.carrier == "urban central heat"]
if not urban_central.empty and options["chp"]:
if (
not urban_central.empty
and options["chp"]["enable"]
and ("solid biomass" in options["chp"]["fuel"])
):
urban_central = urban_central.str[: -len(" urban central heat")]

key = "central solid biomass CHP"
Expand Down
Loading