prepare sectors: allow for updating co2 network costs

This commit is contained in:
Fabian 2023-09-18 12:25:04 +02:00 committed by Fabian Neumann
parent 608a12fed2
commit 254d50b1b4
4 changed files with 47 additions and 11 deletions

View File

@ -125,6 +125,7 @@ rule sync:
shell:
"""
rsync -uvarh --ignore-missing-args --files-from=.sync-send . {params.cluster}
rsync -uvarh --no-g {params.cluster}/resources . || echo "No resources directory, skipping rsync
rsync -uvarh --no-g {params.cluster}/results . || echo "No results directory, skipping rsync"
rsync -uvarh --no-g {params.cluster}/logs . || echo "No logs directory, skipping rsync"
"""

View File

@ -478,6 +478,7 @@ sector:
co2_sequestration_lifetime: 50
co2_spatial: false
co2network: false
co2_network_cost_factor: 1
cc_fraction: 0.9
hydrogen_underground_storage: true
hydrogen_underground_storage_locations:
@ -985,6 +986,7 @@ plotting:
CO2 sequestration: '#f29dae'
DAC: '#ff5270'
co2 stored: '#f2385a'
co2 sequestered: '#f2682f'
co2: '#f29dae'
co2 vent: '#ffd4dc'
CO2 pipeline: '#f5627f'

View File

@ -549,7 +549,7 @@ def patch_electricity_network(n):
n.loads_t.p_set.rename(lambda x: x.strip(), axis=1, inplace=True)
def add_co2_tracking(n, options):
def add_co2_tracking(n, costs, options):
# minus sign because opposite to how fossil fuels used:
# CH4 burning puts CH4 down, atmosphere up
n.add("Carrier", "co2", co2_emissions=-1.0)
@ -576,6 +576,37 @@ def add_co2_tracking(n, options):
unit="t_co2",
)
# add CO2 tanks
n.madd(
"Store",
spatial.co2.nodes,
e_nom_extendable=True,
capital_cost=costs.loc["CO2 storage tank"],
carrier="co2 stored",
bus=spatial.co2.nodes,
)
n.add("Carrier", "co2 stored")
# this tracks CO2 stored, e.g. underground
sequestration_buses = spatial.co2.nodes.str.replace(" stored", " sequestered")
n.madd(
"Bus",
sequestration_buses,
location=spatial.co2.locations,
carrier="co2 sequestered",
unit="t_co2",
)
n.madd(
"Link",
sequestration_buses,
bus0=spatial.co2.nodes,
bus1=sequestration_buses,
carrier="co2 sequestered",
efficiency=1.0,
p_nom_extendable=True,
)
if options["regional_co2_sequestration_potential"]["enable"]:
upper_limit = (
options["regional_co2_sequestration_potential"]["max_size"] * 1e3
@ -591,22 +622,22 @@ def add_co2_tracking(n, options):
.mul(1e6)
/ annualiser
) # t
e_nom_max = e_nom_max.rename(index=lambda x: x + " co2 stored")
e_nom_max = e_nom_max.rename(index=lambda x: x + " co2 sequestered")
else:
e_nom_max = np.inf
n.madd(
"Store",
spatial.co2.nodes,
sequestration_buses,
e_nom_extendable=True,
e_nom_max=e_nom_max,
capital_cost=options["co2_sequestration_cost"],
carrier="co2 stored",
bus=spatial.co2.nodes,
bus=sequestration_buses,
lifetime=options["co2_sequestration_lifetime"],
carrier="co2 sequestered",
)
n.add("Carrier", "co2 stored")
n.add("Carrier", "co2 sequestered")
if options["co2_vent"]:
n.madd(
@ -635,6 +666,8 @@ def add_co2_network(n, costs):
* co2_links.length
)
capital_cost = cost_onshore + cost_submarine
cost_factor = snakemake.config["sector"]["co2_network_cost_factor"]
capital_cost *= cost_factor
n.madd(
"Link",
@ -3626,7 +3659,7 @@ if __name__ == "__main__":
for carrier in conventional:
add_carrier_buses(n, carrier)
add_co2_tracking(n, options)
add_co2_tracking(n, costs, options)
add_generation(n, costs)

View File

@ -202,10 +202,10 @@ def add_co2_sequestration_limit(n, config, limit=200):
n.madd(
"GlobalConstraint",
names,
sense="<=",
constant=limit,
type="primary_energy",
carrier_attribute="co2_absorptions",
sense=">=",
constant=-limit,
type="operational_limit",
carrier_attribute="co2 sequestered",
investment_period=periods,
)