pressurePIDControlInletVelocityFvPatchVectorField Class Reference

This boundary condition tries to generate an inlet velocity that maintains a specified pressure drop between two face zones downstream. The zones should fully span a duct through which all the inlet flow passes. More...

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

Public Member Functions

 TypeName ("pressurePIDControlInletVelocity")
 Runtime type information. More...
 
 pressurePIDControlInletVelocityFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &)
 Construct from patch and internal field. More...
 
 pressurePIDControlInletVelocityFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 pressurePIDControlInletVelocityFvPatchVectorField (const pressurePIDControlInletVelocityFvPatchVectorField &, const fvPatch &, const DimensionedField< vector, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given. More...
 
 pressurePIDControlInletVelocityFvPatchVectorField (const pressurePIDControlInletVelocityFvPatchVectorField &)
 Construct as copy. More...
 
virtual tmp< fvPatchVectorFieldclone () const
 Construct and return a clone. More...
 
 pressurePIDControlInletVelocityFvPatchVectorField (const pressurePIDControlInletVelocityFvPatchVectorField &, 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...
 

Detailed Description

This boundary condition tries to generate an inlet velocity that maintains a specified pressure drop between two face zones downstream. The zones should fully span a duct through which all the inlet flow passes.

An incompressible, lossless analysis of the flow between the inlet and the two face-zones is performed. An ideal inlet velocity is thereby calculated from the user-specified pressure drop. This analysis can include the transient effect of the inlet velocity change. In this case, a shape factor is included to represent non-linearity in the duct cross section.

The average pressure drop between the two face zones is measured. The same incompressible, lossless analysis is performed using this pressure drop. The difference between the two computed velocities is considered as an error. The ideal inlet is modified so as to drive this error to zero. This is accomplished by means of a PID control algorithm, for which non-dimensional gains are specified by the user.

The shape factor takes a value of 0 for a linear change in cross sectional area between the two face zones. A value of 1 represents a step change in area at the mid-point between the zones. A smooth cubic or cosine profile between two zones with zero divergence is typically represented by a factor of between 0.2 and 0.25.


Patch usage

Property Description Required Default value
upstream upstream face zone name yes
downstream downstream face zone name yes
deltaP desired pressure drop yes
shapeFactor non-linearity in the nozzle no 0
p pressure field name no p
phi flux field name yes phi
rho density field name no none
P proportional gain yes
I integral gain yes
D differential gain yes

Example of the boundary condition specification:

    myPatch
    {
        type            pressurePIDControlInletVelocity;
        upstream        upstream;
        downstream      downstream;
        deltaP          200;
        shapeFactor     0;
        p               p;
        phi             phi;
        rho             none;
        P               0.5;
        I               0.5;
        D               0.1;
        value           uniform (0 0 0);
    }
See also
Foam::fixedValueFvPatchField
Source files

Definition at line 168 of file pressurePIDControlInletVelocityFvPatchVectorField.H.

Constructor & Destructor Documentation

◆ pressurePIDControlInletVelocityFvPatchVectorField() [1/5]

Construct from patch and internal field.

Definition at line 67 of file pressurePIDControlInletVelocityFvPatchVectorField.C.

◆ pressurePIDControlInletVelocityFvPatchVectorField() [2/5]

Construct from patch, internal field and dictionary.

Definition at line 125 of file pressurePIDControlInletVelocityFvPatchVectorField.C.

◆ pressurePIDControlInletVelocityFvPatchVectorField() [3/5]

◆ pressurePIDControlInletVelocityFvPatchVectorField() [4/5]

◆ pressurePIDControlInletVelocityFvPatchVectorField() [5/5]

Construct as copy setting internal field reference.

Definition at line 181 of file pressurePIDControlInletVelocityFvPatchVectorField.C.

Member Function Documentation

◆ TypeName()

TypeName ( "pressurePIDControlInletVelocity"  )

Runtime type information.

◆ clone() [1/2]

virtual tmp< fvPatchVectorField > clone ( ) const
inlinevirtual

Construct and return a clone.

Definition at line 283 of file pressurePIDControlInletVelocityFvPatchVectorField.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 302 of file pressurePIDControlInletVelocityFvPatchVectorField.H.

◆ updateCoeffs()

void updateCoeffs ( )
virtual

Update the coefficients associated with the patch field.

Definition at line 211 of file pressurePIDControlInletVelocityFvPatchVectorField.C.

References b, fvMesh::Cf(), Foam::dimArea, Foam::dimDensity, DimensionedField< Type, GeoMesh >::dimensions(), Foam::dimVelocity, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::gSum(), Foam::Info, L, Foam::log(), Foam::mag(), mesh, phi, rho, Foam::sqr(), Foam::sqrt(), schemesLookup::steady(), timeIndex, atmBoundaryLayerInletEpsilonFvPatchScalarField::updateCoeffs(), and WarningInFunction.

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write.

Definition at line 355 of file pressurePIDControlInletVelocityFvPatchVectorField.C.

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

Here is the call graph for this function:

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