Commit Graph

479 Commits

Author SHA1 Message Date
Tom Brown
e92558716e config.yaml: Remove unnecessary settings
Adjustments made to scripts to read correct settings.

Documentation of scenario options improved.
2020-04-30 18:38:55 +02:00
Tom Brown
f9952b9aad Fixed for PyPSA-Eur 0.1.0, PyPSA 0.17.0 and plotting
This commit now work with PyPSA-Eur 0.1.0 (tested with commit
bb3477 from 14th April 2020).

Changes to line/link_widths/colors for plotting networks in PyPSA
0.17.0.

Other corrections to plotting code so it works with this version.

Include oil boilers in colors in config.yaml.
2020-04-29 18:23:18 +02:00
Tom Brown
478832f484 Merge branch 'master' of github.com:nworbmot/pypsa-eur-sec 2020-04-29 09:53:11 +02:00
d-fine dev
a4db176458 add new link oil boiler
* prepare_sector_network:
    - add link for oil boiler in function add_industry()
    - add function for partitioning clusters into different heat node types

* config.yaml: add option for oil_boiler

* costs.csv: add costs for oil boiler
2020-04-09 14:58:03 +02:00
Tom Brown
bd85f751ac Include home battery for low voltage node 2020-03-26 14:54:10 +01:00
Tom Brown
31cad1bd6d Separate rooftop and utility solar PV 2020-03-26 10:06:59 +01:00
lisazeyen
a239f7efbf make the script running with pandas 1.0, colors for some network plots, add option to plot the current transmission system in the cost_network plot 2020-03-25 17:14:28 +01:00
Tom Brown
0df8fc50cf Summaries and plotting: Fix groupby with two bys for pandas 1.0.x 2020-03-25 16:42:38 +01:00
Tom Brown
9b326ba493 Include electricity distribution grid between load and EVs 2020-03-25 12:52:25 +01:00
Tom Brown
5dc572c35e solve_network.py: Remove hacked installation of conda libraries 2020-03-04 18:10:57 +01:00
Tom Brown
ab401907b2 Merge branch 'master' of github.com:nworbmot/pypsa-eur-sec 2020-01-31 19:25:19 +01:00
Tom Brown
d4c6521aaf For H2 network plotting, introduce dummy MultiIndex to get area
Otherwise the area is not consistent with the legend (I'll open a
PyPSA issue).
2020-01-31 19:20:46 +01:00
lisazeyen
36a57222f7 Clip p min pu (#50)
* changes for retrofitting

* changed Snakefile to work with new pypsa-eur version, change solve_network.py to clip also n.generators_t.p_min_pu

* removed retrofitting data files
2020-01-24 15:31:17 +01:00
Tom Brown
b6383b37b7
Merge pull request #46 from nworbmot/describe_biomass_categories
Describe biomass categories
2020-01-22 16:58:26 +01:00
Tom Brown
e0cf7e0860 Fix transmission map for nomopyomo outputs; plot also H2 network
Use s_nom_min for the reference point for the transmission
reinforcement not s_nom, since s_nom is now overwritten for LV > 1.0
(the old pyomo code kept the s_nom variable fixed in the pyomo model
rather than via pypsa setting s_nom_extendable = False, like the
nomopyomo code now does).

The legend scale of the H2 network electrolyzers is wrong. I don't yet
understand why. Possibly the cost scale in the other map is also wrong.
2020-01-21 19:44:36 +01:00
Tom Brown
17e8d114b1 Allow wave costs to be modified 2020-01-14 21:36:35 +01:00
Tom Brown
2278d67687 Add wave with default minimum costs 2020-01-11 09:11:09 +01:00
Tom Brown
9ed2cbffa8 Update code to PyPSA 0.16.1 2020-01-10 18:13:01 +01:00
Tom Brown
0e5dcbbce4 Fix clash of names in creation of candidate network for H2
Sometimes Lines and Links have same name, so need MultiIndex to avoid
a clash of names.
2019-12-26 10:21:22 +00:00
Tom Brown
9a5ae01a92 Adjust code to use version 0.16.0 of PyPSA for nomopyomo framework 2019-12-26 10:19:26 +00:00
Tom Brown
ca15750b48 Catch process emissions from feedstock for industry demand script 2019-12-19 17:49:45 +01:00
Tom Brown
ba52bbf5d4 Merge branch 'process' 2019-12-19 14:04:04 +01:00
Tom Brown
180846945f Fix bug in ordering of MultiIndex in make_summary.py
df.loc[idx[a,b,some_list],label] does NOT preserve the ordering of
some_list, but sorts it instead. Therefore the pattern:

df.loc[idx[a,b,s.index],label] = s.values

was mismatching the index and values.
2019-12-19 11:40:17 +01:00
Tom Brown
eb2fa1b24e Adjust plotting for new CCS scheme 2019-12-19 11:39:38 +01:00
Tom Brown
c525e2a6ae Install package dependencies nomopyomo branch PyPSA and gurobipy
Inelegant - installed by hand in solve_network.py.

Should replace with environment.yaml.
2019-12-19 11:38:43 +01:00
Tom Brown
52581466b6 Account for chemical industry process emissions more carefully
Remove emissions from hydrogen production for ammonia (since H2 now
comes from electrolysis).

Allow process emissions from petrochemical production to be captured
(the carbon is not necessarily fossil, but could come from CCU).
2019-12-18 09:45:14 +01:00
Tom Brown
105aeba215 Merge branch 'nomopyomo' 2019-12-13 18:07:06 +01:00
Tom Brown
41f7f44dcf Make CCS optional for SMR and industry process emissions 2019-12-13 18:06:38 +01:00
Tom Brown
49a68bdd35 Separate CHP gas/solid biomass, with/without CCS
Also fix CHP p_nom_ratio constraint, and battery charger/discharger
constraint.
2019-12-12 15:03:51 +01:00
Tom Brown
ec9b447949 make_summary: Account for multi-links in supply* summaries 2019-12-06 17:40:20 +01:00
Tom Brown
80642ae9af Fix post-processing to read nomopyomo nc; fix MultiIndex issue
With new pandas:

pd.Index([])|pd.MultiIndex(...)

returns a pd.Index, not a pd.MultiIndex, so just reversed:

pd.MultiIndex(...)|pd.Index([])

This returns a pd.MultiIndex.
2019-12-06 16:56:33 +01:00
Tom Brown
066f1b0bb5 Fix solve_network.py to use nomopyomo for LV > 1.0 2019-12-06 16:55:28 +01:00
martavp
f6d407cc24
Add files via upload
describe biomass
2019-12-04 16:38:19 +01:00
martavp
5038faa020
Delete build_biomass_potentials.py
describe biomass
2019-12-04 16:37:50 +01:00
Tom Brown
6cbd3384e4 Merge branch 'master' of github.com:nworbmot/pypsa-eur-sec 2019-11-27 18:36:01 +01:00
Tom Brown
8982147706 Convert code to use PyPSA nomopyomo branch; only works for LV=1.0
Will extend to LV > 1.0 soon.
2019-11-27 18:34:53 +01:00
Tom Brown
3fac944e5b 191108: Include a correctly-costed H2 network
Offers same topology to optimisation for H2 grid as that of HVAC and
HVDC grid.
2019-11-26 18:00:45 +01:00
martavp
5251ee5e56
Add files via upload
Read industry constants from config.yaml
2019-10-07 16:21:14 +02:00
Tom Brown
8d68146e7c Switch to BDEW-based weekday/end space heating demand profiles
These are different for residential and services demand.

Also include Snakefile in config files copied for each run.

Use gurobi settings from gurobi support for speed.

Commented out settings for testing randomness for noise.
2019-08-07 19:08:06 +02:00
Tom Brown
019e2f3f25 Split heat demand into residential and services with diff profiles
All urban central (i.e. district heating) is aggregated to the same
profile and bus.

The code is now written to cycle over each heating sector to add
demand and supply technologies, only changing what is necessary to
change, rather than just copying chunks of code and modifying
parameters there. This should make it easier to get an overview of
what's going on.
2019-08-07 11:33:29 +02:00
Tom Brown
eebac1bfa3 Deduct electric heating from electricity load profile
Otherwise it is double-counted in both the heating and the electricity
load profiles. This removes 454 TWh/a from electricity.
2019-08-01 16:16:05 +02:00
Tom Brown
d3a0f7e67d Diff intraday heat profiles for (res, services) x (water, space)
These are specified in data/heat_load_profile.csv.

The resulting heat_demand df has MultiIndex columns, where the first
level is ["sector use"], and the second level level is nodes.
2019-08-01 15:43:04 +02:00
Tom Brown
72b7ea0997 Allow space heating to be linearly reduced (without cost so far) 2019-07-31 14:22:33 +02:00
Tom Brown
886b7c5f48 Include micro-CHP using PEMFC 2019-07-28 13:10:21 +02:00
Tom Brown
318444e3a4 Include new industry technologies for plotting colours 2019-07-21 12:11:40 +02:00
Tom Brown
7e37dbbd03 Include multi-link outputs in energy balance 2019-07-21 12:11:05 +02:00
Tom Brown
ae1ea81520 Copper plate biogas and solid biomass
Because there was insufficient solid biomass in 3-4 countries to
supply industry for it locally, and we need to account for transport
of solid biomass.

Should be replaced by transport cost links between countries.
2019-07-21 12:09:18 +02:00
Tom Brown
32af25df62 Backup config files before solve_network rather than after
For debugging cases where solving failed.
2019-07-20 10:55:23 +02:00
Tom Brown
03670c1ab3 Simplify industry load-link-bus to avoid numerical problems
Gurobi had numerical problems solving the system.

Trivial load-link-bus combinations to manage CO2 have been replaced
with simple loads.
2019-07-19 12:10:22 +02:00
Tom Brown
06cb526fef Re-integrate industry, aviation and shipping into model
Following plan by Marta and Kun
2019-07-19 10:21:12 +02:00
Tom Brown
990ab035c3 Include light-rail and high-speed-rail in "electricity rail"
This then conforms with JRC IDEES totals
2019-07-19 10:19:21 +02:00
Tom Brown
7509d61348 Split industrial demand across nodes by population 2019-07-18 15:55:58 +02:00
Tom Brown
b132193f7f Read in more sector detail for road, rail, aviation and navigation 2019-07-18 15:38:37 +02:00
Tom Brown
f3b6027cd5 Incorporate Marta and Kun's scripts to build industry demand
By country and by energy source.
2019-07-18 11:40:38 +02:00
Tom Brown
ddca9afcc7 Give all loads a carrier; rename heat buses; fix district h losses
Heat buses renamed to:

rural (for low-density areas where district heating not possible)

urban decentral (for high-density areas without district heating and
individual heating technologies) (used to be called "urban")

urban central (for high-density areas with district heating) (used to
be called "central")

District heating losses applied only to urban central.
2019-07-16 16:00:21 +02:00
Tom Brown
6cc676d6cf 190516: Try removing H2 network too 2019-07-12 08:51:25 +02:00
Tom Brown
ae3059f676 Add "central" option to remove electricity grid (HVAC, HVDC, B2B) 2019-05-16 16:08:16 +02:00
Tom Brown
8394dca22c Rule to save a copy of important config files after each run 2019-05-16 09:39:03 +02:00
Tom Brown
9ad0eb01e2 Use waste heat from FT and fuel cells in district heating 2019-05-14 11:49:32 +02:00
Tom Brown
77bef57c60 Automatic plotting of network maps with costs per node 2019-05-13 17:09:26 +02:00
Tom Brown
52a02bd979 Compute cfs; compute nodal costs, capacities, cfs; fix prices 2019-05-13 16:48:29 +02:00
Tom Brown
71c04909b5 Allow option of underground H2 storage 2019-05-13 16:47:54 +02:00
Tom Brown
3c28e4daba Include lossless and costless H2 network to examine benefit
Agglomerate H2 storage for this case.

Need to replace with separate H2 links and stores.
2019-05-12 11:27:56 +02:00
Tom Brown
a10a7d2b15 Limit sequestration to 200 Mt/a, introduce SMR, vent stored CO2 2019-05-11 15:55:06 +02:00
Tom Brown
38c49ad460 Fix paper_graphics.py maps for cartopy and industrial demands 2019-05-09 17:28:16 +02:00
Tom Brown
1aa9f9e70b Copy over paper_graphics.py from old pypsa-eur sector branch 2019-05-09 15:22:14 +02:00
Tom Brown
0ab5bd200a 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).
2019-05-08 12:18:18 +02:00
Tom Brown
5357b7b92f Record total capacities and total costs 2019-05-03 17:11:13 +02:00
Tom Brown
c47ffb8d03 Changes for 190501-256 2019-05-02 08:39:29 +02:00
Tom Brown
82a057791e Allow storing FT fuels, cost for FT conversion, fossil FT fuels
Also include raw data/costs.csv
2019-04-30 12:05:36 +02:00
Tom Brown
952534c5c9 Generalise limitation of tech potentials
tech name must only appear, but not be identical to generator
carrier. This allows to use the name "offshore" for both "offshore-ac"
and "offshore-dc", but then "solar" also catches "solar thermal",
which is fine since for solar thermal potentials are np.inf, unless
limit is 0 since np.inf*0 is nan.
2019-04-24 12:17:42 +02:00
Tom Brown
d48d51f765 Cater for AC and DC offshore in plotting 2019-04-23 16:22:09 +02:00
Tom Brown
5157041ee2 Update for compatibility with latest PyPSA-eur master branch
Remove non-renewable generator and storage units from electricity-only
base network, since they're added differently here with links.

Remove unncessary cruft from config.yaml which is not used by
PyPSA-Eur-Sec (e.g. renewable configuration parameters).

Rename "naptha" to correct "naphtha".
2019-04-18 15:23:37 +02:00
Tom Brown
3b0e0dfb3a Changes to make solving and post-processing work 2019-04-18 12:12:38 +02:00
Tom Brown
cfe44ce702 Copy solve_network.py and *_summary.py from pypsa-eur sector branch 2019-04-18 11:39:17 +02:00
Tom Brown
e88b6c850f Fix prepare_sector_network to reproduce old sector prenetworks
from pypsa-eur sector branch
2019-04-17 17:04:33 +02:00
Tom Brown
ad865c18c6 Copy prepare_network.py from pypsa-eur sector commit 95820e57f795
...to scripts/prepare_sector_network.py
2019-04-17 14:24:22 +02:00
Tom Brown
ea22a792b7 Fix all data preparation steps up to prepare_network 2019-04-17 11:44:16 +02:00
Tom Brown
1b26c3c737 Copy data preparation scripts from pypsa-eur sector branch 2019-04-16 16:03:51 +02:00