Initial commit for version 2.0.x patch release
[OpenFOAM-2.0.x.git] / applications / solvers / multiphase / cavitatingFoam / continuityErrs.H
blobc5e93c7efb3d537892e22228143b8103e9ce3a21
2     volScalarField thermoRho = psi*p + (1.0 - gamma)*rhol0;
4     dimensionedScalar totalMass = fvc::domainIntegrate(rho);
6     scalar sumLocalContErr =
7     (
8         fvc::domainIntegrate(mag(rho - thermoRho))/totalMass
9     ).value();
11     scalar globalContErr =
12     (
13         fvc::domainIntegrate(rho - thermoRho)/totalMass
14     ).value();
16     cumulativeContErr += globalContErr;
18     Info<< "time step continuity errors : sum local = " << sumLocalContErr
19         << ", global = " << globalContErr
20         << ", cumulative = " << cumulativeContErr
21         << endl;