OpenFOAM logo
Open Source CFD Toolkit

wallPointYPlus.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2005 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 the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     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, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     wallPointYPlus
00027 
00028 Description
00029     Holds information (coordinate and yStar) regarding nearest wall point.
00030     Used in VanDriest wall damping where the interest is in y+ but only
00031     needs to be calculated upto e.g. y+ < 200. In all other cells/faces
00032     (since y gets initialized to GREAT and yStar to 1) the damping function
00033     becomes 1
00034 
00035 SourceFiles
00036     wallPointYPlusI.H
00037     wallPointYPlus.C
00038 
00039 \*---------------------------------------------------------------------------*/
00040 
00041 #ifndef wallPointYPlus_H
00042 #define wallPointYPlus_H
00043 
00044 #include "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 "wallPointYPlusI.H"
00142 
00143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00144 
00145 #endif
00146 
00147 // ************************************************************************* //
For further information go to www.openfoam.org