60 phiName_(ptf.phiName_),
61 rhoName_(ptf.rhoName_),
62 flowRate_(ptf.flowRate_,
false),
90 phiName_(ptf.phiName_),
91 rhoName_(ptf.rhoName_),
92 flowRate_(ptf.flowRate_,
false),
105 phiName_(ptf.phiName_),
106 rhoName_(ptf.rhoName_),
107 flowRate_(ptf.flowRate_,
false),
108 rpm_(ptf.rpm_,
false)
121 const scalar t = this->db().time().timeOutputValue();
122 const scalar flowRate = flowRate_->value(t);
123 const scalar rpm = rpm_->value(t);
125 const scalar totArea =
gSum(patch().magSf());
126 const scalar avgU = -flowRate/totArea;
128 const vector avgCenter =
gSum(patch().Cf()*patch().magSf())/totArea;
129 const vector avgNormal =
gSum(patch().Sf())/totArea;
135 * (patch().Cf() - avgCenter) ^ avgNormal
159 <<
"dimensions of " << phiName_ <<
" are incorrect" <<
nl 160 <<
" on patch " << this->patch().name()
161 <<
" of field " << this->internalField().name()
162 <<
" in file " << this->internalField().objectPath()
176 writeEntryIfDifferent<word>(os,
"phi",
"phi", phiName_);
177 writeEntryIfDifferent<word>(os,
"rho",
"rho", rhoName_);
178 flowRate_->writeData(os);
180 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.
virtual void write(Ostream &) const
Write.
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...
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
makePatchTypeField(fvPatchVectorField, SRFFreestreamVelocityFvPatchVectorField)
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.
const dimensionSet & dimensions() const
Return dimensions.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
const dimensionSet dimDensity
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...
A class for managing temporary objects.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
This boundary condition provides a volumetric- OR mass-flow normal vector boundary condition by its m...
const dimensionSet dimArea(sqr(dimLength))
virtual void write(Ostream &) const
Write.
const dimensionSet dimVelocity