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