Loading...
Searching...
No Matches
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...

#include <fixedNormalInletOutletVelocityFvPatchVectorField.H>

Inheritance diagram for fixedNormalInletOutletVelocityFvPatchVectorField:
Collaboration diagram for fixedNormalInletOutletVelocityFvPatchVectorField:

Public Member Functions

 TypeName ("fixedNormalInletOutletVelocity")
 Runtime type information.
 fixedNormalInletOutletVelocityFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &)
 Construct from patch and internal field.
 fixedNormalInletOutletVelocityFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary.
 fixedNormalInletOutletVelocityFvPatchVectorField (const fixedNormalInletOutletVelocityFvPatchVectorField &, const fvPatch &, const DimensionedField< vector, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given.
 fixedNormalInletOutletVelocityFvPatchVectorField (const fixedNormalInletOutletVelocityFvPatchVectorField &)
 Construct as copy.
 fixedNormalInletOutletVelocityFvPatchVectorField (const fixedNormalInletOutletVelocityFvPatchVectorField &, const DimensionedField< vector, volMesh > &)
 Construct as copy setting internal field reference.
virtual tmp< fvPatchField< vector > > clone () const
 Return a clone.
virtual tmp< fvPatchField< vector > > clone (const DimensionedField< vector, volMesh > &iF) const
 Clone with an internal field reference.
virtual bool assignable () const
 True: this patch field is altered by assignment.
const wordphiName () const
 Return the name of phi.
wordphiName ()
 Return reference to the name of phi to allow adjustment.
Switch fixTangentialInflow () const
const fvPatchVectorFieldnormalVelocity () const
 Return the BC which provides the normal component of velocity.
virtual void autoMap (const fvPatchFieldMapper &)
 Map (and resize as needed) from self given a mapping object.
virtual void rmap (const fvPatchVectorField &, const labelList &)
 Reverse map the given fvPatchField onto this fvPatchField.
virtual void updateCoeffs ()
 Update the coefficients associated with the patch field.
virtual void write (Ostream &) const
 Write.
virtual void operator= (const fvPatchField< vector > &pvf)

Protected Attributes

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

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

Constructor & Destructor Documentation

◆ fixedNormalInletOutletVelocityFvPatchVectorField() [1/5]

fixedNormalInletOutletVelocityFvPatchVectorField ( const fvPatch & p,
const DimensionedField< vector, volMesh > & iF )

Construct from patch and internal field.

Definition at line 30 of file fixedNormalInletOutletVelocityFvPatchVectorField.C.

References fixTangentialInflow_, Foam::New(), normalVelocity_, p, phiName_, and Foam::Zero.

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

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

◆ fixedNormalInletOutletVelocityFvPatchVectorField() [2/5]

fixedNormalInletOutletVelocityFvPatchVectorField ( const fvPatch & p,
const DimensionedField< vector, volMesh > & iF,
const dictionary & dict )

Construct from patch, internal field and dictionary.

Definition at line 51 of file fixedNormalInletOutletVelocityFvPatchVectorField.C.

References dict, fixTangentialInflow_, IOobjectOption::MUST_READ, Foam::New(), normalVelocity(), normalVelocity_, p, phiName_, fvPatchFieldBase::readDict(), and Foam::Zero.

Here is the call graph for this function:

◆ fixedNormalInletOutletVelocityFvPatchVectorField() [3/5]

fixedNormalInletOutletVelocityFvPatchVectorField ( const fixedNormalInletOutletVelocityFvPatchVectorField & ptf,
const fvPatch & p,
const DimensionedField< vector, volMesh > & iF,
const fvPatchFieldMapper & mapper )

Construct by mapping given.

fixedNormalInletOutletVelocityFvPatchVectorField onto a new patch

Definition at line 75 of file fixedNormalInletOutletVelocityFvPatchVectorField.C.

References fixedNormalInletOutletVelocityFvPatchVectorField(), fixTangentialInflow_, Foam::New(), normalVelocity(), normalVelocity_, p, and phiName_.

Here is the call graph for this function:

◆ fixedNormalInletOutletVelocityFvPatchVectorField() [4/5]

fixedNormalInletOutletVelocityFvPatchVectorField ( const fixedNormalInletOutletVelocityFvPatchVectorField & pivpvf)

Construct as copy.

Definition at line 94 of file fixedNormalInletOutletVelocityFvPatchVectorField.C.

References clone(), fixedNormalInletOutletVelocityFvPatchVectorField(), fixTangentialInflow_, normalVelocity(), normalVelocity_, and phiName_.

Here is the call graph for this function:

◆ fixedNormalInletOutletVelocityFvPatchVectorField() [5/5]

fixedNormalInletOutletVelocityFvPatchVectorField ( const fixedNormalInletOutletVelocityFvPatchVectorField & pivpvf,
const DimensionedField< vector, volMesh > & iF )

Construct as copy setting internal field reference.

Definition at line 107 of file fixedNormalInletOutletVelocityFvPatchVectorField.C.

References clone(), fixedNormalInletOutletVelocityFvPatchVectorField(), fixTangentialInflow_, normalVelocity(), normalVelocity_, and phiName_.

Here is the call graph for this function:

Member Function Documentation

◆ TypeName()

TypeName ( "fixedNormalInletOutletVelocity" )

Runtime type information.

References fixedNormalInletOutletVelocityFvPatchVectorField().

Here is the call graph for this function:

◆ clone() [1/2]

virtual tmp< fvPatchField< vector > > clone ( ) const
inlinevirtual

Return a clone.

Definition at line 206 of file fixedNormalInletOutletVelocityFvPatchVectorField.H.

References fvPatchField< Type >::Clone().

Referenced by fixedNormalInletOutletVelocityFvPatchVectorField(), and fixedNormalInletOutletVelocityFvPatchVectorField().

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

◆ clone() [2/2]

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

Clone with an internal field reference.

Definition at line 214 of file fixedNormalInletOutletVelocityFvPatchVectorField.H.

References fvPatchField< Type >::Clone().

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

◆ phiName() [1/2]

const word & phiName ( ) const
inline

Return the name of phi.

Definition at line 236 of file fixedNormalInletOutletVelocityFvPatchVectorField.H.

References phiName_.

◆ phiName() [2/2]

word & phiName ( )
inline

Return reference to the name of phi to allow adjustment.

Definition at line 244 of file fixedNormalInletOutletVelocityFvPatchVectorField.H.

References phiName_.

◆ fixTangentialInflow()

Switch fixTangentialInflow ( ) const
inline

◆ normalVelocity()

const fvPatchVectorField & normalVelocity ( ) const
inline

◆ autoMap()

void autoMap ( const fvPatchFieldMapper & m)
virtual

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

Definition at line 123 of file fixedNormalInletOutletVelocityFvPatchVectorField.C.

References normalVelocity_.

◆ rmap()

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

Reverse map the given fvPatchField onto this fvPatchField.

Definition at line 133 of file fixedNormalInletOutletVelocityFvPatchVectorField.C.

References fixedNormalInletOutletVelocityFvPatchVectorField(), normalVelocity(), normalVelocity_, and Foam::refCast().

Here is the call graph for this function:

◆ updateCoeffs()

void updateCoeffs ( )
virtual

Update the coefficients associated with the patch field.

Definition at line 148 of file fixedNormalInletOutletVelocityFvPatchVectorField.C.

References fixTangentialInflow_, Foam::I, Foam::neg(), normalVelocity(), normalVelocity_, phiName_, and Foam::sqr().

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 193 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_

◆ fixTangentialInflow_

◆ normalVelocity_


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