52Foam::inverseFaceDistanceDiffusivity::inverseFaceDistanceDiffusivity
79 label nPatchFaces = 0;
81 for (
const word& patchName : patchNames_)
87 patchSet.insert(patchi);
88 nPatchFaces += bdry[patchi].
size();
97 for (
const label patchi : patchSet)
105 changedFaces[nPatchFaces] =
patch.start() + patchFacei;
107 faceDist[nPatchFaces] =
wallPoint(fc[patchFacei], 0);
112 faceDist.setSize(nPatchFaces);
113 changedFaces.setSize(nPatchFaces);
120 mesh().globalData().nTotalCells()+1
128 scalar dist = faceInfo[facei].distSqr();
130 faceDiffusivity_[facei] = 1.0/
sqrt(dist);
134 faceDiffusivity_.boundaryFieldRef();
136 forAll(faceDiffusivityBf, patchi)
142 if (patchSet.found(patchi))
147 bfld[i] = 1.0/
sqrt(dist);
152 const label start = bfld.patch().start();
156 scalar dist = faceInfo[start+i].distSqr();
157 bfld[i] = 1.0/
sqrt(dist);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
SubField< vector > subField
GeometricBoundaryField< scalar, fvsPatchField, surfaceMesh > Boundary
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
bool found(const Key &key) const
Same as contains().
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void setSize(label n)
Alias for resize().
const List< Type > & allFaceInfo() const noexcept
Get allFaceInfo.
const List< Type > & allCellInfo() const noexcept
Get allCellInfo.
label size() const noexcept
The number of entries in the list.
Holds information regarding type of cell. Used in inside/outside determination in cellClassification.
Smooth ATC in cells next to a set of patches supplied by type.
Mesh data needed to do the Finite Volume discretisation.
label start() const noexcept
The patch start within the polyMesh face list.
virtual const labelUList & faceCells() const
Return faceCells.
const fvPatch & patch() const noexcept
Return the patch.
Inverse distance to the given patches motion diffusivity.
virtual void correct()
Correct the motion diffusivity.
virtual ~inverseFaceDistanceDiffusivity()
Destructor.
Abstract base class for cell-centre mesh motion diffusivity.
const fvMesh & mesh() const
Return reference to the mesh.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
label findPatchID(const word &patchName, const bool allowNotFound=true) const
Find patch index given a name, return -1 if not found.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
A patch is a list of labels that address the faces in the global face list.
label nInternalFaces() const noexcept
Number of internal faces.
Holds information regarding nearest wall point. Used in wall distance calculation.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const std::string patch
OpenFOAM patch number as a std::string.
List< label > labelList
A List of labels.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
dimensionedScalar sqrt(const dimensionedScalar &ds)
UList< label > labelUList
A UList of labels.
fvsPatchField< scalar > fvsPatchScalarField
#define forAll(list, i)
Loop across all elements in list.