Public Member Functions | List of all members
pressureDirectedInletOutletVelocityFvPatchVectorField 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 flux with the specified inlet direction. More...

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

Public Member Functions

 TypeName ("pressureDirectedInletOutletVelocity")
 Runtime type information. More...
 
 pressureDirectedInletOutletVelocityFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &)
 Construct from patch and internal field. More...
 
 pressureDirectedInletOutletVelocityFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 pressureDirectedInletOutletVelocityFvPatchVectorField (const pressureDirectedInletOutletVelocityFvPatchVectorField &, const fvPatch &, const DimensionedField< vector, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given. More...
 
 pressureDirectedInletOutletVelocityFvPatchVectorField (const pressureDirectedInletOutletVelocityFvPatchVectorField &)
 Construct as copy. More...
 
virtual tmp< fvPatchVectorFieldclone () const
 Construct and return a clone. More...
 
 pressureDirectedInletOutletVelocityFvPatchVectorField (const pressureDirectedInletOutletVelocityFvPatchVectorField &, 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
 True: this patch field is altered by assignment. More...
 
const wordrhoName () const
 Return the name of rho. More...
 
wordrhoName ()
 Return reference to the name of rho to allow adjustment. More...
 
const wordphiName () const
 Return the name of phi. More...
 
wordphiName ()
 Return reference to the name of phi to allow adjustment. 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 flux with the specified inlet direction.

Usage
Property Description Required Default value
phi flux field name no phi
rho density field name no rho
inletDirection inlet direction per patch face yes

Example of the boundary condition specification:

    <patchName>
    {
        type            pressureDirectedInletOutletVelocity;
        phi             phi;
        rho             rho;
        inletDirection  uniform (1 0 0);
        value           uniform 0;
    }
Note
Sign conventions:
  • positive flux (out of domain): apply zero-gradient condition
  • negative flux (into of domain): derive from the flux with specified direction
See also
Foam::mixedFvPatchVectorField
Source files

Definition at line 102 of file pressureDirectedInletOutletVelocityFvPatchVectorField.H.

Constructor & Destructor Documentation

◆ pressureDirectedInletOutletVelocityFvPatchVectorField() [1/5]

Construct from patch and internal field.

Definition at line 32 of file pressureDirectedInletOutletVelocityFvPatchVectorField.C.

References Foam::Zero.

Referenced by pressureDirectedInletOutletVelocityFvPatchVectorField::clone().

Here is the caller graph for this function:

◆ pressureDirectedInletOutletVelocityFvPatchVectorField() [2/5]

Construct from patch, internal field and dictionary.

Definition at line 66 of file pressureDirectedInletOutletVelocityFvPatchVectorField.C.

References dict, and Foam::Zero.

◆ pressureDirectedInletOutletVelocityFvPatchVectorField() [3/5]

Construct by mapping given.

pressureDirectedInletOutletVelocityFvPatchVectorField onto a new patch

Definition at line 50 of file pressureDirectedInletOutletVelocityFvPatchVectorField.C.

◆ pressureDirectedInletOutletVelocityFvPatchVectorField() [4/5]

Construct as copy.

Definition at line 87 of file pressureDirectedInletOutletVelocityFvPatchVectorField.C.

◆ pressureDirectedInletOutletVelocityFvPatchVectorField() [5/5]

Construct as copy setting internal field reference.

Definition at line 100 of file pressureDirectedInletOutletVelocityFvPatchVectorField.C.

Member Function Documentation

◆ TypeName()

TypeName ( "pressureDirectedInletOutletVelocity"  )

Runtime type information.

◆ clone() [1/2]

virtual tmp<fvPatchVectorField> clone ( ) const
inlinevirtual

Construct and return a clone.

Definition at line 178 of file pressureDirectedInletOutletVelocityFvPatchVectorField.H.

References pressureDirectedInletOutletVelocityFvPatchVectorField::pressureDirectedInletOutletVelocityFvPatchVectorField().

Here is the call graph for this function:

◆ clone() [2/2]

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

Construct and return a clone setting internal field reference.

Definition at line 202 of file pressureDirectedInletOutletVelocityFvPatchVectorField.H.

References pressureDirectedInletOutletVelocityFvPatchVectorField::pressureDirectedInletOutletVelocityFvPatchVectorField().

Here is the call graph for this function:

◆ assignable()

virtual bool assignable ( ) const
inlinevirtual

True: this patch field is altered by assignment.

Definition at line 222 of file pressureDirectedInletOutletVelocityFvPatchVectorField.H.

◆ rhoName() [1/2]

const word& rhoName ( ) const
inline

Return the name of rho.

Definition at line 230 of file pressureDirectedInletOutletVelocityFvPatchVectorField.H.

◆ rhoName() [2/2]

word& rhoName ( )
inline

Return reference to the name of rho to allow adjustment.

Definition at line 238 of file pressureDirectedInletOutletVelocityFvPatchVectorField.H.

◆ phiName() [1/2]

const word& phiName ( ) const
inline

Return the name of phi.

Definition at line 246 of file pressureDirectedInletOutletVelocityFvPatchVectorField.H.

◆ phiName() [2/2]

word& phiName ( )
inline

Return reference to the name of phi to allow adjustment.

Definition at line 254 of file pressureDirectedInletOutletVelocityFvPatchVectorField.H.

◆ autoMap()

void autoMap ( const fvPatchFieldMapper m)
virtual

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

Definition at line 115 of file pressureDirectedInletOutletVelocityFvPatchVectorField.C.

◆ rmap()

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

Reverse map the given fvPatchField onto this fvPatchField.

Definition at line 125 of file pressureDirectedInletOutletVelocityFvPatchVectorField.C.

References pressureDirectedInletOutletVelocityFvPatchVectorField::rmap().

Referenced by pressureDirectedInletOutletVelocityFvPatchVectorField::rmap().

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

◆ updateCoeffs()

void updateCoeffs ( )
virtual

Update the coefficients associated with the patch field.

Definition at line 140 of file pressureDirectedInletOutletVelocityFvPatchVectorField.C.

References Foam::dimMass, Foam::dimTime, Foam::dimVolume, Foam::exit(), Foam::FatalError, FatalErrorInFunction, n, Foam::neg(), and Foam::foamVersion::patch.

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

◆ operator=()

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

Definition at line 194 of file pressureDirectedInletOutletVelocityFvPatchVectorField.C.

References Foam::lerp().

Here is the call graph for this function:

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