functionObjects::forceCoeffs: Corrected setting of rhoRef for compressible flow

Resolves bug-report https://bugs.openfoam.org/view.php?id=2387
This commit is contained in:
Henry Weller 2016-12-14 10:42:49 +00:00
parent 3d754f4a12
commit fb57ecbfdf
2 changed files with 4 additions and 1 deletions

View file

@ -156,6 +156,9 @@ bool Foam::functionObjects::forceCoeffs::read(const dictionary& dict)
// Free stream velocity magnitude
dict.lookup("magUInf") >> magUInf_;
// Reference (free stream) density
dict.lookup("rhoInf") >> rhoRef_;
// Reference length and area scales
dict.lookup("lRef") >> lRef_;
dict.lookup("Aref") >> Aref_;

View file

@ -639,7 +639,7 @@ bool Foam::functionObjects::forces::read(const dictionary& dict)
// Reference density needed for incompressible calculations
if (rhoName_ == "rhoInf")
{
rhoRef_ = readScalar(dict.lookup("rhoInf"));
dict.lookup("rhoInf") >> rhoRef_;
}
// Reference pressure, 0 by default