Skip to content

Simulation and optimisation of hybrid electric and thermal powered desalination systems

License

Notifications You must be signed in to change notification settings

BenWinchester/HEATDesalination

Repository files navigation

HEATDesalination

Simulation and optimisation of hybrid electric and thermal powered desalination systems

Table Of Contents

🔗 Dependencies

👏 Acknowledgements

Downloading HEATDesalination

🐍 Setting up your Python environment

🌦️ PVGIS

📝 Completing input files

🔥 Running HEATDesalination

🎓 Running HEATDesalination on Imperial College London's high-performance computers

📝 References

Dependencies

This module imports libraries from:

  • The open-source pvlib Python package developed by Holmgren, Hansen and Mikofski [1].

This module integrates with the open-source PVGIS framework, developed by Huld et al., [2].

Acknowledgements

This repository uses code developed by the CLOVER-energy team by Winchester et al. (2022). Thanks to all at the @CLOVER-energy/clover-development-team for their work.

Downloading HEATDesalination

heat-desalination is best installed from pypi:

python -m pip install heat-desalination

should be run from a terminal or powershell window. This will fetch and install the latest version of heat-desalination along with all of its dependencies. heat-desalination runs best in Python 3.10.

Working as a developer

If you wish to help develop and work on the project, or, if you have any modifications that you wish to make to the code, the best approach is to run a git clone of the reposiroty. This will ensure that you have an up-to-date copy of the code which you can use to make changes, push commits and open pull requests within the repository:

git clone https://github.com/BenWinchester/HEATDesalination

Setting up your Python environment

heat-desalination uses Python 3.10. If you have installed the package heat-desalination following the instructions in the Downloading HEATDesalination section, then you should already have everything that you need. Otherwise, you will need to install the required dependencies.

Anaconda method

To install using conda, a Python-based virutal-environment manager, from the root of the repository, run:

conda install --file requirements.txt

Note, on some systems, Anaconda may be unable to find the requirements.txt file. In these cases, it's necessary to use the absolute path to the file, e.g.,

conda install --file C:\Users\<User>\...\requirements.txt
Pip install

If you feel more comfortable using pip, the Python package manager, you can use this either from within an Anaconda environment or straight from the command-line:

python -m pip install -r requirements.txt

PVGIS

heat-desalination relies on the package pvlib.iotools.pvgis [[1]]. This package is responsible for fetching weather data from the Photovoltaic Geographical Information System (PVGIS). This data is used in the internal models to assess the performance of the solar collectors considered in the system. No API tokens or login keys are needed in order to use this API.

In order to download weather related data for your given location, simply run

python -m heat-desalination-weather -lat <latitude> -lon -<longitude> -t <timezone>

or

heat-desalination-weather -lat <latitude> -lon -<longitude> -t <timezone>

from your command-line interface, provided that you have installed the heat-desalination package, where <latitude> and <longitude> are floating-point (i.e., decimal) numbers that give the latitude and longitude of the location for which you wish to download data respectively and <timezone> is the decimal timezone offset, e.g., 5.5 for a 5-and-a-half hour time difference from UTC.

If you have downloaded the code from Github, you will need to run

python -m src.heatdesalination.weather -lat <latitude> -lon -<longitude> -t <timezone>

from your command-line interface.

Completing input files

Location-based files

System-based files

Running HEATDesalination

Fetching weather data

Running a simulation

Running an optimisation

Parallel simulation and optimisation

Running HEATDesalination on Imperial College London's high-performance computers

References

[1] Holmgren, W. F., Hansen, C. W., & Mikofski, M. A. 2018 "pvlib python: a python package for modeling solar energy systems." Journal of Open Source Software, 3(29), 884. https://doi.org/10.21105/joss.00884

[2] Huld, T., Müller, R. & Gambardella, A., 2012 "A new solar radiation database for estimating PV performance in Europe and Africa". Solar Energy, 86, 1803-1815. http://dx.doi.org/10.1016/j.solener.2012.03.006

[3] Winchester, B., Beath, H., Nelson, J., & Sandwell, P. "CLOVER (Version v5.0.5)" 2020. [Computer software]. https://doi.org/10.5281/zenodo.6925535

[4] Sandwell P., Winchester B., Beath H., & Nelson J. "CLOVER: A modelling framework for sustainable community-scale energy systems." Journal of Open Source Software, 8(82), 4799, 2023. https://doi.org/10.21105/joss.04799

About

Simulation and optimisation of hybrid electric and thermal powered desalination systems

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published