Report velocity magnitude from flux

This commit is contained in:
Hrvoje Jasak 2010-09-30 23:04:53 +01:00
parent 166b357c16
commit 08eecf6618

View file

@ -33,11 +33,14 @@ Description
scalar CoNum = 0.0; scalar CoNum = 0.0;
scalar meanCoNum = 0.0; scalar meanCoNum = 0.0;
scalar acousticCoNum = 0.0; scalar acousticCoNum = 0.0;
scalar velMag = 0.0;
if (mesh.nInternalFaces()) if (mesh.nInternalFaces())
{ {
surfaceScalarField magPhiv = mag(phiv);
surfaceScalarField SfUfbyDelta = surfaceScalarField SfUfbyDelta =
mesh.surfaceInterpolation::deltaCoeffs()*mag(phiv); mesh.surfaceInterpolation::deltaCoeffs()*magPhiv;
CoNum = max(SfUfbyDelta/mesh.magSf()) CoNum = max(SfUfbyDelta/mesh.magSf())
.value()*runTime.deltaT().value(); .value()*runTime.deltaT().value();
@ -45,6 +48,8 @@ if (mesh.nInternalFaces())
meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf())) meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
.value()*runTime.deltaT().value(); .value()*runTime.deltaT().value();
velMag = max(magPhiv/mesh.magSf()).value();
acousticCoNum = max acousticCoNum = max
( (
mesh.surfaceInterpolation::deltaCoeffs()/sqrt(fvc::interpolate(psi)) mesh.surfaceInterpolation::deltaCoeffs()/sqrt(fvc::interpolate(psi))
@ -54,6 +59,7 @@ if (mesh.nInternalFaces())
Info<< "phiv Courant Number mean: " << meanCoNum Info<< "phiv Courant Number mean: " << meanCoNum
<< " max: " << CoNum << " max: " << CoNum
<< " acoustic max: " << acousticCoNum << " acoustic max: " << acousticCoNum
<< " velocity magnitude: " << velMag
<< endl; << endl;
// ************************************************************************* // // ************************************************************************* //