exponentialSolidTransport.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2017 OpenFOAM Foundation
9  Copyright (C) 2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::exponentialSolidTransport
29 
30 Description
31  Exponential properties for solid heat transport
32  Templated into a given thermodynamics package.
33 
34 SourceFiles
35  exponentialSolidTransportI.H
36  exponentialSolidTransport.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef exponentialSolidTransport_H
41 #define exponentialSolidTransport_H
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 // Forward Declarations
49 
50 template<class Thermo> class exponentialSolidTransport;
51 
52 template<class Thermo>
53 inline exponentialSolidTransport<Thermo> operator*
54 (
55  const scalar,
57 );
58 
59 template<class Thermo>
60 Ostream& operator<<
61 (
62  Ostream&,
64 );
65 
66 
67 /*---------------------------------------------------------------------------*\
68  Class exponentialSolidTransport Declaration
69 \*---------------------------------------------------------------------------*/
70 
71 template<class Thermo>
73 :
74  public Thermo
75 {
76  // Private Data
77 
78  //- Constant thermal coefficient.
79  scalar kappa0_;
80 
81  //- Exponent coefficient
82  scalar n0_;
83 
84  //- Reference temperature
85  scalar Tref_;
86 
87 
88  // Private Member Functions
89 
90  //- Construct from components
92  (
93  const Thermo& t,
94  const scalar kappa0,
95  const scalar n0,
96  const scalar Tref
97  );
98 
99 
100 public:
101 
102  // Generated Methods: copy construct, copy assignment
103 
104 
105  // Constructors
106 
107  //- Construct as named copy
109  (
110  const word&,
112  );
113 
114  //- Construct from dictionary
115  explicit exponentialSolidTransport(const dictionary&);
116 
117  // Selector from dictionary
119  (
120  const dictionary& dict
121  );
122 
123 
124  // Member Functions
125 
126  //- Return the instantiated type name
127  static word typeName()
128  {
129  return "exponential<" + Thermo::typeName() + '>';
130  }
131 
132  //- Is the thermal conductivity isotropic
133  static const bool isotropic = true;
134 
135  //- Thermal conductivity [W/mK]
136  inline scalar kappa(const scalar p, const scalar T) const;
137 
138  //- Thermal conductivity [W/mK]
139  inline vector Kappa(const scalar p, const scalar T) const;
140 
141  //- Dynamic viscosity [kg/ms]
142  inline scalar mu(const scalar p, const scalar T) const;
143 
144  //- Thermal diffusivity of enthalpy [kg/ms]
145  inline scalar alphah(const scalar p, const scalar T) const;
146 
147  //- Write to Ostream
148  void write(Ostream& os) const;
149 
150 
151  // Member Operators
152 
153  inline void operator+=(const exponentialSolidTransport&);
154 
155 
156  // Friend Operators
157 
158  friend exponentialSolidTransport operator* <Thermo>
159  (
160  const scalar,
162  );
163 
164 
165  // IOstream Operators
166 
167  friend Ostream& operator<< <Thermo>
168  (
169  Ostream&,
171  );
172 };
173 
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 } // End namespace Foam
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
182 
183 #ifdef NoRepository
184  #include "exponentialSolidTransport.C"
185 #endif
186 
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 
189 #endif
190 
191 // ************************************************************************* //
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::exponentialSolidTransport
Exponential properties for solid heat transport Templated into a given thermodynamics package.
Definition: exponentialSolidTransport.H:49
Foam::exponentialSolidTransport::Kappa
vector Kappa(const scalar p, const scalar T) const
Thermal conductivity [W/mK].
Definition: exponentialSolidTransportI.H:84
Foam::exponentialSolidTransport::New
static autoPtr< exponentialSolidTransport > New(const dictionary &dict)
Definition: exponentialSolidTransportI.H:63
Foam::exponentialSolidTransport::operator+=
void operator+=(const exponentialSolidTransport &)
Definition: exponentialSolidTransportI.H:113
Foam::exponentialSolidTransport::kappa
scalar kappa(const scalar p, const scalar T) const
Thermal conductivity [W/mK].
Definition: exponentialSolidTransportI.H:74
Foam::exponentialSolidTransport::mu
scalar mu(const scalar p, const scalar T) const
Dynamic viscosity [kg/ms].
Definition: exponentialSolidTransportI.H:95
Foam::exponentialSolidTransport::alphah
scalar alphah(const scalar p, const scalar T) const
Thermal diffusivity of enthalpy [kg/ms].
Definition: exponentialSolidTransportI.H:104
Foam::exponentialSolidTransport::isotropic
static const bool isotropic
Is the thermal conductivity isotropic.
Definition: exponentialSolidTransport.H:132
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::exponentialSolidTransport::write
void write(Ostream &os) const
Write to Ostream.
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
os
OBJstream os(runTime.globalPath()/outputName)
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::Vector< scalar >
exponentialSolidTransport.C
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::exponentialSolidTransport::typeName
static word typeName()
Return the instantiated type name.
Definition: exponentialSolidTransport.H:126
exponentialSolidTransportI.H