Skip to content

scottryn/floris

 
 

Repository files navigation

FLORIS Wake Modeling and Wind Farm Controls Software

FLORIS is a controls-focused wind farm simulation software incorporating steady-state engineering wake models into a performance-focused Python framework. It has been in active development at NREL since 2013 and the latest release is FLORIS v3.5. Online documentation is available at https://nrel.github.io/floris.

The software is in active development and engagement with the development team is highly encouraged. If you are interested in using FLORIS to conduct studies of a wind farm or extending FLORIS to include your own wake model, please join the conversation in GitHub Discussions!

Installation

If upgrading from v2, it is highly recommended to install FLORIS V3 into a new virtual environment. Installing into a Python environment that contains FLORIS v2 may cause conflicts. If you intend to use pyOptSparse with FLORIS, it is recommended to install that package first before installing FLORIS.

FLORIS can be installed by downloading the source code or via the PyPI package manager with pip.

The simplest method is with pip by using this command:

pip install floris

Developers and anyone who intends to inspect the source code can install FLORIS by downloading the git repository from GitHub with git and use pip to locally install it. It is highly recommended to use a Python virtual environment manager such as conda in order to maintain a clean and sandboxed environment. The following commands in a terminal or shell will download and install FLORIS.

    # Download the source code from the `main` branch
    git clone -b main https://github.com/NREL/floris.git

    # If using conda, be sure to activate your environment prior to installing
    # conda activate <env name>

    # If using pyOptSpare, install it first
    conda install -c conda-forge pyoptsparse

    # Install FLORIS
    pip install -e floris

With both methods, the installation can be verified by opening a Python interpreter and importing FLORIS:

    >>> import floris
    >>> help(floris)

    Help on package floris:

    NAME
        floris - # Copyright 2021 NREL

    PACKAGE CONTENTS
        logging_manager
        simulation (package)
        tools (package)
        turbine_library (package)
        type_dec
        utilities
        version

    VERSION
        3.5

    FILE
        ~/floris/floris/__init__.py

It is important to regularly check for new updates and releases as new features, improvements, and bug fixes will be issued on an ongoing basis.

Quick Start

FLORIS is a Python package run on the command line typically by providing an input file with an initial configuration. It can be installed with pip install floris (see installation). The typical entry point is FlorisInterface which accepts the path to the input file as an argument. From there, changes can be made to the initial configuration through the FlorisInterface.reinitialize routine, and the simulation is executed with FlorisInterface.calculate_wake.

from floris.tools import FlorisInterface
fi = FlorisInterface("path/to/input.yaml")
fi.reinitialize(wind_directions=[i for i in range(10)])
fi.calculate_wake()

Finally, results can be analyzed via post-processing functions available within FlorisInterface such as

and in a visualization package at floris.tools.visualization. A collection of examples describing the creation of simulations as well as analysis and post processing are included in the repository and described in detail in Examples Index.

Engaging on GitHub

FLORIS leverages the following GitHub features to coordinate support and development efforts:

  • Discussions: Collaborate to develop ideas for new use cases, features, and software designs, and get support for usage questions
  • Issues: Report potential bugs and well-developed feature requests
  • Projects: Include current and future work on a timeline and assign a person to "own" it

Generally, the first entry point for the community will be within one of the categories in Discussions. Ideas is a great spot to develop the details for a feature request. Q&A is where to get usage support. Show and tell is a free-form space to show off the things you are doing with FLORIS.

License

Copyright 2022 NREL

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

A controls-oriented engineering wake model.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%