1 of 45

PyPSA-Eur

g

github.com/pypsa/pypsa-eur

pypsa-eur.readthedocs.io

v0.1.0 Release

9 January 2020

Unless otherwise stated, the graphics and text are Copyright © Elisabeth Zeyen, Martha Maria Frysztacki, Fabian Hofmann, Jonas Hörsch, Fabian Neumann, Tom Brown 2020. This work is licensed under a Creative Commons “Attribution 4.0 International” license.

2 of 45

What’s the plan?

2

Icon made by wanicon from www.flaticon.com

Introductory Slide Deck

25’

Workflow Demo

10’

Installation “break”

15’

Live Coding

20’

You explore some pre-solved networks.

50’

3 of 45

The Optimisation Problem

3

4 of 45

What can PyPSA-Eur do?

Covers the ENTSO-E area and contains

  • all AC lines at and above 220 kV, substations and HVDC links,
  • A database of conventional power plants,
  • time series for electrical demand,
  • time series for variable renewable generator availability, and
  • geographic potentials for the expansion of wind and solar power.

Features

  • Only freely available and open data
  • Automated and configurable software pipeline from raw data to optimised electricity system
  • High temporal resolution and scope
  • High spatial resolution and scope

4

Suitable for both operational studies and expansion planning studies

5 of 45

What is configurable?

  • Select countries
  • Select reference year / time period
  • Specify CO2 budget
  • Tweak spatial and temporal resolution
  • Customize cost assumptions
  • Parametrise technologies
  • Define land use eligibility criteria
  • Choose weather dataset
  • Pick a solver (Cbc, Gurobi, CPLEX, …)
  • Choose between greenfield generation expansion or existing power plants

5

… and more!

Icon made by surang from www.flaticon.com

6 of 45

6

7 of 45

The Workflow Structure

7

Prepare the PyPSA Network

Simplify the PyPSA Network

Solve the Optimisation Problem

Summarise the Results

8 of 45

Preparing networks

8

Retrieve polygons for each country

build_shapes

9 of 45

Preparing networks

9

Retrieve polygons for each country

build_shapes

Construct a base power network with

buses, transformers, HVAC lines, HVDC links

base_network

10 of 45

The base_network rule:

10

PyPSA

Network

(.csv or .nc)

12 January 2020!

11 of 45

Preparing networks

11

Retrieve polygons for each country

build_shapes

Construct a base network with stores, buses, HVAC lines, HCDC links

base_network

Voronoi cells

build_bus_regions

12 of 45

Preparing networks

12

Retrieve polygons for each country

build_shapes

Construct a base power network with

buses, transformers, HVAC lines, HVDC links

base_network

Determine Voronoi cells from network buses and shapes

build_bus_regions

Build renewable profiles for each Voronoi cell:

  • per-unit availability time series
  • land availability

build_cutouts, build_natura_raster, build_renewable profiles, build_hydro_profile

13 of 45

Land Availability for Renewables

13

  • CORINE 2018

land cover

    • eligible codes
    • distances

  • NATURA 2000 natural protection areas

  • GEBCO 2018 bathymetry dataset

  • Density:

capacity per km²

example:

onshore wind

in one cell

14 of 45

Land Availability for Renewables

14

  • CORINE 2018

land cover

    • eligible codes
    • distances

  • NATURA 2000 natural protection areas

  • GEBCO 2018 bathymetry dataset

  • Density:

capacity per km²

15 of 45

Land Availability for Renewables

15

  • CORINE 2018

land cover

    • eligible codes
    • distances

  • NATURA 2000 natural protection areas

  • GEBCO 2018 bathymetry dataset

  • Density:

capacity per km²

16 of 45

Land Availability for Renewables

16

  • CORINE 2018

land cover

    • eligible codes
    • distances

  • NATURA 2000 natural protection areas

  • GEBCO 2018 bathymetry dataset

  • Density:

capacity per km²

17 of 45

Land Availability for Renewables

17

  • CORINE 2018

land cover

    • eligible codes
    • distances

  • NATURA 2000 natural protection areas

  • GEBCO 2018 bathymetry dataset

  • Density:

capacity per km²

18 of 45

Land Availability for Renewables

18

  • CORINE 2018

land cover

    • eligible codes
    • distances

  • NATURA 2000 natural protection areas

  • GEBCO 2018 bathymetry dataset

  • Density:

capacity per km²

19 of 45

Land Availability for Renewables

19

  • CORINE 2018

land cover

    • eligible codes
    • distances

  • NATURA 2000 natural protection areas

  • GEBCO 2018 bathymetry dataset

  • Density:

capacity per km²

20 of 45

Land Availability for Renewables

20

  • CORINE 2018

land cover

    • eligible codes
    • distances

  • NATURA 2000 natural protection areas

  • GEBCO 2018 bathymetry dataset

  • Density:

capacity per km²

21 of 45

Land Availability for Renewables

21

  • CORINE 2018

land cover

    • eligible codes
    • distances

  • NATURA 2000 natural protection areas

  • GEBCO 2018 bathymetry dataset

  • Density:

capacity per km²

22 of 45

Land Availability for Renewables

22

  • CORINE 2018

land cover

    • eligible codes
    • distances

  • NATURA 2000 natural protection areas

  • GEBCO 2018 bathymetry dataset

  • Density:

capacity per km²

23 of 45

Land Availability for Renewables

23

  • CORINE 2018

land cover

    • eligible codes
    • distances

  • NATURA 2000 natural protection areas

  • GEBCO 2018 bathymetry dataset

  • Density:

capacity per km²

24 of 45

Land Availability for Renewables

24

  • CORINE 2018

land cover

    • eligible codes
    • distances

  • NATURA 2000 natural protection areas

  • GEBCO 2018 bathymetry dataset

  • Density:

capacity per km²

25 of 45

Land Availability for Renewables

25

  • CORINE 2018

land cover

    • eligible codes
    • distances

  • NATURA 2000 natural protection areas

  • GEBCO 2018 bathymetry dataset

  • Density:

capacity per km²

26 of 45

Time Series for Variable Renewables

26

Solar panel models

  • orientation
  • material

Wind turbine models

  • power curve
  • surface roughness

Attend A.3 and A.4

27 of 45

Preparing networks

27

Retrieve polygons for each country

build_shapes

Construct a base power network with

buses, transformers, HVAC lines, HVDC links

base_network

Determine Voronoi cells from network buses and shapes

build_bus_regions

Build renewable profiles for each Voronoi cell:

  • per-unit availability time series
  • land availability

build_cutouts, build_natura_raster, build_renewable profiles, build_hydro_profile

Attach existing fossil-fueled power plants

build_powerplants

28 of 45

The build_powerplants rule:

28

Optional Step!

Provides a merged dataset of conventional power plants

  • name
  • fuel type
  • technology
  • country
  • capacity
  • commissioning/retrofit year
  • coordinates
  • closest substation in

base_network

Possible to append custom entries!

29 of 45

Preparing networks

29

Retrieve polygons for each country

build_shapes

Construct a base power network with

buses, transformers, HVAC lines, HVDC links

base_network

Determine Voronoi cells from network buses and shapes

build_bus_regions

Build renewable profiles for each Voronoi cell:

  • per-unit availability time series
  • land availability

build_cutouts, build_natura_raster, build_renewable profiles, build_hydro_profile

Attach existing fossil-fueled power plants

build_powerplants

Add loads and generators to the base network with costs

add_electricity

30 of 45

The add_electricity rule:

European network with

  • 5,000 buses
  • 9,600 (aggregated) generators
  • 6,000 AC lines (>220 kV)
  • 60 HVDC links

Each node has

  • a load time series,
  • an availability time series and potential for each carrier (solar, onshore / offshore wind),
  • hydrogen storage and batteries.

30

31 of 45

Simplifying networks

31

Make the problem less computationally challenging

… to allow for co-optimizing generation, storage and transmission capacities!

Transform all transmission lines to 380kV and remove dead ends

simplify_network

Cluster network with k-means

cluster_network

Additional components after clustering

add_extra_components

Aggregate snapshots and add

system-wide constraints

prepare_network

32 of 45

The cluster_network rule:

32

Clustered to 512 buses

Transformed to 380 kV

33 of 45

The cluster_network rule:

33

Clustered to 256 buses

Transformed to 380 kV

34 of 45

The cluster_network rule:

34

Clustered to 128 buses

Transformed to 380 kV

35 of 45

The cluster_network rule:

35

Clustered to 37 buses

Transformed to 380 kV

36 of 45

Reproducible snakemake Workflow

36

(pypsa-eur) $ snakemake solve_all_elec_networks

Single command:

37 of 45

Solving and summarizing networks

Requirements:

  • Preparation and simplification steps can run locally on most modern laptops.
  • You’ll likely need access to a commercial solver for large problems. Can be any solver that works with pyomo.

Performance (investment planning):

There are scripts to plot and summarise solved networks. These will be reworked soon.

37

Nodes

Snapshots

Memory (RAM)

Solving Time

350

4,780 (2h)

70 GB

14 h

100

2,920 (3h)

21 GB

1.5 h

38 of 45

Installation and Dependencies

An environment.yaml ships with the repository to install via conda, i.a. with:

Additionally, you’ll need to install a solver (Cbc, Gurobi, CPLEX)!

Continuous integration testing with Travis, tells us PyPSA-Eur is working with all of Linux, Mac, and Windows!

38

pypsa

atlite

powerplantmatching

snakemake-minimal

pandas

geopandas

xarray

pyproj

libgdal

cartopy

glaes

geokit

39 of 45

More Features Planned!

39

… and give up on pyomo, write .lp ourselves

https://github.com/pypsa/pypsa-eur/issues

40 of 45

Upcoming in 2020: PyPSA-Eur-Sec

40

41 of 45

Looking at the time...

41

41

Icon made by wanicon from www.flaticon.com

Introductory Slide Deck

25’

Workflow Demo

10’

Installation “break”

15’

Live Coding

20’

You explore some pre-solved networks.

50’

?

42 of 45

Workflow

Live Demo

> conda activate pypsa-eur

> snakemake solve_all_scenarios

42

43 of 45

Installation

“Break”

Install PyPSA and download networks (~1 GB)

First:

$ git clone https://github.com/lisazeyen/pypsa-eur-tut

Then, follow instructions at README.md

43

44 of 45

Interactive Session

Let’s explore some pre-solved networks!

For one of the networks,

  • plot the curtailment in the system over time.
  • plot how the state of charge of a storage develops over time.
  • Plot the availability time series of a carrier / location you like.

Or,

  • get help with installing the necessary environment.

44

45 of 45

PyPSA-Eur

g

github.com/pypsa/pypsa-eur

pypsa-eur.readthedocs.io

v0.1.0 Release

9 January 2020

Unless otherwise stated, the graphics and text are Copyright © Elisabeth Zeyen, Martha Maria Frysztacki, Fabian Hofmann, Fabian Neumann, Jonas Hörsch, Tom Brown 2020. This work is licensed under a Creative Commons “Attribution 4.0 International” license.