wallPointYPlus.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-2021 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::wallPointYPlus
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  Note: should feed the additional argument (yPlusCutoff) through as a
36  template argument into FaceCellWave
37 
38 SourceFiles
39  wallPointYPlusI.H
40  wallPointYPlus.C
41 
42 \*---------------------------------------------------------------------------*/
43 
44 #ifndef wallPointYPlus_H
45 #define wallPointYPlus_H
46 
47 #include "wallPointData.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 
55 /*---------------------------------------------------------------------------*\
56  Class wallPointYPlus Declaration
57 \*---------------------------------------------------------------------------*/
58 
59 class wallPointYPlus
60 :
61  public wallPointData<scalar>
62 {
63  // Private Member Functions
64 
65  //- Evaluate distance to point. Update distSqr, origin from whomever
66  // is nearer pt. Return true if w2 is closer to point,
67  // false otherwise.
68  template<class TrackingData>
69  inline bool update
70  (
71  const point&,
72  const wallPointYPlus& w2,
73  const scalar tol,
74  TrackingData& td
75  );
76 
77 
78 public:
79 
80  // Static Data Members
81 
82  //- cut-off value for y+
83  static scalar yPlusCutOff;
84 
85 
86  // Constructors
87 
88  //- Construct null
89  inline wallPointYPlus();
90 
91  //- Construct from origin, yStar, distance
92  inline wallPointYPlus
93  (
94  const point& origin,
95  const scalar yStar,
96  const scalar distSqr
97  );
98 
99 
100  // Member Functions
101 
102  // Needed by FaceCellWave
103 
104  //- Influence of neighbouring face.
105  // Calls update(...) with cellCentre of celli
106  template<class TrackingData>
107  inline bool updateCell
108  (
109  const polyMesh& mesh,
110  const label thisCelli,
111  const label neighbourFacei,
112  const wallPointYPlus& neighbourWallInfo,
113  const scalar tol,
114  TrackingData& td
115  );
116 
117  //- Influence of neighbouring cell.
118  // Calls update(...) with faceCentre of facei
119  template<class TrackingData>
120  inline bool updateFace
121  (
122  const polyMesh& mesh,
123  const label thisFacei,
124  const label neighbourCelli,
125  const wallPointYPlus& neighbourWallInfo,
126  const scalar tol,
127  TrackingData& td
128  );
129 
130  //- Influence of different value on same face.
131  // Merge new and old info.
132  // Calls update(...) with faceCentre of facei
133  template<class TrackingData>
134  inline bool updateFace
135  (
136  const polyMesh& mesh,
137  const label thisFacei,
138  const wallPointYPlus& neighbourWallInfo,
139  const scalar tol,
140  TrackingData& td
141  );
142 };
143 
144 
145 //- Data associated with pointEdgePoint type as contiguous as underlying type
146 template<>
147 inline bool contiguous<wallPointYPlus>()
148 {
149  return contiguous<wallPointData<scalar>>();
150 }
151 
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 } // End namespace Foam
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 #include "wallPointYPlusI.H"
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 #endif
164 
165 // ************************************************************************* //
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
#define w2
Definition: blockCreate.C:32
bool updateCell(const polyMesh &mesh, const label thisCelli, const label neighbourFacei, const wallPointYPlus &neighbourWallInfo, const scalar tol, TrackingData &td)
Influence of neighbouring face.
dynamicFvMesh & mesh
wallPointYPlus()
Construct null.
Holds information (coordinate and normal) regarding nearest wall point.
Definition: wallPointData.H:48
const point & origin() const
Definition: wallPointI.H:101
scalar distSqr() const
Definition: wallPointI.H:113
static scalar yPlusCutOff
cut-off value for y+
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
bool contiguous< wallPointYPlus >()
Data associated with pointEdgePoint type as contiguous as underlying type.
Holds information (coordinate and yStar) regarding nearest wall point.
Namespace for OpenFOAM.
bool updateFace(const polyMesh &mesh, const label thisFacei, const label neighbourCelli, const wallPointYPlus &neighbourWallInfo, const scalar tol, TrackingData &td)
Influence of neighbouring cell.