44 inverseFaceDistanceDiffusivity,
52 Foam::inverseFaceDistanceDiffusivity::inverseFaceDistanceDiffusivity
79 label nPatchFaces = 0;
81 for (
const word& patchName : patchNames_)
87 patchSet.insert(patchi);
88 nPatchFaces += bdry[patchi].
size();
92 List<wallPoint> faceDist(nPatchFaces);
97 for (
const label patchi : patchSet)
99 const polyPatch&
patch = bdry[patchi];
105 changedFaces[nPatchFaces] =
patch.start() + patchFacei;
107 faceDist[nPatchFaces] = wallPoint(fc[patchFacei], 0);
112 faceDist.setSize(nPatchFaces);
113 changedFaces.setSize(nPatchFaces);
115 MeshWave<wallPoint> waveInfo
120 mesh().globalData().nTotalCells()+1
123 const List<wallPoint>& faceInfo = waveInfo.allFaceInfo();
124 const List<wallPoint>& cellInfo = waveInfo.allCellInfo();
128 scalar dist = faceInfo[facei].distSqr();
130 faceDiffusivity_[facei] = 1.0/
sqrt(dist);
134 faceDiffusivity_.boundaryFieldRef();
136 forAll(faceDiffusivityBf, patchi)
140 const labelUList& faceCells = bfld.patch().faceCells();
142 if (patchSet.found(patchi))
146 scalar dist = cellInfo[faceCells[i]].distSqr();
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);
label findPatchID(const word &patchName, const bool allowNotFound=true) const
Find patch index given a name, return -1 if not found.
fvsPatchField< scalar > fvsPatchScalarField
virtual ~inverseFaceDistanceDiffusivity()
Destructor.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
dimensionedScalar sqrt(const dimensionedScalar &ds)
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.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
A class for handling words, derived from Foam::string.
label size() const noexcept
The number of entries in the list.
label nInternalFaces() const noexcept
Number of internal faces.
virtual void correct()
Correct the motion diffusivity.
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/v2306/OpenFOAM-v2306/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)
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Mesh data needed to do the Finite Volume discretisation.
const std::string patch
OpenFOAM patch number as a std::string.
SubField< vector > subField
Declare type of subField.
List< label > labelList
A List of labels.