Public Member Functions | Private Attributes
flowRateInletVelocityFvPatchVectorField Class Reference

This boundary condition provides a velocity boundary condition, derived from the flux (volumetric or mass-based), whose direction is assumed to be normal to the patch. More...

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

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 &)
 Construct as copy. More...
 
virtual tmp< fvPatchVectorFieldclone () const
 Construct and return a clone. More...
 
 flowRateInletVelocityFvPatchVectorField (const flowRateInletVelocityFvPatchVectorField &, 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 void updateCoeffs ()
 Update the coefficients associated with the patch field. More...
 
virtual void write (Ostream &) const
 Write. More...
 

Private Attributes

autoPtr< DataEntry< scalar > > flowRate_
 Inlet integral flow rate. More...
 
bool volumetric_
 Is volumetric? More...
 
word rhoName_
 Name of the density field used to normalize the mass flux. More...
 
scalar rhoInlet_
 Rho initialisation value (for start; if value not supplied) More...
 

Detailed Description

This boundary condition provides a velocity boundary condition, derived from the flux (volumetric or mass-based), whose direction is assumed to be normal to the patch.

For a mass-based flux:

For a volumetric-based flux:


Patch usage

Property Description Required Default value
massFlowRate mass flow rate [kg/s] no
volumetricFlowRate volumetric flow rate [m3/s] no
rhoInlet inlet density no

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

    myPatch
    {
        type        flowRateInletVelocity;
        volumetricFlowRate  0.2;
        value       uniform (0 0 0); // placeholder
    }

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

    myPatch
    {
        type                flowRateInletVelocity;
        massFlowRate        0.2;
        rho                 rho;
        rhoInlet            1.0;
    }

The flowRate entry is a DataEntry type, meaning that it can be specified as constant, a polynomial fuction of time, and ...

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::DataEntry Foam::fixedValueFvPatchField
Source files

Definition at line 127 of file flowRateInletVelocityFvPatchVectorField.H.

Constructor & Destructor Documentation

◆ flowRateInletVelocityFvPatchVectorField() [1/5]

Construct from patch and internal field.

Definition at line 36 of file flowRateInletVelocityFvPatchVectorField.C.

Referenced by flowRateInletVelocityFvPatchVectorField::clone().

Here is the caller graph for this function:

◆ flowRateInletVelocityFvPatchVectorField() [2/5]

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

Construct from patch, internal field and dictionary.

Definition at line 68 of file flowRateInletVelocityFvPatchVectorField.C.

References dict, Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::compressible::New(), p, and vectorField().

Here is the call graph for this function:

◆ flowRateInletVelocityFvPatchVectorField() [3/5]

Construct by mapping given.

flowRateInletVelocityFvPatchVectorField onto a new patch

Definition at line 51 of file flowRateInletVelocityFvPatchVectorField.C.

◆ flowRateInletVelocityFvPatchVectorField() [4/5]

Construct as copy.

Definition at line 115 of file flowRateInletVelocityFvPatchVectorField.C.

◆ flowRateInletVelocityFvPatchVectorField() [5/5]

Construct as copy setting internal field reference.

Definition at line 129 of file flowRateInletVelocityFvPatchVectorField.C.

Member Function Documentation

◆ TypeName()

TypeName ( "flowRateInletVelocity"  )

Runtime type information.

◆ clone() [1/2]

virtual tmp<fvPatchVectorField> clone ( ) const
inlinevirtual

Construct and return a clone.

Definition at line 187 of file flowRateInletVelocityFvPatchVectorField.H.

References flowRateInletVelocityFvPatchVectorField::flowRateInletVelocityFvPatchVectorField().

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 204 of file flowRateInletVelocityFvPatchVectorField.H.

References flowRateInletVelocityFvPatchVectorField::flowRateInletVelocityFvPatchVectorField().

Here is the call graph for this function:

◆ updateCoeffs()

void updateCoeffs ( )
virtual

◆ write()

void write ( Ostream os) const
virtual

Write.

Definition at line 191 of file flowRateInletVelocityFvPatchVectorField.C.

References fvPatchField::write().

Here is the call graph for this function:

Field Documentation

◆ flowRate_

autoPtr<DataEntry<scalar> > flowRate_
private

Inlet integral flow rate.

Definition at line 134 of file flowRateInletVelocityFvPatchVectorField.H.

Referenced by flowRateInletVelocityFvPatchVectorField::updateCoeffs().

◆ volumetric_

bool volumetric_
private

◆ rhoName_

word rhoName_
private

Name of the density field used to normalize the mass flux.

Definition at line 140 of file flowRateInletVelocityFvPatchVectorField.H.

Referenced by flowRateInletVelocityFvPatchVectorField::updateCoeffs().

◆ rhoInlet_

scalar rhoInlet_
private

Rho initialisation value (for start; if value not supplied)

Definition at line 143 of file flowRateInletVelocityFvPatchVectorField.H.

Referenced by flowRateInletVelocityFvPatchVectorField::updateCoeffs().


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