68 gSum(patch().Cf()*patch().magSf())/
gSum(patch().magSf())
76 -
gSum(patch().Sf())/
gSum(patch().magSf())
94 phiName_(ptf.phiName_),
95 rhoName_(ptf.rhoName_),
98 flowRate_(ptf.flowRate_,
false),
110 phiName_(ptf.phiName_),
111 rhoName_(ptf.rhoName_),
112 origin_(ptf.origin_),
114 flowRate_(ptf.flowRate_,
false),
115 rpm_(ptf.rpm_,
false)
127 phiName_(ptf.phiName_),
128 rhoName_(ptf.rhoName_),
129 origin_(ptf.origin_),
131 flowRate_(ptf.flowRate_,
false),
132 rpm_(ptf.rpm_,
false)
145 const scalar t = this->db().time().timeOutputValue();
146 const scalar flowRate = flowRate_->value(t);
147 const scalar rpm = rpm_->value(t);
149 const scalar totArea =
gSum(patch().magSf());
150 const scalar avgU = -flowRate/totArea;
181 <<
"dimensions of " << phiName_ <<
" are incorrect" <<
nl 182 <<
" on patch " << this->patch().name()
183 <<
" of field " << this->internalField().name()
184 <<
" in file " << this->internalField().objectPath()
198 writeEntryIfDifferent<word>(os,
"phi",
"phi", phiName_);
199 writeEntryIfDifferent<word>(os,
"rho",
"rho", rhoName_);
202 flowRate_->writeData(os);
204 writeEntry(
"value", os);
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...
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void write(Ostream &) const
Write.
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
makePatchTypeField(fvPatchVectorField, SRFFreestreamVelocityFvPatchVectorField)
const dimensionSet & dimensions() const
Return dimensions.
Type gSum(const FieldField< Field, Type > &f)
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
A class for handling words, derived from string.
swirlFlowRateInletVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
Foam::fvPatchFieldMapper.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
const dimensionSet dimDensity
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
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...
virtual void write(Ostream &) const
Write.
dimensioned< scalar > mag(const dimensioned< Type > &)
A class for managing temporary objects.
This boundary condition provides a volumetric- OR mass-flow normal vector boundary condition by its m...
const dimensionSet dimArea(sqr(dimLength))
const dimensionSet dimVelocity