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.deltaTValue();
8 
9  scalar sumLocalContErr = runTime.deltaTValue()*
10  mag(conserve)().weightedAverage(mesh.V()).value();
11 
12  scalar globalContErr = runTime.deltaTValue()*
13  conserve.weightedAverage(mesh.V()).value();
14 
15  Info<< "volume continuity errors : sum local = " << sumLocalContErr
16  << ", global = " << globalContErr << endl;
17 }
dimensioned< scalar > mag(const dimensioned< Type > &)
messageStream Info
dynamicFvMesh & mesh
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47