All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
outletStabilised.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) 2011-2022 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::outletStabilised
26 
27 Description
28  Outlet-stabilised interpolation scheme which applies upwind interpolation
29  to the faces of the cells adjacent to outlets.
30 
31  This is particularly useful to stabilise the velocity at entrainment
32  boundaries for LES cases using linear or other centred interpolation
33  schemes.
34 
35 SourceFiles
36  outletStabilised.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef outletStabilised_H
41 #define outletStabilised_H
42 
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class outletStabilised Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 template<class Type>
55 class outletStabilised
56 :
57  public surfaceInterpolationScheme<Type>
58 {
59  // Private member data
60 
61  const surfaceScalarField& faceFlux_;
63 
64 
65 public:
66 
67  //- Runtime type information
68  TypeName("outletStabilised");
69 
70 
71  // Constructors
72 
73  //- Construct from mesh and Istream
75  (
76  const fvMesh& mesh,
77  Istream& is
78  )
79  :
80  surfaceInterpolationScheme<Type>(mesh),
81  faceFlux_
82  (
83  mesh.lookupObject<surfaceScalarField>
84  (
85  word(is)
86  )
87  ),
88  tScheme_
89  (
90  surfaceInterpolationScheme<Type>::New(mesh, faceFlux_, is)
91  )
92  {}
93 
94 
95  //- Construct from mesh, faceFlux and Istream
97  (
98  const fvMesh& mesh,
99  const surfaceScalarField& faceFlux,
100  Istream& is
101  )
102  :
103  surfaceInterpolationScheme<Type>(mesh),
104  faceFlux_(faceFlux),
105  tScheme_
106  (
107  surfaceInterpolationScheme<Type>::New(mesh, faceFlux, is)
108  )
109  {}
110 
111  //- Disallow default bitwise copy construction
112  outletStabilised(const outletStabilised&) = delete;
113 
114 
115  // Member Functions
116 
117  //- Return the interpolation weighting factors
119  (
121  ) const;
122 
123  //- Return true if this scheme uses an explicit correction
124  virtual bool corrected() const
125  {
126  return tScheme_().corrected();
127  }
128 
129  //- Return the explicit correction to the face-interpolate
130  // set to zero on the near-boundary faces where upwind is applied
132  correction
133  (
135  ) const;
136 
137 
138  // Member Operators
139 
140  //- Disallow default bitwise assignment
141  void operator=(const outletStabilised&) = delete;
142 };
143 
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 } // End namespace Foam
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 #endif
152 
153 // ************************************************************************* //
virtual bool corrected() const
Return true if this scheme uses an explicit correction.
void operator=(const outletStabilised &)=delete
Disallow default bitwise assignment.
outletStabilised(const fvMesh &mesh, Istream &is)
Construct from mesh and Istream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
TypeName("outletStabilised")
Runtime type information.
Outlet-stabilised interpolation scheme which applies upwind interpolation to the faces of the cells a...
A class for handling words, derived from string.
Definition: word.H:59
static tmp< surfaceInterpolationScheme< Type > > New(const fvMesh &mesh, Istream &schemeData)
Return new tmp interpolation scheme.
virtual tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > correction(const GeometricField< Type, fvPatchField, volMesh > &vf) const
Return the explicit correction to the face-interpolate.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:95
A class for managing temporary objects.
Definition: PtrList.H:53
tmp< surfaceScalarField > weights(const GeometricField< Type, fvPatchField, volMesh > &vf) const
Return the interpolation weighting factors.
Abstract base class for surface interpolation schemes.
Namespace for OpenFOAM.