diff --git a/src/functionObjects/forces/forceCoeffs/forceCoeffs.C b/src/functionObjects/forces/forceCoeffs/forceCoeffs.C index 635edfd6f4..27a95872ac 100644 --- a/src/functionObjects/forces/forceCoeffs/forceCoeffs.C +++ b/src/functionObjects/forces/forceCoeffs/forceCoeffs.C @@ -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_; diff --git a/src/functionObjects/forces/forces/forces.C b/src/functionObjects/forces/forces/forces.C index ec0f0810e5..9ade518a92 100644 --- a/src/functionObjects/forces/forces/forces.C +++ b/src/functionObjects/forces/forces/forces.C @@ -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