# Second order file WaveDir boundary check issue

**URL:** <https://forums.nlr.gov/t/second-order-file-wavedir-boundary-check-issue/1454>\
**Category:** Computer-Aided Engineering Software Tools\
**Created:** [September 16, 2016, 4:16pm UTC](https://forums.nlr.gov/t/second-order-file-wavedir-boundary-check-issue/1454 "2016-09-16T16:16:19Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Romain.Quancard](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@Romain.Quancard](https://forums.nlr.gov/u/Romain.Quancard)\
**Post date:** [September 16, 2016, 4:16pm UTC](https://forums.nlr.gov/t/second-order-file-wavedir-boundary-check-issue/1454/1 "2016-09-16T16:16:19Z")

</div>

Hello everyone,

While trying to take mean drift forces into account through the use of a “.8” Wamit-format file (generated from Nemoh outputs), I think I found a mistake in the HydroDyn code.

According to the “WAMIT2.f90” file at line 929, HydroDyn will return a fatal error if our simulation’s WaveDirMax is smaller than the “.8” file’s WaveDir1 upper boundary ; on the contrary, it should abort when WaveDirMax is greater than the upper boundary (same issue with the WaveDir2 upper boundary at line 943).

For example, when I used a “.8” file whose WaveDir(1 and 2) range is [-180°;180°], I coudn’t start a simulation with WaveDir = 0°.

There appears to be the same problem in the Newman approximation, difference-QTF and sum-QTF cases (lines 1443 & 1457, 1935 & 1949, and 2372 & 2386) : in each case, the “\<” sign should be replaced with “\>”.

With the code as it is, one can only take second order loads into account if WaveDirMax is equal to the second order Wamit file’s WaveDir upper boundaries (although it still won’t work with WaveDir = 180° and my “.8” file because of the “known issue #1”).

Thanks again for all the good work on FAST,

Best regards,

Romain

---

_[View the full topic](https://forums.nlr.gov/t/second-order-file-wavedir-boundary-check-issue/1454)._
