1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
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
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/>.
25 Foam::tabulatedWallFunctions::SpaldingsLaw
28 Computes U+ as a function of Reynolds number by inverting Spaldings law.
30 Example dictionary specification:
32 tabulatedWallFunction SpaldingsLaw;
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)
43 kappa 0.41; // Von Karman constant
44 E 9.8; // Law-of-the-wall E coefficient
51 \*---------------------------------------------------------------------------*/
53 #ifndef SpaldingsLaw_H
54 #define SpaldingsLaw_H
56 #include "tabulatedWallFunction.H"
58 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62 namespace tabulatedWallFunctions
65 /*---------------------------------------------------------------------------*\
66 Class SpaldingsLaw Declaration
67 \*---------------------------------------------------------------------------*/
71 public tabulatedWallFunction
77 //- Von Karman constant
80 //- Law-of-the-wall E coefficient
84 // Newton iteration solution properties
86 //- Maximum number of iterations
87 static const label maxIters_;
90 static const scalar tolerance_;
93 // Protected Member Functions
95 //- Invert the function
96 virtual void invertFunction();
101 //- Run-time type information
102 TypeName("SpaldingsLaw");
106 SpaldingsLaw(const dictionary& dict, const polyMesh& mesh);
109 virtual ~SpaldingsLaw();
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;
126 virtual void writeData(Ostream& os) const;
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 } // End namespace tabulatedWallFunctions
133 } // End namespace Foam
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 // ************************************************************************* //