pressureInletOutletVelocityFvPatchVectorField Class Reference

This velocity inlet/outlet boundary condition is applied to velocity boundaries where the pressure is specified. A zero-gradient condition is applied for outflow (as defined by the flux); for inflow, the velocity is obtained from the patch-face normal component of the internal-cell value. More...

Inheritance diagram for pressureInletOutletVelocityFvPatchVectorField:
[legend]
Collaboration diagram for pressureInletOutletVelocityFvPatchVectorField:
[legend]

Public Member Functions

 TypeName ("pressureInletOutletVelocity")
 Runtime type information. More...
 
 pressureInletOutletVelocityFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &)
 Construct from patch and internal field. More...
 
 pressureInletOutletVelocityFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 pressureInletOutletVelocityFvPatchVectorField (const pressureInletOutletVelocityFvPatchVectorField &, const fvPatch &, const DimensionedField< vector, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given. More...
 
 pressureInletOutletVelocityFvPatchVectorField (const pressureInletOutletVelocityFvPatchVectorField &)
 Construct as copy. More...
 
virtual tmp< fvPatchVectorFieldclone () const
 Construct and return a clone. More...
 
 pressureInletOutletVelocityFvPatchVectorField (const pressureInletOutletVelocityFvPatchVectorField &, const DimensionedField< vector, volMesh > &)
 Construct as copy setting internal field reference. More...
 
virtual tmp< fvPatchVectorFieldclone (const DimensionedField< vector, volMesh > &iF) const
 Construct and return a clone setting internal field reference. More...
 
virtual bool assignable () const
 Return true: this patch field is altered by assignment. More...
 
const wordphiName () const
 Return the name of phi. More...
 
wordphiName ()
 Return reference to the name of phi to allow adjustment. More...
 
const vectorFieldtangentialVelocity () const
 Return the tangential velocity. More...
 
void setTangentialVelocity (const vectorField &tangentialVelocity)
 Reset the tangential velocity. More...
 
virtual void autoMap (const fvPatchFieldMapper &)
 Map (and resize as needed) from self given a mapping object. More...
 
virtual void rmap (const fvPatchVectorField &, const labelList &)
 Reverse map the given fvPatchField onto this fvPatchField. More...
 
virtual void updateCoeffs ()
 Update the coefficients associated with the patch field. More...
 
virtual void write (Ostream &) const
 Write. More...
 
virtual void operator= (const fvPatchField< vector > &pvf)
 

Detailed Description

This velocity inlet/outlet boundary condition is applied to velocity boundaries where the pressure is specified. A zero-gradient condition is applied for outflow (as defined by the flux); for inflow, the velocity is obtained from the patch-face normal component of the internal-cell value.

The tangential patch velocity can be optionally specified.

Usage
Property Description Required Default value
phi flux field name no phi
tangentialVelocity tangential velocity field no

Example of the boundary condition specification:

    <patchName>
    {
        type            pressureInletOutletVelocity;
        phi             phi;
        tangentialVelocity uniform (0 0 0);
        value           uniform (0 0 0);
    }
Note
Sign conventions:
  • positive flux (out of domain): apply zero-gradient condition
  • negative flux (into of domain): derive from the flux in the patch-normal direction
Source files

Definition at line 98 of file pressureInletOutletVelocityFvPatchVectorField.H.

Constructor & Destructor Documentation

◆ pressureInletOutletVelocityFvPatchVectorField() [1/5]

Construct from patch and internal field.

Definition at line 37 of file pressureInletOutletVelocityFvPatchVectorField.C.

References Foam::Zero.

◆ pressureInletOutletVelocityFvPatchVectorField() [2/5]

Construct from patch, internal field and dictionary.

Definition at line 72 of file pressureInletOutletVelocityFvPatchVectorField.C.

References dict, dictionary::found(), dictionary::getOrDefault(), word::null, fvPatchField< vector >::operator=(), p, pressureInletOutletVelocityFvPatchVectorField::setTangentialVelocity(), UList< T >::size(), and Foam::Zero.

Here is the call graph for this function:

◆ pressureInletOutletVelocityFvPatchVectorField() [3/5]

Construct by mapping given.

pressureInletOutletVelocityFvPatchVectorField onto a new patch

Definition at line 53 of file pressureInletOutletVelocityFvPatchVectorField.C.

References UList< T >::size().

Here is the call graph for this function:

◆ pressureInletOutletVelocityFvPatchVectorField() [4/5]

◆ pressureInletOutletVelocityFvPatchVectorField() [5/5]

Construct as copy setting internal field reference.

Definition at line 115 of file pressureInletOutletVelocityFvPatchVectorField.C.

Member Function Documentation

◆ TypeName()

TypeName ( "pressureInletOutletVelocity"  )

Runtime type information.

◆ clone() [1/2]

virtual tmp< fvPatchVectorField > clone ( ) const
inlinevirtual

Construct and return a clone.

Reimplemented in rotatingPressureInletOutletVelocityFvPatchVectorField.

Definition at line 151 of file pressureInletOutletVelocityFvPatchVectorField.H.

◆ clone() [2/2]

virtual tmp< fvPatchVectorField > clone ( const DimensionedField< vector, volMesh > &  iF) const
inlinevirtual

Construct and return a clone setting internal field reference.

Reimplemented in rotatingPressureInletOutletVelocityFvPatchVectorField.

Definition at line 167 of file pressureInletOutletVelocityFvPatchVectorField.H.

◆ assignable()

virtual bool assignable ( ) const
inlinevirtual

Return true: this patch field is altered by assignment.

Definition at line 184 of file pressureInletOutletVelocityFvPatchVectorField.H.

◆ phiName() [1/2]

const word & phiName ( ) const
inline

Return the name of phi.

Definition at line 193 of file pressureInletOutletVelocityFvPatchVectorField.H.

◆ phiName() [2/2]

word & phiName ( )
inline

Return reference to the name of phi to allow adjustment.

Definition at line 199 of file pressureInletOutletVelocityFvPatchVectorField.H.

◆ tangentialVelocity()

const vectorField & tangentialVelocity ( ) const
inline

Return the tangential velocity.

Definition at line 205 of file pressureInletOutletVelocityFvPatchVectorField.H.

◆ setTangentialVelocity()

void setTangentialVelocity ( const vectorField tangentialVelocity)

Reset the tangential velocity.

Definition at line 130 of file pressureInletOutletVelocityFvPatchVectorField.C.

References n.

Referenced by pressureInletOutletVelocityFvPatchVectorField::pressureInletOutletVelocityFvPatchVectorField().

Here is the caller graph for this function:

◆ autoMap()

void autoMap ( const fvPatchFieldMapper m)
virtual

Map (and resize as needed) from self given a mapping object.

Definition at line 139 of file pressureInletOutletVelocityFvPatchVectorField.C.

◆ rmap()

void rmap ( const fvPatchVectorField ptf,
const labelList addr 
)
virtual

Reverse map the given fvPatchField onto this fvPatchField.

Definition at line 152 of file pressureInletOutletVelocityFvPatchVectorField.C.

◆ updateCoeffs()

void updateCoeffs ( )
virtual

Update the coefficients associated with the patch field.

Definition at line 170 of file pressureInletOutletVelocityFvPatchVectorField.C.

References Foam::I, Foam::neg(), and Foam::sqr().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write.

Reimplemented in rotatingPressureInletOutletVelocityFvPatchVectorField.

Definition at line 187 of file pressureInletOutletVelocityFvPatchVectorField.C.

References os(), ObukhovLength::write(), and Ostream::writeEntryIfDifferent().

Here is the call graph for this function:

◆ operator=()

void operator= ( const fvPatchField< vector > &  pvf)
virtual

Definition at line 205 of file pressureInletOutletVelocityFvPatchVectorField.C.

References Foam::I, fvPatchField< Type >::operator=(), and Foam::transform().

Here is the call graph for this function:

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