Commit 8293b56e authored by Andrew Heather's avatar Andrew Heather
Browse files

consistency update

parent b8a5d2ef
...@@ -81,7 +81,7 @@ Foam::tmp<Foam::volSymmTensorField> Foam::forces::devRhoReff() const ...@@ -81,7 +81,7 @@ Foam::tmp<Foam::volSymmTensorField> Foam::forces::devRhoReff() const
const basicThermo& thermo = const basicThermo& thermo =
obr_.lookupObject<basicThermo>("thermophysicalProperties"); obr_.lookupObject<basicThermo>("thermophysicalProperties");
const volVectorField& U = obr_.lookupObject<volVectorField>(Uname_); const volVectorField& U = obr_.lookupObject<volVectorField>(UName_);
return -thermo.mu()*dev(twoSymm(fvc::grad(U))); return -thermo.mu()*dev(twoSymm(fvc::grad(U)));
} }
...@@ -94,7 +94,7 @@ Foam::tmp<Foam::volSymmTensorField> Foam::forces::devRhoReff() const ...@@ -94,7 +94,7 @@ Foam::tmp<Foam::volSymmTensorField> Foam::forces::devRhoReff() const
obr_.lookupObject<singlePhaseTransportModel> obr_.lookupObject<singlePhaseTransportModel>
("transportProperties"); ("transportProperties");
const volVectorField& U = obr_.lookupObject<volVectorField>(Uname_); const volVectorField& U = obr_.lookupObject<volVectorField>(UName_);
return -rhoRef_*laminarT.nu()*dev(twoSymm(fvc::grad(U))); return -rhoRef_*laminarT.nu()*dev(twoSymm(fvc::grad(U)));
} }
...@@ -105,7 +105,7 @@ Foam::tmp<Foam::volSymmTensorField> Foam::forces::devRhoReff() const ...@@ -105,7 +105,7 @@ Foam::tmp<Foam::volSymmTensorField> Foam::forces::devRhoReff() const
dimensionedScalar nu(transportProperties.lookup("nu")); dimensionedScalar nu(transportProperties.lookup("nu"));
const volVectorField& U = obr_.lookupObject<volVectorField>(Uname_); const volVectorField& U = obr_.lookupObject<volVectorField>(UName_);
return -rhoRef_*nu*dev(twoSymm(fvc::grad(U))); return -rhoRef_*nu*dev(twoSymm(fvc::grad(U)));
} }
...@@ -149,7 +149,7 @@ Foam::forces::forces ...@@ -149,7 +149,7 @@ Foam::forces::forces
log_(false), log_(false),
patchSet_(), patchSet_(),
pName_(""), pName_(""),
Uname_(""), UName_(""),
rhoRef_(0), rhoRef_(0),
CofR_(vector::zero), CofR_(vector::zero),
forcesFilePtr_(NULL) forcesFilePtr_(NULL)
...@@ -190,18 +190,18 @@ void Foam::forces::read(const dictionary& dict) ...@@ -190,18 +190,18 @@ void Foam::forces::read(const dictionary& dict)
// Optional entries U and p // Optional entries U and p
pName_ = dict.lookupOrDefault<word>("pName", "p"); pName_ = dict.lookupOrDefault<word>("pName", "p");
Uname_ = dict.lookupOrDefault<word>("Uname", "U"); UName_ = dict.lookupOrDefault<word>("UName", "U");
// Check whether Uname and pName exists, if not deactivate forces // Check whether UName and pName exists, if not deactivate forces
if if
( (
!obr_.foundObject<volVectorField>(Uname_) !obr_.foundObject<volVectorField>(UName_)
|| !obr_.foundObject<volScalarField>(pName_) || !obr_.foundObject<volScalarField>(pName_)
) )
{ {
active_ = false; active_ = false;
WarningIn("void forces::read(const dictionary& dict)") WarningIn("void forces::read(const dictionary& dict)")
<< "Could not find " << Uname_ << " or " << "Could not find " << UName_ << " or "
<< pName_ << " in database." << nl << pName_ << " in database." << nl
<< " De-activating forces." << " De-activating forces."
<< endl; << endl;
...@@ -299,7 +299,7 @@ void Foam::forces::write() ...@@ -299,7 +299,7 @@ void Foam::forces::write()
Foam::forces::forcesMoments Foam::forces::calcForcesMoment() const Foam::forces::forcesMoments Foam::forces::calcForcesMoment() const
{ {
const volVectorField& U = obr_.lookupObject<volVectorField>(Uname_); const volVectorField& U = obr_.lookupObject<volVectorField>(UName_);
const volScalarField& p = obr_.lookupObject<volScalarField>(pName_); const volScalarField& p = obr_.lookupObject<volScalarField>(pName_);
const fvMesh& mesh = U.mesh(); const fvMesh& mesh = U.mesh();
......
...@@ -130,7 +130,7 @@ protected: ...@@ -130,7 +130,7 @@ protected:
word pName_; word pName_;
//- Name of velocity field //- Name of velocity field
word Uname_; word UName_;
//- Reference density needed for incompressible calculations //- Reference density needed for incompressible calculations
scalar rhoRef_; scalar rhoRef_;
......
Supports Markdown
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