mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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
This commit is contained in:
@ -31,16 +31,12 @@ Description
|
|||||||
|
|
||||||
if (mesh.nInternalFaces())
|
if (mesh.nInternalFaces())
|
||||||
{
|
{
|
||||||
surfaceScalarField amaxSfbyDelta
|
scalarField sumAmaxSf(fvc::surfaceSum(amaxSf)().internalField());
|
||||||
(
|
|
||||||
mesh.surfaceInterpolation::deltaCoeffs()*amaxSf
|
|
||||||
);
|
|
||||||
|
|
||||||
CoNum = max(amaxSfbyDelta/mesh.magSf()).value()*runTime.deltaTValue();
|
CoNum = 0.5*gMax(sumAmaxSf/mesh.V().field())*runTime.deltaTValue();
|
||||||
|
|
||||||
meanCoNum =
|
meanCoNum =
|
||||||
(sum(amaxSfbyDelta)/sum(mesh.magSf())).value()
|
0.5*(gSum(sumAmaxSf)/gSum(mesh.V().field()))*runTime.deltaTValue();
|
||||||
*runTime.deltaTValue();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Mean and max Courant Numbers = "
|
Info<< "Mean and max Courant Numbers = "
|
||||||
|
|||||||
Reference in New Issue
Block a user