meanVelocityForce: Updated and corrected documentation

This commit is contained in:
Henry Weller
2015-06-30 19:20:08 +01:00
parent 256be2641f
commit 82ccea2a49
2 changed files with 13 additions and 14 deletions

View File

@ -91,7 +91,7 @@ Foam::fv::meanVelocityForce::meanVelocityForce
dGradP_(0.0),
flowDir_(Ubar_/mag(Ubar_)),
relaxation_(coeffs_.lookupOrDefault<scalar>("relaxation", 1.0)),
invAPtr_(NULL)
rAPtr_(NULL)
{
coeffs_.lookup("fieldNames") >> fieldNames_;
@ -134,7 +134,7 @@ Foam::fv::meanVelocityForce::meanVelocityForce
void Foam::fv::meanVelocityForce::correct(volVectorField& U)
{
const scalarField& rAU = invAPtr_().internalField();
const scalarField& rAU = rAPtr_().internalField();
// Integrate flow variables over cell set
scalar magUbarAve = 0.0;
@ -225,15 +225,15 @@ void Foam::fv::meanVelocityForce::constrain
const label
)
{
if (invAPtr_.empty())
if (rAPtr_.empty())
{
invAPtr_.reset
rAPtr_.reset
(
new volScalarField
(
IOobject
(
name_ + ":invA",
name_ + ":rA",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
@ -245,7 +245,7 @@ void Foam::fv::meanVelocityForce::constrain
}
else
{
invAPtr_() = 1.0/eqn.A();
rAPtr_() = 1.0/eqn.A();
}
gradP0_ += dGradP_;

View File

@ -25,19 +25,18 @@ Class
Foam::fv::meanVelocityForce
Description
Creates a pressure gradient source
Calculates and applies the force necessary to maintain the specified mean
velocity.
Note: Currently only handles kinematic pressure
Note: Currently only handles kinematic pressure (incompressible solvers).
\heading Source usage
Example usage:
\verbatim
meanVelocityForceCoeffs
{
fieldNames (U); // name of velocity field
Ubar (10.0 0 0); // desired average velocity
gradPini gradPini [0 2 -2 0 0] 0; // initial pressure gradient
flowDir (1 0 0); // flow direction
fieldNames (U); // Name of velocity field
Ubar (10.0 0 0); // Desired mean velocity
relaxation 0.2; // Optional relaxation factor
}
\endverbatim
@ -91,7 +90,7 @@ class meanVelocityForce
scalar relaxation_;
//- Matrix 1/A coefficients field pointer
autoPtr<volScalarField> invAPtr_;
autoPtr<volScalarField> rAPtr_;
// Private Member Functions