Go to the documentation of this file.
43 { fanFlowDirection::ffdIn,
"in" },
44 { fanFlowDirection::ffdOut,
"out" },
59 nonDimensional_(
false),
74 fanCurve_(rhs.fanCurve_.clone()),
75 direction_(rhs.direction_),
76 nonDimensional_(rhs.nonDimensional_),
77 rpm_(rhs.rpm_.clone()),
91 direction_(fanFlowDirectionNames_.get(
"direction",
dict)),
92 nonDimensional_(
dict.getOrDefault(
"nonDimensional",
false)),
97 if (
dict.found(
"file"))
123 fanCurve_(rhs.fanCurve_.clone()),
124 direction_(rhs.direction_),
125 nonDimensional_(rhs.nonDimensional_),
126 rpm_(rhs.rpm_.clone()),
138 fanCurve_(rhs.fanCurve_.clone()),
139 direction_(rhs.direction_),
140 nonDimensional_(rhs.nonDimensional_),
141 rpm_(rhs.rpm_.clone()),
160 const int dir = 2*direction_ - 1;
163 scalar volFlowRate = 0;
167 volFlowRate = dir*
gSum(phip);
173 volFlowRate = dir*
gSum(phip/rhop);
178 <<
"dimensions of phi are not correct\n"
179 <<
" on patch " <<
patch().name()
180 <<
" of field " << internalField().name()
181 <<
" in file " << internalField().objectPath() <<
nl
192 rpm = rpm_->value(this->db().time().timeOutputValue());
193 meanDiam = dm_->value(this->db().time().timeOutputValue());
206 scalar pdFan = fanCurve_->value(
max(volFlowRate, scalar(0)));
214 *
sqr(rpm * meanDiam) / 1800.0
221 patch().lookupPatchField<volVectorField, vector>(
UName())
229 fanCurve_->writeData(
os);
230 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.
Type gSum(const FieldField< Field, Type > &f)
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
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)
tmp< DimensionedField< scalar, GeoMesh > > stabilise(const DimensionedField< scalar, GeoMesh > &dsf, const dimensioned< scalar > &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.
Templated table container function where data are read from file.
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,...
OBJstream os(runTime.globalPath()/outputName)
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)
fanFlowDirection
Fan flow direction.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...