constAnIsoSolidTransport.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-2016 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/mK]
118  inline scalar kappa(const scalar p, const scalar T) const;
119 
120  //- Un-isotropic thermal conductivity [W/mK]
121  inline vector Kappa(const scalar p, const scalar T) const;
122 
123  //- Dynamic viscosity [kg/ms]
124  inline scalar mu(const scalar p, const scalar T) const;
125 
126  //- Thermal diffusivity of enthalpy [kg/ms]
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  inline void operator+=(const constAnIsoSolidTransport&);
138  inline void operator-=(const constAnIsoSolidTransport&);
139 
140  // Friend operators
141 
142  friend constAnIsoSolidTransport 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 
166 
167 #ifdef NoRepository
168  #include "constAnIsoSolidTransport.C"
169 #endif
170 
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 
173 #endif
174 
175 // ************************************************************************* //
dictionary dict
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:137
void operator=(const constAnIsoSolidTransport &)
static autoPtr< constAnIsoSolidTransport > New(const dictionary &dict)
void operator+=(const constAnIsoSolidTransport &)
void write(Ostream &os) const
Write to Ostream.
scalar mu(const scalar p, const scalar T) const
Dynamic viscosity [kg/ms].
A class for handling words, derived from string.
Definition: word.H:59
scalar kappa(const scalar p, const scalar T) const
Isotropic thermal conductivity [W/mK].
vector alphah(const scalar p, const scalar T) const
Thermal diffusivity of enthalpy [kg/ms].
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)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:53
volScalarField & p
vector Kappa(const scalar p, const scalar T) const
Un-isotropic thermal conductivity [W/mK].
Constant properties Transport package. Templated into a given Thermodynamics package (needed for ther...
void operator-=(const constAnIsoSolidTransport &)
Namespace for OpenFOAM.