flowRateInletVelocityFvPatchVectorField Class Reference

Velocity inlet boundary condition creating a velocity field with optionally specified profile normal to the patch adjusted to match the specified mass flow rate, volumetric flow rate or mean velocity. More...

Inheritance diagram for flowRateInletVelocityFvPatchVectorField:
Collaboration diagram for flowRateInletVelocityFvPatchVectorField:

Public Member Functions

 TypeName ("flowRateInletVelocity")
 Runtime type information. More...
 
 flowRateInletVelocityFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &)
 Construct from patch and internal field. More...
 
 flowRateInletVelocityFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 flowRateInletVelocityFvPatchVectorField (const flowRateInletVelocityFvPatchVectorField &, const fvPatch &, const DimensionedField< vector, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given. More...
 
 flowRateInletVelocityFvPatchVectorField (const flowRateInletVelocityFvPatchVectorField &)=delete
 Disallow copy without setting internal field reference. More...
 
 flowRateInletVelocityFvPatchVectorField (const flowRateInletVelocityFvPatchVectorField &, const DimensionedField< vector, volMesh > &)
 Copy constructor 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 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 reset (const fvPatchVectorField &)
 Reset the fvPatchField to the given fvPatchField. More...
 
virtual void updateCoeffs ()
 Update the coefficients associated with the patch field. More...
 
virtual void write (Ostream &) const
 Write. More...
 

Detailed Description

Velocity inlet boundary condition creating a velocity field with optionally specified profile normal to the patch adjusted to match the specified mass flow rate, volumetric flow rate or mean velocity.

For a mass-based flux:

  • the flow rate should be provided in kg/s
  • if rho is "none" the flow rate is in m3/s
  • otherwise rho should correspond to the name of the density field
  • if the density field cannot be found in the database, the user must specify the inlet density using the rhoInlet entry

For a volumetric-based flux:

  • the flow rate is in m3/s
Usage
Property Description Required Default value
massFlowRate Mass flow rate [kg/s] no
volumetricFlowRate Volumetric flow rate [m^3/s] no
meanVelocity Mean velocity [m/s] no
profile Velocity profile no
rho Density field name no rho
rhoInlet Inlet density no
alpha Volume fraction field name no

Example of the boundary condition specification for a volumetric flow rate:

    <patchName>
    {
        type                flowRateInletVelocity;
        volumetricFlowRate  0.2;
        profile             laminarBL;
    }

Example of the boundary condition specification for a mass flow rate:

    <patchName>
    {
        type                flowRateInletVelocity;
        massFlowRate        0.2;
        profile             turbulentBL;
        rho                 rho;
        rhoInlet            1.0;
    }

Example of the boundary condition specification for a volumetric flow rate:

    <patchName>
    {
        type                flowRateInletVelocity;
        meanVelocity        5;
        profile             turbulentBL;
    }

The volumetricFlowRate, massFlowRate or meanVelocity entries are Function1 of time, see Foam::Function1s.

The profile entry is a Function1 of the normalised distance to the wall. Any suitable Foam::Function1s can be used including Foam::Function1s::codedFunction1 but Foam::Function1s::laminarBL and Foam::Function1s::turbulentBL have been created specifically for this purpose and are likely to be appropriate for most cases.

Note:

  • rhoInlet is required for the case of a mass flow rate, where the density field is not available at start-up
  • The value is positive into the domain (as an inlet)
  • May not work correctly for transonic inlets
  • Strange behaviour with potentialFoam since the U equation is not solved
See also
Foam::fixedValueFvPatchField Foam::Function1s::laminarBL Foam::Function1s::turbulentBL Foam::Function1s Foam::flowRateOutletVelocityFvPatchVectorField
Source files

Definition at line 168 of file flowRateInletVelocityFvPatchVectorField.H.

Constructor & Destructor Documentation

◆ flowRateInletVelocityFvPatchVectorField() [1/5]

Construct from patch and internal field.

Definition at line 138 of file flowRateInletVelocityFvPatchVectorField.C.

Referenced by flowRateInletVelocityFvPatchVectorField::clone(), and flowRateInletVelocityFvPatchVectorField::flowRateInletVelocityFvPatchVectorField().

Here is the caller graph for this function:

◆ flowRateInletVelocityFvPatchVectorField() [2/5]

◆ flowRateInletVelocityFvPatchVectorField() [3/5]

Construct by mapping given.

flowRateInletVelocityFvPatchVectorField onto a new patch

Definition at line 222 of file flowRateInletVelocityFvPatchVectorField.C.

References flowRateInletVelocityFvPatchVectorField::flowRateInletVelocityFvPatchVectorField().

Here is the call graph for this function:

◆ flowRateInletVelocityFvPatchVectorField() [4/5]

Disallow copy without setting internal field reference.

◆ flowRateInletVelocityFvPatchVectorField() [5/5]

Copy constructor setting internal field reference.

Definition at line 244 of file flowRateInletVelocityFvPatchVectorField.C.

References flowRateInletVelocityFvPatchVectorField::autoMap().

Here is the call graph for this function:

Member Function Documentation

◆ TypeName()

TypeName ( "flowRateInletVelocity"  )

Runtime type information.

◆ clone()

◆ autoMap()

void autoMap ( const fvPatchFieldMapper m)
virtual

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

Used to update fields following mesh topology change

Definition at line 265 of file flowRateInletVelocityFvPatchVectorField.C.

References flowRateInletVelocityFvPatchVectorField::rmap().

Referenced by flowRateInletVelocityFvPatchVectorField::clone(), and flowRateInletVelocityFvPatchVectorField::flowRateInletVelocityFvPatchVectorField().

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

◆ rmap()

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

Reverse map the given fvPatchField onto this fvPatchField.

Used to reconstruct fields

Definition at line 279 of file flowRateInletVelocityFvPatchVectorField.C.

References flowRateInletVelocityFvPatchVectorField::reset(), and Field< Type >::rmap().

Referenced by flowRateInletVelocityFvPatchVectorField::autoMap(), and flowRateInletVelocityFvPatchVectorField::clone().

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

◆ reset()

void reset ( const fvPatchVectorField ptf)
virtual

Reset the fvPatchField to the given fvPatchField.

Used for mesh to mesh mapping

Definition at line 297 of file flowRateInletVelocityFvPatchVectorField.C.

References Field< Type >::reset().

Referenced by flowRateInletVelocityFvPatchVectorField::clone(), and flowRateInletVelocityFvPatchVectorField::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 313 of file flowRateInletVelocityFvPatchVectorField.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and word::null.

Referenced by flowRateInletVelocityFvPatchVectorField::clone().

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

◆ write()

void write ( Ostream os) const
virtual

Write.

Definition at line 343 of file flowRateInletVelocityFvPatchVectorField.C.

References Foam::makePatchTypeField(), word::null, fvPatchField< Type >::write(), and Foam::writeEntry().

Referenced by flowRateInletVelocityFvPatchVectorField::clone().

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

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