00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. 00006 \\/ M anipulation | 00007 ------------------------------------------------------------------------------- 00008 License 00009 This file is part of OpenFOAM. 00010 00011 OpenFOAM is free software: you can redistribute it and/or modify it 00012 under the terms of the GNU General Public License as published by 00013 the Free Software Foundation, either version 3 of the License, or 00014 (at your option) any later version. 00015 00016 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT 00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00018 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00019 for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. 00023 00024 Class 00025 Foam::wallPointYPlus 00026 00027 Description 00028 Holds information (coordinate and yStar) regarding nearest wall point. 00029 00030 Used in VanDriest wall damping where the interest is in y+ but only 00031 needs to be calculated up to e.g. y+ < 200. In all other cells/faces 00032 the damping function becomes 1, since y gets initialized to GREAT and 00033 yStar to 1. 00034 00035 SourceFiles 00036 wallPointYPlusI.H 00037 wallPointYPlus.C 00038 00039 \*---------------------------------------------------------------------------*/ 00040 00041 #ifndef wallPointYPlus_H 00042 #define wallPointYPlus_H 00043 00044 #include <meshTools/wallPointData.H> 00045 00046 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00047 00048 namespace Foam 00049 { 00050 00051 00052 /*---------------------------------------------------------------------------*\ 00053 Class wallPointYPlus Declaration 00054 \*---------------------------------------------------------------------------*/ 00055 00056 class wallPointYPlus 00057 : 00058 public wallPointData<scalar> 00059 { 00060 00061 // Private Member Functions 00062 00063 //- Evaluate distance to point. Update distSqr, origin from whomever 00064 // is nearer pt. Return true if w2 is closer to point, 00065 // false otherwise. 00066 inline bool update 00067 ( 00068 const point&, 00069 const wallPointYPlus& w2, 00070 const scalar tol 00071 ); 00072 00073 public: 00074 00075 // Static data members 00076 00077 //- cut-off value for y+ 00078 static scalar yPlusCutOff; 00079 00080 00081 // Constructors 00082 00083 //- Construct null 00084 inline wallPointYPlus(); 00085 00086 //- Construct from origin, yStar, distance 00087 inline wallPointYPlus 00088 ( 00089 const point& origin, 00090 const scalar yStar, 00091 const scalar distSqr 00092 ); 00093 00094 00095 // Member Functions 00096 00097 // Needed by meshWave 00098 00099 //- Influence of neighbouring face. 00100 // Calls update(...) with cellCentre of cellI 00101 inline bool updateCell 00102 ( 00103 const polyMesh& mesh, 00104 const label thisCellI, 00105 const label neighbourFaceI, 00106 const wallPointYPlus& neighbourWallInfo, 00107 const scalar tol 00108 ); 00109 00110 //- Influence of neighbouring cell. 00111 // Calls update(...) with faceCentre of faceI 00112 inline bool updateFace 00113 ( 00114 const polyMesh& mesh, 00115 const label thisFaceI, 00116 const label neighbourCellI, 00117 const wallPointYPlus& neighbourWallInfo, 00118 const scalar tol 00119 ); 00120 00121 //- Influence of different value on same face. 00122 // Merge new and old info. 00123 // Calls update(...) with faceCentre of faceI 00124 inline bool updateFace 00125 ( 00126 const polyMesh& mesh, 00127 const label thisFaceI, 00128 const wallPointYPlus& neighbourWallInfo, 00129 const scalar tol 00130 ); 00131 }; 00132 00133 00134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00135 00136 00137 } // End namespace Foam 00138 00139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00140 00141 #include <finiteVolume/wallPointYPlusI.H> 00142 00143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00144 00145 #endif 00146 00147 // ************************ vim: set sw=4 sts=4 et: ************************ //