OpenFAST is a multi-physics engineering tool for the aero-servo-elastic simulation of wind turbines. It includes modules for the modeling of aerodynamic, structural, and electrical behaviour of on- and offshore wind turbines.
This project aims to couple OpenFAST with CFD simulation tools with the coupling library preCICE. Therefore, a preCICE-OpenFAST Adapter is being developed. The Adapter calls OpenFAST via the C++ API to drive the turbine simulation. Additionally, it calls the preCICE library to communicate and coordinate with CFD solvers like OpenFOAM.
As a first test case, the Adapter should be able to perform the coupled simulation of a single NREL5MW onshore turbine. OpenFAST calculates the forces and internal state of the turbine, while OpenFOAM is used as CFD solver to compute the inflow (see image).
Source: OpenFAST documentation, visited on 07.11.2023
- OpenFAST v3.5.0, with the C++ API enabled
- Building from source:
cmake -DBUILD_OPENFAST_CPP_API=ON .. && make
- Getting from Spack:
spack install openfast+cxx
(but build with an MPI compiler, see issue)
- Building from source:
- preCICE v3.0.0 or later v3.x.
Note
If you are using a different version of OpenFAST and want to run the provided cases, make sure to check if the OpenFAST input files are suitable for your version
- Install the adapter
- Select a simulation case
- Compile the necessary scripts
- Run the coupled simulation
Instructions on how to compile the files and run the simulation are given in each case.
Clone the repository and switch to the source directory:
git clone https://github.com/precice/openfast-adapter.git
cd openfast-adapter/src
We use cmake for the compilation by invoking a make script:
bash Allmake
The adapter is built locally in the bin
folder. To make it accessible on the whole system, you need to export the installation path after compilation.
Open the .bashrc
file
cd ~
nano .bashrc
and add the following line:
export PATH={path_to_repository}/openfast-adapter/bin:$PATH
Now run
source .basrhc
and restart your terminal.
You're good to go! If you want to re-compile the adapter, make sure to clean the old installation first by running src/Allclean
.
A more detailed description of the concept behind the adapter can be found in this report. Please consider citing the report if you are using the adapter.
Parts of the code in src/openfast-adapter
were reused from a OpenFAST C++ API example, which is licensed under the Apache 2 license.
The initial version of this adapter was developed by Leonard Willeke during his research stay at Delft University of Technology in the group for Wind Energy in collaboration with Evert Wiegant.