From 2a3b576cbd9723880d39116b949fe5bcd02dc99d Mon Sep 17 00:00:00 2001 From: Ebbe Kyhl Date: Tue, 14 Jun 2022 15:00:53 +0200 Subject: [PATCH 1/3] Add coal with carbon capture --- config.default.yaml | 1 + scripts/prepare_sector_network.py | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/config.default.yaml b/config.default.yaml index d48879c6..b56553ec 100644 --- a/config.default.yaml +++ b/config.default.yaml @@ -232,6 +232,7 @@ sector: marginal_cost_storage: 0. #1e-4 methanation: true helmeth: true + coal_cc: true dac: true co2_vent: true SMR: true diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index f0f60934..66be98de 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -1118,6 +1118,23 @@ def add_storage_and_grids(n, costs): lifetime=costs.at['helmeth', 'lifetime'] ) + if options['coal_cc']: + + for generator,carrier in [("coal CC","coal")]: + n.madd("Link", + nodes + " " + generator, + bus0=["EU " + carrier]*len(nodes), + bus1=nodes, + bus2="co2 atmosphere", + bus3="co2 stored", + marginal_cost=costs.at['coal','efficiency']*costs.at['coal','VOM'], #NB: VOM is per MWel + capital_cost=costs.at['coal','efficiency']*costs.at['coal','fixed']+ costs.at['biomass CHP capture','fixed']*costs.at[carrier,'CO2 intensity'], #NB: fixed cost is per MWel + p_nom_extendable=True, + carrier=generator, + efficiency=costs.at['coal','efficiency'], + efficiency2=costs.at[carrier,'CO2 intensity']*(1-costs.at['biomass CHP capture','capture_rate']), + efficiency3=costs.at[carrier,'CO2 intensity']*costs.at['biomass CHP capture','capture_rate'], + lifetime=costs.at['coal','lifetime']) if options['SMR']: From 5ae56cca7c056646a42cb16161ac56fcf3dce1b7 Mon Sep 17 00:00:00 2001 From: Ebbe Kyhl <69363603+ebbekyhl@users.noreply.github.com> Date: Mon, 27 Jun 2022 18:06:59 +0200 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Fabian Neumann --- config.default.yaml | 2 +- scripts/prepare_sector_network.py | 33 ++++++++++++++++--------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/config.default.yaml b/config.default.yaml index b56553ec..45e431ac 100644 --- a/config.default.yaml +++ b/config.default.yaml @@ -232,7 +232,7 @@ sector: marginal_cost_storage: 0. #1e-4 methanation: true helmeth: true - coal_cc: true + coal_cc: false dac: true co2_vent: true SMR: true diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 66be98de..3e076886 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -1118,23 +1118,24 @@ def add_storage_and_grids(n, costs): lifetime=costs.at['helmeth', 'lifetime'] ) - if options['coal_cc']: + if options.get('coal_cc'): - for generator,carrier in [("coal CC","coal")]: - n.madd("Link", - nodes + " " + generator, - bus0=["EU " + carrier]*len(nodes), - bus1=nodes, - bus2="co2 atmosphere", - bus3="co2 stored", - marginal_cost=costs.at['coal','efficiency']*costs.at['coal','VOM'], #NB: VOM is per MWel - capital_cost=costs.at['coal','efficiency']*costs.at['coal','fixed']+ costs.at['biomass CHP capture','fixed']*costs.at[carrier,'CO2 intensity'], #NB: fixed cost is per MWel - p_nom_extendable=True, - carrier=generator, - efficiency=costs.at['coal','efficiency'], - efficiency2=costs.at[carrier,'CO2 intensity']*(1-costs.at['biomass CHP capture','capture_rate']), - efficiency3=costs.at[carrier,'CO2 intensity']*costs.at['biomass CHP capture','capture_rate'], - lifetime=costs.at['coal','lifetime']) +n.madd("Link", + spatial.nodes, + suffix=" coal CC", + bus0=spatial.coal.nodes, + bus1=spatial.nodes, + bus2="co2 atmosphere", + bus3="co2 stored", + marginal_cost=costs.at['coal', 'efficiency'] * costs.at['coal', 'VOM'], #NB: VOM is per MWel + capital_cost=costs.at['coal', 'efficiency'] * costs.at['coal', 'fixed'] + costs.at['biomass CHP capture', 'fixed'] * costs.at['coal', 'CO2 intensity'], #NB: fixed cost is per MWel + p_nom_extendable=True, + carrier="coal", + efficiency=costs.at['coal', 'efficiency'], + efficiency2=costs.at['coal', 'CO2 intensity'] * (1 - costs.at['biomass CHP capture','capture_rate']), + efficiency3=costs.at['coal', 'CO2 intensity'] * costs.at['biomass CHP capture','capture_rate'], + lifetime=costs.at['coal','lifetime'] +) if options['SMR']: From e9f2d65cda8332b8217115003340bd4450f83ab0 Mon Sep 17 00:00:00 2001 From: Ebbe Kyhl <69363603+ebbekyhl@users.noreply.github.com> Date: Tue, 28 Jun 2022 13:35:44 +0200 Subject: [PATCH 3/3] Indent by two layers --- scripts/prepare_sector_network.py | 32 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 3e076886..5f75b1db 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -1120,22 +1120,22 @@ def add_storage_and_grids(n, costs): if options.get('coal_cc'): -n.madd("Link", - spatial.nodes, - suffix=" coal CC", - bus0=spatial.coal.nodes, - bus1=spatial.nodes, - bus2="co2 atmosphere", - bus3="co2 stored", - marginal_cost=costs.at['coal', 'efficiency'] * costs.at['coal', 'VOM'], #NB: VOM is per MWel - capital_cost=costs.at['coal', 'efficiency'] * costs.at['coal', 'fixed'] + costs.at['biomass CHP capture', 'fixed'] * costs.at['coal', 'CO2 intensity'], #NB: fixed cost is per MWel - p_nom_extendable=True, - carrier="coal", - efficiency=costs.at['coal', 'efficiency'], - efficiency2=costs.at['coal', 'CO2 intensity'] * (1 - costs.at['biomass CHP capture','capture_rate']), - efficiency3=costs.at['coal', 'CO2 intensity'] * costs.at['biomass CHP capture','capture_rate'], - lifetime=costs.at['coal','lifetime'] -) + n.madd("Link", + spatial.nodes, + suffix=" coal CC", + bus0=spatial.coal.nodes, + bus1=spatial.nodes, + bus2="co2 atmosphere", + bus3="co2 stored", + marginal_cost=costs.at['coal', 'efficiency'] * costs.at['coal', 'VOM'], #NB: VOM is per MWel + capital_cost=costs.at['coal', 'efficiency'] * costs.at['coal', 'fixed'] + costs.at['biomass CHP capture', 'fixed'] * costs.at['coal', 'CO2 intensity'], #NB: fixed cost is per MWel + p_nom_extendable=True, + carrier="coal", + efficiency=costs.at['coal', 'efficiency'], + efficiency2=costs.at['coal', 'CO2 intensity'] * (1 - costs.at['biomass CHP capture','capture_rate']), + efficiency3=costs.at['coal', 'CO2 intensity'] * costs.at['biomass CHP capture','capture_rate'], + lifetime=costs.at['coal','lifetime'] + ) if options['SMR']: