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-------------------------------------------------------------------------------
10License
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
35namespace Foam
36{
37
38// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39
40namespace fv
41{
42
43// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45template<class Type>
47{
48 return scheme_();
49}
50
51
52template<class Type>
55(
58) const
59{
60 return scheme_().interpolate(phi, vf);
61}
62
63
64template<class Type>
67(
68 const surfaceScalarField& faceFlux,
70) const
71{
72 return scheme_().flux(faceFlux, vf);
73}
74
75
76template<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
90template<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// ************************************************************************* //
surfaceScalarField & phi
Computes the flux of an input vector field.
Definition: flux.H:144
flux(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Definition: flux.C:77
const convectionScheme< Type > & scheme() const
tmp< fvMatrix< Type > > fvmDiv(const surfaceScalarField &, const GeometricField< Type, fvPatchField, volMesh > &) const
tmp< GeometricField< Type, fvPatchField, volMesh > > fvcDiv(const surfaceScalarField &, const GeometricField< Type, fvPatchField, volMesh > &) const
Abstract base class for convection schemes.
bool interpolate() const noexcept
Same as isPointData()
A class for managing temporary objects.
Definition: tmp.H:65
A special matrix type and solver, designed for finite volume solutions of scalar equations.
Surface integrate surfaceField creating a volField. Surface sum a surfaceField creating a volField.
Calculate the finiteVolume matrix for implicit and explicit sources.
void surfaceIntegrate(Field< Type > &ivf, const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
zeroField Sp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
Namespace for OpenFOAM.
labelList fv(nPoints)