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
668 stars 452 forks source link

HydroDyn WaveMod=6 Kinematics may not be applied above MWL #1235

Open Sam-Ramsahoye opened 2 years ago

Sam-Ramsahoye commented 2 years ago

Hello,

I'm using WaveMod=6 in HydroDyn to pass my own kinematics to the hydrodynamic model. I'm using the latest version of OpenFAST with a minor modification to the HydroDyn source to allow me to specify the kinematics on a larger number of internal hydro nodes than the previous maximum line length would have allowed (thanks to Andrew Platt).

I'm struggling to validate a drag-only case for a large non-linear stream function wave (H~15m, T=~0s, depth ~30m) (surface elevation deviates significantly from the MWL), the kinematics of which I'm passing to HydroDyn. The validation is being performed against a well-validated internal code on a jacket foundation (~1000 internal nodes). The "error" seems to be a function of phase. Notably, the error in total shear load from drag is ~0 when the instantaneous water level is below 0 and grows as the instantaneous water level exceeds MWL, see below. image

This lead me to hypothesize Hydrodyn might be cutting the loads above the MWL (even with WaveMod=6). To test this, I set all the kinematics below the MWL to 0, such that only non-zero kinematics could exist between MWL and the instantaneous free surface. In this case, the total hydrodynamic shear load due to drag for all time was zero suggesting no load above the MWL is ever applied.

I was surprised by this result because the documentation states that "externally generated wave kinematics used with WaveMod = 6 are not limited to the domain between a flat seabed and SWL and may consider wave stretching, higher-order wave theories, or an uneven seabed".

In this a known bug? Are there any quick fixes? Thanks for all the help recently.

Cheers, Sam

Sam-Ramsahoye commented 2 years ago

Hi,

A quick update. For the avoidance of doubt, I artificially shifted all the nodes in HydroDyn down by 100m and then specified a water depth of ~130m - this translation doesn't affect the magnitude of the loading because I'm specifying all of the kinematics. Now all the hydro nodes between the previous MWL and instantaneous water level are "correctly" loaded, see the comparison below, image

andrew-platt commented 2 years ago

@luwang00, do you have any insights here?

andrew-platt commented 2 years ago

Related: #1222 (fix for large number of nodes mentioned above)

jjonkman commented 2 years ago

Dear @Sam-Ramsahoye,

Sounds like a bug in HydroDyn. I know that the WaveMod = 6 functionality worked in FAST v8 and earlier versions of OpenFAST. I'm curious if the major changes made to HydroDyn in OpenFAST v2.6 introduced the bug: https://github.com/OpenFAST/openfast/pull/537? To check that, you could see if the code works as expected in OpenFAST v2.5 (with the patch from #1222 applied).

Regardless, we are introducing further major changes to HydroDyn in an upcoming version, where wave stretching has been reintroduced (among many other improvements): https://github.com/OpenFAST/openfast/pull/1008. We should check that the WaveMod = 6 functionality works in this version.

Best regards,

luwang00 commented 2 years ago

Hi @Sam-Ramsahoye

I took a quick look at version 3.2, and I think the issue is not with WaveMod = 6 itself. It looks like the wave kinematics are read in correctly by the subroutine UserWaves_Init. The problem is that HydroDyn is simply not evaluating the loads on any elements above the SWL. If the condition if ( i > mem%i_floor .and. z1 <= 0.0 ) then (line 3031 of Morison.f90) is not met, the member is skipped when computing the external hydrodynamic side loads.

I don't think there's a proper easy fix for this. This limitation is what we are trying to address with #1008 as @jjonkman mentioned. Note that with #1008, we currently cannot specify wave kinematics above the SWL with WaveMod = 6. The wave kinematics need to be defined everywhere between the seabed and the SWL. Currently, wave stretching does not work with WaveMod = 6, but we should be able to make it work with vertical and Wheeler stretching in the future.