constAnIsoSolidTransport.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::constAnIsoSolidTransport
26 
27 Description
28  Constant properties Transport package.
29  Templated into a given Thermodynamics package (needed for thermal
30  conductivity).
31 
32 SourceFiles
33  constAnIsoSolidTransportI.H
34  constAnIsoSolidTransport.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef constAnIsoSolidTransport_H
39 #define constAnIsoSolidTransport_H
40 #include "vector.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 template<class Thermo> class constAnIsoSolidTransport;
48 
49 template<class Thermo>
50 inline constAnIsoSolidTransport<Thermo> operator*
51 (
52  const scalar,
54 );
55 
56 template<class Thermo>
57 Ostream& operator<<
58 (
59  Ostream&,
61 );
62 
63 
64 /*---------------------------------------------------------------------------*\
65  Class constAnIsoSolidTransport Declaration
66 \*---------------------------------------------------------------------------*/
67 
68 template<class Thermo>
70 :
71  public Thermo
72 {
73  // Private Data
74 
75  //- Constant anisotropic thermal conductivity.
76  vector kappa_;
77 
78 
79  // Private Member Functions
80 
81  //- Construct from components
82  inline constAnIsoSolidTransport(const Thermo& t, const vector kappa);
83 
84 
85 public:
86 
87  // Constructors
88 
89  //- Construct as named copy
91  (
92  const word&,
94  );
95 
96  //- Construct from dictionary
98 
99  // Selector from dictionary
101  (
102  const dictionary& dict
103  );
104 
105 
106  // Member Functions
107 
108  //- Return the instantiated type name
109  static word typeName()
110  {
111  return "constAnIso<" + Thermo::typeName() + '>';
112  }
113 
114  //- Is the thermal conductivity isotropic
115  static const bool isotropic = false;
116 
117  //- Isotropic thermal conductivity [W/m/K]
118  inline scalar kappa(const scalar p, const scalar T) const;
119 
120  //- Un-isotropic thermal conductivity [W/m/K]
121  inline vector Kappa(const scalar p, const scalar T) const;
122 
123  //- Dynamic viscosity [kg/m/s]
124  inline scalar mu(const scalar p, const scalar T) const;
125 
126  //- Thermal diffusivity of enthalpy [kg/m/s]
127  inline vector alphah(const scalar p, const scalar T) const;
128 
129 
130  //- Write to Ostream
131  void write(Ostream& os) const;
132 
133 
134  // Member Operators
135 
136  inline void operator+=(const constAnIsoSolidTransport&);
137 
138 
139  // Friend operators
140 
141  friend constAnIsoSolidTransport operator* <Thermo>
142  (
143  const scalar,
145  );
146 
147 
148  // Ostream Operator
149 
150  friend Ostream& operator<< <Thermo>
151  (
152  Ostream&,
154  );
155 };
156 
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 } // End namespace Foam
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 
165 
166 #ifdef NoRepository
167  #include "constAnIsoSolidTransport.C"
168 #endif
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 #endif
173 
174 // ************************************************************************* //
dictionary dict
void write(Ostream &os) const
Write to Ostream.
static const bool isotropic
Is the thermal conductivity isotropic.
static word typeName()
Return the instantiated type name.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
vector alphah(const scalar p, const scalar T) const
Thermal diffusivity of enthalpy [kg/m/s].
vector Kappa(const scalar p, const scalar T) const
Un-isotropic thermal conductivity [W/m/K].
static autoPtr< constAnIsoSolidTransport > New(const dictionary &dict)
void operator+=(const constAnIsoSolidTransport &)
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)
scalar kappa(const scalar p, const scalar T) const
Isotropic thermal conductivity [W/m/K].
scalar mu(const scalar p, const scalar T) const
Dynamic viscosity [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...
Namespace for OpenFOAM.