94 #ifndef meanVelocityForce_H 95 #define meanVelocityForce_H 113 class meanVelocityForce
115 public fv::cellSetOption
137 autoPtr<volScalarField>
rAPtr_;
164 const word& sourceName,
virtual scalar magUbarAve(const volVectorField &U) const
Calculate and return the magnitude of the mean velocity averaged over the selected cellSet...
virtual void correct(volVectorField &U)
Correct the pressure gradient.
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual bool read(const dictionary &dict)
Read source dictionary.
void operator=(const meanVelocityForce &)=delete
No copy assignment.
autoPtr< volScalarField > rAPtr_
Matrix 1/A coefficients field pointer.
volVectorField gradP(fvc::grad(p))
void writeProps(const scalar gradP) const
Write the pressure gradient to file (for restarts etc)
meanVelocityForce(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from explicit source name and mesh.
scalar relaxation_
Relaxation factor.
virtual void addSup(fvMatrix< vector > &eqn, const label fieldi)
Add explicit contribution to momentum equation.
A class for handling words, derived from Foam::string.
vector Ubar_
Desired mean velocity.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
virtual ~meanVelocityForce()=default
Destructor.
scalar dGradP_
Change in pressure gradient.
void update(fvMatrix< vector > &eqn)
Correct driving force for a constant mass flow rate.
TypeName("meanVelocityForce")
Runtime type information.
Mesh data needed to do the Finite Volume discretisation.
scalar gradP0_
Pressure gradient before correction.
vector flowDir_
Flow direction.
Applies the force within a specified region to maintain the specified mean velocity for incompressibl...
virtual void constrain(fvMatrix< vector > &eqn, const label fieldi)
Set 1/A coefficient.