ENH: rotorDiskSource - limit angle of attack to -pi to pi

This commit is contained in:
andy 2014-05-13 17:23:53 +01:00
parent e399248ef2
commit 896bd3fd1b

View file

@ -566,6 +566,14 @@ void Foam::fv::rotorDiskSource::calculate
// effective angle of attack
scalar alphaEff = alphaGeom - atan2(-Uc.z(), Uc.y());
if (alphaEff > mathematical::pi)
{
alphaEff -= mathematical::twoPi;
}
if (alphaEff < -mathematical::pi)
{
alphaEff += mathematical::twoPi;
}
AOAmin = min(AOAmin, alphaEff);
AOAmax = max(AOAmax, alphaEff);