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());
fvsPatchField< scalar > fvsPatchScalarField
labelHashSet patchSet(const UList< wordRe > &select, const bool warnNotFound=true, const bool useGroups=true) const
Return the set of patch IDs corresponding to the given names.
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.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
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/v2406/OpenFOAM-v2406/applications/solvers/multiphase/cavitatingFoam/alphavPsi.H" 1{ alphav=clamp((rho - rholSat)/(rhovSat - rholSat), zero_one{});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.
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.
List< label > labelList
A List of labels.
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)