merge master

This commit is contained in:
lisazeyen 2024-08-02 15:58:01 +02:00
commit 68e9593b01
4 changed files with 279 additions and 178 deletions

View File

@ -598,6 +598,7 @@ sector:
conventional_generation:
OCGT: gas
biomass_to_liquid: false
electrobiofuels: false
biosng: false
limit_max_growth:
enable: false
@ -620,6 +621,11 @@ sector:
max_boost: 0.25
var_cf: true
sustainability_factor: 0.0025
solid_biomass_import:
enable: false
price: 54 #EUR/MWh
max_amount: 1390 # TWh
upstream_emissions_factor: .1 #share of solid biomass CO2 emissions at full combustion
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#industry
industry:
@ -1018,6 +1024,7 @@ plotting:
biomass: '#baa741'
solid biomass: '#baa741'
municipal solid waste: '#91ba41'
solid biomass import: '#d5ca8d'
solid biomass transport: '#baa741'
solid biomass for industry: '#7a6d26'
solid biomass for industry CC: '#47411c'
@ -1031,6 +1038,7 @@ plotting:
services rural biomass boiler: '#c6cf98'
services urban decentral biomass boiler: '#dde5b5'
biomass to liquid: '#32CD32'
electrobiofuels: 'red'
BioSNG: '#123456'
# power transmission
lines: '#6c9459'

View File

@ -6,7 +6,7 @@ industry,--,"{true, false}",Flag to include industry sector.
agriculture,--,"{true, false}",Flag to include agriculture sector.
fossil_fuels,--,"{true, false}","Flag to include imports of fossil fuels ( [""coal"", ""gas"", ""oil"", ""lignite""])"
district_heating,--,,`prepare_sector_network.py <https://github.com/PyPSA/pypsa-eur-sec/blob/master/scripts/prepare_sector_network.py>`_
-- potential,--,float,maximum fraction of urban demand which can be supplied by district heating. Ignored where below current fraction.
-- potential,--,float,maximum fraction of urban demand which can be supplied by district heating
-- progress,--,Dictionary with planning horizons as keys., Increase of today's district heating demand to potential maximum district heating share. Progress = 0 means today's district heating share. Progress = 1 means maximum fraction of urban demand is supplied by district heating
-- district_heating_loss,--,float,Share increase in district heat demand in urban central due to heat losses
cluster_heat_buses,--,"{true, false}",Cluster residential and service heat buses in `prepare_sector_network.py <https://github.com/PyPSA/pypsa-eur-sec/blob/master/scripts/prepare_sector_network.py>`_ to one to save memory.
@ -72,7 +72,7 @@ boilers,--,"{true, false}",Add option for transforming gas into heat using gas b
resistive_heaters,--,"{true, false}",Add option for transforming electricity into heat using resistive heaters (independently from gas boilers)
oil_boilers,--,"{true, false}",Add option for transforming oil into heat using boilers
biomass_boiler,--,"{true, false}",Add option for transforming biomass into heat using boilers
overdimension_individual_heating,--,float,Add option for overdimensioning individual heating systems by a certain factor. This allows them to cover heat demand peaks e.g. 10% higher than those in the data with a setting of 1.1.
overdimension_individual_heating,--,"float",Add option for overdimensioning individual heating systems by a certain factor. This allows them to cover heat demand peaks e.g. 10% higher than those in the data with a setting of 1.1.
chp,--,"{true, false}",Add option for using Combined Heat and Power (CHP)
micro_chp,--,"{true, false}",Add option for using Combined Heat and Power (CHP) for decentral areas.
solar_thermal,--,"{true, false}",Add option for using solar thermal to generate heat.
@ -154,3 +154,8 @@ enhanced_geothermal,,,
-- max_boost,--,float,The maximum boost in power output under flexible operation
-- var_cf,--,"{true, false}",Add option for variable capacity factor (see Ricks et al. 2024)
-- sustainability_factor,--,float,Share of sourced heat that is replenished by the earth's core (see details in `build_egs_potentials.py <https://github.com/PyPSA/pypsa-eur-sec/blob/master/scripts/build_egs_potentials.py>`_)
solid_biomass_import,,,
-- enable,--,"{true, false}",Add option to include solid biomass imports
-- price,currency/MWh,float,Price for importing solid biomass
-- max_amount,Twh,float,Maximum solid biomass import potential
-- upstream_emissions_factor,p.u.,float,Upstream emissions of solid biomass imports

1 Unit Values Description
6 agriculture -- {true, false} Flag to include agriculture sector.
7 fossil_fuels -- {true, false} Flag to include imports of fossil fuels ( ["coal", "gas", "oil", "lignite"])
8 district_heating -- `prepare_sector_network.py <https://github.com/PyPSA/pypsa-eur-sec/blob/master/scripts/prepare_sector_network.py>`_
9 -- potential -- float maximum fraction of urban demand which can be supplied by district heating. Ignored where below current fraction. maximum fraction of urban demand which can be supplied by district heating
10 -- progress -- Dictionary with planning horizons as keys. Increase of today's district heating demand to potential maximum district heating share. Progress = 0 means today's district heating share. Progress = 1 means maximum fraction of urban demand is supplied by district heating
11 -- district_heating_loss -- float Share increase in district heat demand in urban central due to heat losses
12 cluster_heat_buses -- {true, false} Cluster residential and service heat buses in `prepare_sector_network.py <https://github.com/PyPSA/pypsa-eur-sec/blob/master/scripts/prepare_sector_network.py>`_ to one to save memory.
72 resistive_heaters -- {true, false} Add option for transforming electricity into heat using resistive heaters (independently from gas boilers)
73 oil_boilers -- {true, false} Add option for transforming oil into heat using boilers
74 biomass_boiler -- {true, false} Add option for transforming biomass into heat using boilers
75 overdimension_individual_heating -- float Add option for overdimensioning individual heating systems by a certain factor. This allows them to cover heat demand peaks e.g. 10% higher than those in the data with a setting of 1.1.
76 chp -- {true, false} Add option for using Combined Heat and Power (CHP)
77 micro_chp -- {true, false} Add option for using Combined Heat and Power (CHP) for decentral areas.
78 solar_thermal -- {true, false} Add option for using solar thermal to generate heat.
154 -- max_boost -- float The maximum boost in power output under flexible operation
155 -- var_cf -- {true, false} Add option for variable capacity factor (see Ricks et al. 2024)
156 -- sustainability_factor -- float Share of sourced heat that is replenished by the earth's core (see details in `build_egs_potentials.py <https://github.com/PyPSA/pypsa-eur-sec/blob/master/scripts/build_egs_potentials.py>`_)
157 solid_biomass_import
158 -- enable -- {true, false} Add option to include solid biomass imports
159 -- price currency/MWh float Price for importing solid biomass
160 -- max_amount Twh float Maximum solid biomass import potential
161 -- upstream_emissions_factor p.u. float Upstream emissions of solid biomass imports

View File

@ -10,6 +10,10 @@ Release Notes
Upcoming Release
================
* Add option to import solid biomass
* Add option to produce electrobiofuels (flag ``electrobiofuels`) from solid biomass and hydrogen, as a combination of BtL and Fischer-Tropsch to make more use of the biogenic carbon
* Add flag ``sector: fossil_fuels`` in config to remove the option of importing fossil fuels
* Renamed the carrier of batteries in BEVs from `battery storage` to `EV battery` and the corresponding bus carrier from `Li ion` to `EV battery`. This is to avoid confusion with stationary battery storage.

View File

@ -2311,6 +2311,54 @@ def add_biomass(n, costs):
e_initial=solid_biomass_potentials_spatial,
)
if options["solid_biomass_import"].get("enable", False):
biomass_import_price = options["solid_biomass_import"]["price"]
# convert TWh in MWh
biomass_import_max_amount = options["solid_biomass_import"]["max_amount"] * 1e6
biomass_import_upstream_emissions = options["solid_biomass_import"][
"upstream_emissions_factor"
]
logger.info(
"Adding biomass import with cost %.2f EUR/MWh, a limit of %.2f TWh, and embedded emissions of %.2f%%",
biomass_import_price,
options["solid_biomass_import"]["max_amount"],
biomass_import_upstream_emissions * 100,
)
n.add("Carrier", "solid biomass import")
n.madd(
"Bus",
["EU solid biomass import"],
location="EU",
carrier="solid biomass import",
)
n.madd(
"Store",
["solid biomass import"],
bus=["EU solid biomass import"],
carrier="solid biomass import",
e_nom=biomass_import_max_amount,
marginal_cost=biomass_import_price,
e_initial=biomass_import_max_amount,
)
n.madd(
"Link",
spatial.biomass.nodes,
suffix=" solid biomass import",
bus0=["EU solid biomass import"],
bus1=spatial.biomass.nodes,
bus2="co2 atmosphere",
carrier="solid biomass import",
efficiency=1.0,
efficiency2=biomass_import_upstream_emissions
* costs.at["solid biomass", "CO2 intensity"],
p_nom_extendable=True,
)
n.madd(
"Store",
spatial.msw.nodes,
@ -2484,28 +2532,23 @@ def add_biomass(n, costs):
bus4=spatial.co2.df.loc[urban_central, "nodes"].values,
carrier="urban central solid biomass CHP CC",
p_nom_extendable=True,
capital_cost=costs.at[key, "fixed"] * costs.at[key, "efficiency"]
capital_cost=costs.at[key + " CC", "fixed"]
* costs.at[key + " CC", "efficiency"]
+ costs.at["biomass CHP capture", "fixed"]
* costs.at["solid biomass", "CO2 intensity"],
marginal_cost=costs.at[key, "VOM"],
efficiency=costs.at[key, "efficiency"]
marginal_cost=costs.at[key + " CC", "VOM"],
efficiency=costs.at[key + " CC", "efficiency"]
- costs.at["solid biomass", "CO2 intensity"]
* (
costs.at["biomass CHP capture", "electricity-input"]
+ costs.at["biomass CHP capture", "compression-electricity-input"]
),
efficiency2=costs.at[key, "efficiency-heat"]
+ costs.at["solid biomass", "CO2 intensity"]
* (
costs.at["biomass CHP capture", "heat-output"]
+ costs.at["biomass CHP capture", "compression-heat-output"]
- costs.at["biomass CHP capture", "heat-input"]
),
efficiency2=costs.at[key + " CC", "efficiency-heat"],
efficiency3=-costs.at["solid biomass", "CO2 intensity"]
* costs.at["biomass CHP capture", "capture_rate"],
efficiency4=costs.at["solid biomass", "CO2 intensity"]
* costs.at["biomass CHP capture", "capture_rate"],
lifetime=costs.at[key, "lifetime"],
lifetime=costs.at[key + " CC", "lifetime"],
)
if options["biomass_boiler"]:
@ -2547,11 +2590,12 @@ def add_biomass(n, costs):
efficiency2=-costs.at["solid biomass", "CO2 intensity"]
+ costs.at["BtL", "CO2 stored"],
p_nom_extendable=True,
capital_cost=costs.at["BtL", "fixed"],
marginal_cost=costs.at["BtL", "efficiency"] * costs.at["BtL", "VOM"],
capital_cost=costs.at["BtL", "fixed"] * costs.at["BtL", "efficiency"],
marginal_cost=costs.at["BtL", "VOM"] * costs.at["BtL", "efficiency"],
)
# TODO: Update with energy penalty
# Assuming that acid gas removal (incl. CO2) from syngas i performed with Rectisol
# process (Methanol) and that electricity demand for this is included in the base process
n.madd(
"Link",
spatial.biomass.nodes,
@ -2567,9 +2611,46 @@ def add_biomass(n, costs):
+ costs.at["BtL", "CO2 stored"] * (1 - costs.at["BtL", "capture rate"]),
efficiency3=costs.at["BtL", "CO2 stored"] * costs.at["BtL", "capture rate"],
p_nom_extendable=True,
capital_cost=costs.at["BtL", "fixed"]
capital_cost=costs.at["BtL", "fixed"] * costs.at["BtL", "efficiency"]
+ costs.at["biomass CHP capture", "fixed"] * costs.at["BtL", "CO2 stored"],
marginal_cost=costs.at["BtL", "efficiency"] * costs.at["BtL", "VOM"],
marginal_cost=costs.at["BtL", "VOM"] * costs.at["BtL", "efficiency"],
)
# Electrobiofuels (BtL with hydrogen addition to make more use of biogenic carbon).
# Combination of efuels and biomass to liquid, both based on Fischer-Tropsch.
# Experimental version - use with caution
if options["electrobiofuels"]:
efuel_scale_factor = costs.at["BtL", "C stored"]
name = (
pd.Index(spatial.biomass.nodes)
+ " "
+ pd.Index(spatial.h2.nodes.str.replace(" H2", ""))
)
n.madd(
"Link",
name,
suffix=" electrobiofuels",
bus0=spatial.biomass.nodes,
bus1=spatial.oil.nodes,
bus2=spatial.h2.nodes,
bus3="co2 atmosphere",
carrier="electrobiofuels",
lifetime=costs.at["electrobiofuels", "lifetime"],
efficiency=costs.at["electrobiofuels", "efficiency-biomass"],
efficiency2=-costs.at["electrobiofuels", "efficiency-hydrogen"],
efficiency3=-costs.at["solid biomass", "CO2 intensity"]
+ costs.at["BtL", "CO2 stored"]
* (1 - costs.at["Fischer-Tropsch", "capture rate"]),
p_nom_extendable=True,
capital_cost=costs.at["BtL", "fixed"] * costs.at["BtL", "efficiency"]
+ efuel_scale_factor
* costs.at["Fischer-Tropsch", "fixed"]
* costs.at["Fischer-Tropsch", "efficiency"],
marginal_cost=costs.at["BtL", "VOM"] * costs.at["BtL", "efficiency"]
+ efuel_scale_factor
* costs.at["Fischer-Tropsch", "VOM"]
* costs.at["Fischer-Tropsch", "efficiency"],
)
# BioSNG from solid biomass
@ -2587,11 +2668,12 @@ def add_biomass(n, costs):
efficiency3=-costs.at["solid biomass", "CO2 intensity"]
+ costs.at["BioSNG", "CO2 stored"],
p_nom_extendable=True,
capital_cost=costs.at["BioSNG", "fixed"],
marginal_cost=costs.at["BioSNG", "efficiency"] * costs.at["BioSNG", "VOM"],
capital_cost=costs.at["BioSNG", "fixed"] * costs.at["BioSNG", "efficiency"],
marginal_cost=costs.at["BioSNG", "VOM"] * costs.at["BioSNG", "efficiency"],
)
# TODO: Update with energy penalty for CC
# Assuming that acid gas removal (incl. CO2) from syngas i performed with Rectisol
# process (Methanol) and that electricity demand for this is included in the base process
n.madd(
"Link",
spatial.biomass.nodes,
@ -2609,10 +2691,10 @@ def add_biomass(n, costs):
+ costs.at["BioSNG", "CO2 stored"]
* (1 - costs.at["BioSNG", "capture rate"]),
p_nom_extendable=True,
capital_cost=costs.at["BioSNG", "fixed"]
capital_cost=costs.at["BioSNG", "fixed"] * costs.at["BioSNG", "efficiency"]
+ costs.at["biomass CHP capture", "fixed"]
* costs.at["BioSNG", "CO2 stored"],
marginal_cost=costs.at["BioSNG", "efficiency"] * costs.at["BioSNG", "VOM"],
marginal_cost=costs.at["BioSNG", "VOM"] * costs.at["BioSNG", "efficiency"],
)
@ -3183,7 +3265,9 @@ def add_industry(n, costs):
carrier="waste CHP CC",
p_nom_extendable=True,
capital_cost=costs.at["waste CHP CC", "fixed"]
* costs.at["waste CHP CC", "efficiency"],
* costs.at["waste CHP CC", "efficiency"]
+ costs.at["biomass CHP capture", "fixed"]
* costs.at["oil", "CO2 intensity"],
marginal_cost=costs.at["waste CHP CC", "VOM"],
efficiency=costs.at["waste CHP CC", "efficiency"],
efficiency2=costs.at["waste CHP CC", "efficiency-heat"],