Go to the documentation of this file.
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
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
swirlFanVelocityFvPatchField(const fvPatch &, const DimensionedField< vector, volMesh > &)
virtual void setJump(const Field< vector > &jump)
A class for handling words, derived from Foam::string.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
static constexpr const zero Zero
Unit conversion functions.
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...
Field< vector > vectorField
Specialisation of Field<T> for vector.
const fvBoundaryMesh & boundaryMesh() const
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
tmp< DimensionedField< scalar, GeoMesh > > stabilise(const DimensionedField< scalar, GeoMesh > &dsf, const dimensioned< scalar > &ds)
virtual void write(Ostream &) const
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
const cyclicFvPatch & cyclicPatch() const
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const Type & lookupObject(const word &name, const bool recursive=false) const
virtual void write(Ostream &os) const
const vectorField & Cf() const
const GeometricField::Patch & lookupPatchField(const word &name, const GeometricField *=nullptr, const Type *=nullptr) const
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 dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Vector< scalar > vector
A scalar version of the templated Vector.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr scalar rpmToRads(const scalar rpm) noexcept
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
fvPatchField< vector > fvPatchVectorField
#define FatalErrorInFunction
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
const objectRegistry & db() const
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
virtual void updateCoeffs()
Ostream & writeEntry(const keyType &key, const T &value)
virtual label neighbPatchID() const
Foam::fvPatchFieldMapper.
const fvPatch & patch() const
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
This boundary condition provides a jump condition for U across a cyclic pressure jump condition and a...
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...