diff --git a/applications/solvers/compressible/rhoCentralFoam/centralCourantNo.H b/applications/solvers/compressible/rhoCentralFoam/centralCourantNo.H index 09c13ff249a2281d64599dbd858c08dde8d6928a..d915d29ace166f2a13fb17a340c338dcb9ee4019 100644 --- a/applications/solvers/compressible/rhoCentralFoam/centralCourantNo.H +++ b/applications/solvers/compressible/rhoCentralFoam/centralCourantNo.H @@ -31,16 +31,12 @@ Description if (mesh.nInternalFaces()) { - surfaceScalarField amaxSfbyDelta - ( - mesh.surfaceInterpolation::deltaCoeffs()*amaxSf - ); + scalarField sumAmaxSf(fvc::surfaceSum(amaxSf)().internalField()); - CoNum = max(amaxSfbyDelta/mesh.magSf()).value()*runTime.deltaTValue(); + CoNum = 0.5*gMax(sumAmaxSf/mesh.V().field())*runTime.deltaTValue(); meanCoNum = - (sum(amaxSfbyDelta)/sum(mesh.magSf())).value() - *runTime.deltaTValue(); + 0.5*(gSum(sumAmaxSf)/gSum(mesh.V().field()))*runTime.deltaTValue(); } Info<< "Mean and max Courant Numbers = "