OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

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-2009 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     Foam::wallPointYPlus
00027 
00028 Description
00029     Holds information (coordinate and yStar) regarding nearest wall point.
00030 
00031     Used in VanDriest wall damping where the interest is in y+ but only
00032     needs to be calculated up to e.g. y+ < 200. In all other cells/faces
00033     the damping function becomes 1, since y gets initialized to GREAT and
00034     yStar to 1.
00035 
00036 SourceFiles
00037     wallPointYPlusI.H
00038     wallPointYPlus.C
00039 
00040 \*---------------------------------------------------------------------------*/
00041 
00042 #ifndef wallPointYPlus_H
00043 #define wallPointYPlus_H
00044 
00045 #include "wallPointData.H"
00046 
00047 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00048 
00049 namespace Foam
00050 {
00051 
00052 
00053 /*---------------------------------------------------------------------------*\
00054                            Class wallPointYPlus Declaration
00055 \*---------------------------------------------------------------------------*/
00056 
00057 class wallPointYPlus
00058 :
00059     public wallPointData<scalar>
00060 {
00061 
00062     // Private Member Functions
00063 
00064         //- Evaluate distance to point. Update distSqr, origin from whomever
00065         //  is nearer pt. Return true if w2 is closer to point,
00066         //  false otherwise.
00067         inline bool update
00068         (
00069             const point&,
00070             const wallPointYPlus& w2,
00071             const scalar tol
00072         );
00073 
00074 public:
00075 
00076     // Static data members
00077 
00078         //- cut-off value for y+
00079         static scalar yPlusCutOff;
00080 
00081 
00082     // Constructors
00083 
00084         //- Construct null
00085         inline wallPointYPlus();
00086 
00087         //- Construct from origin, yStar, distance
00088         inline wallPointYPlus
00089         (
00090             const point& origin,
00091             const scalar yStar,
00092             const scalar distSqr
00093         );
00094 
00095 
00096     // Member Functions
00097 
00098         // Needed by meshWave
00099 
00100             //- Influence of neighbouring face.
00101             //  Calls update(...) with cellCentre of cellI
00102             inline bool updateCell
00103             (
00104                 const polyMesh& mesh,
00105                 const label thisCellI,
00106                 const label neighbourFaceI,
00107                 const wallPointYPlus& neighbourWallInfo,
00108                 const scalar tol
00109             );
00110 
00111             //- Influence of neighbouring cell.
00112             //  Calls update(...) with faceCentre of faceI
00113             inline bool updateFace
00114             (
00115                 const polyMesh& mesh,
00116                 const label thisFaceI,
00117                 const label neighbourCellI,
00118                 const wallPointYPlus& neighbourWallInfo,
00119                 const scalar tol
00120             );
00121 
00122             //- Influence of different value on same face.
00123             //  Merge new and old info.
00124             //  Calls update(...) with faceCentre of faceI
00125             inline bool updateFace
00126             (
00127                 const polyMesh& mesh,
00128                 const label thisFaceI,
00129                 const wallPointYPlus& neighbourWallInfo,
00130                 const scalar tol
00131             );
00132 };
00133 
00134 
00135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00136 
00137 
00138 } // End namespace Foam
00139 
00140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00141 
00142 #include "wallPointYPlusI.H"
00143 
00144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00145 
00146 #endif
00147 
00148 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd