BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / applications / utilities / preProcessing / wallFunctionTable / tabulatedWallFunction / SpaldingsLaw / SpaldingsLaw.H
blob7f9f4c7a9130212f2181837fbee0431fbeec7d54
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
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
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
19     for more details.
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/>.
24 Class
25     Foam::tabulatedWallFunctions::SpaldingsLaw
27 Description
28     Computes U+ as a function of Reynolds number by inverting Spaldings law.
30     Example dictionary specification:
32         tabulatedWallFunction SpaldingsLaw;
34         // Output table info
35         tableName       uPlusWallFunctionData; // Output table name
36         log10           yes;                // Rey interpreted as log10(Rey)
37         dx              0.2;                // Interval log10(Rey)
38         x0              -3;                 // Minimum log10(Rey)
39         xMax            7;                  // Maximum log10(Rey)
41         SpaldingsLawCoeffs
42         {
43             kappa           0.41;           // Von Karman constant
44             E               9.8;            // Law-of-the-wall E coefficient
45         }
48 SourceFiles
49     SpaldingsLaw.C
51 \*---------------------------------------------------------------------------*/
53 #ifndef SpaldingsLaw_H
54 #define SpaldingsLaw_H
56 #include "tabulatedWallFunction.H"
58 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60 namespace Foam
62 namespace tabulatedWallFunctions
65 /*---------------------------------------------------------------------------*\
66                         Class SpaldingsLaw Declaration
67 \*---------------------------------------------------------------------------*/
69 class SpaldingsLaw
71     public tabulatedWallFunction
73 protected:
75     // Protected data
77         //- Von Karman constant
78         scalar kappa_;
80         //- Law-of-the-wall E coefficient
81         scalar E_;
84         // Newton iteration solution properties
86             //- Maximum number of iterations
87             static const label maxIters_;
89             //- Tolerance
90             static const scalar tolerance_;
93     // Protected Member Functions
95         //- Invert the function
96         virtual void invertFunction();
99 public:
101     //- Run-time type information
102     TypeName("SpaldingsLaw");
105     // Constructors
106     SpaldingsLaw(const dictionary& dict, const polyMesh& mesh);
108     //- Destructor
109     virtual ~SpaldingsLaw();
112     // Member Functions
114         // Access
116             //- Return y+ as a function of u+
117             virtual scalar yPlus(const scalar uPlus) const;
119             //- Return Reynolds number as a function of u+
120             virtual scalar Re(const scalar uPlus) const;
123         // I-O
125             //- Write to Ostream
126             virtual void writeData(Ostream& os) const;
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 } // End namespace tabulatedWallFunctions
133 } // End namespace Foam
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 #endif
139 // ************************************************************************* //