Go to the documentation of this file.
42 void Foam::wallDist::constructn()
const
56 patchDistMethod::patchTypes<vector>(
mesh(), patchIDs_)
62 volVectorField::Boundary& nbf = n_.ref().boundaryFieldRef();
64 for (
const label patchi : patchIDs_)
66 nbf[patchi] ==
patches[patchi].nf();
73 Foam::wallDist::wallDist
77 const word& patchTypeName
84 Foam::wallDist::wallDist
87 const word& defaultPatchDistMethod,
89 const word& patchTypeName
94 patchTypeName_(patchTypeName),
99 patchTypeName_ &
"Dist"
109 defaultPatchDistMethod
116 "y" & patchTypeName_,
125 updateInterval_(dict_.getOrDefault<label>(
"updateInterval", 1)),
126 nRequired_(dict_.getOrDefault(
"nRequired", false)),
138 Foam::wallDist::wallDist(
const fvMesh&
mesh,
const word& patchTypeName)
143 mesh.boundaryMesh().findPatchIDs<wallPolyPatch>(),
162 <<
"n requested but 'nRequired' not specified in the "
163 << (patchTypeName_ &
"Dist") <<
" dictionary" <<
nl
164 <<
" Recalculating y and n fields." <<
endl;
168 pdm_->correct(y_, n_.ref());
179 (updateInterval_ != 0)
180 && ((mesh_.time().timeIndex() % updateInterval_) == 0)
183 requireUpdate_ =
true;
186 if (requireUpdate_ && pdm_->movePoints())
190 requireUpdate_ =
false;
194 return pdm_->correct(y_, n_.ref());
198 return pdm_->correct(y_);
208 pdm_->updateMesh(mpm);
214 requireUpdate_ =
true;
Defines the attributes of an object for which implicit objectRegistry management is supported,...
virtual void updateMesh(const mapPolyMesh &)
A class for handling words, derived from Foam::string.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
static constexpr const zero Zero
Selector class for finite volume differencing schemes. fvMesh is derived from fvSchemes so that all f...
static word timeName(const scalar t, const int precision=precision_)
IOobject(const IOobject &)=default
Ostream & endl(Ostream &os)
A HashTable with keys but without contents that is similar to std::unordered_set.
const Time & time() const
wordList patchTypes(nPatches)
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
PtrList< fvPatch > fvPatchList
container classes for fvPatch
Interface to run-time selectable methods to calculate the distance-to-wall and normal-to-wall fields.
const fvMesh & mesh() const
virtual bool movePoints()
const volVectorField & n() const
Specialisation of patchDist for wall distance calculation.
Generic dimensioned Type class.
Mesh data needed to do the Finite Volume discretisation.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
GeometricField< vector, fvPatchField, volMesh > volVectorField
const fvBoundaryMesh & boundary() const
static autoPtr< patchDistMethod > New(const dictionary &dict, const fvMesh &mesh, const labelHashSet &patchIDs, const word &defaultPatchDistMethod=word::null)
const polyBoundaryMesh & patches
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const Time & time() const
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
bool isNull(const T *ptr)
static const GeometricField< Type, PatchField, GeoMesh > & null()
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys and label hasher.
Generic GeometricField class.
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
const dimensionSet dimless