OpenFAST / openfast

Main repository for the NREL-supported OpenFAST whole-turbine and FAST.Farm wind farm simulation codes.
http://openfast.readthedocs.io
Apache License 2.0
680 stars 456 forks source link

Bug in the calculation of strip-theory hydrodynamic side loads #1446

Closed luwang00 closed 11 months ago

luwang00 commented 1 year ago

Bug description

  1. When computing the distributed hydrodynamic side loads in Morison.f90, the effective element length for the last (top most) node below the still-water level (SWL) is incorrectly evaluated. In the code snippet below, h should be the positive distance along the member measured from the node to the SWL, but, with pos1(3)<=0, h is also less than or equal to zero. As a result, instead of adding to the effective element length deltal, it substracts from it. This bug results in slow convergence of the strip-theory hydrodynamic loads with MDivSize in the HydroDyn input file. To fix this bug, simply add a minus sign on line 3059.

https://github.com/OpenFAST/openfast/blob/e8ec53f9c7f9d3f6a13bfb61dba12a0ca04d8a2f/modules/hydrodyn/src/Morison.f90#L3054-L3062

  1. There is a second bug with an element crossing the seabed. mem%i_floor is the index of the element crossing the seabed, so the index of the node just above the seabed is mem%i_floor+1. Therefore, the IF condition on line 3045 should be mem%i_floor+1 == i instead of mem%i_floor == i+1.

https://github.com/OpenFAST/openfast/blob/e8ec53f9c7f9d3f6a13bfb61dba12a0ca04d8a2f/modules/hydrodyn/src/Morison.f90#L3045-L3048

  1. The distributed axial drag force does not change direction with the relative velocity. Line 3084 in the code snippet below should be corrected to 0.5*mem%AxCd(i)*p%WtrDens*pi*mem%RMG(i)*dRdl_p * abs(dot_product( mem%k, m%vrel(:,mem%NodeIndx(i)) )) * matmul( mem%kkt, m%vrel(:,mem%NodeIndx(i)) )

https://github.com/OpenFAST/openfast/blob/18704086dad861ab13daf804825da7c4b8d59428/modules/hydrodyn/src/Morison.f90#L3083-L3084

To Reproduce

  1. Add a member in HydroDyn that crosses the SWL without having a joint or internal node from member discretization falling exactly on the SWL.
  2. Have a member in HydroDyn crossing the seabed.
  3. Have a tapered member in HydroDyn with nonzero axial drag coefficient.

OpenFAST Version These bugs are identified in OpenFAST ver. 3.2, 3.3, and 3.4, and possibly in earlier versions as well. They are fixed in pull request https://github.com/OpenFAST/openfast/pull/1008.


**************************************************************************************************
 OpenFAST

 Copyright (C)  National Renewable Energy Laboratory
 Copyright (C)  Envision Energy USA LTD

 This program is licensed under Apache License Version 2.0 and comes with ABSOLUTELY NO WARRANTY.
 See the "LICENSE" file distributed with this software for details.
 **************************************************************************************************
ebranlard commented 1 year ago

Thanks for finding this! I was noticing some weird behavior where the linearized added mass was a function of the discretization used.