2 // Volume and motion flux check
4 scalar newTotalVolume = sum(mesh.V()).value();
6 volScalarField motionContErr =
7 fvc::ddt(dimensionedScalar("1", dimless, 1.0), mesh)
8 - fvc::div(fvc::meshPhi(U));
10 scalar sumLocalContErr = runTime.deltaT().value()*
11 mag(motionContErr)().weightedAverage(mesh.V()).value();
14 runTime.deltaT().value()*max(motionContErr.internalField());
16 Info<< "Volume: new = " << newTotalVolume << " old = " << totalVolume
17 << " change = " << Foam::mag(newTotalVolume - totalVolume) << nl
18 << "Motion continuity errors : sum local = " << sumLocalContErr
19 << ", maximum = " << maxContErr
22 totalVolume = newTotalVolume;