boundedConvectionScheme.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2012-2020 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 public:
72 
73  //- Runtime type information
74  TypeName("bounded");
75 
76 
77  // Constructors
78 
79  //- Construct from flux and Istream
81  (
82  const fvMesh& mesh,
83  const surfaceScalarField& faceFlux,
84  Istream& is
85  )
86  :
87  convectionScheme<Type>(mesh, faceFlux),
88  scheme_
89  (
90  fv::convectionScheme<Type>::New(mesh, faceFlux, is)
91  )
92  {}
93 
94  //- Disallow default bitwise copy construction
96 
97 
98  // Member Functions
99 
101  (
102  const surfaceScalarField&,
104  ) const;
105 
107  (
108  const surfaceScalarField&,
110  ) const;
111 
113  (
114  const surfaceScalarField&,
116  ) const;
117 
119  (
120  const surfaceScalarField&,
122  ) const;
123 
124 
125  // Member Operators
126 
127  //- Disallow default bitwise assignment
128  void operator=(const boundedConvectionScheme&) = delete;
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 // ************************************************************************* //
Bounded form of the selected convection scheme.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const surfaceScalarField &, const GeometricField< Type, fvPatchField, volMesh > &) const
Abstract base class for convection schemes.
TypeName("bounded")
Runtime type information.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > flux(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
boundedConvectionScheme(const fvMesh &mesh, const surfaceScalarField &faceFlux, Istream &is)
Construct from flux and Istream.
tmp< fvMatrix< Type > > fvmDiv(const surfaceScalarField &, const GeometricField< Type, fvPatchField, volMesh > &) const
void operator=(const boundedConvectionScheme &)=delete
Disallow default bitwise assignment.
static tmp< convectionScheme< Type > > New(const fvMesh &mesh, const surfaceScalarField &faceFlux, Istream &schemeData)
Return a pointer to a new convectionScheme created on freestore.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:95
const fvMesh & mesh() const
Return mesh reference.
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.