Skip to content
Snippets Groups Projects
Commit 164448f8 authored by Henry Weller's avatar Henry Weller
Browse files

rhoCentralFoam: Updated Courant number calculation to be cell-based rather than face-based

Now consistent with the way the Courant number is calculated for other solvers
parent bc493180
Branches
Tags
No related merge requests found
......@@ -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 = "
......
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