Modified do-while for U generation, incorrect use of continue.
This commit is contained in:
parent
239b954ad3
commit
d544973b14
@ -183,7 +183,7 @@ void Foam::FreeStream<CloudType>::inflow()
|
|||||||
// From Bird eqn 4.22
|
// From Bird eqn 4.22
|
||||||
|
|
||||||
pFA[i] +=
|
pFA[i] +=
|
||||||
mag(patch.faceAreas()) * numberDensities_[i] * deltaT
|
mag(patch.faceAreas())*numberDensities_[i]*deltaT
|
||||||
*mostProbableSpeed
|
*mostProbableSpeed
|
||||||
*(
|
*(
|
||||||
exp(-sqr(sCosTheta)) + sqrtPi*sCosTheta*(1 + erf(sCosTheta))
|
exp(-sqr(sCosTheta)) + sqrtPi*sCosTheta*(1 + erf(sCosTheta))
|
||||||
@ -344,11 +344,13 @@ void Foam::FreeStream<CloudType>::inflow()
|
|||||||
|
|
||||||
if (uNormal < 0.0)
|
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());
|
} while (P < rndGen.scalar01());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user