Skip to content
Snippets Groups Projects
Commit 08318727 authored by andy's avatar andy Committed by Andrew Heather
Browse files

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

parent 0946ba74
Branches
Tags
No related merge requests found
......@@ -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);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment