constTransport.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) 2011-2017 OpenFOAM Foundation
9 Copyright (C) 2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::constTransport
29
30Group
31 grpSpecieTransport
32
33Description
34 Constant properties Transport package.
35 Templated into a given thermodynamics package (needed for thermal
36 conductivity).
37
38SourceFiles
39 constTransportI.H
40 constTransport.C
41
42\*---------------------------------------------------------------------------*/
43
44#ifndef constTransport_H
45#define constTransport_H
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52// Forward Declarations
53
54template<class Thermo> class constTransport;
55
56template<class Thermo>
57inline constTransport<Thermo> operator+
58(
61);
62
63template<class Thermo>
64inline constTransport<Thermo> operator*
65(
66 const scalar,
68);
69
70template<class Thermo>
71Ostream& operator<<
72(
73 Ostream&,
75);
76
77
78/*---------------------------------------------------------------------------*\
79 Class constTransport Declaration
80\*---------------------------------------------------------------------------*/
81
82template<class Thermo>
84:
85 public Thermo
86{
87 // Private Data
88
89 //- Constant dynamic viscosity [Pa.s]
90 scalar mu_;
91
92 //- Reciprocal Prandtl Number [-]
93 scalar rPr_;
94
95
96 // Private Member Functions
97
98 //- Construct from components
99 inline constTransport
100 (
101 const Thermo& t,
102 const scalar mu,
103 const scalar Pr
104 );
105
106
107public:
108
109 // Generated Methods: copy construct, copy assignment
110
111
112 // Constructors
113
114 //- Construct as named copy
115 inline constTransport(const word&, const constTransport&);
116
117 //- Construct from dictionary
118 explicit constTransport(const dictionary& dict);
119
120 //- Construct and return a clone
121 inline autoPtr<constTransport> clone() const;
122
123 // Selector from dictionary
124 inline static autoPtr<constTransport> New(const dictionary& dict);
125
126
127 // Member Functions
128
129 //- Return the instantiated type name
130 static word typeName()
131 {
132 return "const<" + Thermo::typeName() + '>';
133 }
134
135 //- Dynamic viscosity [kg/ms]
136 inline scalar mu(const scalar p, const scalar T) const;
137
138 //- Thermal conductivity [W/mK]
139 inline scalar kappa(const scalar p, const scalar T) const;
140
141 //- Thermal diffusivity of enthalpy [kg/ms]
142 inline scalar alphah(const scalar p, const scalar T) const;
143
144 // Species diffusivity
145 //inline scalar D(const scalar p, const scalar T) const;
146
147 //- Write to Ostream
148 void write(Ostream& os) const;
149
150
151 // Member Operators
152
153 inline void operator+=(const constTransport&);
154
155 inline void operator*=(const scalar);
156
157
158 // Friend Operators
160 friend constTransport operator+ <Thermo>
161 (
162 const constTransport&,
163 const constTransport&
164 );
166 friend constTransport operator* <Thermo>
167 (
168 const scalar,
169 const constTransport&
170 );
171
172
173 // IOstream Operators
175 friend Ostream& operator<< <Thermo>
176 (
177 Ostream&,
178 const constTransport&
179 );
180};
181
182
183// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184
185} // End namespace Foam
186
187// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188
189#include "constTransportI.H"
190
191#ifdef NoRepository
192 #include "constTransport.C"
193#endif
194
195// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196
197#endif
198
199// ************************************************************************* //
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
Constant properties Transport package. Templated into a given thermodynamics package (needed for ther...
void operator+=(const constTransport &)
scalar kappa(const scalar p, const scalar T) const
Thermal conductivity [W/mK].
static word typeName()
Return the instantiated type name.
autoPtr< constTransport > clone() const
Construct and return a clone.
static autoPtr< constTransport > New(const dictionary &dict)
scalar alphah(const scalar p, const scalar T) const
Thermal diffusivity of enthalpy [kg/ms].
void operator*=(const scalar)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A class for handling words, derived from Foam::string.
Definition: word.H:68
volScalarField & p
const volScalarField & T
const volScalarField & mu
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
runTime write()
dictionary dict
dimensionedScalar Pr("Pr", dimless, laminarTransport)