Go to the documentation of this file.
42 { fanFlowDirection::ffdIn,
"in" },
43 { fanFlowDirection::ffdOut,
"out" },
60 nonDimensional_(
false)
73 fanCurve_(ptf.fanCurve_),
74 direction_(ptf.direction_),
77 nonDimensional_(ptf.nonDimensional_)
90 direction_(fanFlowDirectionNames_.get(
"direction",
dict)),
93 nonDimensional_(
dict.getOrDefault(
"nonDimensional",
false))
97 dict.readEntry(
"rpm", rpm_);
98 dict.readEntry(
"dm", dm_);
109 fanCurve_(pfopsf.fanCurve_),
110 direction_(pfopsf.direction_),
113 nonDimensional_(pfopsf.nonDimensional_)
124 fanCurve_(pfopsf.fanCurve_),
125 direction_(pfopsf.direction_),
128 nonDimensional_(pfopsf.nonDimensional_)
148 int dir = 2*direction_ - 1;
151 scalar volFlowRate = 0;
155 volFlowRate = dir*
gSum(phip);
161 volFlowRate = dir*
gSum(phip/rhop);
166 <<
"dimensions of phi are not correct"
167 <<
"\n on patch " <<
patch().name()
168 <<
" of field " << internalField().name()
169 <<
" in file " << internalField().objectPath() <<
nl
181 scalar pdFan = fanCurve_(
max(volFlowRate, 0.0));
192 patch().lookupPatchField<volVectorField, vector>(
UName())
201 os.
writeEntry(
"direction", fanFlowDirectionNames_[direction_]);
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
This boundary condition can be applied to assign either a pressure inlet or outlet total pressure con...
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
const dimensionSet dimVelocity
const dimensionSet dimDensity
virtual void write(Ostream &os) const
Write.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
Type gSum(const FieldField< Field, Type > &f)
fanPressureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
dimensionedScalar pow4(const dimensionedScalar &ds)
This boundary condition provides a total pressure condition. Four variants are possible:
const dimensionSet dimArea(sqr(dimLength))
dimensionedScalar pow3(const dimensionedScalar &ds)
const word & phiName() const
Return the name of the flux field.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
const word & UName() const
Return the name of the velocity field.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
fanFlowDirection
Fan flow direction.
Macros for easy insertion into run-time selection tables.
const word & rhoName() const
Return the name of the density field.
const scalarField & p0() const
Return the total pressure.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
constexpr scalar pi(M_PI)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
const std::string patch
OpenFOAM patch number as a std::string.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
virtual void write(Ostream &) const
Write.
Foam::fvPatchFieldMapper.
static const Enum< fanFlowDirection > fanFlowDirectionNames_
Fan flow direction names.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...