FreeFOAM The Cross-Platform CFD Toolkit
wallPointYPlus.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 | Copyright (C) 1991-2010 OpenCFD Ltd.
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 initialized to GREAT and
33  yStar to 1.
34 
35 SourceFiles
36  wallPointYPlusI.H
37  wallPointYPlus.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef wallPointYPlus_H
42 #define wallPointYPlus_H
43 
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 
52 /*---------------------------------------------------------------------------*\
53  Class wallPointYPlus Declaration
54 \*---------------------------------------------------------------------------*/
55 
57 :
58  public wallPointData<scalar>
59 {
60 
61  // Private Member Functions
62 
63  //- Evaluate distance to point. Update distSqr, origin from whomever
64  // is nearer pt. Return true if w2 is closer to point,
65  // false otherwise.
66  inline bool update
67  (
68  const point&,
69  const wallPointYPlus& w2,
70  const scalar tol
71  );
72 
73 public:
74 
75  // Static data members
76 
77  //- cut-off value for y+
78  static scalar yPlusCutOff;
79 
80 
81  // Constructors
82 
83  //- Construct null
84  inline wallPointYPlus();
85 
86  //- Construct from origin, yStar, distance
87  inline wallPointYPlus
88  (
89  const point& origin,
90  const scalar yStar,
91  const scalar distSqr
92  );
93 
94 
95  // Member Functions
96 
97  // Needed by meshWave
98 
99  //- Influence of neighbouring face.
100  // Calls update(...) with cellCentre of cellI
101  inline bool updateCell
102  (
103  const polyMesh& mesh,
104  const label thisCellI,
105  const label neighbourFaceI,
106  const wallPointYPlus& neighbourWallInfo,
107  const scalar tol
108  );
109 
110  //- Influence of neighbouring cell.
111  // Calls update(...) with faceCentre of faceI
112  inline bool updateFace
113  (
114  const polyMesh& mesh,
115  const label thisFaceI,
116  const label neighbourCellI,
117  const wallPointYPlus& neighbourWallInfo,
118  const scalar tol
119  );
120 
121  //- Influence of different value on same face.
122  // Merge new and old info.
123  // Calls update(...) with faceCentre of faceI
124  inline bool updateFace
125  (
126  const polyMesh& mesh,
127  const label thisFaceI,
128  const wallPointYPlus& neighbourWallInfo,
129  const scalar tol
130  );
131 };
132 
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 
137 } // End namespace Foam
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 #endif
146 
147 // ************************ vim: set sw=4 sts=4 et: ************************ //