Added velocity magnitude messaging from flux
This commit is contained in:
parent
6b9a782226
commit
db4a63ed07
2 changed files with 21 additions and 12 deletions
|
@ -32,20 +32,26 @@ Description
|
|||
|
||||
scalar CoNum = 0.0;
|
||||
scalar meanCoNum = 0.0;
|
||||
scalar velMag = 0.0;
|
||||
|
||||
if (mesh.nInternalFaces())
|
||||
{
|
||||
surfaceScalarField SfUfbyDelta =
|
||||
mesh.surfaceInterpolation::deltaCoeffs()*mag(phi)/fvc::interpolate(rho);
|
||||
surfaceScalarField phiOverRho = mag(phi)/fvc::interpolate(rho);
|
||||
|
||||
CoNum = max(SfUfbyDelta/mesh.magSf())
|
||||
.value()*runTime.deltaT().value();
|
||||
surfaceScalarField SfUfbyDelta =
|
||||
mesh.surfaceInterpolation::deltaCoeffs()*phiOverRho;
|
||||
|
||||
meanCoNum = (sum(SfUfbyDelta)/sum(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();
|
||||
|
||||
velMag = max(phiOverRho/mesh.magSf()).value();
|
||||
}
|
||||
|
||||
Info<< "Courant Number mean: " << meanCoNum
|
||||
<< " max: " << CoNum << endl;
|
||||
<< " max: " << CoNum
|
||||
<< " velocity magnitude: " << velMag
|
||||
<< endl;
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -36,8 +36,10 @@ scalar velMag = 0.0;
|
|||
|
||||
if (mesh.nInternalFaces())
|
||||
{
|
||||
surfaceScalarField SfUfbyDelta =
|
||||
mesh.surfaceInterpolation::deltaCoeffs()*mag(phi);
|
||||
surfaceScalarField magPhi = mag(phi);
|
||||
|
||||
surfaceScalarField SfUfbyDelta =
|
||||
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;
|
||||
<< " max: " << CoNum
|
||||
<< " velocity magnitude: " << velMag
|
||||
<< endl;
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
Reference in a new issue