37 namespace functionObjects
50 label nPatchFaces = 0;
54 nPatchFaces += mesh_.boundary()[
patchi].size();
106 start = faceCellCentres[patchFacei];
109 const point end = start-distance_*nf[patchFacei];
136 /
"wantedTracks_" + mesh_.time().timeName() +
".obj" 150 cellToWalls_.setSize(mesh_.nCells());
151 cellToSamples_.setSize(mesh_.nCells());
157 scalar maxTrackLen = 2.0*mesh_.bounds().mag();
169 start[nPatchFaces++] = tp.
position();
174 cloud.
move(td, maxTrackLen);
179 getPatchDataMapPtr_.reset
193 getPatchDataMapPtr_().distribute(start);
198 /
"obtainedTracks_" + mesh_.time().timeName() +
".obj" 202 forAll(cellToWalls_, celli)
205 const labelList& cData = cellToWalls_[celli];
218 Foam::functionObjects::nearWallFields::nearWallFields
246 dict.
lookup(
"fields") >> fieldSet_;
259 reverseFieldMap_.clear();
265 fieldMap_.resize(2*fieldSet_.size());
266 reverseFieldMap_.resize(2*fieldSet_.size());
269 const word& fldName = fieldSet_[setI].first();
270 const word& sampleFldName = fieldSet_[setI].second();
272 fieldMap_.insert(fldName, sampleFldName);
273 reverseFieldMap_.insert(sampleFldName, fldName);
277 <<
": Sampling " << fieldMap_.size() <<
" fields" <<
endl;
295 && vSpheretf_.empty()
301 <<
": Creating " << fieldMap_.size() <<
" fields" <<
endl;
305 createFields(vSpheretf_);
306 createFields(vSymmtf_);
314 <<
" Sampling fields to " << time_.timeName()
319 sampleFields(vSpheretf_);
320 sampleFields(vSymmtf_);
331 Log <<
" Writing sampled fields to " << time_.timeName()
344 vSpheretf_[i].write();
Template class for intrusive linked lists.
#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.
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...
tmp< vectorField > nf() const
Return face normals.
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.
Macros for easy insertion into run-time selection tables.
virtual bool execute()
Calculate the near-wall fields.
const Point & hitPoint() const
Return hit point.
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.
const polyPatch & patch() const
Return the polyPatch.
#define DebugInFunction
Report an information message using Foam::Info.
A cloud is a collection of lagrangian particles.
label size() const
Global sum of localSizes.
bool hit() const
Is there a hit.
tmp< vectorField > faceCellCentres() const
Return face cell centres.
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 word defaultName
The default cloud name: defaultCloud.
static pointIndexHit facePoint(const polyMesh &, const label facei, const polyMesh::cellDecomposition)
Get a point on the face given a face decomposition method:
word name(const complex &)
Return a string representation of a complex.
fileName::Type type(const fileName &, const bool followLink=true)
Return the file type: DIRECTORY or FILE.
const point & end() const
Point to track to.
void setSize(const label)
Reset size of List.
label toGlobal(const label i) const
From local to global.
Class containing processor-to-processor mapping information.
label start() const
Return start label of this patch in the polyMesh face list.
Particle class that finds cells by tracking.
#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)
Class used to pass tracking data to the trackToFace function.
vector position() const
Return current particle position.
addToRunTimeSelectionTable(functionObject, add, dictionary)
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.