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 | Copyright (C) 2012 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::fv::boundedConvectionScheme
26 
27 Description
28  Bounded form of the selected convection scheme.
29 
30  Boundedness is achieved by subtracting div(phi)*vf or Sp(div(phi), vf)
31  which is non-conservative if div(phi) != 0 but conservative otherwise.
32 
33  Can be used for convection of bounded scalar properties in steady-state
34  solvers to improve stability if insufficient convergence of the pressure
35  equation causes temporary divergence of the flux field.
36 
37 SourceFiles
38  boundedConvectionScheme.C
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef boundedConvectionScheme_H
43 #define boundedConvectionScheme_H
44 
45 #include "convectionScheme.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 namespace fv
55 {
56 
57 /*---------------------------------------------------------------------------*\
58  Class boundedConvectionScheme Declaration
59 \*---------------------------------------------------------------------------*/
60 
61 template<class Type>
63 :
64  public fv::convectionScheme<Type>
65 {
66  // Private data
67 
69 
70 
71  // Private Member Functions
72 
73  //- Disallow default bitwise copy construct
75 
76  //- Disallow default bitwise assignment
77  void operator=(const boundedConvectionScheme&);
78 
79 
80 public:
81 
82  //- Runtime type information
83  TypeName("bounded");
84 
85 
86  // Constructors
87 
88  //- Construct from flux and Istream
90  (
91  const fvMesh& mesh,
92  const surfaceScalarField& faceFlux,
93  Istream& is
94  )
95  :
96  convectionScheme<Type>(mesh, faceFlux),
97  scheme_
98  (
99  fv::convectionScheme<Type>::New(mesh, faceFlux, is)
100  )
101  {}
102 
103 
104  // Member Functions
105 
107  (
108  const surfaceScalarField&,
110  ) const;
111 
113  (
114  const surfaceScalarField&,
116  ) const;
117 
119  (
120  const surfaceScalarField&,
122  ) const;
123 
125  (
126  const surfaceScalarField&,
128  ) const;
129 };
130 
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 } // End namespace fv
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 } // End namespace Foam
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 #ifdef NoRepository
143 # include "boundedConvectionScheme.C"
144 #endif
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 #endif
149 
150 // ************************************************************************* //
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
TypeName("bounded")
Runtime type information.
const fvMesh & mesh() const
Return mesh reference.
Bounded form of the selected convection scheme.
Namespace for OpenFOAM.
static tmp< convectionScheme< Type > > New(const fvMesh &mesh, const surfaceScalarField &faceFlux, Istream &schemeData)
Return a pointer to a new convectionScheme created on freestore.
tmp< fvMatrix< Type > > fvmDiv(const surfaceScalarField &, const GeometricField< Type, fvPatchField, volMesh > &) const
Abstract base class for convection schemes.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const surfaceScalarField &, const GeometricField< Type, fvPatchField, volMesh > &) const
labelList fv(nPoints)
tmp< GeometricField< Type, fvPatchField, volMesh > > fvcDiv(const surfaceScalarField &, const GeometricField< Type, fvPatchField, volMesh > &) const
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > flux(const surfaceScalarField &, const GeometricField< Type, fvPatchField, volMesh > &) const
A class for managing temporary objects.
Definition: PtrList.H:118