Added velocity magnitude messaging from flux

This commit is contained in:
Hrvoje Jasak 2010-09-30 23:01:27 +01:00
parent 6b9a782226
commit db4a63ed07
2 changed files with 21 additions and 12 deletions

View file

@ -32,20 +32,26 @@ Description
scalar CoNum = 0.0;
scalar meanCoNum = 0.0;
scalar velMag = 0.0;
if (mesh.nInternalFaces())
{
surfaceScalarField phiOverRho = mag(phi)/fvc::interpolate(rho);
surfaceScalarField SfUfbyDelta =
mesh.surfaceInterpolation::deltaCoeffs()*mag(phi)/fvc::interpolate(rho);
mesh.surfaceInterpolation::deltaCoeffs()*phiOverRho;
CoNum = max(SfUfbyDelta/mesh.magSf())
.value()*runTime.deltaT().value();
CoNum = max(SfUfbyDelta/mesh.magSf()).value()*runTime.deltaT().value();
meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
.value()*runTime.deltaT().value();
meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf())).value()*
runTime.deltaT().value();
velMag = max(phiOverRho/mesh.magSf()).value();
}
Info<< "Courant Number mean: " << meanCoNum
<< " max: " << CoNum << endl;
<< " max: " << CoNum
<< " velocity magnitude: " << velMag
<< endl;
// ************************************************************************* //

View file

@ -36,8 +36,10 @@ scalar velMag = 0.0;
if (mesh.nInternalFaces())
{
surfaceScalarField magPhi = mag(phi);
surfaceScalarField SfUfbyDelta =
mesh.surfaceInterpolation::deltaCoeffs()*mag(phi);
mesh.surfaceInterpolation::deltaCoeffs()*magPhi;
CoNum = max(SfUfbyDelta/mesh.magSf())
.value()*runTime.deltaT().value();
@ -45,11 +47,12 @@ if (mesh.nInternalFaces())
meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
.value()*runTime.deltaT().value();
velMag = max(mag(phi)/mesh.magSf()).value();
velMag = max(magPhi/mesh.magSf()).value();
}
Info<< "Courant Number mean: " << meanCoNum
<< " max: " << CoNum
<< " velocity magnitude: " << velMag << endl;
<< " velocity magnitude: " << velMag
<< endl;
// ************************************************************************* //