Fix gas and oil stores so that they allow fossil fuel extraction

Before both initial SOC and final SOC were set to be zero, which
prevents synthetic fuel transfer over the year boundary, and prevents
the use of fossil fuels for non-zero CO2 scenarios.

Now done properly with cyclic Store (prevents accumulation of fossil
fuels as a form of sequestration) and Generator (to imitate fossil
fuel extraction).
This commit is contained in:
Tom Brown 2019-05-08 12:18:18 +02:00
parent 5357b7b92f
commit 0ab5bd200a
3 changed files with 26 additions and 11 deletions

View File

@ -197,7 +197,7 @@ rule solve_network:
memory="logs/{network}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_memory.log"
benchmark: "benchmarks/solve_network/{network}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}"
threads: 4
resources: mem=230000 #memory in MB; 40 GB enough for 45+B+I; 100 GB based on RESI usage for 128
resources: mem=100000 #memory in MB; 40 GB enough for 45+B+I; 100 GB based on RESI usage for 128
# group: "solve" # with group, threads is ignored https://bitbucket.org/snakemake/snakemake/issues/971/group-job-description-does-not-contain
script: "scripts/solve_network.py"

View File

@ -2,15 +2,15 @@ logging_level: INFO
results_dir: 'results/'
summary_dir: results
run: '190502-181'
run: '190508-test_fossil'
scenario:
sectors: [E] # ,E+EV,E+BEV,E+BEV+V2G] # [ E+EV, E+BEV, E+BEV+V2G ]
simpl: ['']
lv: [1.0,1.25]#[1.0, 1.125, 1.25, 1.5, 2.0, opt]# or opt
clusters: [181] #[90, 128, 181] #[45, 64, 90, 128, 181, 256] #, 362] # (2**np.r_[5.5:9:.5]).astype(int) minimum is 37
lv: [1.0]# or opt
clusters: [128] #[90, 128, 181] #[45, 64, 90, 128, 181, 256] #, 362] # (2**np.r_[5.5:9:.5]).astype(int) minimum is 37
opts: [''] #for pypsa-eur
sector_opts: [Co2L0-3H-T-H-B-I-solar3,Co2L0-3H-T-H-B-I-onwind0p25-solar3]#,Co2L0p05-3H-T-H-B-I,Co2L0p10-3H-T-H-B-I,Co2L0p20-3H-T-H-B-I,Co2L0p30-3H-T-H-B-I,Co2L0p50-3H-T-H-B-I]#[Co2L-3H-T-H,Co2L0p10-3H-T-H,Co2L0-3H-T-H,Co2L0p20-3H-T-H] #Co2L-3H-T-H,Co2L0p10-3H-T-H,Co2L0p20-3H-T-HCo2L-3H-T-H,Co2L0p10-3H-T-H,Co2L0p30-3H-T-H,Co2L0p50-3H-T-H] #Co2L-3H,Co2L-3H-T,, LC-FL, LC-T, Ep-T, Co2L-T]
sector_opts: [Co2L0-3H-T-H-B-I,Co2L0p1-3H-T-H-B-I,Co2L0p25-3H-T-H-B-I,Co2L0p50-3H-T-H-B-I]#[Co2L0-3H-T-H-B-I-onwind0-solar3,Co2L0-3H-T-H-B-I-onwind0p125-solar3,Co2L0-3H-T-H-B-I-onwind0p25-solar3,Co2L0-3H-T-H-B-I-onwind0p50-solar3,Co2L0-3H-T-H-B-I-solar3]#,Co2L0-3H-T-H-B-I-onwind0p25-solar3]#,Co2L0p05-3H-T-H-B-I,Co2L0p10-3H-T-H-B-I,Co2L0p20-3H-T-H-B-I,Co2L0p30-3H-T-H-B-I,Co2L0p50-3H-T-H-B-I]#[Co2L-3H-T-H,Co2L0p10-3H-T-H,Co2L0-3H-T-H,Co2L0p20-3H-T-H] #Co2L-3H-T-H,Co2L0p10-3H-T-H,Co2L0p20-3H-T-HCo2L-3H-T-H,Co2L0p10-3H-T-H,Co2L0p30-3H-T-H,Co2L0p50-3H-T-H] #Co2L-3H,Co2L-3H-T,, LC-FL, LC-T, Ep-T, Co2L-T]
# Co2L will give default (5%); Co2L0p25 will give 25% CO2 emissions; Co2Lm0p05 will give 5% negative emissions

View File

@ -452,10 +452,18 @@ def add_generation(network):
["EU " + carrier + " Store"],
bus=["EU " + carrier],
e_nom_extendable=True,
#force fossil to be empty at end of period; can start higher to represent fossil input
e_max_pu=pd.DataFrame({ "EU " + carrier + " Store" : pd.Series([1.]*(len(network.snapshots)-1)+[0.],index=network.snapshots)}),
e_cyclic=True,
carrier=carrier,
marginal_cost=costs.at[carrier,'fuel'])
capital_cost=0.) #could correct to e.g. 0.2 EUR/kWh * annuity and O&M
network.add("Generator",
"EU fossil " + carrier,
bus="EU " + carrier,
p_nom_extendable=True,
carrier=carrier,
capital_cost=0.,
marginal_cost=costs.at[carrier,'fuel'])
network.madd("Link",
nodes + " " + generator,
@ -1148,10 +1156,17 @@ def add_industry(network):
["Fischer-Tropsch Store"],
bus="Fischer-Tropsch",
e_nom_extendable=True,
#force fossil to be empty at end of period; can start higher to represent fossil input
e_max_pu=pd.DataFrame({ "Fischer-Tropsch Store" : pd.Series([1.]*(len(network.snapshots)-1)+[0.],index=network.snapshots)}),
e_cyclic=True,
carrier="Fischer-Tropsch",
marginal_cost=costs.at["oil",'fuel'])
capital_cost=0.) #could correct to e.g. 0.001 EUR/kWh * annuity and O&M
network.add("Generator",
"fossil oil",
bus="Fischer-Tropsch",
p_nom_extendable=True,
carrier="oil",
capital_cost=0.,
marginal_cost=costs.at["oil",'fuel'])
network.madd("Link",
nodes + " Fischer-Tropsch",