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:39:32 +00:00
parent 6405663f67
commit f14e69bdc5
2 changed files with 4 additions and 1 deletions

View File

@ -163,6 +163,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

@ -638,7 +638,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