Skip to content

Commit 3e3c264

Browse files
author
Bart Doekemeijer
authored
Update horizontalAxisWindTurbinesALMAdvanced.C
Bug fix for yaw actions in ALMAdvanced
1 parent 41be0c8 commit 3e3c264

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/turbineModels/turbineModelsStandard/horizontalAxisWindTurbinesALMAdvanced/horizontalAxisWindTurbinesALMAdvanced.C

+6-2
Original file line numberDiff line numberDiff line change
@@ -1696,13 +1696,17 @@ void horizontalAxisWindTurbinesALMAdvanced::controlNacYaw()
16961696
}
16971697

16981698
//Info << "nacYaw = " << nacYaw << endl;
1699-
if (((nacYawCommanded - nacYaw[i]) / degRad) <= 180.0)
1699+
if (((nacYawCommanded - nacYaw[i]) / degRad) <= -180.0)
1700+
{
1701+
deltaNacYaw[i] = nacYawCommanded - nacYaw[i] + (360.0*degRad);
1702+
}
1703+
else if (((nacYawCommanded - nacYaw[i]) / degRad) <= 180.0)
17001704
{
17011705
deltaNacYaw[i] = nacYawCommanded - nacYaw[i];
17021706
}
17031707
else
17041708
{
1705-
deltaNacYaw[i] = nacYaw[i] - ((360.0*degRad) - nacYawCommanded);
1709+
deltaNacYaw[i] = nacYawCommanded - nacYaw[i] - (360.0*degRad);
17061710
}
17071711
//Info << "deltaNacYaw = " << deltaNacYaw / degRad << endl;
17081712

0 commit comments

Comments
 (0)