rotorDiskSource: Use the scalar sign function

This commit is contained in:
Henry Weller
2019-06-04 15:56:19 +01:00
parent 77f441344e
commit 74d45a1313

View File

@ -86,7 +86,7 @@ void Foam::fv::rotorDiskSource::calculate
const scalar alphaGeom = thetag[i] + twist;
// Effective angle of attack
const int rotationSign = (omega_ > 0) ? 1 : -1;
const int rotationSign = sign(omega_);
const scalar alphaEff =
alphaGeom - atan2(-Uc.z(), rotationSign*Uc.y());