diff --git a/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.C b/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.C index f22cac7b0ff559a1e8b970c9a49060e03a4b58ae..eb436471ea59ac159602abcb5efd06a53bf12049 100644 --- a/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.C @@ -273,26 +273,33 @@ void Foam::MPPICCloud<CloudType>::info() tmp<volScalarField> alpha = this->theta(); - Info<< " Min cell volume fraction = " - << gMin(alpha().internalField()) << endl; - Info<< " Max cell volume fraction = " - << gMax(alpha().internalField()) << endl; + const scalar alphaMin = gMin(alpha().internalField()); + const scalar alphaMax = gMax(alpha().internalField()); - 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(); - const tetIndices tetIs(p.cell(), p.tetFace(), p.tetPt(), this->mesh()); - nOutside += !tetIs.tet(this->mesh()).inside(p.position()); + return; } - 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; } diff --git a/tutorials/lagrangian/MPPICFoam/injectionChannel/constant/kinematicCloudProperties b/tutorials/lagrangian/MPPICFoam/injectionChannel/constant/kinematicCloudProperties index 0055095d8e4f1f886e282695b4d6d0912c355537..d3a10f2c5a2b543ab34977d92b31f17e482b7bac 100644 --- a/tutorials/lagrangian/MPPICFoam/injectionChannel/constant/kinematicCloudProperties +++ b/tutorials/lagrangian/MPPICFoam/injectionChannel/constant/kinematicCloudProperties @@ -106,7 +106,7 @@ subModels type patchInjection; parcelBasisType fixed; patchName upperInlet; - U0 (18.7939 6.8404 0); + U0 (18.7939 -6.8404 0); nParticle 1; parcelsPerSecond 1390885; sizeDistribution