meanVelocityForce Class Reference

Calculates and applies the force necessary to maintain the specified mean velocity. More...

Inheritance diagram for meanVelocityForce:
Collaboration diagram for meanVelocityForce:

Public Member Functions

 TypeName ("meanVelocityForce")
 Runtime type information. More...
 
 meanVelocityForce (const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
 Construct from explicit source name and mesh. More...
 
 meanVelocityForce (const meanVelocityForce &)=delete
 Disallow default bitwise copy construction. More...
 
const vectorUbar () const
 Return the average velocity. More...
 
virtual wordList constrainedFields () const
 Return the list of fields constrained by the fvConstraint. More...
 
virtual bool constrain (fvMatrix< vector > &eqn, const word &fieldName) const
 Add the momentum source and set the 1/A coefficient. More...
 
virtual bool constrain (volVectorField &U) const
 Correct the pressure gradient. More...
 
virtual bool movePoints ()
 Update for mesh motion. More...
 
virtual void topoChange (const polyTopoChangeMap &)
 Update topology using the given map. More...
 
virtual void mapMesh (const polyMeshMap &)
 Update from another mesh using the given map. More...
 
virtual void distribute (const polyDistributionMap &)
 Redistribute or update using the given distribution map. More...
 
virtual bool read (const dictionary &dict)
 Read source dictionary. More...
 
void operator= (const meanVelocityForce &)=delete
 Disallow default bitwise assignment. More...
 
- Public Member Functions inherited from fvConstraint
 TypeName ("fvConstraint")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, fvConstraint, dictionary,(const word &name, const word &constraintType, const dictionary &dict, const fvMesh &mesh),(name, constraintType, dict, mesh))
 
 fvConstraint (const word &name, const word &constraintType, const dictionary &dict, const fvMesh &mesh)
 Construct from components. More...
 
autoPtr< fvConstraintclone () const
 Return clone. More...
 
virtual ~fvConstraint ()
 Destructor. More...
 
const wordname () const
 Return const access to the source name. More...
 
const fvMeshmesh () const
 Return const access to the mesh database. More...
 
const dictionarycoeffs () const
 Return dictionary. More...
 
virtual bool constrainsField (const word &fieldName) const
 Return true if the given field is constrained. More...
 
 FOR_ALL_FIELD_TYPES (DEFINE_FV_CONSTRAINT_CONSTRAIN)
 Apply a constraint to an equation. More...
 
 FOR_ALL_FIELD_TYPES (DEFINE_FV_CONSTRAINT_CONSTRAIN_FIELD)
 Apply constraint to a field. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from fvConstraint
static autoPtr< fvConstraintNew (const word &name, const dictionary &dict, const fvMesh &mesh)
 Return a reference to the selected fvConstraint. More...
 

Detailed Description

Calculates and applies the force necessary to maintain the specified mean velocity.

Usage
Example usage:
meanVelocityConstraint
{
    type            meanVelocityForce;

    selectionMode   all;

    U               U;          // Name of velocity field

    Ubar            (10.0 0 0); // Desired mean velocity
    relaxation      0.2;        // Optional relaxation factor
}

Note: Currently only handles kinematic pressure (incompressible solvers).

Source files

Definition at line 71 of file meanVelocityForce.H.

Constructor & Destructor Documentation

◆ meanVelocityForce() [1/2]

meanVelocityForce ( const word sourceName,
const word modelType,
const dictionary dict,
const fvMesh mesh 
)

Construct from explicit source name and mesh.

Definition at line 90 of file meanVelocityForce.C.

References Foam::endl(), IOstream::good(), Foam::Info, dictionary::lookup(), Foam::name(), Foam::nl, dictionary::null, propsDict(), fvMesh::time(), and Time::timePath().

Here is the call graph for this function:

◆ meanVelocityForce() [2/2]

meanVelocityForce ( const meanVelocityForce )
delete

Disallow default bitwise copy construction.

Member Function Documentation

◆ TypeName()

TypeName ( "meanVelocityForce"  )

Runtime type information.

◆ Ubar()

◆ constrainedFields()

Foam::wordList constrainedFields ( ) const
virtual

Return the list of fields constrained by the fvConstraint.

Reimplemented from fvConstraint.

Definition at line 126 of file meanVelocityForce.C.

References cells, meanVelocityForce::constrain(), forAll, mesh, Foam::normalised(), Foam::reduce(), and U.

Referenced by meanVelocityForce::Ubar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ constrain() [1/2]

bool constrain ( fvMatrix< vector > &  eqn,
const word fieldName 
) const
virtual

Add the momentum source and set the 1/A coefficient.

Definition at line 154 of file meanVelocityForce.C.

References fvMatrix< Type >::A(), fvMatrix< Type >::dimensions(), Foam::dimVolume, gradP(), mesh, Foam::name(), IOobject::NO_READ, IOobject::NO_WRITE, Foam::normalised(), Su, timeName, and Foam::Zero.

Referenced by meanVelocityForce::constrainedFields(), and meanVelocityForce::Ubar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ constrain() [2/2]

bool constrain ( volVectorField U) const
virtual

Correct the pressure gradient.

Definition at line 210 of file meanVelocityForce.C.

References cells, Foam::endl(), forAll, Foam::Info, Foam::mag(), mesh, Foam::normalised(), rAU, and Foam::reduce().

Here is the call graph for this function:

◆ movePoints()

bool movePoints ( )
virtual

Update for mesh motion.

Implements fvConstraint.

Definition at line 251 of file meanVelocityForce.C.

Referenced by meanVelocityForce::Ubar().

Here is the caller graph for this function:

◆ topoChange()

void topoChange ( const polyTopoChangeMap map)
virtual

Update topology using the given map.

Implements fvConstraint.

Definition at line 258 of file meanVelocityForce.C.

Referenced by meanVelocityForce::Ubar().

Here is the caller graph for this function:

◆ mapMesh()

void mapMesh ( const polyMeshMap map)
virtual

Update from another mesh using the given map.

Implements fvConstraint.

Definition at line 264 of file meanVelocityForce.C.

Referenced by meanVelocityForce::Ubar().

Here is the caller graph for this function:

◆ distribute()

void distribute ( const polyDistributionMap map)
virtual

Redistribute or update using the given distribution map.

Implements fvConstraint.

Definition at line 270 of file meanVelocityForce.C.

Referenced by meanVelocityForce::Ubar().

Here is the caller graph for this function:

◆ read()

bool read ( const dictionary dict)
virtual

Read source dictionary.

Reimplemented from fvConstraint.

Reimplemented in patchMeanVelocityForce.

Definition at line 276 of file meanVelocityForce.C.

References fvConstraint::read().

Referenced by patchMeanVelocityForce::read(), and meanVelocityForce::Ubar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

void operator= ( const meanVelocityForce )
delete

Disallow default bitwise assignment.

Referenced by meanVelocityForce::Ubar().

Here is the caller graph for this function:

The documentation for this class was generated from the following files: