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-------------------------------------------------------------------------------
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
26Class
27 Foam::fv::boundedConvectionScheme
28
29Group
30 grpFvConvectionSchemes
31
32Description
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
42SourceFiles
43 boundedConvectionScheme.C
44
45\*---------------------------------------------------------------------------*/
46
47#ifndef boundedConvectionScheme_H
48#define boundedConvectionScheme_H
49
50#include "convectionScheme.H"
51
52// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53
54namespace Foam
55{
56
57// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58
59namespace fv
60{
61
62/*---------------------------------------------------------------------------*\
63 Class boundedConvectionScheme Declaration
64\*---------------------------------------------------------------------------*/
65
66template<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
85public:
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
151#endif
152
153// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154
155#endif
156
157// ************************************************************************* //
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:64
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
Bounded form of the selected convection scheme.
boundedConvectionScheme(const fvMesh &mesh, const surfaceScalarField &faceFlux, Istream &is)
Construct from flux and Istream.
TypeName("bounded")
Runtime type information.
const convectionScheme< Type > & scheme() const
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const surfaceScalarField &, const GeometricField< Type, fvPatchField, volMesh > &) 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.
const fvMesh & mesh() const
Return mesh reference.
static tmp< convectionScheme< Type > > New(const fvMesh &mesh, const surfaceScalarField &faceFlux, Istream &schemeData)
Return a pointer to a new convectionScheme created on freestore.
A class for managing temporary objects.
Definition: tmp.H:65
Namespace for OpenFOAM.
labelList fv(nPoints)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73