constIsoSolidTransport.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 | Copyright (C) 2011-2017 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 Class
25  Foam::constIsoSolidTransport
26 
27 Description
28  Constant properties Transport package.
29  Templated into a given thermodynamics package (needed for thermal
30  conductivity).
31 
32 SourceFiles
33  constIsoSolidTransportI.H
34  constIsoSolidTransport.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef constIsoSolidTransport_H
39 #define constIsoSolidTransport_H
40 
41 #include "vector.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 template<class Thermo> class constIsoSolidTransport;
49 
50 template<class Thermo>
51 inline constIsoSolidTransport<Thermo> operator*
52 (
53  const scalar,
55 );
56 
57 template<class Thermo>
58 Ostream& operator<<
59 (
60  Ostream&,
62 );
63 
64 
65 /*---------------------------------------------------------------------------*\
66  Class constIsoSolidTransport Declaration
67 \*---------------------------------------------------------------------------*/
68 
69 template<class Thermo>
71 :
72  public Thermo
73 {
74  // Private data
75 
76  //- Constant isotropic thermal conductivity
77  scalar kappa_;
78 
79 
80  // Private Member Functions
81 
82  //- Construct from components
83  inline constIsoSolidTransport(const Thermo& t, const scalar kappa);
84 
85 
86 public:
87 
88  // Constructors
89 
90  //- Construct as named copy
92  (
93  const word&,
95  );
96 
97  //- Construct from dictionary
99 
100  // Selector from dictionary
102  (
103  const dictionary& dict
104  );
105 
106 
107  // Member functions
108 
109  //- Return the instantiated type name
110  static word typeName()
111  {
112  return "constIso<" + Thermo::typeName() + '>';
113  }
114 
115  //- Is the thermal conductivity isotropic
116  static const bool isotropic = true;
117 
118  //- Isotropic thermal conductivity [W/mK]
119  inline scalar kappa(const scalar p, const scalar T) const;
120 
121  //- Un-isotropic thermal conductivity [W/mK]
122  inline vector Kappa(const scalar p, const scalar T) const;
123 
124  //- Dynamic viscosity [kg/ms]
125  inline scalar mu(const scalar p, const scalar T) const;
126 
127  //- Thermal diffusivity of enthalpy [kg/ms]
128  inline scalar alphah(const scalar p, const scalar T) const;
129 
130 
131  //- Write to Ostream
132  void write(Ostream& os) const;
133 
134 
135  // Member operators
136 
137  inline void operator=(const constIsoSolidTransport&);
138  inline void operator+=(const constIsoSolidTransport&);
139 
140 
141  // Friend operators
142 
143  friend constIsoSolidTransport operator* <Thermo>
144  (
145  const scalar,
147  );
148 
149 
150  // Ostream Operator
151 
152  friend Ostream& operator<< <Thermo>
153  (
154  Ostream&,
156  );
157 };
158 
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 } // End namespace Foam
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 #include "constIsoSolidTransportI.H"
167 
168 #ifdef NoRepository
169  #include "constIsoSolidTransport.C"
170 #endif
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 #endif
175 
176 // ************************************************************************* //
static const bool isotropic
Is the thermal conductivity isotropic.
void write(Ostream &os) const
Write to Ostream.
dictionary dict
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
static word typeName()
Return the instantiated type name.
vector Kappa(const scalar p, const scalar T) const
Un-isotropic thermal conductivity [W/mK].
static autoPtr< constIsoSolidTransport > New(const dictionary &dict)
void operator=(const constIsoSolidTransport &)
A class for handling words, derived from string.
Definition: word.H:59
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void operator+=(const constIsoSolidTransport &)
scalar alphah(const scalar p, const scalar T) const
Thermal diffusivity of enthalpy [kg/ms].
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
volScalarField & p
Constant properties Transport package. Templated into a given thermodynamics package (needed for ther...
scalar kappa(const scalar p, const scalar T) const
Isotropic thermal conductivity [W/mK].
Namespace for OpenFOAM.
scalar mu(const scalar p, const scalar T) const
Dynamic viscosity [kg/ms].