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 | Copyright (C) 2011 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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.
20 
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/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "tabulatedWallFunction.H"
27 #include "Time.H"
28 
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
33  namespace tabulatedWallFunctions
34  {
35  defineTypeNameAndDebug(tabulatedWallFunction, 0);
36  defineRunTimeSelectionTable(tabulatedWallFunction, dictionary);
37  }
38 }
39 
40 
41 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
42 
44 (
45  const dictionary& dict,
46  const polyMesh& mesh,
47  const word& name
48 )
49 :
50  dict_(dict),
51  mesh_(mesh),
52  coeffDict_(dict.subDict(name + "Coeffs")),
53  invertedTableName_(dict.lookup("invertedTableName")),
54  invertedTable_(invertedTableName_, mesh_, dict, true)
55 {}
56 
57 
58 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
59 
61 {}
62 
63 
64 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
65 
67 {
68  if (invertedTable_.log10())
69  {
70  invertedTable_.note() =
71  "U+ as a function of log10(Re) computed using " + type();
72  }
73  else
74  {
75  invertedTable_.note() =
76  "U+ as a function of Re computed using " + type();
77  }
78 
79  Info<< "Writing inverted table to\n " << invertedTable_.objectPath()
80  << endl;
81 
82  invertedTable_.write();
83 }
84 
85 
86 // ************************************************************************* //
tabulatedWallFunction.H
Foam::defineRunTimeSelectionTable
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Foam::Ostream::write
virtual Ostream & write(const token &)=0
Write next token to stream.
Foam::Info
messageStream Info
Foam::tabulatedWallFunctions::tabulatedWallFunction::tabulatedWallFunction
tabulatedWallFunction(const dictionary &dict, const polyMesh &mesh, const word &name)
Constructor.
dict
dictionary dict
Definition: searchingEngine.H:14
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::tabulatedWallFunctions::tabulatedWallFunction::~tabulatedWallFunction
virtual ~tabulatedWallFunction()
Destructor.
Foam::type
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:588
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
Foam::tabulatedWallFunctions::tabulatedWallFunction::write
virtual void write()
Write.
Foam::name
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
lookup
stressControl lookup("compactNormalStress") >> compactNormalStress