exponentialSolidTransport.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-2018 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::exponentialSolidTransport
26 
27 Description
28  Exponential properties for solid heat transport
29  Templated into a given thermodynamics package.
30 
31 SourceFiles
32  exponentialSolidTransportI.H
33  exponentialSolidTransport.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef exponentialSolidTransport_H
38 #define exponentialSolidTransport_H
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 template<class Thermo> class exponentialSolidTransport;
46 
47 template<class Thermo>
48 inline exponentialSolidTransport<Thermo> operator*
49 (
50  const scalar,
52 );
53 
54 template<class Thermo>
55 Ostream& operator<<
56 (
57  Ostream&,
59 );
60 
61 
62 /*---------------------------------------------------------------------------*\
63  Class exponentialSolidTransport Declaration
64 \*---------------------------------------------------------------------------*/
65 
66 template<class Thermo>
68 :
69  public Thermo
70 {
71  // Private data
72 
73  //- Constant thermal coefficient.
74  scalar kappa0_;
75 
76  //- Exponent coefficient
77  scalar n0_;
78 
79  //- Reference temperature
80  scalar Tref_;
81 
82 
83  // Private Member Functions
84 
85  //- Construct from components
87  (
88  const Thermo& t,
89  const scalar kappa0,
90  const scalar n0,
91  const scalar Tref
92  );
93 
94 
95 public:
96 
97  // Constructors
98 
99  //- Construct as named copy
101  (
102  const word&,
104  );
105 
106  //- Construct from dictionary
108 
109  // Selector from dictionary
111  (
112  const dictionary& dict
113  );
114 
115 
116  // Member functions
117 
118  //- Return the instantiated type name
119  static word typeName()
120  {
121  return "exponential<" + Thermo::typeName() + '>';
122  }
123 
124  //- Is the thermal conductivity isotropic
125  static const bool isotropic = true;
126 
127  //- Thermal conductivity [W/mK]
128  inline scalar kappa(const scalar p, const scalar T) const;
129 
130  //- Thermal conductivity [W/mK]
131  inline vector Kappa(const scalar p, const scalar T) const;
132 
133  //- Dynamic viscosity [kg/ms]
134  inline scalar mu(const scalar p, const scalar T) const;
135 
136  //- Thermal diffusivity of enthalpy [kg/ms]
137  inline scalar alphah(const scalar p, const scalar T) const;
138 
139  //- Write to Ostream
140  void write(Ostream& os) const;
141 
142 
143  // Member operators
144 
145  inline void operator=(const exponentialSolidTransport&);
146  inline void operator+=(const exponentialSolidTransport&);
147 
148 
149  // Friend operators
150 
151  friend exponentialSolidTransport operator* <Thermo>
152  (
153  const scalar,
155  );
156 
157  // Ostream Operator
158 
159  friend Ostream& operator<< <Thermo>
160  (
161  Ostream&,
163  );
164 };
165 
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 } // End namespace Foam
170 
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 
174 
175 #ifdef NoRepository
176  #include "exponentialSolidTransport.C"
177 #endif
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 #endif
182 
183 // ************************************************************************* //
void operator=(const exponentialSolidTransport &)
dictionary dict
Exponential properties for solid heat transport Templated into a given thermodynamics package...
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
scalar kappa(const scalar p, const scalar T) const
Thermal conductivity [W/mK].
scalar alphah(const scalar p, const scalar T) const
Thermal diffusivity of enthalpy [kg/ms].
void write(Ostream &os) const
Write to Ostream.
static autoPtr< exponentialSolidTransport > New(const dictionary &dict)
static const bool isotropic
Is the thermal conductivity isotropic.
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)
static word typeName()
Return the instantiated type name.
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
scalar mu(const scalar p, const scalar T) const
Dynamic viscosity [kg/ms].
void operator+=(const exponentialSolidTransport &)
Namespace for OpenFOAM.
vector Kappa(const scalar p, const scalar T) const
Thermal conductivity [W/mK].