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-2013 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 Istream
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 constIsoSolidTransport& operator=
138  (
140  );
141  inline void operator+=(const constIsoSolidTransport&);
142  inline void operator-=(const constIsoSolidTransport&);
143 
144 
145  // Friend operators
146 
147  friend constIsoSolidTransport operator* <Thermo>
148  (
149  const scalar,
151  );
152 
153 
154  // Ostream Operator
155 
156  friend Ostream& operator<< <Thermo>
157  (
158  Ostream&,
160  );
161 };
162 
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 } // End namespace Foam
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 #include "constIsoSolidTransportI.H"
171 
172 #ifdef NoRepository
173 # include "constIsoSolidTransport.C"
174 #endif
175 
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 
178 #endif
179 
180 // ************************************************************************* //
Foam::constIsoSolidTransport::typeName
static word typeName()
Return the instantiated type name.
Definition: constIsoSolidTransport.H:109
p
p
Definition: pEqn.H:62
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::constIsoSolidTransport::operator+=
void operator+=(const constIsoSolidTransport &)
Definition: constIsoSolidTransportI.H:115
Foam::constIsoSolidTransport::isotropic
static const bool isotropic
Is the thermal conductivity isotropic.
Definition: constIsoSolidTransport.H:115
Foam::constIsoSolidTransport::Kappa
vector Kappa(const scalar p, const scalar T) const
Un-isotropic thermal conductivity [W/mK].
Definition: constIsoSolidTransportI.H:76
Foam::constIsoSolidTransport::constIsoSolidTransport
constIsoSolidTransport(const Thermo &t, const scalar kappa)
Construct from components.
constIsoSolidTransport.C
constIsoSolidTransportI.H
Foam::constIsoSolidTransport::kappa_
scalar kappa_
Constant isotropic thermal conductivity.
Definition: constIsoSolidTransport.H:76
Foam::constIsoSolidTransport::write
void write(Ostream &os) const
Write to Ostream.
Foam::constIsoSolidTransport::kappa
scalar kappa(const scalar p, const scalar T) const
Isotropic thermal conductivity [W/mK].
Definition: constIsoSolidTransportI.H:69
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:55
Foam::constIsoSolidTransport::mu
scalar mu(const scalar p, const scalar T) const
Dynamic viscosity [kg/ms].
Definition: constIsoSolidTransportI.H:84
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::constIsoSolidTransport::New
static autoPtr< constIsoSolidTransport > New(const dictionary &dict)
Definition: constIsoSolidTransportI.H:55
Foam::Vector< scalar >
vector.H
Foam::constIsoSolidTransport::operator-=
void operator-=(const constIsoSolidTransport &)
Definition: constIsoSolidTransportI.H:131
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::constIsoSolidTransport::alphah
scalar alphah(const scalar p, const scalar T) const
Thermal diffusivity of enthalpy [kg/ms].
Definition: constIsoSolidTransportI.H:93
Foam::constIsoSolidTransport
Constant properties Transport package. Templated into a given thermodynamics package (needed for ther...
Definition: constIsoSolidTransport.H:47