mgrabovsky / electric-waltz

πŸ­πŸ—²πŸ”Œ A simple model of the Czech electricity grid

Home Page:https://mgrabovsky.net/electric-waltz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Electric Waltz

A simple deterministc model of the electric energy system of the Czech Republic.

Build Status Code Coverage Code Quality

This project aims to construct an open-source model of the Czech electricity system.

The basic features of the model currently include:

  • Calculating unit commitment of power sources for each hour of the year.
  • Calculating the generation of intermittent sources (photoltaic, wind) according to their assumed hourly capacity factor (supplied as part of input).
  • Dispatching flexible sources, storage and import/export in a specified merit order.
    • The default merit order is as follows: baseload and intermittent sources (nuclear, PV, wind) β†’ storage β†’ hydro β†’ biomass β†’ natural gas β†’ cross-border import.
  • Redirecting of surplus generation to storage units (pumped water, batteries, power-to-gas) and discharging them when demand rises.
  • Basic modelling of power plant self-consumption, storage inefficiency (only at charging time at the moment) and transmission/distribution losses in the grid.
  • Basic modelling of thermal power plants with constraints in minimum load, minimum uptime/downtime and linear startup times.
  • Configuration of grid elements and properties using a YAML file.
  • Export of hourly data to CSV.

The model is wholly deterministic, i.e. the output is only affected by the supplied input data and there are no elements of randomness in the simulation process.

Example output

The basic output of the model runner is the following table summarising the key flows in the model:

Total net generation          107,141,867 MWh
β”œβ”€ Total inflexible            60,516,587
β”‚  β”œβ”€ Nuclear                  19,033,918
β”‚  β”œβ”€ Solar PV                 23,951,325
β”‚  └─ On-shore wind            17,531,344
└─ Total flexible              46,625,280
   β”œβ”€ Hydro                     7,899,128
   β”œβ”€ Biomass                  24,121,364
   └─ Natural gas              14,604,788

Total charging consumption      2,880,642 MWh   1061 hrs
Total discharging               1,986,646        770 hrs

Total export                      540,868        360 hrs
Total import                    3,189,288       2373 hrs
Import balance                  2,648,420

Total surplus/dump                274,023        172 hrs
Total shortage (EENS, LOLE)     1,473,203        997 hrs

Total net consumption         102,864,123 MWh

Model output written to β€˜sandbox/model_output.csv’

The runner also generates a CSV file with the generation/output of each electricity source in every hour of the modelled period. This data can be used to plot the time series of demand, power generation, import/export, etc., such as the following:

Stacked area chart showing in two rows the progress of electricity generation in two fortnights of the hypothetical year 2050.

History

A first version of this model was devised by Jan RovenskΓ½ and implemented in an Excel spreadsheet. This project is a rewrite of that model in Python which provides greater flexibility and maintainability. It makes the model easier to expand and customise.

Licence

This project is licensed under the Blue Oak Model License 1.0.0.

About

πŸ­πŸ—²πŸ”Œ A simple model of the Czech electricity grid

https://mgrabovsky.net/electric-waltz

License:Other


Languages

Language:Jupyter Notebook 86.0%Language:Python 13.6%Language:R 0.5%