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::general
28 Computes U+ as a function of Reynolds number by inverting table of
31 Example dictionary specification:
33 tabulatedWallFunction general;
36 tableName uPlusWallFunctionData; // Output table name
37 log10 yes; // Re interpreted as log10(Rey)
38 dx 0.2; // Interval log10(Rey)
39 x0 -3; // Minimum log10(Rey)
40 xMax 7; // Maximum log10(Rey)
44 interpType linear; // Interpolation method
45 log10YPlus true; // y+ values defined as log10(y+)
46 log10UPlus true; // U+ values defined as log10(y+)
49 (yPlusValue0 uPlusValue0)
51 (yPlusValueN uPlusValueN)
60 \*---------------------------------------------------------------------------*/
65 #include "tabulatedWallFunction.H"
66 #include "NamedEnum.H"
69 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
73 namespace tabulatedWallFunctions
76 /*---------------------------------------------------------------------------*\
77 Class general Declaration
78 \*---------------------------------------------------------------------------*/
82 public tabulatedWallFunction
88 //- Enumeration listing available interpolation types
89 enum interpolationType
94 static const NamedEnum<interpolationType, 1> interpolationTypeNames_;
101 //- Type of interpolation to apply when inverting the data set
102 interpolationType interpType_;
110 //- Are y+ values entered as log10(y+)?
113 //- Are U+ values entered as log10(U+)?
117 // Protected Member Functions
120 virtual void invertTable();
123 virtual scalar interpolate
133 //- Run-time type information
138 general(const dictionary& dict, const polyMesh& mesh);
148 //- Return y+ as a function of u+
149 virtual scalar yPlus(const scalar uPlus) const;
151 //- Return Reynolds number as a function of u+
152 virtual scalar Re(const scalar uPlus) const;
158 virtual void writeData(Ostream& os) const;
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 } // End namespace tabulatedWallFunctions
165 } // End namespace Foam
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 // ************************************************************************* //