From 82ccea2a497fe8e9919c1012f7a9edef86858ffe Mon Sep 17 00:00:00 2001
From: Henry Weller <http://cfd.direct>
Date: Tue, 30 Jun 2015 19:20:08 +0100
Subject: [PATCH] meanVelocityForce: Updated and corrected documentation

---
 .../derived/meanVelocityForce/meanVelocityForce.C | 12 ++++++------
 .../derived/meanVelocityForce/meanVelocityForce.H | 15 +++++++--------
 2 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C b/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C
index bacb31b69de..393acaadf10 100644
--- a/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C
+++ b/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C
@@ -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_;
diff --git a/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.H b/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.H
index c0ac2f51970..e34904f88e4 100644
--- a/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.H
+++ b/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.H
@@ -25,20 +25,19 @@ 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
-        relaxation  0.2;                        // Optional relaxation factor
+        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
-- 
GitLab