Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
meanVelocityForce Class Reference

Applies the force within a specified region to maintain the specified mean velocity for incompressible flows. More...

Inheritance diagram for meanVelocityForce:
Inheritance graph
[legend]
Collaboration diagram for meanVelocityForce:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("meanVelocityForce")
 
 meanVelocityForce (const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
 
 meanVelocityForce (const meanVelocityForce &)=delete
 
void operator= (const meanVelocityForce &)=delete
 
virtual ~meanVelocityForce ()=default
 
virtual void correct (volVectorField &U)
 
virtual void addSup (fvMatrix< vector > &eqn, const label fieldi)
 
virtual void addSup (const volScalarField &rho, fvMatrix< vector > &eqn, const label fieldi)
 
virtual void constrain (fvMatrix< vector > &eqn, const label fieldi)
 
virtual bool read (const dictionary &dict)
 
- Public Member Functions inherited from cellSetOption
 TypeName ("cellSetOption")
 
 cellSetOption (const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
 
virtual ~cellSetOption ()=default
 
scalar timeStart () const noexcept
 
scalar duration () const noexcept
 
bool inTimeLimits (const scalar timeValue) const
 
selectionModeType selectionMode () const noexcept
 
bool useSubMesh () const noexcept
 
const wordcellSetName () const noexcept
 
scalar V () const noexcept
 
const labelListcells () const noexcept
 
scalar timeStart (scalar val) noexcept
 
scalar duration (scalar val) noexcept
 
virtual bool isActive ()
 
- Public Member Functions inherited from option
 TypeName ("option")
 
 declareRunTimeSelectionTable (autoPtr, option, dictionary,(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh),(name, modelType, dict, mesh))
 
 option (const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
 
autoPtr< optionclone () const
 
virtual ~option ()=default
 
const wordname () const noexcept
 
const fvMeshmesh () const noexcept
 
const dictionarycoeffs () const noexcept
 
bool active () const noexcept
 
void setApplied (const label fieldi)
 
bool active (const bool on) noexcept
 
virtual label applyToField (const word &fieldName) const
 
virtual void checkApplied () const
 
virtual void addSup (fvMatrix< scalar > &eqn, const label fieldi)
 
virtual void addSup (fvMatrix< symmTensor > &eqn, const label fieldi)
 
virtual void addSup (fvMatrix< sphericalTensor > &eqn, const label fieldi)
 
virtual void addSup (fvMatrix< tensor > &eqn, const label fieldi)
 
virtual void addSup (const volScalarField &rho, fvMatrix< scalar > &eqn, const label fieldi)
 
virtual void addSup (const volScalarField &rho, fvMatrix< symmTensor > &eqn, const label fieldi)
 
virtual void addSup (const volScalarField &rho, fvMatrix< sphericalTensor > &eqn, const label fieldi)
 
virtual void addSup (const volScalarField &rho, fvMatrix< tensor > &eqn, const label fieldi)
 
virtual void addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< scalar > &eqn, const label fieldi)
 
virtual void addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< vector > &eqn, const label fieldi)
 
virtual void addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< symmTensor > &eqn, const label fieldi)
 
virtual void addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< sphericalTensor > &eqn, const label fieldi)
 
virtual void addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< tensor > &eqn, const label fieldi)
 
virtual void constrain (fvMatrix< scalar > &eqn, const label fieldi)
 
virtual void constrain (fvMatrix< sphericalTensor > &eqn, const label fieldi)
 
virtual void constrain (fvMatrix< symmTensor > &eqn, const label fieldi)
 
virtual void constrain (fvMatrix< tensor > &eqn, const label fieldi)
 
virtual void correct (volScalarField &field)
 
virtual void correct (volSphericalTensorField &field)
 
virtual void correct (volSymmTensorField &field)
 
virtual void correct (volTensorField &field)
 
virtual void postProcessSens (scalarField &sensField, const word &fieldName=word::null, const word &designVariablesName=word::null)
 
virtual void postProcessSens (vectorField &sensField, const word &fieldName=word::null, const word &designVariablesName=word::null)
 
virtual void postProcessSens (tensorField &sensField, const word &fieldName=word::null, const word &designVariablesName=word::null)
 
virtual void writeHeader (Ostream &) const
 
virtual void writeFooter (Ostream &) const
 
virtual void writeData (Ostream &) const
 

Protected Member Functions

virtual scalar magUbarAve (const volVectorField &U) const
 
void writeProps (const scalar gradP) const
 
void update (fvMatrix< vector > &eqn)
 
- Protected Member Functions inherited from cellSetOption
void setSelection (const dictionary &dict)
 
void setCellSelection ()
 
void setVol ()
 
- Protected Member Functions inherited from option
void resetApplied ()
 

Protected Attributes

vector Ubar_
 
scalar gradP0_
 
scalar dGradP_
 
vector flowDir_
 
scalar relaxation_
 
autoPtr< volScalarFieldrAPtr_
 
- Protected Attributes inherited from cellSetOption
scalar timeStart_
 
scalar duration_
 
selectionModeType selectionMode_
 
word cellSetName_
 
List< pointpoints_
 
labelList cells_
 
scalar V_
 
- Protected Attributes inherited from option
const word name_
 
const word modelType_
 
const fvMeshmesh_
 
dictionary dict_
 
dictionary coeffs_
 
wordList fieldNames_
 
List< boolapplied_
 
bool active_
 

Additional Inherited Members

- Public Types inherited from cellSetOption
enum  selectionModeType { smAll, smCellSet, smCellZone, smPoints }
 
- Static Public Member Functions inherited from option
static autoPtr< optionNew (const word &name, const dictionary &dict, const fvMesh &mesh)
 
- Public Attributes inherited from option
bool log
 
- Static Public Attributes inherited from cellSetOption
static const Enum< selectionModeTypeselectionModeTypeNames_
 

Detailed Description

Applies the force within a specified region to maintain the specified mean velocity for incompressible flows.

Sources applied to:

  U         | Velocity                                   [m/s]

Required fields:

  U         | Velocity                                   [m/s]
Usage
Minimal example by using constant/fvOptions:
meanVelocityForce1
{
    // Mandatory entries (unmodifiable)
    type                 meanVelocityForce;

    // Mandatory entries (unmodifiable)
    Ubar             (1 0 0);
    fields           (<fieldName>);

    // Optional entries (unmodifiable)
    relaxation       1.0;

    // Conditional mandatory entries (unmodifiable)

        // when <timePath>/uniform/<name>Properties file exists
        gradient    <vectorField>; // reading from the aforementioned file

    // Mandatory/Optional (inherited) entries
    ...
}

where the entries mean:

Property Description Type Reqd Dflt
type Type name: meanVelocityForce word yes -
Ubar Desired mean velocity vector yes -
fields Name of operand velocity field word yes -
relaxation Relaxation factor scalar no 1
gradient Initial pressure gradient field vectorField cndtnl -

The inherited entries are elaborated in:

Note
  • Currently only handles kinematic pressure (incompressible solvers).
Source files

Definition at line 144 of file meanVelocityForce.H.

Constructor & Destructor Documentation

◆ meanVelocityForce() [1/2]

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

Definition at line 71 of file meanVelocityForce.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, IOstream::good(), Foam::Info, Foam::nl, and propsDict().

Here is the call graph for this function:

◆ meanVelocityForce() [2/2]

meanVelocityForce ( const meanVelocityForce )
delete

◆ ~meanVelocityForce()

virtual ~meanVelocityForce ( )
virtualdefault

Member Function Documentation

◆ magUbarAve()

Foam::scalar magUbarAve ( const volVectorField U) const
protectedvirtual

Definition at line 116 of file meanVelocityForce.C.

References forAll, reduce(), and U.

Referenced by meanVelocityForce::correct().

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

◆ writeProps()

void writeProps ( const scalar  gradP) const
protected

Definition at line 43 of file meanVelocityForce.C.

References gradP(), and propsDict().

Referenced by meanVelocityForce::correct().

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

◆ update()

void update ( fvMatrix< vector > &  eqn)
protected

◆ TypeName()

TypeName ( "meanVelocityForce"  )

◆ operator=()

void operator= ( const meanVelocityForce )
delete

◆ correct()

void correct ( volVectorField U)
virtual

◆ addSup() [1/2]

void addSup ( fvMatrix< vector > &  eqn,
const label  fieldi 
)
virtual

Reimplemented from option.

Definition at line 183 of file meanVelocityForce.C.

References fvMatrix::dimensions(), Foam::dimVolume, gradP(), IOobject::NO_READ, IOobject::NO_WRITE, Su, and Foam::Zero.

Here is the call graph for this function:

◆ addSup() [2/2]

void addSup ( const volScalarField rho,
fvMatrix< vector > &  eqn,
const label  fieldi 
)
virtual

Reimplemented from option.

Definition at line 211 of file meanVelocityForce.C.

◆ constrain()

void constrain ( fvMatrix< vector > &  eqn,
const label  fieldi 
)
virtual

Reimplemented from option.

Definition at line 222 of file meanVelocityForce.C.

References fvMatrix::A(), IOobject::NO_READ, and IOobject::NO_WRITE.

Here is the call graph for this function:

◆ read()

bool read ( const dictionary dict)
virtual

Reimplemented from cellSetOption.

Definition at line 255 of file meanVelocityForce.C.

References NotImplemented.

Member Data Documentation

◆ Ubar_

vector Ubar_
protected

Definition at line 153 of file meanVelocityForce.H.

Referenced by meanVelocityForce::correct().

◆ gradP0_

scalar gradP0_
protected

Definition at line 156 of file meanVelocityForce.H.

Referenced by meanVelocityForce::correct().

◆ dGradP_

scalar dGradP_
protected

Definition at line 159 of file meanVelocityForce.H.

Referenced by meanVelocityForce::correct().

◆ flowDir_

vector flowDir_
protected

Definition at line 162 of file meanVelocityForce.H.

Referenced by meanVelocityForce::correct().

◆ relaxation_

scalar relaxation_
protected

Definition at line 165 of file meanVelocityForce.H.

Referenced by meanVelocityForce::correct().

◆ rAPtr_

autoPtr<volScalarField> rAPtr_
protected

Definition at line 168 of file meanVelocityForce.H.

Referenced by meanVelocityForce::correct().


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