add switch for msw waste

This commit is contained in:
lisazeyen 2024-08-05 10:32:22 +02:00
parent f58322c3e5
commit a56834e51e
2 changed files with 71 additions and 53 deletions

View File

@ -600,6 +600,7 @@ sector:
biomass_to_liquid: false
electrobiofuels: false
biosng: false
municipal_solid_waste: false
limit_max_growth:
enable: false
# allowing 30% larger than max historic growth
@ -627,6 +628,7 @@ sector:
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:
St_primary_fraction:

View File

@ -2266,8 +2266,38 @@ def add_biomass(n, costs):
n.add("Carrier", "biogas")
n.add("Carrier", "solid biomass")
if (options["municipal_solid_waste"] and not options["industry"]
and cf_industry["waste_to_energy"] or cf_industry["waste_to_energy_cc"]):
logger.warning("Flag municipal_solid_waste can be only used with industry "
"sector waste to energy."
"Setting municipal_solid_waste=False.")
options["municipal_solid_waste"] = False
if options["municipal_solid_waste"]:
n.add("Carrier", "municipal solid waste")
n.madd(
"Bus",
spatial.msw.nodes,
location=spatial.msw.locations,
carrier="municipal solid waste",
)
e_max_pu = pd.Series([1] * (len(n.snapshots) - 1) + [0], index=n.snapshots)
n.madd(
"Store",
spatial.msw.nodes,
bus=spatial.msw.nodes,
carrier="municipal solid waste",
e_nom=msw_biomass_potentials_spatial,
marginal_cost=0, # costs.at["municipal solid waste", "fuel"],
e_max_pu=e_max_pu,
e_initial=msw_biomass_potentials_spatial,
)
n.madd(
"Bus",
spatial.gas.biogas,
@ -2284,12 +2314,6 @@ def add_biomass(n, costs):
unit="MWh_LHV",
)
n.madd(
"Bus",
spatial.msw.nodes,
location=spatial.msw.locations,
carrier="municipal solid waste",
)
n.madd(
"Store",
@ -2359,17 +2383,7 @@ def add_biomass(n, costs):
p_nom_extendable=True,
)
e_max_pu = pd.Series([1] * (len(n.snapshots) - 1) + [0], index=n.snapshots)
n.madd(
"Store",
spatial.msw.nodes,
bus=spatial.msw.nodes,
carrier="municipal solid waste",
e_nom=msw_biomass_potentials_spatial,
marginal_cost=0, # costs.at["municipal solid waste", "fuel"],
e_max_pu=e_max_pu,
e_initial=msw_biomass_potentials_spatial,
)
n.madd(
"Link",
@ -2442,6 +2456,7 @@ def add_biomass(n, costs):
carrier="solid biomass transport",
)
if options["municipal_solid_waste"]:
n.madd(
"Link",
biomass_transport.index,
@ -2483,6 +2498,7 @@ def add_biomass(n, costs):
type="operational_limit",
)
if options["municipal_solid_waste"]:
# Add municipal solid waste
n.madd(
"Generator",
@ -3207,7 +3223,7 @@ def add_industry(n, costs):
efficiency3=process_co2_per_naphtha,
)
if options.get("biomass", True):
if options.get("biomass", True) and options["municipal_solid_waste"]:
n.madd(
"Link",
spatial.msw.locations,
@ -4110,7 +4126,7 @@ if __name__ == "__main__":
"prepare_sector_network",
simpl="",
opts="",
clusters="1",
clusters="37",
ll="vopt",
sector_opts="",
planning_horizons="2050",