openfast
openfast copied to clipboard
c-bindings interface for AeroDyn + InflowWind
This PR is NOT ready for merging due to conflicts (see ToDo below).
Feature or improvement description This PR introduces a new library version of the AeroDyn and InflowWind modules together with a c-bindings interface for calling from other codes. Included with this PR:
- AeroDyn_Inflow_C_Binding.f90 -- Fortran library interface with c-bindings. This wraps both AeroDyn15 and InflowWind modules together (simplifies passing of aerodynamics data).
- aerodyn_inflow_library.py -- Python library corresponding to Fortran code
- example code for running the 5MW_OC4Semi_WSt_WavesWN test case using the timeseries input for the ad_py_5MW_OC4Semi_WSt_WavesWN driver version (Python results closely agree with the Fortran driver results, which agree with the force/moment results for the corresponding full OpenFAST regression test). This driver code is not a true driver code; it contains hard coded input files and is not configurable from the command line or an input file (funding limitations during development).
- Regression test integrated into CTest environment
- Library incorporated into the build systems (VS project, and CMake)
- Library supports correction steps (handled internally in the library)
- Updated AeroDyn driver code architecture with
AeroDyn_Inflow.f90
that wraps both AeroDyn15 and InflowWind together for the AeroDyn15 driver, and for this library interface.
This module interface is compatible with the OWENS vertical axis wind turbine code from Sandia National Labs.
Missing things:
- Documentation of this feature is missing due to funding and time limitations.
- Passing of linearization matrices is not supported (also funding limited)
Related issue, if one exists This is the 4th PR providing a c-bindings interface for a module and follows the same architectural design used in those:
- #720
- #806
- #848
Impacted areas of the software This does not affect any existing functionality of OpenFAST.
Additional supporting information This project was funded through SBIR funding from ARPA-E in collaboration with XFlow Energy (https://www.xflowenergy.com/).
Test results, if applicable Comparison between Python or Julia driver simulations to a fully coupled OpenFAST simulation show good agreement. For the OpenFAST simulation, the tower shadow and tower potential have been turned off (the driver has no knowledge of the tower). Loads along the blade span agree well after an initial difference during startup.
Lift force at 3 blade nodes:
Axial induction at 3 blade nodes:
Tangential induction at 3 blade nodes:
To Do
- [ ] Add VS project to build the library
- [ ] There are code conflicts in registry and driver subs that will need addressing. Perhaps best to do after other AD15 updates related to v3.4.0, (project https://github.com/OpenFAST/openfast/projects/8)
- [ ] Merge #1188 first