constIsoSolidTransport.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::constIsoSolidTransport
29 
30 Description
31  Constant properties Transport package.
32  Templated into a given thermodynamics package (needed for thermal
33  conductivity).
34 
35 SourceFiles
36  constIsoSolidTransportI.H
37  constIsoSolidTransport.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef constIsoSolidTransport_H
42 #define constIsoSolidTransport_H
43 
44 #include "vector.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 // Forward Declarations
52 template<class Thermo> class constIsoSolidTransport;
53 
54 template<class Thermo>
55 inline constIsoSolidTransport<Thermo> operator*
56 (
57  const scalar,
59 );
60 
61 template<class Thermo>
62 Ostream& operator<<
63 (
64  Ostream&,
66 );
67 
68 
69 /*---------------------------------------------------------------------------*\
70  Class constIsoSolidTransport Declaration
71 \*---------------------------------------------------------------------------*/
72 
73 template<class Thermo>
75 :
76  public Thermo
77 {
78  // Private Data
79 
80  //- Constant isotropic thermal conductivity
81  scalar kappa_;
82 
83 
84  // Private Member Functions
85 
86  //- Construct from components
87  inline constIsoSolidTransport(const Thermo& t, const scalar kappa);
88 
89 
90 public:
91 
92  // Generated Methods: copy construct, copy assignment
93 
94 
95  // Constructors
96 
97  //- Construct as named copy
99  (
100  const word&,
102  );
103 
104  //- Construct from dictionary
105  explicit constIsoSolidTransport(const dictionary& dict);
106 
107  // Selector from dictionary
109  (
110  const dictionary& dict
111  );
112 
113 
114  // Member Functions
115 
116  //- Return the instantiated type name
117  static word typeName()
118  {
119  return "constIso<" + Thermo::typeName() + '>';
120  }
121 
122  //- Is the thermal conductivity isotropic
123  static const bool isotropic = true;
124 
125  //- Isotropic thermal conductivity [W/mK]
126  inline scalar kappa(const scalar p, const scalar T) const;
127 
128  //- Un-isotropic thermal conductivity [W/mK]
129  inline vector Kappa(const scalar p, const scalar T) const;
130 
131  //- Dynamic viscosity [kg/ms]
132  inline scalar mu(const scalar p, const scalar T) const;
133 
134  //- Thermal diffusivity of enthalpy [kg/ms]
135  inline scalar alphah(const scalar p, const scalar T) const;
136 
137 
138  //- Write to Ostream
139  void write(Ostream& os) const;
140 
141 
142  // Member Operators
143 
144  inline void operator+=(const constIsoSolidTransport&);
145 
146 
147  // Friend Operators
148 
149  friend constIsoSolidTransport operator* <Thermo>
150  (
151  const scalar,
153  );
154 
155 
156  // IOstream Operators
157 
158  friend Ostream& operator<< <Thermo>
159  (
160  Ostream&,
162  );
163 };
164 
165 
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 
168 } // End namespace Foam
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 #include "constIsoSolidTransportI.H"
173 
174 #ifdef NoRepository
175  #include "constIsoSolidTransport.C"
176 #endif
177 
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 
180 #endif
181 
182 // ************************************************************************* //
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::constIsoSolidTransport::typeName
static word typeName()
Return the instantiated type name.
Definition: constIsoSolidTransport.H:116
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::constIsoSolidTransport::operator+=
void operator+=(const constIsoSolidTransport &)
Definition: constIsoSolidTransportI.H:101
Foam::constIsoSolidTransport::isotropic
static const bool isotropic
Is the thermal conductivity isotropic.
Definition: constIsoSolidTransport.H:122
Foam::constIsoSolidTransport::Kappa
vector Kappa(const scalar p, const scalar T) const
Un-isotropic thermal conductivity [W/mK].
Definition: constIsoSolidTransportI.H:75
constIsoSolidTransport.C
constIsoSolidTransportI.H
Foam::constIsoSolidTransport::write
void write(Ostream &os) const
Write to Ostream.
Foam::constIsoSolidTransport::kappa
scalar kappa(const scalar p, const scalar T) const
Isotropic thermal conductivity [W/mK].
Definition: constIsoSolidTransportI.H:68
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::constIsoSolidTransport::mu
scalar mu(const scalar p, const scalar T) const
Dynamic viscosity [kg/ms].
Definition: constIsoSolidTransportI.H:83
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::constIsoSolidTransport::New
static autoPtr< constIsoSolidTransport > New(const dictionary &dict)
Definition: constIsoSolidTransportI.H:57
Foam::Vector< scalar >
vector.H
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::constIsoSolidTransport::alphah
scalar alphah(const scalar p, const scalar T) const
Thermal diffusivity of enthalpy [kg/ms].
Definition: constIsoSolidTransportI.H:92
Foam::constIsoSolidTransport
Constant properties Transport package. Templated into a given thermodynamics package (needed for ther...
Definition: constIsoSolidTransport.H:51