45void Foam::fanFvPatchField<Foam::scalar>::calcFanJump()
47 if (!this->cyclicPatch().owner())
56 if (phip.internalField().dimensions() == dimVolume/dimTime)
60 else if (phip.internalField().dimensions() == dimMass/dimTime)
68 <<
"dimensions of phi are not correct\n"
69 <<
" on patch " <<
patch().name()
70 <<
" of field " << internalField().name()
71 <<
" in file " << internalField().objectPath() <<
nl
82 switch (operatingMode_)
84 case operatingMode::VELOCITY:
87 volFlowRate /=
patch().magSf();
90 pdFan = this->jumpTable_->value(volFlowRate);
94 case operatingMode::UNIFORM_VELOCITY:
97 volFlowRate /=
patch().magSf();
104 pdFan = this->jumpTable_->value(UnAve);
108 case operatingMode::VOL_FLOW_RATE:
112 const scalar sumVolFlowRate =
gSum(volFlowRate);
115 pdFan = this->jumpTable_->value(sumVolFlowRate);
119 case operatingMode::NON_DIMENSIONAL:
123 scalar sumVolFlowRate =
gSum(volFlowRate);
125 rpm = rpm_->value(this->db().time().timeOutputValue());
126 meanDiam = dm_->value(this->db().time().timeOutputValue());
134 pow3(constant::mathematical::pi*meanDiam)*rpm,
139 const scalar pdNonDim = this->jumpTable_->value(sumVolFlowRate);
144 *
pow4(constant::mathematical::pi)*
sqr(meanDiam*rpm)/1800.0;
151 <<
"Unhandled enumeration "
152 << operatingModeNames_[operatingMode_]
153 <<
abort(FatalError);
158 this->setJump(pdFan);
Macros for easy insertion into run-time selection tables.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define makePatchFieldType(fieldType, bcType)
const wordList area
Standard area field types (scalar, vector, tensor, etc).
const std::string patch
OpenFOAM patch number as a std::string.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Type gSum(const FieldField< Field, Type > &f)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar pow3(const dimensionedScalar &ds)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar pow4(const dimensionedScalar &ds)
errorManip< error > abort(error &err)
dimensionedScalar stabilise(const dimensionedScalar &x, const dimensionedScalar &y)
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a).