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;
262 fields[fieldi] = fieldSet_[fieldi].first();
278 && vSpheretf_.empty()
284 <<
": Creating " << fieldMap_.size() <<
" fields" <<
endl;
288 createFields(vSpheretf_);
289 createFields(vSymmtf_);
297 <<
" Sampling fields to " << time_.timeName()
302 sampleFields(vSpheretf_);
303 sampleFields(vSymmtf_);
314 Log <<
" Writing sampled fields to " << time_.timeName()
327 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.
virtual wordList fields() const
Return the list of fields required.
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
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.
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.
Class containing processor-to-processor mapping information.
void move(TrackCloudType &cloud, typename ParticleType::trackingData &td, const scalar trackTime)
Move the particles.
Info<< "Reading field p_rgh\"<< endl;volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);pressureReference pressureReference(p, p_rgh, pimple.dict(), thermo.incompressible());mesh.schemes().setFluxRequired(p_rgh.name());hydrostaticInitialisation(p_rgh, p, rho, U, gh, ghf, pRef, thermo, pimple.dict());Info<< "Creating field dpdt\"<< endl;volScalarField dpdt(IOobject("dpdt", runTime.timeName(), mesh), mesh, dimensionedScalar(p.dimensions()/dimTime, 0));Info<< "Creating field kinetic energy K\"<< endl;volScalarField K("K", 0.5 *magSqr(U));dimensionedScalar initialMass=fvc::domainIntegrate(rho);multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
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.