make waste-to-energy work without regional_oil_demand

This commit is contained in:
Fabian Neumann 2024-05-13 17:13:16 +02:00
parent afa5cc5014
commit 649e277c7d
2 changed files with 51 additions and 50 deletions

View File

@ -669,6 +669,7 @@ industry:
2050: 0.20 2050: 0.20
HVC_environment_sequestration_fraction: 0. HVC_environment_sequestration_fraction: 0.
waste_to_energy: false waste_to_energy: false
waste_to_energy_cc: false
sector_ratios_fraction_future: sector_ratios_fraction_future:
2020: 0.0 2020: 0.0
2025: 0.1 2025: 0.1

View File

@ -906,8 +906,6 @@ def add_ammonia(n, costs):
nodes = pop_layout.index nodes = pop_layout.index
cf_industry = snakemake.params.industry
n.add("Carrier", "NH3") n.add("Carrier", "NH3")
n.madd( n.madd(
@ -2901,18 +2899,17 @@ def add_industry(n, costs):
emitted_co2_per_naphtha = costs.at["oil", "CO2 intensity"] - process_co2_per_naphtha emitted_co2_per_naphtha = costs.at["oil", "CO2 intensity"] - process_co2_per_naphtha
non_sequestered = 1 - get( non_sequestered = 1 - get(
snakemake.config["industry"]["HVC_environment_sequestration_fraction"], cf_industry["HVC_environment_sequestration_fraction"],
investment_year, investment_year,
) )
if ( if cf_industry["waste_to_energy"] or cf_industry["waste_to_energy_cc"]:
snakemake.config["industry"]["waste_to_energy"]
and options["regional_oil_demand"] # Should warn if regional_oil_demand is not true!!? non_sequestered_hvc_locations = pd.Index(spatial.oil.demand_locations) + " non-sequestered HVC"
):
n.madd( n.madd(
"Bus", "Bus",
spatial.oil.demand_locations + " non-sequestered HVC", non_sequestered_hvc_locations,
location=spatial.oil.demand_locations, location=spatial.oil.demand_locations,
carrier="non-sequestered HVC", carrier="non-sequestered HVC",
unit="MWh_LHV", unit="MWh_LHV",
@ -2923,7 +2920,7 @@ def add_industry(n, costs):
spatial.oil.naphtha, spatial.oil.naphtha,
bus0=spatial.oil.nodes, bus0=spatial.oil.nodes,
bus1=spatial.oil.naphtha, bus1=spatial.oil.naphtha,
bus2=spatial.oil.demand_locations + " non-sequestered HVC", bus2=non_sequestered_hvc_locations,
bus3=spatial.co2.process_emissions, bus3=spatial.co2.process_emissions,
carrier="naphtha for industry", carrier="naphtha for industry",
p_nom_extendable=True, p_nom_extendable=True,
@ -2935,53 +2932,56 @@ def add_industry(n, costs):
n.madd( n.madd(
"Link", "Link",
spatial.oil.demand_locations + " HVC to air", spatial.oil.demand_locations,
bus0=spatial.oil.demand_locations + " non-sequestered HVC", suffix=" HVC to air",
bus0=non_sequestered_hvc_locations,
bus1="co2 atmosphere", bus1="co2 atmosphere",
carrier="HVC to air", carrier="HVC to air",
p_nom_extendable=True, p_nom_extendable=True,
efficiency=costs.at["oil", "CO2 intensity"], efficiency=costs.at["oil", "CO2 intensity"],
) )
n.madd( if cf_industry["waste_to_energy"]:
"Link",
spatial.oil.demand_locations + " waste CHP",
bus0=spatial.oil.demand_locations + " non-sequestered HVC",
bus1=spatial.oil.demand_locations,
bus2=spatial.oil.demand_locations + "urban central heat",
bus3="co2 atmosphere",
carrier="waste CHP",
p_nom_extendable=True,
# p_nom=biomass_potential['municipal solid waste'] / 8760,
capital_cost=costs.at["waste CHP", "fixed"]
* costs.at["waste CHP", "efficiency"],
marginal_cost=costs.at["waste CHP", "VOM"],
efficiency=costs.at["waste CHP", "efficiency"],
efficiency2=costs.at['waste CHP', 'efficiency-heat'],
efficiency3=costs.at["oil", "CO2 intensity"],
lifetime=costs.at["waste CHP", "lifetime"],
)
n.madd( n.madd(
"Link", "Link",
spatial.oil.demand_locations + " waste CHP CC", spatial.nodes + " waste CHP",
bus0=spatial.oil.demand_locations + " non-sequestered HVC", bus0=non_sequestered_hvc_locations,
bus1=spatial.oil.demand_locations, bus1=spatial.nodes,
bus2=spatial.oil.demand_locations + "urban central heat", bus2=spatial.nodes + " urban central heat",
bus3="co2 atmosphere", bus3="co2 atmosphere",
bus4=spatial.co2.nodes, carrier="waste CHP",
carrier="waste CHP CC", p_nom_extendable=True,
p_nom_extendable=True, capital_cost=costs.at["waste CHP", "fixed"]
# p_nom=biomass_potential['municipal solid waste'] / 8760, * costs.at["waste CHP", "efficiency"],
capital_cost=costs.at["waste CHP CC", "fixed"] marginal_cost=costs.at["waste CHP", "VOM"],
* costs.at["waste CHP CC", "efficiency"], efficiency=costs.at["waste CHP", "efficiency"],
marginal_cost=costs.at["waste CHP CC", "VOM"], efficiency2=costs.at['waste CHP', 'efficiency-heat'],
efficiency=costs.at["waste CHP CC", "efficiency"], efficiency3=costs.at["oil", "CO2 intensity"],
efficiency2=costs.at["waste CHP CC", 'efficiency-heat'], lifetime=costs.at["waste CHP", "lifetime"],
efficiency3=costs.at["oil", "CO2 intensity"] * (1 - options["cc_fraction"]), )
efficiency4=costs.at["oil", "CO2 intensity"] * options["cc_fraction"],
lifetime=costs.at["waste CHP CC", "lifetime"], if cf_industry["waste_to_energy_cc"]:
)
n.madd(
"Link",
spatial.nodes + " waste CHP CC",
bus0=non_sequestered_hvc_locations,
bus1=spatial.nodes,
bus2=spatial.nodes + " urban central heat",
bus3="co2 atmosphere",
bus4=spatial.co2.nodes,
carrier="waste CHP CC",
p_nom_extendable=True,
capital_cost=costs.at["waste CHP CC", "fixed"]
* costs.at["waste CHP CC", "efficiency"],
marginal_cost=costs.at["waste CHP CC", "VOM"],
efficiency=costs.at["waste CHP CC", "efficiency"],
efficiency2=costs.at["waste CHP CC", 'efficiency-heat'],
efficiency3=costs.at["oil", "CO2 intensity"] * (1 - options["cc_fraction"]),
efficiency4=costs.at["oil", "CO2 intensity"] * options["cc_fraction"],
lifetime=costs.at["waste CHP CC", "lifetime"],
)
else: else:
@ -3207,7 +3207,6 @@ def add_waste_heat(n):
# TODO options? # TODO options?
logger.info("Add possibility to use industrial waste heat in district heating") logger.info("Add possibility to use industrial waste heat in district heating")
cf_industry = snakemake.params.industry
# AC buses with district heating # AC buses with district heating
urban_central = n.buses.index[n.buses.carrier == "urban central heat"] urban_central = n.buses.index[n.buses.carrier == "urban central heat"]
@ -3672,6 +3671,7 @@ if __name__ == "__main__":
update_config_from_wildcards(snakemake.config, snakemake.wildcards) update_config_from_wildcards(snakemake.config, snakemake.wildcards)
options = snakemake.params.sector options = snakemake.params.sector
cf_industry = snakemake.params.industry
investment_year = int(snakemake.wildcards.planning_horizons[-4:]) investment_year = int(snakemake.wildcards.planning_horizons[-4:])