Skip to content
Snippets Groups Projects
Commit 014f7a08 authored by william's avatar william
Browse files

ENH: added packed particle number info to MPPIC Cloud

parent b0218cfc
Branches
Tags
No related merge requests found
...@@ -273,26 +273,33 @@ void Foam::MPPICCloud<CloudType>::info() ...@@ -273,26 +273,33 @@ void Foam::MPPICCloud<CloudType>::info()
tmp<volScalarField> alpha = this->theta(); tmp<volScalarField> alpha = this->theta();
Info<< " Min cell volume fraction = " const scalar alphaMin = gMin(alpha().internalField());
<< gMin(alpha().internalField()) << endl; const scalar alphaMax = gMax(alpha().internalField());
Info<< " Max cell volume fraction = "
<< gMax(alpha().internalField()) << endl;
label nOutside = 0; Info<< " Min cell volume fraction = " << alphaMin << endl;
Info<< " Max cell volume fraction = " << alphaMax << endl;
forAllIter(typename CloudType, *this, iter) if (alphaMax < SMALL)
{ {
typename CloudType::parcelType& p = iter(); return;
const tetIndices tetIs(p.cell(), p.tetFace(), p.tetPt(), this->mesh());
nOutside += !tetIs.tet(this->mesh()).inside(p.position());
} }
reduce(nOutside, plusOp<label>()); scalar nMin = GREAT;
if (nOutside > 0) forAll(this->mesh().cells(), cellI)
{ {
Info<< " Number of parcels outside tets = " << nOutside << endl; const label n = this->cellOccupancy()[cellI].size();
const scalar nPack = n*alphaMax/alpha()[cellI];
if (n > 0 && nPack < nMin)
{
nMin = nPack;
}
} }
reduce(nMin, minOp<scalar>());
Info<< " Min dense number of parcels = " << nMin << endl;
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment