NREL / SOWFA

Other
131 stars 113 forks source link

Fix Floating point exception #17

Closed pablo-benito closed 6 years ago

pablo-benito commented 6 years ago

There is a floating point exception on horizontalAxisWindTurbinesALMfastv8.C, line 1563, whenever the vectors bladePoint1 and bladePoint1Old are equal, because it's trying to calculate the acos of a value slightly higher than 1 (due to numerical rounding issues)

I enforce the argument of acos to be between -1 and 1. This issue is solved in the openFast branch, but not in this one, and I use the same solution.

mchurchf commented 6 years ago

Pablo, thanks much for fixing this.