fixedNormalInletOutletVelocityFvPatchVectorField Class Reference

This velocity inlet/outlet boundary condition combines a fixed normal component obtained from the "normalVelocity" patchField supplied with a fixed or zero-gradiented tangential component. More...

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

Public Member Functions

 TypeName ("fixedNormalInletOutletVelocity")
 Runtime type information. More...
 
 fixedNormalInletOutletVelocityFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &)
 Construct from patch and internal field. More...
 
 fixedNormalInletOutletVelocityFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 fixedNormalInletOutletVelocityFvPatchVectorField (const fixedNormalInletOutletVelocityFvPatchVectorField &, const fvPatch &, const DimensionedField< vector, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given. More...
 
 fixedNormalInletOutletVelocityFvPatchVectorField (const fixedNormalInletOutletVelocityFvPatchVectorField &)
 Construct as copy. More...
 
virtual tmp< fvPatchVectorFieldclone () const
 Construct and return a clone. More...
 
 fixedNormalInletOutletVelocityFvPatchVectorField (const fixedNormalInletOutletVelocityFvPatchVectorField &, 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...
 
Switch fixTangentialInflow () const
 
const fvPatchVectorFieldnormalVelocity () const
 Return the BC which provides the normal component of 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)
 

Protected Attributes

word phiName_
 Flux field name. More...
 
Switch fixTangentialInflow_
 Set true to fix the tangential component for inflow. More...
 
tmp< fvPatchVectorFieldnormalVelocity_
 BC which provided the normal component of the velocity. More...
 

Detailed Description

This velocity inlet/outlet boundary condition combines a fixed normal component obtained from the "normalVelocity" patchField supplied with a fixed or zero-gradiented tangential component.

The tangential component is set depending on the direction of the flow and the setting of "fixTangentialInflow":

  • Outflow: apply zero-gradient condition to tangential components
  • Inflow:
    • fixTangentialInflow is true apply value provided by the normalVelocity patchField to the tangential components
    • fixTangentialInflow is false apply zero-gradient condition to tangential components.
Usage
Property Description Required Default value
phi flux field name no phi
fixTangentialInflow If true fix the tangential component for inflow yes
normalVelocity patchField providing the normal velocity field yes

Example of the boundary condition specification:

    <patchName>
    {
        type            fixedNormalInletOutletVelocity;

        fixTangentialInflow false;
        normalVelocity
        {
            type            uniformFixedValue;
            uniformValue    sine;
            uniformValueCoeffs
            {
                frequency 1;
                amplitude table
                (
                    (0  0)
                    (2  0.088)
                    (8  0.088)
                );
                scale     (0 1 0);
                level     (0 0 0);
            }
        }

        value           uniform (0 0 0);
    }
Source files

Definition at line 124 of file fixedNormalInletOutletVelocityFvPatchVectorField.H.

Constructor & Destructor Documentation

◆ fixedNormalInletOutletVelocityFvPatchVectorField() [1/5]

Construct from patch and internal field.

Definition at line 37 of file fixedNormalInletOutletVelocityFvPatchVectorField.C.

References Foam::New(), and Foam::Zero.

Here is the call graph for this function:

◆ fixedNormalInletOutletVelocityFvPatchVectorField() [2/5]

Construct from patch, internal field and dictionary.

Definition at line 58 of file fixedNormalInletOutletVelocityFvPatchVectorField.C.

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

Here is the call graph for this function:

◆ fixedNormalInletOutletVelocityFvPatchVectorField() [3/5]

◆ fixedNormalInletOutletVelocityFvPatchVectorField() [4/5]

◆ fixedNormalInletOutletVelocityFvPatchVectorField() [5/5]

Construct as copy setting internal field reference.

Definition at line 114 of file fixedNormalInletOutletVelocityFvPatchVectorField.C.

Member Function Documentation

◆ TypeName()

TypeName ( "fixedNormalInletOutletVelocity"  )

Runtime type information.

◆ clone() [1/2]

virtual tmp< fvPatchVectorField > clone ( ) const
inlinevirtual

Construct and return a clone.

Definition at line 182 of file fixedNormalInletOutletVelocityFvPatchVectorField.H.

◆ 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 198 of file fixedNormalInletOutletVelocityFvPatchVectorField.H.

◆ assignable()

virtual bool assignable ( ) const
inlinevirtual

Return true: this patch field is altered by assignment.

Definition at line 215 of file fixedNormalInletOutletVelocityFvPatchVectorField.H.

◆ phiName() [1/2]

const word & phiName ( ) const
inline

◆ phiName() [2/2]

word & phiName ( )
inline

Return reference to the name of phi to allow adjustment.

Definition at line 230 of file fixedNormalInletOutletVelocityFvPatchVectorField.H.

References fixedNormalInletOutletVelocityFvPatchVectorField::phiName_.

◆ fixTangentialInflow()

◆ normalVelocity()

const fvPatchVectorField & normalVelocity ( ) const
inline

Return the BC which provides the normal component of velocity.

Definition at line 241 of file fixedNormalInletOutletVelocityFvPatchVectorField.H.

References fixedNormalInletOutletVelocityFvPatchVectorField::normalVelocity_.

Referenced by fixedNormalInletOutletVelocityFvPatchVectorField::fixedNormalInletOutletVelocityFvPatchVectorField(), and fixedNormalInletOutletVelocityFvPatchVectorField::rmap().

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 130 of file fixedNormalInletOutletVelocityFvPatchVectorField.C.

◆ rmap()

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

Reverse map the given fvPatchField onto this fvPatchField.

Definition at line 140 of file fixedNormalInletOutletVelocityFvPatchVectorField.C.

References fixedNormalInletOutletVelocityFvPatchVectorField::normalVelocity().

Here is the call graph for this function:

◆ updateCoeffs()

void updateCoeffs ( )
virtual

Update the coefficients associated with the patch field.

Definition at line 155 of file fixedNormalInletOutletVelocityFvPatchVectorField.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.

Definition at line 180 of file fixedNormalInletOutletVelocityFvPatchVectorField.C.

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

Here is the call graph for this function:

◆ operator=()

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

Definition at line 200 of file fixedNormalInletOutletVelocityFvPatchVectorField.C.

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

Here is the call graph for this function:

Member Data Documentation

◆ phiName_

word phiName_
protected

◆ fixTangentialInflow_

Switch fixTangentialInflow_
protected

Set true to fix the tangential component for inflow.

Definition at line 136 of file fixedNormalInletOutletVelocityFvPatchVectorField.H.

Referenced by fixedNormalInletOutletVelocityFvPatchVectorField::fixTangentialInflow().

◆ normalVelocity_

tmp<fvPatchVectorField> normalVelocity_
protected

BC which provided the normal component of the velocity.

Definition at line 139 of file fixedNormalInletOutletVelocityFvPatchVectorField.H.

Referenced by fixedNormalInletOutletVelocityFvPatchVectorField::normalVelocity().


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