37 namespace functionObjects
50 label nPatchFaces = 0;
54 nPatchFaces += mesh_.boundary()[
patchi].size();
87 patch.
Cf()[patchFacei],
89 - distance_*nf[patchFacei],
106 /
"wantedTracks_" + mesh_.time().timeName() +
".obj" 112 const vector p = iter().position();
120 cellToWalls_.setSize(mesh_.nCells());
121 cellToSamples_.setSize(mesh_.nCells());
127 scalar maxTrackLen = 2.0*mesh_.bounds().mag();
139 start[nPatchFaces++] = tp.
position();
144 cloud.
move(cloud, td, maxTrackLen);
149 getPatchDataMapPtr_.reset
163 getPatchDataMapPtr_().distribute(start);
168 /
"obtainedTracks_" + mesh_.time().timeName() +
".obj" 172 forAll(cellToWalls_, celli)
175 const labelList& cData = cellToWalls_[celli];
216 dict.
lookup(
"fields") >> fieldSet_;
219 distance_ = dict.
lookup<scalar>(
"distance");
229 reverseFieldMap_.clear();
235 fieldMap_.resize(2*fieldSet_.size());
236 reverseFieldMap_.resize(2*fieldSet_.size());
239 const word& fldName = fieldSet_[setI].first();
240 const word& sampleFldName = fieldSet_[setI].second();
242 fieldMap_.insert(fldName, sampleFldName);
243 reverseFieldMap_.insert(sampleFldName, fldName);
247 <<
": Sampling " << fieldMap_.size() <<
" fields" <<
endl;
265 && vSpheretf_.empty()
271 <<
": Creating " << fieldMap_.size() <<
" fields" <<
endl;
275 createFields(vSpheretf_);
276 createFields(vSymmtf_);
284 <<
" Sampling fields to " << time_.timeName()
289 sampleFields(vSpheretf_);
290 sampleFields(vSymmtf_);
301 Log <<
" Writing sampled fields to " << time_.timeName()
314 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.
addToRunTimeSelectionTable(functionObject, Qdot, dictionary)
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.
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.
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.
void clear()
Clear the list, i.e. set size to zero.
A class for handling words, derived from string.
virtual const labelUList & faceCells() const
Return faceCells.
#define DebugInFunction
Report an information message using Foam::Info.
A cloud is a collection of lagrangian particles.
label size() const
Global sum of localSizes.
const vectorField & Cf() const
Return face centres.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
Base cloud calls templated on particle type.
OFstream which keeps track of vertices.
nearWallFields(const word &name, const Time &runTime, const dictionary &dict)
Construct for given objectRegistry and dictionary.
static word defaultName
The default cloud name: defaultCloud.
word name(const complex &)
Return a string representation of a complex.
defineTypeNameAndDebug(Qdot, 0)
void setSize(const label)
Reset size of List.
label toGlobal(const label i) const
From local to global.
void move(TrackCloudType &cloud, typename ParticleType::trackingData &td, const scalar trackTime)
Move the particles.
Class containing processor-to-processor mapping information.
Particle class that finds cells by tracking.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
#define Log
Report write to Foam::Info if the local log switch is true.
virtual bool read(const dictionary &)
Read the controls.
Specialisation of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
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.
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.