FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

volContinuity.H

Go to the documentation of this file.
00001 {
00002     volScalarField conserve = -fvc::div(mesh.phi());
00003     // The ddt term constructed by hand because it would be wrong for
00004     // Backward Differencing in time.
00005 
00006     conserve.internalField() +=
00007         (1.0 - mesh.V0()/mesh.V())/runTime.deltaT().value();
00008 
00009     scalar sumLocalContErr = runTime.deltaT().value()*
00010         mag(conserve)().weightedAverage(mesh.V()).value();
00011 
00012     scalar globalContErr = runTime.deltaT().value()*
00013         conserve.weightedAverage(mesh.V()).value();
00014 
00015     Info<< "volume continuity errors : sum local = " << sumLocalContErr
00016         << ", global = " << globalContErr << endl;
00017 }
00018 
00019 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines