db7fac3f24
git-svn-id: https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Core/OpenFOAM-1.5-dev@1731 e4e07f05-0c2f-0410-a05a-b8ba57e0c909
23 lines
750 B
C
23 lines
750 B
C
{
|
|
// Volume and motion flux check
|
|
|
|
scalar newTotalVolume = sum(mesh.V()).value();
|
|
|
|
volScalarField motionContErr =
|
|
fvc::ddt(dimensionedScalar("1", dimless, 1.0), mesh)
|
|
- fvc::div(fvc::meshPhi(U));
|
|
|
|
scalar sumLocalContErr = runTime.deltaT().value()*
|
|
mag(motionContErr)().weightedAverage(mesh.V()).value();
|
|
|
|
scalar maxContErr =
|
|
runTime.deltaT().value()*max(motionContErr.internalField());
|
|
|
|
Info<< "Volume: new = " << newTotalVolume << " old = " << totalVolume
|
|
<< " change = " << Foam::mag(newTotalVolume - totalVolume) << nl
|
|
<< "Motion continuity errors : sum local = " << sumLocalContErr
|
|
<< ", maximum = " << maxContErr
|
|
<< endl;
|
|
|
|
totalVolume = newTotalVolume;
|
|
}
|