44 inversePointDistanceDiffusivity,
52 Foam::inversePointDistanceDiffusivity::inversePointDistanceDiffusivity
73 label nPatchEdges = 0;
75 for (
const label patchi : patchSet)
77 nPatchEdges += bdry[patchi].nEdges();
81 List<pointEdgePoint> pointWallDist(
mesh().
nPoints());
82 List<pointEdgePoint> edgeWallDist(
mesh().nEdges());
84 int dummyTrackData = 0;
89 List<pointEdgePoint> seedInfo(nPatchEdges);
94 for (
const label patchi : patchSet)
96 const polyPatch&
patch = bdry[patchi];
100 for (
const label pointi : meshPoints)
102 if (!pointWallDist[pointi].valid(dummyTrackData))
105 seedInfo[nPatchEdges] = pointEdgePoint
110 seedPoints[nPatchEdges] = pointi;
111 pointWallDist[pointi] = seedInfo[nPatchEdges];
117 seedInfo.setSize(nPatchEdges);
118 seedPoints.setSize(nPatchEdges);
121 PointEdgeWave<pointEdgePoint> waveInfo
129 mesh().globalData().nTotalPoints(),
143 dist +=
sqrt(pointWallDist[
f[fp]].distSqr());
154 forAll(faceDiffusivityBf, patchi)
158 if (patchSet.found(patchi))
160 const labelUList& faceCells = bfld.patch().faceCells();
164 const cell& ownFaces =
mesh().
cells()[faceCells[i]];
170 forAll(ownFaces, ownFacei)
172 const face&
f =
mesh().
faces()[ownFaces[ownFacei]];
176 if (cPoints.insert(
f[fp]))
178 dist +=
sqrt(pointWallDist[
f[fp]].distSqr());
182 dist /= cPoints.size();
189 const label start = bfld.patch().start();
199 dist +=
sqrt(pointWallDist[
f[fp]].distSqr());
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
fvsPatchField< scalar > fvsPatchScalarField
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
virtual void correct()
Correct the motion diffusivity.
dimensionedScalar sqrt(const dimensionedScalar &ds)
const cellList & cells() const
GeometricBoundaryField< scalar, fvsPatchField, surfaceMesh > Boundary
Type of boundary fields.
Macros for easy insertion into run-time selection tables.
UList< label > labelUList
A UList of labels.
#define forAll(list, i)
Loop across all elements in list.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
label nInternalFaces() const noexcept
Number of internal faces.
virtual const faceList & faces() const
Return raw faces.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO...
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(psi *p+alphal *rhol0+((alphav *psiv+alphal *psil) - psi) *pSat, rhoMin);# 1 "/home/chef2/andy/OpenFOAM/release/v2212/OpenFOAM-v2212/applications/solvers/multiphase/cavitatingFoam/alphavPsi.H" 1{ alphav=max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0));alphal=1.0 - alphav;Info<< "max-min alphav: "<< max(alphav).value()<< " "<< min(alphav).value()<< endl;psiModel-> correct()
defineTypeNameAndDebug(combustionModel, 0)
const fvMesh & mesh() const
Return reference to the mesh.
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Mesh data needed to do the Finite Volume discretisation.
const std::string patch
OpenFOAM patch number as a std::string.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
labelHashSet patchSet(const UList< wordRe > &patchNames, const bool warnNotFound=true, const bool useGroups=true) const
Return the set of patch IDs corresponding to the given names.
List< label > labelList
A List of labels.