Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWAE: bugfix -- IfW needs HubPosition and rotor rad #1476

Merged
merged 1 commit into from
Mar 2, 2023

Conversation

andrew-platt
Copy link
Collaborator

@andrew-platt andrew-platt commented Mar 2, 2023

This PR is ready for merging.

Feature or improvement description
InflowWind always calculates the disk average velocity and the velocity at the hub. AWAE was not setting the HubPosition or the RotorRad variables for IfW. So depending on the compiler and optimizations, IfW would sometimes fail in AWAE when the wrong random garbage was in those memory locations (interestingly the GH compiler did not trip on this issue). This was found using GCC 10.4.0 on a mac with double precision release compiles.

 FAST.Farm-v3.4.1-22-g59c11c13
 Compile Info:
  - Compiler: GCC version 10.4.0
  - Architecture: 64 bit
  - Precision: double
  - OpenMP: No
  - Date: Mar  1 2023
  - Time: 23:23:04
 Execution Info:
  - Date: 03/01/2023
  - Time: 23:54:04-0700

  Heading of the FAST.Farm input file:
    FAST.Farm input file, using two turbines separated by 3D downstream and an offset of 30m, with
    a turbulent inflow given by one turbsim box
 Running AWAE.
 Running InflowWind.

    Reading a 101x35 grid (1000 m wide, 5 m to 345 m above ground) with a characteristic wind
    speed of 9.243 m/s. This full-field file was generated by TurbSim (from
    OpenFAST-v3.0.0-98-g7bde6b54) on 14-Sep-2021 at 11:37:08.

    Processed 2000 time steps of 10-Hz full-field data (period of 200 seconds).

 Farm_Initialize:Farm_ValidateInput:OutFmt produces a column width of 10 instead of 20 characters.
 Farm_Initialize:For efficiency, NumPlanes has been reduced to the number of time steps (31).
 Farm_Initialize:AWAE_Init:AWAE_UpdateStates:InflowWind_CalcOutput:InflowWind_GetSpatialAverage:Cal
 cOutput:IfW_FFWind_CalcOutput [position=(2.20157-314, 5.47077-315, 2.20133-314)  in wind-file
 coordinates]: FF wind array boundaries violated. Grid too small in Z direction (height
 (Z=2.20133-314 m) is below the grid and no tower points are defined).
 InflowWind_CalcOutput:InflowWind_GetSpatialAverage:CalcOutput:IfW_FFWind_CalcOutput
 [position=(2.20157-314, 5.47077-315, 2.20133-314)  in wind-file coordinates]: FF wind array
 boundaries violated. Grid too small in Z direction (height (Z=2.20133-314 m) is below the grid
 and no tower points are defined).



  Aborting FAST.Farm.

Related issue, if one exists
The disk average outputs were introduced in #1240, which was merged in Oct 2022 for the 3.4.0 release. Surprisingly this did not cause issues until recently.

Impacted areas of the software
Only the AWAE module is affected, and only with certain compiler and optimizations.

Additional supporting information
Interestingly, commit fd5cb5b5a on the dev branch (just before the QuKi merge #1453) worked just fine. However nothing in #1453 should have any affect whatsoever on this. Also, this problem would vanish when run in debug.

Test results, if applicable
Test results for the TSinflow and LESinflow would occasionally fail with the above error (or similar) on some systems. Those now pass properly.

InflowWind always calculates the disk average velocity and the velocity at the hub. AWAE was not setting the HubPosition or the RotorRad variables for IfW.  So depending on the compiler and optimizations, IfW would sometimes fail in AWAE when the wrong random garbage was in those memory locations (interestingly the GH compiler did not trip on this issue).
@andrew-platt andrew-platt merged commit c549400 into OpenFAST:dev Mar 2, 2023
@andrew-platt andrew-platt deleted the b/FFinflow branch March 13, 2023 17:34
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