64 phiName_(
dict.getOrDefault<
word>(
"phi",
"phi")),
65 rhoName_(
dict.getOrDefault<
word>(
"rho",
"rho")),
101 phiName_(ptf.phiName_),
102 rhoName_(ptf.rhoName_),
103 origin_(ptf.origin_),
105 flowRate_(ptf.flowRate_.clone()),
106 rpm_(ptf.rpm_.clone())
117 phiName_(ptf.phiName_),
118 rhoName_(ptf.rhoName_),
119 origin_(ptf.origin_),
121 flowRate_(ptf.flowRate_.clone()),
122 rpm_(ptf.rpm_.clone())
134 phiName_(ptf.phiName_),
135 rhoName_(ptf.rhoName_),
136 origin_(ptf.origin_),
138 flowRate_(ptf.flowRate_.clone()),
139 rpm_(ptf.rpm_.clone())
151 const scalar totArea =
gSum(
patch().magSf());
153 if (totArea > ROOTVSMALL && axis_ !=
vector(
Zero))
155 const scalar t = this->db().time().timeOutputValue();
156 const scalar flowRate = flowRate_->value(t);
157 const scalar omega =
rpmToRads(rpm_->value(t));
159 const scalar avgU = -flowRate/totArea;
164 tmp<vectorField> tangentialVelocity
166 axisHat ^ omega*(
patch().Cf() - origin_)
169 tmp<vectorField>
n =
patch().nf();
189 <<
"dimensions of " << phiName_ <<
" are incorrect" <<
nl 190 <<
" on patch " << this->
patch().name()
191 <<
" of field " << this->internalField().name()
192 <<
" in file " << this->internalField().objectPath()
211 flowRate_->writeData(
os);
224 swirlFlowRateInletVelocityFvPatchVectorField
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
This boundary condition supplies a fixed value constraint, and is the base class for a number of othe...
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...
#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.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
virtual void write(Ostream &) const
Write.
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimVolume(pow3(dimLength))
Type gSum(const FieldField< Field, Type > &f)
A class for handling words, derived from Foam::string.
swirlFlowRateInletVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
A FieldMapper for finite-volume patch fields.
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
OBJstream os(runTime.globalPath()/outputName)
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
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 write(Ostream &) const
Write.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
bool returnReduceOr(const bool value, const label comm=UPstream::worldComm)
Perform logical (or) MPI Allreduce on a copy. Uses UPstream::reduceOr.
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
This boundary condition provides a volumetric- OR mass-flow normal vector boundary condition by its m...
static constexpr const zero Zero
Global zero (0)