Metadata-Version: 2.1
Name: foxes
Version: 0.1.4
Summary: Farm Optimization and eXtended yield Evaluation Software
Author: Fraunhofer IWES
Author-email: jonas.schmidt@iwes.fraunhofer.de
License: MIT
Project-URL: Source Code, https://github.com/FraunhoferIWES/foxes
Project-URL: Bug Tracker, https://github.com/FraunhoferIWES/foxes/issues
Project-URL: Documentation, https://fraunhoferiwes.github.io/foxes.docs/index.html
Keywords: Wind farm,Wake modelling,Wind farm optimization
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 3 - Alpha
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: xarray
Requires-Dist: dask[distributed]
Requires-Dist: scipy
Requires-Dist: netcdf4
Provides-Extra: doc
Requires-Dist: sphinx ; extra == 'doc'
Requires-Dist: sphinx-rtd-theme ; extra == 'doc'
Requires-Dist: sphinxcontrib-email ; extra == 'doc'
Requires-Dist: nbsphinx ; extra == 'doc'
Requires-Dist: ipykernel ; extra == 'doc'
Requires-Dist: ipywidgets ; extra == 'doc'
Requires-Dist: m2r2 ; extra == 'doc'
Provides-Extra: scripts
Provides-Extra: test
Requires-Dist: flake8 ; extra == 'test'
Requires-Dist: pytest ; extra == 'test'

# foxes
## Farm Optimization and eXtended yield Evaluation Software

![](Logo_FOXES_IWES.svg)

## 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 currently implemented wake models implicitly assume time scales of 10 minutes or longer, or statistical input data like wind roses or other distributions.

`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](https://fraunhoferiwes.github.io/foxes.docs/index.html)

Source code: [https://github.com/FraunhoferIWES/foxes](https://github.com/FraunhoferIWES/foxes)

PyPi reference: [https://pypi.org/project/foxes/](https://pypi.org/project/foxes/)

## Requirements
The supported Python versions are: 
- `Python 3.7`
- `Python 3.8`
- `Python 3.9`
- `Python 3.10`

## Installation

### Virtual Python environment

We recommend working in a Python virtual environment and install `foxes` there. Such an environment can be created by
```console
python -m venv /path/to/my_venv
```
and afterwards be activated by
```console
source /path/to/my_venv/bin/activate
```
Note that in the above commands `/path/to/my_venv` is a placeholder that should be replaced by a path to a (non-existing) folder of your choice, for example `~/venv/foxes`.

All subsequent installation commands via `pip` can then be executed directly within the active environment without changes. After your work with `foxes` is done you can leave the environment by the command `deactivate`. 

### Standard users

As a standard user, you can install the latest release via [pip](https://pypi.org/project/foxes/) by
```console
pip install foxes
```
This in general corresponds to the `main` branch at [github](https://github.com/FraunhoferIWES/foxes). Alternatively, you can decide to install the latest pre-release developments (non-stable) by
```console
pip install git+https://github.com/FraunhoferIWES/foxes@dev#egg=foxes
```

### Developers

The first step as a developer is to clone the `foxes` repository by
```console
git clone https://github.com/FraunhoferIWES/foxes.git
```
Enter the root directory by `cd foxes`. Then you can either install from this directory via
```console
pip install -e .
```
Alternatively, add the `foxes` directory to your `PYTHONPATH`, e.g. by running
```console
export PYTHONPATH=`pwd`:$PYTHONPATH
```
from the root `foxes` directory, and then
```console
pip install -r requirements.txt
```

## 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:
```python
import foxes

states = foxes.input.states.Timeseries("timeseries_3000.csv.gz", ["WS", "WD","TI","RHO"])

mbook = foxes.ModelBook("NREL-5MW-D126-H90.csv")

farm = foxes.WindFarm()
foxes.input.farm_layout.add_from_file(farm,"test_farm_67.csv",turbine_models=["Pct"])

algo = foxes.algorithms.Downwind(mbook, farm, states, ["Jensen_linear_k007"])
farm_results = algo.calc_farm()

print(farm_results)
```

## 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).
