Farm Optimization and eXtended yield Evaluation Software
Project description
Welcome to foxes
Overview
The software foxes
is a modular wind farm simulation and wake modelling toolbox which is based on engineering wake models. It has many applications, for example
- Wind farm optimization, e.g. layout optimization or wake steering,
- Wind farm post-construction analysis,
- Wake model studies, comparison and validation,
- Wind farm simulations invoking complex model chains.
The calculation is fully vectorized and its fast performance is owed to dask. Also the parallelization on local or remote clusters is enabled via dask
. The wind farm
optimization capabilities invoke the iwopy package which
as well supports vectorization.
foxes
is build upon many years of experience with wake model code development at IWES, starting with the C++ based in-house code flapFOAM (2011-2019) and the Python based direct predecessor flappy (2019-2022).
Documentation: https://fraunhoferiwes.github.io/foxes.docs/index.html
Source code: https://github.com/FraunhoferIWES/foxes
PyPi reference: https://pypi.org/project/foxes/
Anaconda reference: https://anaconda.org/conda-forge/foxes
Citation
Please cite the JOSS paper "FOXES: Farm Optimization and eXtended yield Evaluation Software"
Bibtex:
@article{
Schmidt2023,
author = {Jonas Schmidt and Lukas Vollmer and Martin Dörenkämper and Bernhard Stoevesandt},
title = {FOXES: Farm Optimization and eXtended yield Evaluation Software},
doi = {10.21105/joss.05464},
url = {https://doi.org/10.21105/joss.05464},
year = {2023},
publisher = {The Open Journal},
volume = {8},
number = {86},
pages = {5464},
journal = {Journal of Open Source Software}
}
Installation via pip
The supported Python versions are:
Python 3.8
Python 3.9
Python 3.10
Python 3.11
Python 3.12
Virtual Python environment
First create a new venv
environment, for example called foxes
and located at ~/venv/foxes
(choose any other convenient name and location in your file system if you prefer), by
python3 -m venv ~/venv/foxes
Then activate the environment every time you work with foxes
, by
source ~/venv/foxes/bin/activate
You can leave the environment by
deactivate
The pip
installation commands below should be executed within the active foxes
environment.
Standard users
As a standard user, you can install the latest release via pip by
pip install foxes
This commands installs the version that correspond to the main
branch at github. Alternatively, you can decide to install the latest pre-release developments (non-stable) by
pip install git+https://github.com/FraunhoferIWES/foxes@dev#egg=foxes
Developers
For developers using pip
, simply invoke the -e
flag in the installation command in your local clone:
git clone https://github.com/FraunhoferIWES/foxes.git
cd foxes
pip install -e .
The last line makes sure that all your code changes are included whenever importing foxes
. Concerning the git clone
line, we actually recommend that you fork foxes
on GitHub and then replace that command by cloning your fork instead.
Installation via conda
The supported Python versions are:
Python 3.8
Python 3.9
Python 3.10
Python 3.11
Python 3.12
Preparation
It is strongly recommend to use the libmamba
dependency solver instead of the default solver. Install it once by
conda install conda-libmamba-solver -n base -c conda-forge
We recommend that you set this to be your default solver, by
conda config --set solver libmamba
Virtual Python environment
First create a new conda
environment, for example called foxes
, by
conda create -n foxes -c conda-forge
Then activate the environment every time you work with foxes
, by
conda activate foxes
You can leave the environment by
conda deactivate
The conda
installation commands below should be executed within the active foxes
environment.
Standard users
The foxes
package is available on the channel conda-forge. You can install the latest version by
conda install foxes -c conda-forge --solver=libmamba
The --solver=libmamba
is optional. Note that it is not necessary if you have set the libmamba
solver as your default, see above.
Developers
For developers using conda
, we recommend first installing foxes as described above, then removing only the foxes
package while keeping the dependencies, and then adding foxes
again from a git using conda develop
:
conda install foxes conda-build -c conda-forge --solver=libmamba
conda remove foxes --force
git clone https://github.com/FraunhoferIWES/foxes.git
cd foxes
conda develop .
The last line makes sure that all your code changes are included whenever importing foxes
. The --solver=libmamba
is optional. Note that it is not necessary if you have set the libmamba
solver as your default, see above.
Concerning the git clone
line, we actually recommend that you fork foxes
on GitHub and then replace that command by cloning your fork instead.
Usage
For detailed examples of how to run foxes, check the examples
and notebooks
folders in this repository. A minimal running example is the following, based on provided static csv
data files:
import foxes
states = foxes.input.states.Timeseries("timeseries_3000.csv.gz", ["WS", "WD","TI","RHO"])
farm = foxes.WindFarm()
foxes.input.farm_layout.add_from_file(farm, "test_farm_67.csv", turbine_models=["NREL5MW"])
algo = foxes.algorithms.Downwind(farm, states, ["Jensen_linear_k007"])
farm_results = algo.calc_farm()
print(farm_results)
Testing
For testing, please clone the repository and install the required dependencies:
git clone https://github.com/FraunhoferIWES/foxes.git
cd foxes
pip install -e .[test]
The tests are then run by
pytest tests
Contributing
- Fork foxes on github.
- Create a branch (
git checkout -b new_branch
) - Commit your changes (
git commit -am "your awesome message"
) - Push to the branch (
git push origin new_branch
) - Create a pull request here
Acknowledgements
The development of foxes and its predecessors flapFOAM and flappy (internal - non public) has been supported through multiple publicly funded research projects. We acknowledge in particular the funding by the Federal Ministry of Economic Affairs and Climate Action (BMWK) through the projects Smart Wind Farms (grant no. 0325851B), GW-Wakes (0325397B) and X-Wakes (03EE3008A), as well as the funding by the Federal Ministry of Education and Research (BMBF) in the framework of the project H2Digital (03SF0635). We furthermore acknowledge funding by the Horizon Europe project FLOW (Atmospheric Flow, Loads and pOwer for Wind energy - grant id 101084205).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file foxes-0.7.0.5.tar.gz
.
File metadata
- Download URL: foxes-0.7.0.5.tar.gz
- Upload date:
- Size: 869.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93289264004cbd264ec15bafdb1e92cc57c196f5ec6890147b4ad7286821a182 |
|
MD5 | efd6204810d9749e7a8e5b47b9e48701 |
|
BLAKE2b-256 | dd7aed8084e5628bd3be4bbef0498316eea5e954b7ec75ef9776f32218aa98ae |
File details
Details for the file foxes-0.7.0.5-py3-none-any.whl
.
File metadata
- Download URL: foxes-0.7.0.5-py3-none-any.whl
- Upload date:
- Size: 998.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2810a9b65c4d57306dee93d0a4b65a32bca07f611d68b1d05067f58619a826c |
|
MD5 | df4ab4ef50e4e5789ffc85e5f49f43a2 |
|
BLAKE2b-256 | 382f114d37a115d5c006769c6f359dec79f558b6bd88721757224e13a0ae957c |