2 volScalarField thermoRho = psi*p + (1.0 - gamma)*rhol0;
4 dimensionedScalar totalMass = fvc::domainIntegrate(rho);
6 scalar sumLocalContErr =
8 fvc::domainIntegrate(mag(rho - thermoRho))/totalMass
11 scalar globalContErr =
13 fvc::domainIntegrate(rho - thermoRho)/totalMass
16 cumulativeContErr += globalContErr;
18 Info<< "time step continuity errors : sum local = " << sumLocalContErr
19 << ", global = " << globalContErr
20 << ", cumulative = " << cumulativeContErr