Commit 3c927090 authored by mattijs's avatar mattijs
Browse files

ENH: chtMultiRegionFoam : allow 0 cells per processor

parent 4d428e8f
......@@ -37,18 +37,16 @@ Foam::scalar Foam::solidRegionDiffNo
scalar DiNum = 0.0;
scalar meanDiNum = 0.0;
//- Can have fluid domains with 0 cells so do not test.
if (mesh.nInternalFaces())
{
surfaceScalarField KrhoCpbyDelta =
mesh.surfaceInterpolation::deltaCoeffs()
* fvc::interpolate(K)
/ fvc::interpolate(Cprho);
DiNum = max(KrhoCpbyDelta.internalField())*runTime.deltaT().value();
meanDiNum = (average(KrhoCpbyDelta)).value()*runTime.deltaT().value();
}
//- Take care: can have fluid domains with 0 cells so do not test for
// zero internal faces.
surfaceScalarField KrhoCpbyDelta =
mesh.surfaceInterpolation::deltaCoeffs()
* fvc::interpolate(K)
/ fvc::interpolate(Cprho);
DiNum = gMax(KrhoCpbyDelta.internalField())*runTime.deltaT().value();
meanDiNum = (average(KrhoCpbyDelta)).value()*runTime.deltaT().value();
Info<< "Region: " << mesh.name() << " Diffusion Number mean: " << meanDiNum
<< " max: " << DiNum << endl;
......
Markdown is supported
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