Repository for the CLOVER-energy Github organisation

View the Project on GitHub

CLOVER modelling framework for community-scale energy systems

CLOVER (Continuous Lifetime Optimisation of Variable Electricity Resources) is a an open-source Python based modelling framework enabling the simulation and optimisation of community-scale energy systems, typically minigrids, to support energy access in developing countries [1]. It is a framework under constant development, with new features being added, and has been applied to many different scenarios and case studies (see the publications page for more information).

The model operates with an hourly resolution and is designed to be able to simulate or optimise community-scale energy systems over a multi-year timeframe. The model is modular, with solar electrcity, solar thermal, PVT, grid, diesel, and load modules. As an open-srouce repository, the development of new functionality is encouraged. For a list of open issues and feature requests see the Github issues page.

Infographic of CLOVER workflow


The CLOVER energy system model has the following modules with related functionality and input requirements:

Solar PV

The CLOVER Solar PV module takes inputs including location, orientation and tilt of array, and degradation rate. If running a simulation rather than an optimisation then additionally the size of the array. The CLOVER model directly extracts hourly predicted electricity generation estimates from the model API for the array specification.

Solar PV-T

The Solar PV-T module takes inputs similar to the solar PV module but also takes in parameters specifying the thermal performance of the collectors as well as the flow rates of water which are permitted. The CLOVER model utilised hourly predicted solar irradiance and temperature estimates from the API and computes the performance of the user-specified collectors.

Solar Thermal

The solar-thermal module, similar to both the solar PV and solar PV-T modules, takes in collector-specific information. Any collectors which have a quadratic performance curve can be inputted.

Battery Storage

CLOVER can simulate or optimise for off-grid systems that inlcude battery storage. The model takes inputs to define the storage including battery lifetime, number of cycles, charging and discharging C-rates, or leakage. The storage size can be determined by the user for simulation.


There are two modes for including diesel generation in the model: back-up or dispatched. In the back-up mode, the model adopts a load following approach for timesteps that are unmet by other sources of energy. In the dispatched mode, the diesel generator can be programmed to come on under certain conditions (battery state of charge) and will charge the batteries as well as meet demand directly. The model can auto size the diesel generator based on the demand profile; or the user can specify the size of the generator. Other inputs include fuel consumption and minimum load factors.


The CLOVER model can be configured so that electricity systems can have a grid connection. For contexts where the grid is unreliable, the Grid module can be used to produce a grid availability profile. The model can be configured to prioritise either generation from the grid, or from the system being modelled.


The CLOVER model has a load module that permits stochastic modelling of hourly load profiles based on the number of devices, time of use of devices, number of devices within the community and the anticipated growth in number of devices over the modelling time horizon. Alternatively, the user can provide an hourly profile or profiles for community, business or institutional loads. Clean-water and hot-water loads can also be considered with scope to produce these resources electrically or thermally and for developers to easily add their own resources within CLOVER.

Cite us

You can cite the CLOVER-energy/CLOVER project by citing the following papers:

  1. Winchester, B., Beath, H., Nelson, J., & Sandwell, P. (2023). CLOVER (Version v5.0.7) [Computer software].
  2. Sandwell, P., Winchester, B., Beath, H., & Nelson, J. (2023). CLOVER: A modelling framework for sustainable community-scale energy systems. Journal of Open Source Software, 8(82), 4799,