Skip to content
Snippets Groups Projects
Commit 3c927090 authored by mattijs's avatar mattijs
Browse files

ENH: chtMultiRegionFoam : allow 0 cells per processor

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