LUST.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) 2011-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::LUST
28
29Group
30 grpFvSurfaceInterpolationSchemes
31
32Description
33 LUST: Linear-upwind stabilised transport.
34
35 Interpolation scheme class derived from linearUpwind which returns blended
36 linear/linear-upwind weighting factors and also applies a explicit
37 gradient-based correction obtained from the linearUpwind scheme. The
38 blending-factor is set to 0.75 linear which optimises the balance between
39 accuracy and stability on a range of LES cases with a range of mesh quality.
40
41SourceFiles
42 LUST.C
43
44\*---------------------------------------------------------------------------*/
45
46#ifndef LUST_H
47#define LUST_H
48
49#include "linearUpwind.H"
50
51// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52
53namespace Foam
54{
55
56/*---------------------------------------------------------------------------*\
57 Class LUST Declaration
58\*---------------------------------------------------------------------------*/
59
60template<class Type>
61class LUST
62:
63 public linearUpwind<Type>
64{
65 // Private Member Functions
66
67 //- No copy construct
68 LUST(const LUST&) = delete;
69
70 //- No copy assignment
71 void operator=(const LUST&) = delete;
72
73
74public:
75
76 //- Runtime type information
77 TypeName("LUST");
78
79
80 // Constructors
81
82 //- Construct from mesh and Istream
83 LUST
84 (
85 const fvMesh& mesh,
86 Istream& schemeData
87 )
88 :
89 linearUpwind<Type>(mesh, schemeData)
90 {}
91
92 //- Construct from mesh, faceFlux and Istream
93 LUST
94 (
95 const fvMesh& mesh,
96 const surfaceScalarField& faceFlux,
97 Istream& schemeData
98 )
99 :
100 linearUpwind<Type>(mesh, faceFlux, schemeData)
101 {}
102
103
104 // Member Functions
105
106 //- Return the interpolation weighting factors
108 (
110 ) const
111 {
112 return
113 0.75*this->mesh().surfaceInterpolation::weights()
115 }
116
117 //- Return true if this scheme uses an explicit correction
118 virtual bool corrected() const
119 {
120 return true;
121 }
122
123 //- Return the explicit correction to the face-interpolate
126 (
128 ) const
129 {
130 return 0.25*linearUpwind<Type>::correction(vf);
131 }
132};
133
134
135// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136
137} // End namespace Foam
138
139// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140
141#endif
142
143// ************************************************************************* //
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:64
LUST: Linear-upwind stabilised transport.
Definition: LUST.H:63
virtual tmp< surfaceScalarField > weights(const GeometricField< Type, fvPatchField, volMesh > &) const
Return the interpolation weighting factors.
Definition: LUST.H:107
LUST(const fvMesh &mesh, Istream &schemeData)
Construct from mesh and Istream.
Definition: LUST.H:83
virtual bool corrected() const
Return true if this scheme uses an explicit correction.
Definition: LUST.H:117
TypeName("LUST")
Runtime type information.
LUST(const fvMesh &mesh, const surfaceScalarField &faceFlux, Istream &schemeData)
Construct from mesh, faceFlux and Istream.
Definition: LUST.H:93
virtual tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > correction(const GeometricField< Type, fvPatchField, volMesh > &vf) const
Return the explicit correction to the face-interpolate.
Definition: LUST.H:125
virtual const scalarListList & weights() const
Return interpolation weights.
Definition: faAreaMapper.C:384
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
linearUpwind interpolation scheme class derived from upwind and returns upwind weighting factors and ...
Definition: linearUpwind.H:60
virtual tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > correction(const GeometricField< Type, fvPatchField, volMesh > &) const
Return the explicit correction to the face-interpolate.
Definition: linearUpwind.C:36
A class for managing temporary objects.
Definition: tmp.H:65
tmp< surfaceScalarField > weights() const
Return the interpolation weighting factors.
Definition: upwind.H:133
dynamicFvMesh & mesh
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73