initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / src / finiteVolume / fvMesh / wallDist / wallPointYPlus / wallPointYPlus.H
blob33a11f44b7183c16e588207a9d4a5d1a999df214
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     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
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::wallPointYPlus
28 Description
29     Holds information (coordinate and yStar) regarding nearest wall point.
31     Used in VanDriest wall damping where the interest is in y+ but only
32     needs to be calculated up to e.g. y+ < 200. In all other cells/faces
33     the damping function becomes 1, since y gets initialized to GREAT and
34     yStar to 1.
36 SourceFiles
37     wallPointYPlusI.H
38     wallPointYPlus.C
40 \*---------------------------------------------------------------------------*/
42 #ifndef wallPointYPlus_H
43 #define wallPointYPlus_H
45 #include "wallPointData.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 namespace Foam
53 /*---------------------------------------------------------------------------*\
54                            Class wallPointYPlus Declaration
55 \*---------------------------------------------------------------------------*/
57 class wallPointYPlus
59     public wallPointData<scalar>
62     // Private Member Functions
64         //- Evaluate distance to point. Update distSqr, origin from whomever
65         //  is nearer pt. Return true if w2 is closer to point,
66         //  false otherwise.
67         inline bool update
68         (
69             const point&,
70             const wallPointYPlus& w2,
71             const scalar tol
72         );
74 public:
76     // Static data members
78         //- cut-off value for y+
79         static scalar yPlusCutOff;
82     // Constructors
84         //- Construct null
85         inline wallPointYPlus();
87         //- Construct from origin, yStar, distance
88         inline wallPointYPlus
89         (
90             const point& origin,
91             const scalar yStar,
92             const scalar distSqr
93         );
96     // Member Functions
98         // Needed by meshWave
100             //- Influence of neighbouring face.
101             //  Calls update(...) with cellCentre of cellI
102             inline bool updateCell
103             (
104                 const polyMesh& mesh,
105                 const label thisCellI,
106                 const label neighbourFaceI,
107                 const wallPointYPlus& neighbourWallInfo,
108                 const scalar tol
109             );
111             //- Influence of neighbouring cell.
112             //  Calls update(...) with faceCentre of faceI
113             inline bool updateFace
114             (
115                 const polyMesh& mesh,
116                 const label thisFaceI,
117                 const label neighbourCellI,
118                 const wallPointYPlus& neighbourWallInfo,
119                 const scalar tol
120             );
122             //- Influence of different value on same face.
123             //  Merge new and old info.
124             //  Calls update(...) with faceCentre of faceI
125             inline bool updateFace
126             (
127                 const polyMesh& mesh,
128                 const label thisFaceI,
129                 const wallPointYPlus& neighbourWallInfo,
130                 const scalar tol
131             );
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 } // End namespace Foam
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 #include "wallPointYPlusI.H"
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 #endif
148 // ************************************************************************* //