37 void Foam::swirlFanVelocityFvPatchField::calcFanJump()
41 const scalar rpm = rpm_->value(this->
db().time().timeOutputValue());
46 const fvPatchField<scalar>& pOwner =
53 const fvPatchField<scalar>& pSlave =
69 axisHat ^ (
patch().Cf() - origin_)
72 tanDir /= (
mag(tanDir) + SMALL);
82 const scalar rMag =
mag(pCf[i] - origin_);
84 if (rMag > rInner_ && rMag < rOuter_)
103 <<
"Effective radius 'rEff' was ill-specified in the " 104 <<
"dictionary." <<
nl 119 const vectorField tangentialVelocity(magTangU*tanDir);
121 this->
setJump(tangentialVelocity);
131 const DimensionedField<vector, volMesh>& iF
134 fixedJumpFvPatchField<
vector>(
p, iF),
144 useRealRadius_(false)
156 phiName_(
dict.getOrDefault<
word>(
"phi",
"phi")),
157 pName_(
dict.getOrDefault<
word>(
"p",
"p")),
158 rhoName_(
dict.getOrDefault<
word>(
"rho",
"rho")),
171 this->cyclicPatch().owner()
175 fanEff_(
dict.getOrDefault<scalar>(
"fanEff", 1)),
176 rEff_(
dict.getOrDefault<scalar>(
"rEff", 0)),
177 rInner_(
dict.getOrDefault<scalar>(
"rInner", 0)),
178 rOuter_(
dict.getOrDefault<scalar>(
"rOuter", 0)),
179 useRealRadius_(
dict.getOrDefault(
"useRealRadius", false))
192 phiName_(rhs.phiName_),
194 rhoName_(rhs.rhoName_),
195 origin_(rhs.origin_),
196 rpm_(rhs.rpm_.clone()),
197 fanEff_(rhs.fanEff_),
199 rInner_(rhs.rInner_),
200 rOuter_(rhs.rOuter_),
201 useRealRadius_(rhs.useRealRadius_)
211 phiName_(rhs.phiName_),
213 rhoName_(rhs.rhoName_),
214 origin_(rhs.origin_),
215 rpm_(rhs.rpm_.clone()),
216 fanEff_(rhs.fanEff_),
218 rInner_(rhs.rInner_),
219 rOuter_(rhs.rOuter_),
220 useRealRadius_(rhs.useRealRadius_)
231 phiName_(rhs.phiName_),
233 rhoName_(rhs.rhoName_),
234 origin_(rhs.origin_),
235 rpm_(rhs.rpm_.clone()),
236 fanEff_(rhs.fanEff_),
238 rInner_(rhs.rInner_),
239 rOuter_(rhs.rOuter_),
240 useRealRadius_(rhs.useRealRadius_)
261 if (this->cyclicPatch().owner())
296 swirlFanVelocityFvPatchField
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
This boundary condition provides a jump condition for U across a cyclic pressure jump condition and a...
virtual label neighbPatchID() const
Return neighbour.
const Type & lookupObject(const word &name, const bool recursive=false) const
Lookup and return const reference to the object of the given Type. Fatal if not found or the wrong ty...
const objectRegistry & db() const
The associated objectRegistry.
fvPatchField< vector > fvPatchVectorField
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const fvPatch & patch() const noexcept
Return the patch.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
constexpr scalar rpmToRads(const scalar rpm) noexcept
Conversion from revolutions/minute to radians/sec.
Unit conversion functions.
constexpr char nl
The newline '\n' character (0x0a)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
dimensionedScalar stabilise(const dimensionedScalar &x, const dimensionedScalar &y)
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
const GeometricField::Patch & lookupPatchField(const word &name, const GeometricField *=nullptr, const AnyType *=nullptr) const
Lookup the named field from the local registry and return the patch field corresponding to this patch...
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Type gSum(const FieldField< Field, Type > &f)
const cyclicFvPatch & cyclicPatch() const
Return local reference cast into the cyclic patch.
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
A FieldMapper for finite-volume patch fields.
const vectorField & Cf() const
Return face centres.
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
const fvBoundaryMesh & boundaryMesh() const noexcept
Return boundaryMesh reference.
swirlFanVelocityFvPatchField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
virtual void write(Ostream &) const
Write.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
OBJstream os(runTime.globalPath()/outputName)
virtual void write(Ostream &os) const
Write.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
This boundary condition provides a jump condition, using the cyclic condition as a base...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const std::string patch
OpenFOAM patch number as a std::string.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
virtual void setJump(const Field< vector > &jump)
Set the jump field.
label size() const noexcept
The number of elements in the UList.
Field< vector > vectorField
Specialisation of Field<T> for vector.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
bool returnReduceOr(const bool value, const label comm=UPstream::worldComm)
Perform logical (or) MPI Allreduce on a copy. Uses UPstream::reduceOr.
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
static constexpr const zero Zero
Global zero (0)