FASTurbine_wrapper is a Fortran/C interface layer around OpenFAST modules to expose wind turbine aerodynamic, structural, and control interactions to external simulators.
The library wraps module initialization and time-step calls for:
- AeroDyn
- InflowWind
- ServoDyn
- ElastoDyn
The project builds a shared library and provides C-compatible headers and a C++ test driver.
src/: Fortran sources and C headers for the wrapper APItest/: C++ integration test and reference input filescompile.sh,compile_cluster.sh,compile.bat: build scriptsrun_test.sh,run_test.bat: test launch scriptsresources/: script to help with OpenFAST Windows installation
- OpenFAST built and installed (headers/modules + libraries available)
- GNU Fortran (
gfortran) - GNU C++ (
g++) - Shell environment with module support if using cluster scripts
- Intel oneAPI (ifx, MKL)
- Visual Studio C++ toolchain (
cl,link)
- Edit
compile.shand set include/lib paths to your OpenFAST install if needed. - Run:
bash compile.sh- Artifacts are placed in:
install/lib/libfasturbwrapper.soinstall/include/*.hinstall/include/*.mod
- Ensure required modules are available on your cluster.
- Run:
bash compile_cluster.sh- Verify artifacts in
install/.
- Edit
compile.batand setOPENFAST_INSTALLto your local OpenFAST install directory. - Run in a regular command prompt:
compile.bat- Artifacts are placed in:
install\lib\fasturbwrapper.dllinstall\lib\fasturbwrapper.libinstall\include\*.hinstall\include\*.mod
The wrapper exports the following C ABI routines (see src/FASTurbW_Library.h):
FSTW_Init(...): initialize all wrapped modules and I/O structuresFSTW_CalcWind(...): compute wind-field related quantitiesFSTW_CalcForces(...): compute aero/structural loads for the current stepFSTW_CalcController(...): run control-related updatesFSTW_WriteOutput(...): write module outputsFSTW_End(...): finalize and release resources
- Fill file paths and initial parameters in
FSTW_InitInputType_t. - Call
FSTW_Init. - For each simulation time step:
- update
FSTW_InputType_tvalues - call
FSTW_CalcWind - call
FSTW_CalcForces - call
FSTW_CalcController - call
FSTW_WriteOutput - read outputs from
FSTW_OutputType_t
- update
- Call
FSTW_End.
Linux:
bash run_test.shWindows:
run_test.batThe test compiles and runs test/test.cpp using files under test/inputs/ and writes outputs under test/outputs/.
This project is licensed under the GNU General Public License, version 3 or later.
- SPDX identifier used in source files:
GPL-3.0-or-later - Full license text: see
LICENSE