WallLocationYPlus.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-2023 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::WallLocationYPlus
26 
27 Description
28  Holds information (coordinate and yStar) regarding nearest wall point.
29 
30  Used in VanDriest wall damping where the interest is in y+ but only
31  needs to be calculated up to e.g. y+ < 200. In all other cells/faces
32  the damping function becomes 1, since y gets initialised to great and
33  yStar to 1.
34 
35 SourceFiles
36  WallLocationYPlusI.H
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef WallLocationYPlus_H
41 #define WallLocationYPlus_H
42 
43 #include "WallLocationData.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 // Forward declaration of classes
51 class transformer;
52 
53 /*---------------------------------------------------------------------------*\
54  Class WallLocationYPlus Declaration
55 \*---------------------------------------------------------------------------*/
56 
57 template<class WallLocation>
59 :
60  public WallLocationData<WallLocation, scalar>
61 {
62 public:
63 
64  // Public Classes
65 
66  //- Class used to pass additional data in
67  class trackData
68  {
69  public:
70 
71  //- Cut off distance
72  scalar yPlusCutOff;
73  };
74 
75 
76 protected:
77 
78  // Protected Member Functions
79 
80  //- Evaluate distance to point. Update distSqr, origin from whomever
81  // is nearer pt. Return true if w2 is closer to point, false
82  // otherwise.
83  template<class TrackingYPlus>
84  inline bool update
85  (
86  const point&,
88  const scalar tol,
89  TrackingYPlus& td
90  );
91 
92 
93 public:
94 
95  // Constructors
96 
97  //- Construct null
98  inline WallLocationYPlus();
99 
100  //- Inherit constructors
102 };
103 
104 
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106 
107 class wallPoint;
108 
109 template<class WallLocation>
110 class FvWallInfo;
111 
112 template<>
113 inline bool contiguous<FvWallInfo<WallLocationYPlus<wallPoint>>>()
114 {
115  return true;
116 }
117 
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 } // End namespace Foam
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 #include "WallLocationYPlusI.H"
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 #endif
130 
131 // ************************************************************************* //
#define w2
Definition: blockCreate.C:32
Holds information regarding nearest wall point. Used in wall distance calculation.
Definition: FvWallInfo.H:59
Holds information regarding nearest wall point. Used in wall distance calculation.
Class used to pass additional data in.
scalar yPlusCutOff
Cut off distance.
Holds information (coordinate and yStar) regarding nearest wall point.
bool update(const point &, const WallLocationYPlus< WallLocation > &w2, const scalar tol, TrackingYPlus &td)
Evaluate distance to point. Update distSqr, origin from whomever.
WallLocationYPlus()
Construct null.
Holds information regarding nearest wall point. Used in wall distance calculation.
Definition: wallPoint.H:59
Namespace for OpenFOAM.