The problem about multidirectional sea stated with second order force

Dear everyone

I am trying simulate a kind of FOWT in OpenFast v 2.4.0. I want to get the response of FOWT in multidirectional sea stated with second-order force. The second-order force is provided by .9 file by WAMIT. The wave direction range in .9 file is about -45 to 45 degree and there is totally 7 wave direction (every 15 degree). In my HydroDyn input file, WaveDir is 0, WaveDirMod is 1, WaveDirSpread is 1 and WaveNDir is 5. The simulation is always abort and the fig error_1 shows the reason. I read the source code of FAST and find out the code that caused the program terminated showed in fig Error_2. I don’t understand why the value of WaveDirMax should larger than the maximum of WvDir2? The .9 file are attached below.

Thanks
.9.txt (783 KB)


Error_1.png

Dear JiYuan,

This is indeed an error in the code (https://github.com/OpenFAST/openfast/issues/9). The sign in the comparison with WaveDirMax is incorrect in lines 922, 979, 979, 993, 1379, 1393, 1436, 1450, 1928, 1942, 2365, and 2379 of the WAMIT2.f90 file.

Line 922 should read:

IF ( InitInp%WaveDirMax > MAXVAL(MnDriftData%Data3D%WvDir1) ) THEN

The other lines noted should similarly be changed. You can correct this in your code and recompile to get the correct behavior.

This was corrected in January of 2020 in a branch that will soon be merged into OpenFAST (there was a delay due to some testing that didn’t proceed according to plan). This correction will be included in v3.0.0

Regards,
Andy