1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
28 Holds information (coordinate and yStar) regarding nearest wall point.
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
35 Note: should feed the additional argument (yPlusCutoff) through as a
36 template argument into FaceCellWave
42 \*---------------------------------------------------------------------------*/
44 #ifndef wallPointYPlus_H
45 #define wallPointYPlus_H
47 #include "wallPointData.H"
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 /*---------------------------------------------------------------------------*\
56 Class wallPointYPlus Declaration
57 \*---------------------------------------------------------------------------*/
61 public wallPointData<scalar>
66 // Private Member Functions
68 //- Evaluate distance to point. Update distSqr, origin from whomever
69 // is nearer pt. Return true if w2 is closer to point,
71 template<class TrackingData>
75 const wallPointYPlus& w2,
82 // Static data members
84 //- cut-off value for y+
85 static scalar yPlusCutOff;
91 inline wallPointYPlus();
93 //- Construct from origin, yStar, distance
104 // Needed by FaceCellWave
106 //- Influence of neighbouring face.
107 // Calls update(...) with cellCentre of cellI
108 template<class TrackingData>
109 inline bool updateCell
111 const polyMesh& mesh,
112 const label thisCellI,
113 const label neighbourFaceI,
114 const wallPointYPlus& neighbourWallInfo,
119 //- Influence of neighbouring cell.
120 // Calls update(...) with faceCentre of faceI
121 template<class TrackingData>
122 inline bool updateFace
124 const polyMesh& mesh,
125 const label thisFaceI,
126 const label neighbourCellI,
127 const wallPointYPlus& neighbourWallInfo,
132 //- Influence of different value on same face.
133 // Merge new and old info.
134 // Calls update(...) with faceCentre of faceI
135 template<class TrackingData>
136 inline bool updateFace
138 const polyMesh& mesh,
139 const label thisFaceI,
140 const wallPointYPlus& neighbourWallInfo,
147 //- Data associated with pointEdgePoint type as contiguous as underlying type
149 inline bool contiguous<wallPointYPlus>()
151 return contiguous<wallPointData<scalar> >();
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 } // End namespace Foam
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 #include "wallPointYPlusI.H"
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 // ************************************************************************* //