FreeFOAM The Cross-Platform CFD Toolkit
volContinuity.H
Go to the documentation of this file.
1 {
2  volScalarField conserve = -fvc::div(mesh.phi());
3  // The ddt term constructed by hand because it would be wrong for
4  // Backward Differencing in time.
5 
6  conserve.internalField() +=
7  (1.0 - mesh.V0()/mesh.V())/runTime.deltaT().value();
8 
9  scalar sumLocalContErr = runTime.deltaT().value()*
10  mag(conserve)().weightedAverage(mesh.V()).value();
11 
12  scalar globalContErr = runTime.deltaT().value()*
13  conserve.weightedAverage(mesh.V()).value();
14 
15  Info<< "volume continuity errors : sum local = " << sumLocalContErr
16  << ", global = " << globalContErr << endl;
17 }
18 
19 // ************************ vim: set sw=4 sts=4 et: ************************ //