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-2020 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  //- Construct and return a clone
101 
102  // Selector from dictionary
104  (
105  const dictionary& dict
106  );
107 
108 
109  // Member Functions
110 
111  //- Return the instantiated type name
112  static word typeName()
113  {
114  return "constAnIso<" + Thermo::typeName() + '>';
115  }
116 
117  //- Is the thermal conductivity isotropic
118  static const bool isotropic = false;
119 
120  //- Isotropic thermal conductivity [W/m/K]
121  inline scalar kappa(const scalar p, const scalar T) const;
122 
123  //- Un-isotropic thermal conductivity [W/m/K]
124  inline vector Kappa(const scalar p, const scalar T) const;
125 
126  //- Dynamic viscosity [kg/m/s]
127  inline scalar mu(const scalar p, const scalar T) const;
128 
129  //- Write to Ostream
130  void write(Ostream& os) const;
131 
132 
133  // Member Operators
134 
135  inline void operator+=(const constAnIsoSolidTransport&);
136 
137 
138  // Friend operators
139 
140  friend constAnIsoSolidTransport operator* <Thermo>
141  (
142  const scalar,
144  );
145 
146 
147  // Ostream Operator
148 
149  friend Ostream& operator<< <Thermo>
150  (
151  Ostream&,
153  );
154 };
155 
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 } // End namespace Foam
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
164 
165 #ifdef NoRepository
166  #include "constAnIsoSolidTransport.C"
167 #endif
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #endif
172 
173 // ************************************************************************* //
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:156
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:54
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].
autoPtr< constAnIsoSolidTransport > clone() const
Construct and return a clone.
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.