boundedConvectionScheme.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2012-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
29 #include "fvcSurfaceIntegrate.H"
30 #include "fvMatrices.H"
31 #include "fvmSup.H"
32 
33 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 
35 namespace Foam
36 {
37 
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39 
40 namespace fv
41 {
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 template<class Type>
47 {
48  return scheme_();
49 }
50 
51 
52 template<class Type>
55 (
56  const surfaceScalarField& phi,
58 ) const
59 {
60  return scheme_().interpolate(phi, vf);
61 }
62 
63 
64 template<class Type>
67 (
68  const surfaceScalarField& faceFlux,
70 ) const
71 {
72  return scheme_().flux(faceFlux, vf);
73 }
74 
75 
76 template<class Type>
79 (
80  const surfaceScalarField& faceFlux,
82 ) const
83 {
84  return
85  scheme_().fvmDiv(faceFlux, vf)
86  - fvm::Sp(fvc::surfaceIntegrate(faceFlux), vf);
87 }
88 
89 
90 template<class Type>
93 (
94  const surfaceScalarField& faceFlux,
96 ) const
97 {
98  return
99  scheme_().fvcDiv(faceFlux, vf)
100  - fvc::surfaceIntegrate(faceFlux)*vf;
101 }
102 
103 
104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
105 
106 } // End namespace fv
107 
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109 
110 } // End namespace Foam
111 
112 // ************************************************************************* //
Foam::fv::boundedConvectionScheme::fvcDiv
tmp< GeometricField< Type, fvPatchField, volMesh > > fvcDiv(const surfaceScalarField &, const GeometricField< Type, fvPatchField, volMesh > &) const
Definition: boundedConvectionScheme.C:93
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::fv::boundedConvectionScheme::scheme
const convectionScheme< Type > & scheme() const
Definition: boundedConvectionScheme.C:46
fvMatrices.H
A special matrix type and solver, designed for finite volume solutions of scalar equations.
Foam::fvm::Sp
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::fv::boundedConvectionScheme::interpolate
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const surfaceScalarField &, const GeometricField< Type, fvPatchField, volMesh > &) const
Definition: boundedConvectionScheme.C:55
fvcSurfaceIntegrate.H
Surface integrate surfaceField creating a volField. Surface sum a surfaceField creating a volField.
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::fv::convectionScheme
Abstract base class for convection schemes.
Definition: convectionScheme.H:69
fvmSup.H
Calculate the matrix for implicit and explicit sources.
Foam::fv::boundedConvectionScheme::fvmDiv
tmp< fvMatrix< Type > > fvmDiv(const surfaceScalarField &, const GeometricField< Type, fvPatchField, volMesh > &) const
Definition: boundedConvectionScheme.C:79
fv
labelList fv(nPoints)
boundedConvectionScheme.H
Foam::fv::boundedConvectionScheme::flux
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > flux(const surfaceScalarField &, const GeometricField< Type, fvPatchField, volMesh > &) const
Definition: boundedConvectionScheme.C:67
Foam::fvc::surfaceIntegrate
void surfaceIntegrate(Field< Type > &ivf, const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcSurfaceIntegrate.C:46
Foam::GeometricField< scalar, fvsPatchField, surfaceMesh >