tabulatedWallFunction.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2017 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "tabulatedWallFunction.H"
29 #include "Time.H"
30 
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35  namespace tabulatedWallFunctions
36  {
37  defineTypeNameAndDebug(tabulatedWallFunction, 0);
38  defineRunTimeSelectionTable(tabulatedWallFunction, dictionary);
39  }
40 }
41 
42 
43 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
44 
46 (
47  const dictionary& dict,
48  const polyMesh& mesh,
49  const word& name
50 )
51 :
52  dict_(dict),
53  mesh_(mesh),
54  coeffDict_(dict.optionalSubDict(name + "Coeffs")),
55  invertedTableName_(dict.lookup("invertedTableName")),
56  invertedTable_(invertedTableName_, mesh_, dict, true)
57 {}
58 
59 
60 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
61 
63 {}
64 
65 
66 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
67 
69 {
70  if (invertedTable_.log10())
71  {
72  invertedTable_.note() =
73  "U+ as a function of log10(Re) computed using " + type();
74  }
75  else
76  {
77  invertedTable_.note() =
78  "U+ as a function of Re computed using " + type();
79  }
80 
81  Info<< "Writing inverted table to\n " << invertedTable_.objectPath()
82  << endl;
83 
84  invertedTable_.write();
85 }
86 
87 
88 // ************************************************************************* //
dictionary dict
tabulatedWallFunction(const dictionary &dict, const polyMesh &mesh, const word &name)
Constructor.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:487
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: POSIX.C:752
dynamicFvMesh & mesh
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:52
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
defineTypeNameAndDebug(combustionModel, 0)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Namespace for OpenFOAM.