Skip to content
Snippets Groups Projects
Commit 1c099647 authored by andy's avatar andy
Browse files

ENH: pressureTools - added check if reference pressure level is zero for coeff calculation

parent ce5c58c4
Branches
Tags
No related merge requests found
......@@ -285,6 +285,17 @@ void Foam::pressureTools::read(const dictionary& dict)
dict.lookup("pInf") >> pInf_;
dict.lookup("UInf") >> UInf_;
dict.lookup("rhoInf") >> rhoInf_;
scalar zeroCheck = 0.5*rhoInf_*magSqr(UInf_) + pInf_;
if (mag(zeroCheck) < ROOTVSMALL)
{
WarningIn("void Foam::pressureTools::read(const dictionary&)")
<< type() << " " << name_ << ": "
<< "Coefficient calculation requested, but reference "
<< "pressure level is zero. Please check the supplied "
<< "values of pInf, UInf and rhoInf" << endl;
}
}
}
}
......
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