Go to the documentation of this file.
70 zoneCell[cellLabels[i]] =
true;
79 if (zoneCell[own[faceI]] || zoneCell[nei[faceI]])
99 if (zoneCell[own[faceI]])
106 else if (!isA<emptyPolyPatch>(pp))
112 if (zoneCell[own[faceI]])
136 if (faceType[faceI] == 1)
154 if (faceType[faceI] == 1)
158 else if (faceType[faceI] == 2)
183 if (faceType[faceI] == 1)
187 else if (faceType[faceI] == 2)
198 Pout<<
"Writing " << internalFaces.
size()
199 <<
" internal faces in MRF zone to faceSet "
201 internalFaces.
write();
212 Pout<<
"Writing " << MRFFaces.
size()
213 <<
" patch faces in MRF zone to faceSet "
226 Pout<<
"Writing " << excludedFaces.
size()
227 <<
" faces in MRF zone with special handling to faceSet "
229 excludedFaces.
write();
241 const word& cellZoneName
247 active_(coeffs_.lookupOrDefault(
"active",
true)),
248 cellZoneName_(cellZoneName),
254 origin_(coeffs_.lookup(
"origin")),
255 axis_(coeffs_.lookup(
"axis")),
260 coeffs_.lookup(
"cellZone") >> cellZoneName_;
269 cellZoneID_ = mesh_.cellZones().findZoneID(cellZoneName_);
271 axis_ = axis_/
mag(axis_);
275 mesh_.boundaryMesh().patchSet(excludedPatchNames_)
278 excludedPatchLabels_.setSize(excludedPatchSet.
size());
283 excludedPatchLabels_[i++] = iter.key();
286 bool cellZoneFound = (cellZoneID_ != -1);
293 <<
"cannot find MRF cellZone " << cellZoneName_
306 return omega_->value(mesh_.time().timeOutputValue())*axis_;
316 if (cellZoneID_ == -1)
325 const vector Omega = this->Omega();
330 ddtUc[celli] += (Omega ^ Uc[celli]);
337 if (cellZoneID_ == -1)
347 const vector Omega = this->Omega();
354 Usource[celli] += V[celli]*(Omega ^
U[celli]);
362 Usource[celli] -= V[celli]*(Omega ^
U[celli]);
375 if (cellZoneID_ == -1)
385 const vector Omega = this->Omega();
392 Usource[celli] += V[celli]*
rho[celli]*(Omega ^
U[celli]);
400 Usource[celli] -= V[celli]*
rho[celli]*(Omega ^
U[celli]);
410 const vector Omega = this->Omega();
417 U[celli] -= (Omega ^ (
C[celli] - origin_));
436 U.boundaryField()[
patchi][patchFacei] -=
438 ^ (
C.boundaryField()[
patchi][patchFacei] - origin_));
462 makeRelativeRhoFlux(
rho,
phi);
470 const vector Omega = this->Omega();
477 U[celli] += (Omega ^ (
C[celli] - origin_));
486 U.boundaryField()[
patchi][patchFacei] =
487 (Omega ^ (
C.boundaryField()[
patchi][patchFacei] - origin_));
497 U.boundaryField()[
patchi][patchFacei] +=
498 (Omega ^ (
C.boundaryField()[
patchi][patchFacei] - origin_));
516 makeAbsoluteRhoFlux(
rho,
phi);
522 const vector Omega = this->Omega();
535 pfld[patchFacei] = (Omega ^ (patchC[patchFacei] - origin_));
538 U.boundaryField()[
patchi] == pfld;
552 omega_->writeData(os);
554 if (excludedPatchNames_.size())
556 os.
writeKeyword(
"nonRotatingPatches") << excludedPatchNames_
569 coeffs_.lookup(
"cellZone") >> cellZoneName_;
570 cellZoneID_ = mesh_.cellZones().findZoneID(cellZoneName_);
A class representing the concept of a field of oneFields used to avoid unnecessary manipulations for ...
A class for handling words, derived from string.
#define forAll(list, i)
Loop across all elements in list.
MRFZone(const MRFZone &)
Disallow default bitwise copy construct.
virtual bool coupled() const
Return true if this patch is geometrically coupled (i.e. faces and.
void setMRFFaces()
Divide faces in frame according to patch.
List< wordRe > wordReList
A List of wordRe (word or regular expression)
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
labelList internalFaces_
Internal faces that are part of MRF.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
void makeAbsolute(volVectorField &U) const
Make the given relative velocity absolute within the MRF region.
const cellZoneMesh & cellZones() const
Return cell zone mesh.
virtual bool write() const
Write using setting from DB.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< scalar > mag(const dimensioned< Type > &)
Ostream & incrIndent(Ostream &os)
Increment the indent level.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
A special matrix type and solver, designed for finite volume solutions of scalar equations.
bool read(const dictionary &dict)
Read MRF dictionary.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
virtual Ostream & write(const token &)=0
Write next token to stream.
A patch is a list of labels that address the faces in the global face list.
virtual const labelList & faceOwner() const
Return face owner.
tmp< fvVectorMatrix > UEqn(fvm::div(phi, U)+MRF.DDt(U)+turbulence->divDevReff(U)==fvOptions(U))
InternalField & internalField()
Return internal field.
const word & name() const
Return name.
A list of keyword definitions, which are a keyword followed by any number of values (e....
label size() const
Return number of elements in table.
label nInternalFaces() const
bool found(const Key &) const
Return true if hashedEntry is found in table.
Mesh data needed to do the Finite Volume discretisation.
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
label start() const
Return start label of this patch in the polyMesh face list.
void writeData(Ostream &os) const
Write.
errorManipArg< error, int > exit(error &err, const int errNo=1)
label cellZoneID_
Cell zone ID.
vector Omega() const
Return the current Omega vector.
void correctBoundaryVelocity(volVectorField &U) const
Correct the boundary velocity for the rotation of the MRF region.
labelList excludedPatchLabels_
void setSize(const label)
Reset size of List.
void makeRelative(volVectorField &U) const
Make the given absolute velocity relative within the MRF region.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
prefixOSstream Pout(cout, "Pout")
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
labelListList excludedFaces_
Excluded faces (per patch) that do not move with the MRF.
const fvMesh & mesh_
Reference to the mesh database.
labelListList includedFaces_
Outside faces (per patch) that move with the MRF.
bool insert(const Key &key)
Insert a new entry.
static const word null
An empty word.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Graphite solid properties.
Generic GeometricField class.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
defineTypeNameAndDebug(combustionModel, 0)
word name(const complex &)
Return a string representation of a complex.
virtual const labelList & faceNeighbour() const
Return face neighbour.
void addCoriolis(const volVectorField &U, volVectorField &ddtU) const
Add the Coriolis force contribution to the acceleration field.