tabulatedTransport.H
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) 2020 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::tabulatedTransport
28
29Description
30 Transport properties package using non-uniform tabulated data for
31 viscosity and thermal conductivity vs temperature.
32
33Usage
34
35 \table
36 Property | Description
37 mu | Dynamic viscosity vs temperature table
38 kappa | Thermal conductivity vs temperature table
39 \endtable
40
41 Example of the specification of the transport properties:
42 \verbatim
43 transport
44 {
45 mu
46 (
47 (200 1.82e-05)
48 (350 2.61e-05)
49 (400 3.93e-05)
50 );
51
52 kappa
53 (
54 (200 2.56e-5)
55 (350 3.33e-5)
56 (400 4.72e-5)
57 );
58 }
59 \endverbatim
60
61SourceFiles
62 tabulatedTransportI.H
63 tabulatedTransport.C
64
65See also
66 Foam::thermophysicalFunctions::nonUniformTable
67
68\*---------------------------------------------------------------------------*/
69
70#ifndef tabulatedTransport_H
71#define tabulatedTransport_H
72
74
75// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
76
77namespace Foam
78{
79
80// Forward Declarations
81template<class Thermo> class tabulatedTransport;
82
83template<class Thermo>
84Ostream& operator<<(Ostream&, const tabulatedTransport<Thermo>&);
85
86
87/*---------------------------------------------------------------------------*\
88 Class tabulatedTransport Declaration
89\*---------------------------------------------------------------------------*/
90
91template<class Thermo>
93:
94 public Thermo
95{
96 // Private Data
97
98 //- Dynamic viscosity table [Pa.s]
99 nonUniformTable mu_;
101 //- Thermal conductivity table [W/m/K]
102 nonUniformTable kappa_;
103
104
105 // Private Member Functions
106
107 //- Construct from components
108 inline tabulatedTransport
109 (
110 const Thermo& t,
111 const nonUniformTable& muPoly,
112 const nonUniformTable& kappaPoly
113 );
114
115
116public:
117
118 // Constructors
119
120 //- Construct as named copy
121 inline tabulatedTransport(const word&, const tabulatedTransport&);
122
123 //- Construct from dictionary
124 explicit tabulatedTransport(const dictionary& dict);
125
126 //- Return a clone
127 inline autoPtr<tabulatedTransport> clone() const;
128
129 // Selector from dictionary
130 inline static autoPtr<tabulatedTransport> New(const dictionary& dict);
131
132
133 // Member Functions
134
135 //- The instantiated type name
136 static word typeName()
137 {
138 return "tabulated<" + Thermo::typeName() + '>';
139 }
140
141 //- Dynamic viscosity [kg/m/s]
142 inline scalar mu(const scalar p, const scalar T) const;
143
144 //- Thermal conductivity [W/m/K]
145 inline scalar kappa(const scalar p, const scalar T) const;
146
147 //- Thermal diffusivity of enthalpy [kg/m/s]
148 inline scalar alphah(const scalar p, const scalar T) const;
149
150 // Species diffusivity
151 // inline scalar D(const scalar p, const scalar T) const;
152
153 //- Write to Ostream
154 void write(Ostream& os) const;
155
156
157 // Ostream Operator
158
159 friend Ostream& operator<< <Thermo>
160 (
161 Ostream&,
162 const tabulatedTransport&
163 );
164};
165
166
167// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168
169} // End namespace Foam
170
171// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172
173#include "tabulatedTransportI.H"
174
175#ifdef NoRepository
176 #include "tabulatedTransport.C"
177#endif
178
179// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180
181#endif
182
183// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Transport properties package using non-uniform tabulated data for viscosity and thermal conductivity ...
scalar kappa(const scalar p, const scalar T) const
Thermal conductivity [W/m/K].
static word typeName()
The instantiated type name.
autoPtr< tabulatedTransport > clone() const
Return a clone.
static autoPtr< tabulatedTransport > New(const dictionary &dict)
scalar alphah(const scalar p, const scalar T) const
Thermal diffusivity of enthalpy [kg/m/s].
A class for handling words, derived from Foam::string.
Definition: word.H:68
volScalarField & p
const volScalarField & mu
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:83
runTime write()
dictionary dict