boundedConvectionScheme.H
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 Class
27  Foam::fv::boundedConvectionScheme
28 
29 Group
30  grpFvConvectionSchemes
31 
32 Description
33  Bounded form of the selected convection scheme.
34 
35  Boundedness is achieved by subtracting div(phi)*vf or Sp(div(phi), vf)
36  which is non-conservative if div(phi) != 0 but conservative otherwise.
37 
38  Can be used for convection of bounded scalar properties in steady-state
39  solvers to improve stability if insufficient convergence of the pressure
40  equation causes temporary divergence of the flux field.
41 
42 SourceFiles
43  boundedConvectionScheme.C
44 
45 \*---------------------------------------------------------------------------*/
46 
47 #ifndef boundedConvectionScheme_H
48 #define boundedConvectionScheme_H
49 
50 #include "convectionScheme.H"
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 namespace Foam
55 {
56 
57 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58 
59 namespace fv
60 {
61 
62 /*---------------------------------------------------------------------------*\
63  Class boundedConvectionScheme Declaration
64 \*---------------------------------------------------------------------------*/
65 
66 template<class Type>
68 :
69  public fv::convectionScheme<Type>
70 {
71  // Private data
72 
74 
75 
76  // Private Member Functions
77 
78  //- No copy construct
80 
81  //- No copy assignment
82  void operator=(const boundedConvectionScheme&) = delete;
83 
84 
85 public:
86 
87  //- Runtime type information
88  TypeName("bounded");
89 
90 
91  // Constructors
92 
93  //- Construct from flux and Istream
95  (
96  const fvMesh& mesh,
97  const surfaceScalarField& faceFlux,
98  Istream& is
99  )
100  :
101  convectionScheme<Type>(mesh, faceFlux),
102  scheme_
103  (
104  fv::convectionScheme<Type>::New(mesh, faceFlux, is)
105  )
106  {}
107 
108 
109  // Member Functions
110 
111  const convectionScheme<Type>& scheme() const;
112 
114  (
115  const surfaceScalarField&,
117  ) const;
118 
120  (
121  const surfaceScalarField&,
123  ) const;
124 
126  (
127  const surfaceScalarField&,
129  ) const;
130 
132  (
133  const surfaceScalarField&,
135  ) const;
136 };
137 
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 } // End namespace fv
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 } // End namespace Foam
146 
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 
149 #ifdef NoRepository
150  #include "boundedConvectionScheme.C"
151 #endif
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 #endif
156 
157 // ************************************************************************* //
Foam::fv::boundedConvectionScheme::fvcDiv
tmp< GeometricField< Type, fvPatchField, volMesh > > fvcDiv(const surfaceScalarField &, const GeometricField< Type, fvPatchField, volMesh > &) const
Definition: boundedConvectionScheme.C:93
convectionScheme.H
Foam::fv::boundedConvectionScheme
Bounded form of the selected convection scheme.
Definition: boundedConvectionScheme.H:66
boundedConvectionScheme.C
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::fv::convectionScheme::New
static tmp< convectionScheme< Type > > New(const fvMesh &mesh, const surfaceScalarField &faceFlux, Istream &schemeData)
Return a pointer to a new convectionScheme created on freestore.
Definition: convectionScheme.C:61
Foam::fv::boundedConvectionScheme::TypeName
TypeName("bounded")
Runtime type information.
Foam::fv::boundedConvectionScheme::scheme
const convectionScheme< Type > & scheme() const
Definition: boundedConvectionScheme.C:46
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::fv::boundedConvectionScheme::interpolate
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const surfaceScalarField &, const GeometricField< Type, fvPatchField, volMesh > &) const
Definition: boundedConvectionScheme.C:55
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::fv::convectionScheme
Abstract base class for convection schemes.
Definition: convectionScheme.H:69
Foam::fv::boundedConvectionScheme::fvmDiv
tmp< fvMatrix< Type > > fvmDiv(const surfaceScalarField &, const GeometricField< Type, fvPatchField, volMesh > &) const
Definition: boundedConvectionScheme.C:79
fv
labelList fv(nPoints)
Foam::fv::boundedConvectionScheme::flux
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > flux(const surfaceScalarField &, const GeometricField< Type, fvPatchField, volMesh > &) const
Definition: boundedConvectionScheme.C:67
Foam::fv::convectionScheme::mesh
const fvMesh & mesh() const
Return mesh reference.
Definition: convectionScheme.H:161
Foam::GeometricField< scalar, fvsPatchField, surfaceMesh >