immersedBoundaryContinuityErrs.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | foam-extend: Open Source CFD
4  \\ / O peration | Version: 3.2
5  \\ / A nd | Web: http://www.foam-extend.org
6  \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9  This file is part of foam-extend.
10 
11  foam-extend is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by the
13  Free Software Foundation, either version 3 of the License, or (at your
14  option) any later version.
15 
16  foam-extend is distributed in the hope that it will be useful, but
17  WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
23 
24 Global
25  immersedBoundaryContinuityErrs
26 
27 Description
28  Calculates and prints the continuity errors with
29  immersed boundary correction.
30 
31 \*---------------------------------------------------------------------------*/
32 
33 {
34  volScalarField contErr = fvc::div(faceIbMask*phi);
35 // volScalarField contErr = cellIbMask*fvc::div(phi);
36 
37  sumLocalContErr = runTime.deltaT().value()*
38  mag(contErr)().weightedAverage(mesh.V()).value();
39 
40  globalContErr = runTime.deltaT().value()*
41  contErr.weightedAverage(mesh.V()).value();
42 
44 
45  Info<< "IB time step continuity errors : sum local = " << sumLocalContErr
46  << ", global = " << globalContErr
47  << ", cumulative = " << cumulativeContErr
48  << endl;
49 }
50 
51 // ************************************************************************* //
sumLocalContErr
sumLocalContErr
Definition: immersedBoundaryContinuityErrs.H:34
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::fvc::div
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Foam::mag
dimensioned< scalar > mag(const dimensioned< Type > &)
Foam::Info
messageStream Info
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
cumulativeContErr
cumulativeContErr
Definition: immersedBoundaryContinuityErrs.H:40
globalContErr
globalContErr
Definition: immersedBoundaryContinuityErrs.H:37