Modified do-while for U generation, incorrect use of continue.

This commit is contained in:
graham 2009-04-17 12:46:20 +01:00
parent 239b954ad3
commit d544973b14

View File

@ -183,7 +183,7 @@ void Foam::FreeStream<CloudType>::inflow()
// From Bird eqn 4.22
pFA[i] +=
mag(patch.faceAreas()) * numberDensities_[i] * deltaT
mag(patch.faceAreas())*numberDensities_[i]*deltaT
*mostProbableSpeed
*(
exp(-sqr(sCosTheta)) + sqrtPi*sCosTheta*(1 + erf(sCosTheta))
@ -344,11 +344,13 @@ void Foam::FreeStream<CloudType>::inflow()
if (uNormal < 0.0)
{
continue;
P = -1;
}
else
{
P = 2.0*uNormal/uNormProbCoeffA
*exp(uNormProbCoeffB - sqr(uNormalThermal));
}
P = 2.0*uNormal/uNormProbCoeffA
*exp(uNormProbCoeffB - sqr(uNormalThermal));
} while (P < rndGen.scalar01());