OpenFOAM
dev
The OpenFOAM Foundation
VenkatakrishnanGradientLimiter.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) 2018 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::gradientLimiters::Venkatakrishnan
26
27
Description
28
Venkatakrishnan gradient limiter
29
30
to be used with the Foam::fv::cellLimitedGrad limited gradient.
31
32
Reference:
33
\verbatim
34
Venkatakrishnan, V. (1993).
35
On the accuracy of limiters and convergence to steady state solutions.
36
In 31st Aerospace Sciences Meeting (p. 880).
37
\endverbatim
38
39
Example:
40
\verbatim
41
gradSchemes
42
{
43
default Gauss linear;
44
limited cellLimited<Venkatakrishnan> Gauss linear 1;
45
}
46
\endverbatim
47
48
Note: this limiter formally allows the limiter function to slightly exceed 1
49
which is generally not a good idea and can cause unboundedness. To avoid
50
this problem the limiter function is clipped to 1 which is likely to be
51
better behaved but is then not differentiable and so no longer conforms to
52
the basic principles of this kind of limiter function. All these issues are
53
resolved in a consistent and differentiable manner by the
54
Foam::fv::gradientLimiters::cubic limiter which is recommended in
55
preference to the Foam::fv::gradientLimiters::Venkatakrishnan limiter.
56
57
See also
58
Foam::fv::cellLimitedGrad
59
Foam::fv::gradientLimiters::cubic
60
61
\*---------------------------------------------------------------------------*/
62
63
#ifndef VenkatakrishnanGradientLimiter_H
64
#define VenkatakrishnanGradientLimiter_H
65
66
#include "
Istream.H
"
67
68
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
69
70
namespace
Foam
71
{
72
73
namespace
fv
74
{
75
76
namespace
gradientLimiters
77
{
78
79
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
80
81
class
Venkatakrishnan
82
{
83
84
public
:
85
86
// Constructors
87
88
Venkatakrishnan
(
Istream
&)
89
{}
90
91
92
// Member Functions
93
94
inline
scalar
limiter
(
const
scalar r)
const
95
{
96
return
(
sqr
(r) + 2*r)/(
sqr
(r) + r + 2);
97
}
98
};
99
100
101
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
102
103
}
// End namespace gradientLimiters
104
105
}
// End namespace fv
106
107
}
// End namespace Foam
108
109
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110
111
#endif
112
113
// ************************************************************************* //
Istream.H
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition:
Istream.H:60
Foam::fv::gradientLimiters::Venkatakrishnan
Venkatakrishnan gradient limiter.
Definition:
VenkatakrishnanGradientLimiter.H:81
Foam::fv::gradientLimiters::Venkatakrishnan::limiter
scalar limiter(const scalar r) const
Definition:
VenkatakrishnanGradientLimiter.H:93
Foam::fv::gradientLimiters::Venkatakrishnan::Venkatakrishnan
Venkatakrishnan(Istream &)
Definition:
VenkatakrishnanGradientLimiter.H:87
Foam
Namespace for OpenFOAM.
Definition:
atmosphericBoundaryLayer.C:32
Foam::sqr
tmp< DimensionedField< typename outerProduct< Type, Type >::type, GeoMesh, Field >> sqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
Definition:
DimensionedFieldFunctions.C:134
fv
labelList fv(nPoints)
src
finiteVolume
finiteVolume
gradSchemes
limitedGradSchemes
cellLimitedGrad
gradientLimiters
VenkatakrishnanGradientLimiter.H
Generated by
1.9.1