constIsoSolidTransport.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 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/m/K]
119  inline scalar kappa(const scalar p, const scalar T) const;
120 
121  //- Un-isotropic thermal conductivity [W/m/K]
122  inline vector Kappa(const scalar p, const scalar T) const;
123 
124  //- Dynamic viscosity [kg/m/s]
125  inline scalar mu(const scalar p, const scalar T) const;
126 
127  //- Thermal diffusivity of enthalpy [kg/m/s]
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 
139 
140  // Friend operators
141 
142  friend constIsoSolidTransport operator* <Thermo>
143  (
144  const scalar,
146  );
147 
148 
149  // Ostream Operator
150 
151  friend Ostream& operator<< <Thermo>
152  (
153  Ostream&,
155  );
156 };
157 
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 } // End namespace Foam
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #include "constIsoSolidTransportI.H"
166 
167 #ifdef NoRepository
168  #include "constIsoSolidTransport.C"
169 #endif
170 
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 
173 #endif
174 
175 // ************************************************************************* //
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:158
static word typeName()
Return the instantiated type name.
vector Kappa(const scalar p, const scalar T) const
Un-isotropic thermal conductivity [W/m/K].
static autoPtr< constIsoSolidTransport > New(const dictionary &dict)
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/m/s].
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/m/K].
Namespace for OpenFOAM.
scalar mu(const scalar p, const scalar T) const
Dynamic viscosity [kg/m/s].