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.primitiveFieldRef() +=
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}
dynamicFvMesh & mesh
engineTime & runTime
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:82
scalar sumLocalContErr
Definition: volContinuity.H:9
scalar globalContErr
Definition: volContinuity.H:12