Go to the documentation of this file.
57 Info<<
"void mixerFvMesh::addZonesAndModifiers() : "
58 <<
"Zones and modifiers already present. Skipping."
65 <<
"Adding zones and modifiers to the mesh" <<
endl;
93 isf[i] = innerSlider.
start() + i;
100 boolList(innerSlider.size(),
false),
113 osf[i] = outerSlider.
start() + i;
120 boolList(outerSlider.size(),
false),
144 label nMovingCells = 0;
148 if (rs[cellI] == originRegion)
150 movingCells[nMovingCells] = cellI;
155 movingCells.
setSize(nMovingCells);
156 Info<<
"Number of cells in the moving region: " << nMovingCells <<
endl;
166 Info<<
"Adding point, face and cell zones" <<
endl;
170 Info<<
"Adding topology modifiers" <<
endl;
180 outerSliderName +
"Zone",
181 innerSliderName +
"Zone",
199 Info<<
"void mixerFvMesh::calcMovingMasks() const : "
200 <<
"Calculating point and cell masks"
204 if (movingPointsMaskPtr_)
207 <<
"point mask already calculated"
213 scalarField& movingPointsMask = *movingPointsMaskPtr_;
218 const labelList& cellAddr = cellZones()[
"movingCells"];
222 const cell& curCell =
c[cellAddr[cellI]];
227 const face& curFace =
f[curCell[faceI]];
231 movingPointsMask[curFace[pointI]] = 1;
236 const word innerSliderZoneName
238 word(motionDict_.subDict(
"slider").lookup(
"inside"))
242 const labelList& innerSliderAddr = faceZones()[innerSliderZoneName];
244 forAll(innerSliderAddr, faceI)
246 const face& curFace =
f[innerSliderAddr[faceI]];
250 movingPointsMask[curFace[pointI]] = 1;
254 const word outerSliderZoneName
256 word(motionDict_.subDict(
"slider").lookup(
"outside"))
260 const labelList& outerSliderAddr = faceZones()[outerSliderZoneName];
262 forAll(outerSliderAddr, faceI)
264 const face& curFace =
f[outerSliderAddr[faceI]];
268 movingPointsMask[curFace[pointI]] = 0;
296 ).subDict(typeName +
"Coeffs")
303 motionDict_.subDict(
"coordinateSystem")
307 movingPointsMaskPtr_(NULL)
309 addZonesAndModifiers();
311 Info<<
"Mixer mesh:" <<
nl
312 <<
" origin: " << cs().origin() <<
nl
313 <<
" axis: " << cs().axis() <<
nl
314 <<
" rpm: " << rpm_ <<
endl;
330 if (!movingPointsMaskPtr_)
335 return *movingPointsMaskPtr_;
344 csPtr_->globalPosition
346 csPtr_->localPosition(
points())
347 +
vector(0, rpm_*360.0*time().deltaTValue()/60.0, 0)
355 if (topoChangeMap.
valid())
359 Info<<
"Mesh topology is changing" <<
endl;
367 csPtr_->globalPosition
369 csPtr_->localPosition(oldPoints())
370 +
vector(0, rpm_*360.0*time().deltaTValue()/60.0, 0)
const coordinateSystem & cs() const
Return coordinate system.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
mixerFvMesh(const mixerFvMesh &)
Disallow default bitwise copy construct.
A class for handling words, derived from string.
List< label > labelList
A List of labels.
#define forAll(list, i)
Loop across all elements in list.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
A subset of mesh points. The labels of points in the zone can be obtained from the addressing() list.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const cellZoneMesh & cellZones() const
Return cell zone mesh.
void addZonesAndModifiers()
Add mixer zones and modifiers.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Sliding interface mesh modifier. Given two face zones, couple the master and slave side using a cutti...
writeOption writeOpt() const
Constant dispersed-phase particle diameter model.
const faceZoneMesh & faceZones() const
Return face zone mesh.
virtual bool write() const
Write mesh using IO settings from time.
void deleteDemandDrivenData(DataPtr &dataPtr)
label findNearestCell(const point &location) const
Find the cell with the nearest cell centre to location.
bool set(const label) const
Is element set.
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.
A subset of mesh faces organised as a primitive patch.
A patch is a list of labels that address the faces in the global face list.
const pointZoneMesh & pointZones() const
Return point zone mesh.
This class separates the mesh into distinct unconnected regions, each of which is then given a label ...
label size() const
Return number of elements in table.
const scalarField & movingPointsMask() const
Return moving points mask.
Macros for easy insertion into run-time selection tables.
errorManip< error > abort(error &err)
List< bool > boolList
Bool container classes.
Vector< scalar > vector
A scalar version of the templated Vector.
label start() const
Return start label of this patch in the polyMesh face list.
virtual bool update()
Update the mesh for both mesh motion and topology change.
void setSize(const label)
Reset size of List.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Abstract base class for a topology changing fvMesh.
bool valid() const
Return true if the autoPtr valid (ie, the pointer is set).
label size() const
Return the number of elements in the PtrList.
void setSize(const label)
Reset size of PtrList. If extending the PtrList, new entries are.
const dimensionedScalar c
Speed of light in a vacuum.
void calcMovingMasks() const
Calculate moving masks.
const Time & time() const
Return the top-level database.
A face is a list of labels corresponding to mesh vertices.
virtual ~mixerFvMesh()
Destructor.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
defineTypeNameAndDebug(combustionModel, 0)
A cell is defined as a list of faces with extra functionality.
void addZones(const List< pointZone * > &pz, const List< faceZone * > &fz, const List< cellZone * > &cz)
Add mesh zones.
static autoPtr< coordinateSystem > New(const objectRegistry &obr, const dictionary &dict)
Select constructed from dictionary and objectRegistry.
dictionary motionDict_
Motion dictionary.
polyTopoChanger topoChanger_