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 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::LUST
28 
29 Group
30  grpFvSurfaceInterpolationSchemes
31 
32 Description
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 
41 SourceFiles
42  LUST.C
43 
44 \*---------------------------------------------------------------------------*/
45 
46 #ifndef LUST_H
47 #define LUST_H
48 
49 #include "linearUpwind.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class LUST Declaration
58 \*---------------------------------------------------------------------------*/
59 
60 template<class Type>
61 class 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 
74 public:
75 
76  //- Runtime type information
77  TypeName("LUST");
78 
79 
80  // Constructors
81 
82  //- Construct from mesh and Istream
84  (
85  const fvMesh& mesh,
86  Istream& schemeData
87  )
88  :
89  linearUpwind<Type>(mesh, schemeData)
90  {}
91 
92  //- Construct from mesh, faceFlux and Istream
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 // ************************************************************************* //
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::upwind::weights
tmp< surfaceScalarField > weights() const
Return the interpolation weighting factors.
Definition: upwind.H:133
Foam::linearUpwind
linearUpwind interpolation scheme class derived from upwind and returns upwind weighting factors and ...
Definition: linearUpwind.H:57
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::linearUpwind::correction
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
Foam::LUST::corrected
virtual bool corrected() const
Return true if this scheme uses an explicit correction.
Definition: LUST.H:117
Foam::LUST
LUST: Linear-upwind stabilised transport.
Definition: LUST.H:60
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::LUST::TypeName
TypeName("LUST")
Runtime type information.
Foam::surfaceInterpolationScheme::mesh
const fvMesh & mesh() const
Return mesh reference.
Definition: surfaceInterpolationScheme.H:144
Foam::GeometricField< scalar, fvsPatchField, surfaceMesh >
Foam::LUST::correction
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