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-2022 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  //- Construct and return a clone
101  inline autoPtr<constIsoSolidTransport> clone() const;
102 
103  // Selector from dictionary
105  (
106  const dictionary& dict
107  );
108 
109 
110  // Member Functions
111 
112  //- Return the instantiated type name
113  static word typeName()
114  {
115  return "constIsoSolid<" + Thermo::typeName() + '>';
116  }
117 
118  //- Is the thermal conductivity isotropic
119  static const bool isotropic = true;
120 
121  //- Isotropic thermal conductivity [W/m/K]
122  inline scalar kappa(const scalar p, const scalar T) const;
123 
124  //- Un-isotropic thermal conductivity [W/m/K]
125  inline vector Kappa(const scalar p, const scalar T) const;
126 
127  //- Dynamic viscosity [kg/m/s]
128  inline scalar mu(const scalar p, const scalar T) const;
129 
130  //- Write to Ostream
131  void write(Ostream& os) const;
132 
133 
134  // Member Operators
135 
136  inline void operator+=(const constIsoSolidTransport&);
137 
138 
139  // Friend operators
140 
141  friend constIsoSolidTransport 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 
164 #include "constIsoSolidTransportI.H"
165 
166 #ifdef NoRepository
167  #include "constIsoSolidTransport.C"
168 #endif
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 #endif
173 
174 // ************************************************************************* //
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:156
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
autoPtr< constIsoSolidTransport > clone() const
Construct and return a clone.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void operator+=(const constIsoSolidTransport &)
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].