diff --git a/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C b/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C index bacb31b69de56a902d85740a7668cb79ac7290a1..393acaadf102db66848bdfef7597e6b57942ecc9 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 c0ac2f51970ed945d64e7c01644aa5a75a2cdf7d..e34904f88e4135e1b95ef06aa8897c24855ea4db 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