45 void Foam::MRFZone::setMRFFaces()
48 const fvBoundaryMesh& fvbMesh = mesh_.
boundary();
58 cellInMRF[MRFCells[i]] =
true;
69 faceInMRF[facei] =
true;
77 const label facei = pbMesh[
patchi].start() + patchFacei;
81 faceInMRF[facei] =
true;
100 patchFaces_.
setSize(fvbMesh.size());
107 labelList patchNFaces(fvbMesh.size(), 0);
116 if (!faceInMRF[facei])
continue;
138 static bool checked =
false;
140 if (!checked &&
U.nOldTimes())
146 if (isA<MRFPatchField>(Ubf[
patchi]))
153 <<
"Field " <<
U.name()
154 <<
" does not provide any MRF specific boundary conditions "
155 "for MRF region " <<
name() <<
nl
156 <<
" Walls rotating in the MRF region should have the "
157 "MRFnoSlip boundary condition."
175 cellSet_(mesh, coeffs_),
176 origin_(coeffs_.lookup(
"origin")),
177 axis_(coeffs_.lookup(
"axis")),
178 omega_(mesh.time(), coeffs_)
180 axis_ = axis_/
mag(axis_);
189 return omega_.value(mesh_.time().value())*axis_;
205 const vector Omega = this->Omega();
210 ddtUc[celli] += (Omega ^ Uc[celli]);
224 const vector Omega = this->Omega();
229 cac[celli] -= Omega ^ (Omega ^ (
C[celli] - origin_));
239 caf[
patchi][patchFacei] -=
241 ^ (Omega ^ (
C.boundaryField()[
patchi][patchFacei] - origin_));
252 const vector Omega = this->Omega();
257 U[celli] -= (Omega ^ (
C[celli] - origin_));
267 Ubf[
patchi][patchFacei] -=
269 ^ (
C.boundaryField()[
patchi][patchFacei] - origin_));
299 makeRelativeRhoFlux(
rho, phi);
305 const vector Omega = this->Omega();
307 Up -= (Omega ^ (mesh_.Cf().boundaryField()[
patchi] - origin_));
316 const vector Omega = this->Omega();
321 U[celli] += (Omega ^ (
C[celli] - origin_));
331 Ubf[
patchi][patchFacei] +=
332 (Omega ^ (
C.boundaryField()[
patchi][patchFacei] - origin_));
350 makeAbsoluteRhoFlux(
rho, phi);
356 const vector Omega = this->Omega();
358 Up += (Omega ^ (mesh_.Cf().boundaryField()[
patchi] - origin_));
365 cellSet_.
read(coeffs_);
374 if (mesh_.topoChanged())
#define forAll(list, i)
Loop across all elements in list.
Graphite solid properties.
Generic GeometricBoundaryField class.
Generic GeometricField class.
Internal::FieldType & primitiveFieldRef()
Return a reference to the primitive field.
GeometricBoundaryField< Type, PatchField, GeoMesh > Boundary
Type of the boundary field.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
void setSize(const label)
Reset size of List.
MRF zone definition based on cell zone and parameters obtained from a control dictionary constructed ...
vector Omega() const
Return the current Omega vector.
bool read(const dictionary &dict)
Read MRF dictionary.
void makeAbsolute(volVectorField &U) const
Make the given relative velocity absolute within the MRF region.
MRFZone(const word &name, const fvMesh &mesh, const dictionary &dict)
Construct from fvMesh.
void makeRelative(volVectorField &U) const
Make the given absolute velocity relative within the MRF region.
void addCentrifugalAcceleration(volVectorField ¢rifugalAcceleration) const
Add the centrifugal acceleration.
void update()
Update MRFZone faces if the mesh topology changes.
void addCoriolis(const volVectorField &U, volVectorField &ddtU) const
Add the Coriolis force contribution to the acceleration field.
A list of keyword definitions, which are a keyword followed by any number of values (e....
bool read(Istream &, const bool keepHeader=false)
Read dictionary from Istream, optionally keeping the header.
Mesh data needed to do the Finite Volume discretisation.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
const UCompactListList< label > & polyBFacePatches() const
Return poly-bFace-patch addressing.
const UCompactListList< label > & polyBFacePatchFaces() const
Return poly-bFace-patch-face addressing.
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
A class representing the concept of a field of oneFields used to avoid unnecessary manipulations for ...
A class representing the concept of a field of 1 used to avoid unnecessary manipulations for objects ...
labelUList cells() const
Return const access to the cell set.
virtual const labelList & faceOwner() const
Return face owner.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
virtual const labelList & faceNeighbour() const
Return face neighbour.
label nInternalFaces() const
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
const fvPatchList & patches
errorManipArg< error, int > exit(error &err, const int errNo=1)
VolField< vector > volVectorField
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
word name(const bool)
Return a word representation of a bool.
labelList findIndices(const ListType &, typename ListType::const_reference, const label start=0)
Find all occurrences of given element. Linear search.
List< bool > boolList
Bool container classes.
dimensioned< scalar > mag(const dimensioned< Type > &)
defineTypeNameAndDebug(combustionModel, 0)
UList< label > labelUList