37 namespace functionObjects
50 label nPatchFaces = 0;
54 nPatchFaces += mesh_.boundary()[
patchi].size();
101 start = faceCellCentres[patchFacei];
104 const point end = start-distance_*nf[patchFacei];
110 mesh_.findCellFacePt(start, celli, tetFacei, tetPtI);
139 /
"wantedTracks_" + mesh_.time().timeName() +
".obj" 153 cellToWalls_.setSize(mesh_.nCells());
154 cellToSamples_.setSize(mesh_.nCells());
160 scalar maxTrackLen = 2.0*mesh_.bounds().mag();
172 start[nPatchFaces++] = tp.
position();
177 cloud.
move(td, maxTrackLen);
182 getPatchDataMapPtr_.reset
196 getPatchDataMapPtr_().distribute(start);
201 /
"obtainedTracks_" + mesh_.time().timeName() +
".obj" 205 forAll(cellToWalls_, celli)
208 const labelList& cData = cellToWalls_[celli];
221 Foam::functionObjects::nearWallFields::nearWallFields
249 dict.
lookup(
"fields") >> fieldSet_;
262 reverseFieldMap_.clear();
268 fieldMap_.resize(2*fieldSet_.size());
269 reverseFieldMap_.resize(2*fieldSet_.size());
272 const word& fldName = fieldSet_[setI].first();
273 const word& sampleFldName = fieldSet_[setI].second();
275 fieldMap_.insert(fldName, sampleFldName);
276 reverseFieldMap_.insert(sampleFldName, fldName);
280 <<
": Sampling " << fieldMap_.size() <<
" fields" <<
endl;
298 && vSpheretf_.empty()
304 <<
": Creating " << fieldMap_.size() <<
" fields" <<
endl;
308 createFields(vSpheretf_);
309 createFields(vSymmtf_);
317 <<
" Sampling fields to " << time_.timeName()
322 sampleFields(vSpheretf_);
323 sampleFields(vSymmtf_);
334 Log <<
" Writing sampled fields to " << time_.timeName()
347 vSpheretf_[i].write();
#define forAll(list, i)
Loop across all elements in list.
virtual bool write()
Write the near-wall fields.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
label toGlobal(const label i) const
From local to global.
A list of keyword definitions, which are a keyword followed by any number of values (e...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
bool hit() const
Is there a hit.
void calcAddressing()
Calculate addressing from cells back to patch faces.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual ~nearWallFields()
Destructor.
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
const polyPatch & patch() const
Return the polyPatch.
Macros for easy insertion into run-time selection tables.
const point & end() const
Point to track to.
label size() const
Global sum of localSizes.
virtual bool execute()
Calculate the near-wall fields.
const vector & position() const
Return current particle position.
virtual bool read(const dictionary &)
Read optional controls.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
bool read(const char *, int32_t &)
void addParticle(ParticleType *pPtr)
Transfer particle to cloud.
line< point, const point & > linePointRef
Line using referred points.
A class for handling words, derived from string.
#define DebugInFunction
Report an information message using Foam::Info.
A cloud is a collection of lagrangian particles.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
void move(TrackData &td, const scalar trackTime)
Move the particles.
OFstream which keeps track of vertices.
static pointIndexHit facePoint(const polyMesh &, const label facei, const polyMesh::cellDecomposition)
Get a point on the face given a face decomposition method:
tmp< vectorField > nf() const
Return face normals.
word name(const complex &)
Return a string representation of a complex.
void setSize(const label)
Reset size of List.
Class containing processor-to-processor mapping information.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
addToRunTimeSelectionTable(functionObject, blendingFactor, dictionary)
Particle class that finds cells by tracking.
const Point & hitPoint() const
Return hit point.
#define Log
Report write to Foam::Info if the local log switch is true.
virtual bool read(const dictionary &)
Read the controls.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
List< wordRe > wordReList
A List of wordRe (word or regular expression)
tmp< vectorField > faceCellCentres() const
Return face cell centres.
label start() const
Return start label of this patch in the polyMesh face list.
Class used to pass tracking data to the trackToFace function.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
#define InfoInFunction
Report an information message using Foam::Info.