Skip to content

Multi-rotor support in ADI c-bindings interface#1784

Merged
andrew-platt merged 20 commits intoOpenFAST:dev-unstable-pointersfrom
andrew-platt:f/ADI_c_binding_multiRotor
Oct 11, 2023
Merged

Multi-rotor support in ADI c-bindings interface#1784
andrew-platt merged 20 commits intoOpenFAST:dev-unstable-pointersfrom
andrew-platt:f/ADI_c_binding_multiRotor

Conversation

@andrew-platt
Copy link
Collaborator

This PR is ready to merge.

Feature or improvement description
The AeroDyn_Inflow_C_Binding interface (also referred to as the ADI c-binding interface) now has support for multiple rotors. This feature is used in coupling AeroDyn15 + InflowWind to the OWENS codebase (currently proprietary) from Sandia National Labs (SNL).

Required changes include new routines for setting motions per rotor and retrieving loads per rotor, and interface changes to the Init, CalcOutput, and UpdateStates routines.

Related issue, if one exists
None

Impacted areas of the software
The only changes occur in the c-bindings interface for AeroDyn15. This is primarily in the AeroDyn_Inflow_C_Binding.f90, with accompanying changes in the Python interface in aerodyn_inflow_library.py. Additional changes were made to the OWENS codebase to match (currently not available on GitHub).

Additional supporting information
This update was required to allow coupling of the OWENS structural code to multiple AeroDyn VAWT turbines so that turbine interaction calculated via the free vortex method in OLAF could be used to evaluate loads on downstream turbines.

Test results, if applicable
A new pair of regression tests for a single blade has been added for both the standalone driver and the Python to ADI c-bindings interface. These tests should exactly match each other.

Screenshot 2023-09-26 at 11 54 12 AM
Figure: Wake results from the ad_B1n2_OLAF driver case and py_ad_B1n2_OLAF Python to ADI c-bindings cases. The wakes exactly overlap each other and all loads match exactly.

Need to revise data handling in Init
- orientations were not getting set correctly at init -- flag for transposeDCM was not set
- forgot to actually store some things during the rotor init, so that threw everything off
- change c_bool to c_int -- some c/c++ compilers may not treat c_bool the same and can cause it to pass incorrectly
Also update results for ad_B1n2_OLAF case
Previous timestep inputs for update states were getting set identical to the new inputs.  This resulted in incorrect loads and wake propagation.
@andrew-platt
Copy link
Collaborator Author

The call sequence for multiple turbines is as follows:

  1. ADI_C_PreInit to set the number of turbines and initialize some memory
  2. Setup rotors with initial (reference) positions for turbine origins, hub positions and orientations, blade root positions and orientations, blade mesh point positions and orientations.
    • ADI_C_SetupRotor for rotor 1
    • ADI_C_SetupRotor for rotor 2
    • ADI_C_SetupRotor for rotor N
  3. ADI_C_Init to initialize AeroDyn with all rotors
  4. Initial loads at T=0
    • ADI_C_CalcOutput to calculate loads from all rotors at T+dt
    • Get rotor loads for each turbine
      • ADI_C_GetRotorLoads for rotor 1
      • ADI_C_GetRotorLoads for rotor 2
      • ADI_C_GetRotorLoads for rotor N
  5. Time marching - loop until done
    • Set rotor motions for each turbine at T+dt
      • ADI_C_SetRotorMotion for rotor 1
      • ADI_C_SetRotorMotion for rotor 2
      • ADI_C_SetRotorMotion for rotor N
    • ADI_C_UpdateStates to update from T to T+dt
    • ADI_C_CalcOutput to calculate loads from all rotors at T+dt
    • Get rotor loads for each turbine
      • ADI_C_GetRotorLoads for rotor 1
      • ADI_C_GetRotorLoads for rotor 2
      • ADI_C_GetRotorLoads for rotor N
  6. ADI_C_End to close AeroDyn and free memory

@andrew-platt andrew-platt force-pushed the f/ADI_c_binding_multiRotor branch from 0445b3d to af651dc Compare October 10, 2023 22:06
@andrew-platt andrew-platt merged commit bb9a8aa into OpenFAST:dev-unstable-pointers Oct 11, 2023
@andrew-platt andrew-platt mentioned this pull request Dec 24, 2024
38 tasks
@andrew-platt andrew-platt deleted the f/ADI_c_binding_multiRotor branch November 5, 2025 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments