temperatureCoupledBase.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::temperatureCoupledBase
26 
27 Description
28  Common functions used in temperature coupled boundaries.
29 
30  The thermal conductivity \c kappa may be obtained by the following methods:
31  - 'lookup' : lookup volScalarField (or volSymmTensorField) with name
32  defined by 'kappa'
33  - 'fluidThermo' : use fluidThermo and default
34  compressible::turbulenceModel to calculate kappa
35  - 'solidThermo' : use solidThermo kappa()
36  - 'directionalSolidThermo': uses look up for volSymmTensorField for
37  transformed kappa vector. Field name definable in 'alphaAni',
38  named 'Anialpha' in solid solver by default
39 
40  \par Keywords provided by this class:
41  \table
42  Property | Description | Required | Default value
43  kappaMethod | Thermal conductivity method | yes |
44  kappa | Name of thermal conductivity field | no | none
45  alphaAni | Name of the non-isotropic alpha | no | Anialpha
46  \endtable
47 
48 Usage
49  \verbatim
50  nonIsotropicWall
51  {
52  ...
53  kappaMethod directionalSolidThermo;
54  kappa none;
55  alphaAni Anialpha;
56  ...
57  }
58  \endverbatim
59 
60 SourceFiles
61  temperatureCoupledBase.C
62 
63 \*---------------------------------------------------------------------------*/
64 
65 #ifndef temperatureCoupledBase_H
66 #define temperatureCoupledBase_H
67 
68 #include "scalarField.H"
69 #include "NamedEnum.H"
70 #include "fvPatch.H"
71 
72 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
73 
74 namespace Foam
75 {
76 
77 /*---------------------------------------------------------------------------*\
78  Class temperatureCoupledBase Declaration
79 \*---------------------------------------------------------------------------*/
80 
81 class temperatureCoupledBase
82 {
83 public:
84 
85  // Public enumerations
86 
87  //- Type of supplied Kappa
88  enum KMethodType
89  {
93  mtLookup
94  };
95 
96 
97 protected:
98 
99  // Protected data
102 
103  //- Underlying patch
104  const fvPatch& patch_;
105 
106  //- How to get K
108 
109  //- Name of thermal conductivity field (if looked up from database)
112  //- Name of the non-Isotropic alpha (default: Anialpha)
113  const word alphaAniName_;
114 
115 
116 public:
117 
118  // Constructors
119 
120  //- Construct from patch and K name
122  (
123  const fvPatch& patch,
124  const word& calculationMethod,
125  const word& kappaName,
126  const word& alphaAniName
127  );
128 
129  //- Construct from patch and dictionary
131  (
132  const fvPatch& patch,
133  const dictionary& dict
134  );
135 
136  //- Construct from patch and temperatureCoupledBase
138  (
139  const fvPatch& patch,
140  const temperatureCoupledBase& base
141  );
142 
143 
144  // Member functions
145 
146  //- Method to obtain K
147  word KMethod() const
148  {
149  return KMethodTypeNames_[method_];
150  }
151 
152  //- Name of thermal conductivity field
153  const word& kappaName() const
154  {
155  return kappaName_;
156  }
157 
158  //- Given patch temperature calculate corresponding K field
159  tmp<scalarField> kappa(const scalarField& Tp) const;
160 
161  //- Write
162  void write(Ostream&) const;
163 };
164 
165 
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 
168 } // End namespace Foam
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 #endif
173 
174 // ************************************************************************* //
dictionary dict
const fvPatch & patch_
Underlying patch.
void write(Ostream &) const
Write.
const word kappaName_
Name of thermal conductivity field (if looked up from database)
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
KMethodType
Type of supplied Kappa.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
word KMethod() const
Method to obtain K.
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
const word alphaAniName_
Name of the non-Isotropic alpha (default: Anialpha)
const KMethodType method_
How to get K.
Common functions used in temperature coupled boundaries.
static const NamedEnum< KMethodType, 4 > KMethodTypeNames_
temperatureCoupledBase(const fvPatch &patch, const word &calculationMethod, const word &kappaName, const word &alphaAniName)
Construct from patch and K name.
const word & kappaName() const
Name of thermal conductivity field.
A class for managing temporary objects.
Definition: PtrList.H:54
tmp< scalarField > kappa(const scalarField &Tp) const
Given patch temperature calculate corresponding K field.
Namespace for OpenFOAM.