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...
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); }
Definition at line 168 of file pressurePIDControlInletVelocityFvPatchVectorField.H.
pressurePIDControlInletVelocityFvPatchVectorField | ( | const fvPatch & | p, |
const DimensionedField< vector, volMesh > & | iF | ||
) |
Construct from patch and internal field.
Definition at line 67 of file pressurePIDControlInletVelocityFvPatchVectorField.C.
pressurePIDControlInletVelocityFvPatchVectorField | ( | const fvPatch & | p, |
const DimensionedField< vector, volMesh > & | iF, | ||
const dictionary & | dict | ||
) |
Construct from patch, internal field and dictionary.
Definition at line 125 of file pressurePIDControlInletVelocityFvPatchVectorField.C.
pressurePIDControlInletVelocityFvPatchVectorField | ( | const pressurePIDControlInletVelocityFvPatchVectorField & | ptf, |
const fvPatch & | p, | ||
const DimensionedField< vector, volMesh > & | iF, | ||
const fvPatchFieldMapper & | mapper | ||
) |
Construct by mapping given.
flowRateInletVelocityFvPatchVectorField onto a new patch
Definition at line 95 of file pressurePIDControlInletVelocityFvPatchVectorField.C.
pressurePIDControlInletVelocityFvPatchVectorField | ( | const pressurePIDControlInletVelocityFvPatchVectorField & | ptf | ) |
Construct as copy.
Definition at line 154 of file pressurePIDControlInletVelocityFvPatchVectorField.C.
pressurePIDControlInletVelocityFvPatchVectorField | ( | const pressurePIDControlInletVelocityFvPatchVectorField & | ptf, |
const DimensionedField< vector, volMesh > & | iF | ||
) |
Construct as copy setting internal field reference.
Definition at line 181 of file pressurePIDControlInletVelocityFvPatchVectorField.C.
TypeName | ( | "pressurePIDControlInletVelocity" | ) |
Runtime type information.
|
inlinevirtual |
Construct and return a clone.
Definition at line 283 of file pressurePIDControlInletVelocityFvPatchVectorField.H.
|
inlinevirtual |
Construct and return a clone setting internal field reference.
Definition at line 302 of file pressurePIDControlInletVelocityFvPatchVectorField.H.
|
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.
|
virtual |
Write.
Definition at line 355 of file pressurePIDControlInletVelocityFvPatchVectorField.C.
References os(), ObukhovLength::write(), Ostream::writeEntry(), and Ostream::writeEntryIfDifferent().