PaSR: ensure the sqrt operates on a positive number

This commit is contained in:
Henry
2015-03-06 22:38:12 +00:00
parent 6884300a00
commit 0003b4b008

View File

@ -84,7 +84,7 @@ void Foam::combustionModels::PaSR<Type>::correct()
forAll(epsilon, i) forAll(epsilon, i)
{ {
scalar tk = scalar tk =
Cmix_*Foam::sqrt(muEff[i]/rho[i]/(epsilon[i] + SMALL)); Cmix_*sqrt(max(muEff[i]/rho[i]/(epsilon[i] + SMALL), 0));
if (tk > SMALL) if (tk > SMALL)
{ {