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-2015 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 for use in temperature coupled boundaries.
29 
30  For now only provides the following methods:
31 
32  - kappa() : heat conduction at patch. Gets supplied how to lookup/calculate
33  'kappa':
34  - 'lookup' : lookup volScalarField (or volSymmTensorField) with name
35  defined in 'kappaName'
36  - 'fluidThermo' : use fluidThermo and default
37  compressible::turbulenceModel to calculate kappa
38  - 'solidThermo' : use solidThermo kappa()
39  - 'directionalSolidThermo': uses look up for volSymmTensorField for
40  transformed kappa vector. Field name definable in 'alphaAniName',
41  named 'Anialpha' in solid solver by default
42 
43  \heading Keywords provided by this class
44 
45  \table
46  Property | Description | Required | Default value
47  kappa | heat conduction type at patch, as listed above | yes |
48  kappaName | Name of thermal conductivity field | yes |
49  alphaAniName | name of the non-isotropic alpha | no | 'Anialpha'
50  \endtable
51 
52  Usage examples:
53  \verbatim
54  nonIsotropicWall
55  {
56  ...
57  kappa directionalSolidThermo;
58  kappaName none;
59  alphaAniName Anialpha;
60  ...
61  }
62  \endverbatim
63 
64 SourceFiles
65  temperatureCoupledBase.C
66 
67 \*---------------------------------------------------------------------------*/
68 
69 #ifndef temperatureCoupledBase_H
70 #define temperatureCoupledBase_H
71 
72 #include "scalarField.H"
73 #include "NamedEnum.H"
74 #include "fvPatch.H"
75 
76 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
77 
78 namespace Foam
79 {
80 
81 /*---------------------------------------------------------------------------*\
82  Class temperatureCoupledBase Declaration
83 \*---------------------------------------------------------------------------*/
84 
85 class temperatureCoupledBase
86 {
87 public:
88 
89  // Public enumerations
90 
91  //- Type of supplied Kappa
92  enum KMethodType
93  {
97  mtLookup
98  };
99 
100 
101 protected:
102 
103  // Protected data
104 
106 
107  //- Underlying patch
108  const fvPatch& patch_;
109 
110  //- How to get K
112 
113  //- Name of thermal conductivity field (if looked up from database)
115 
116  //- Name of the non-Isotropic alpha (default: Anialpha)
117  const word alphaAniName_;
118 
119 
120 public:
121 
122  // Constructors
123 
124  //- Construct from patch and K name
126  (
127  const fvPatch& patch,
128  const word& calculationMethod,
129  const word& kappaName,
130  const word& alphaAniName
131  );
132 
133  //- Construct from patch and dictionary
135  (
136  const fvPatch& patch,
137  const dictionary& dict
138  );
139 
140  //- Construct from patch and temperatureCoupledBase
142  (
143  const fvPatch& patch,
144  const temperatureCoupledBase& base
145  );
146 
147 
148  // Member functions
149 
150  //- Method to obtain K
151  word KMethod() const
152  {
153  return KMethodTypeNames_[method_];
154  }
155 
156  //- Name of thermal conductivity field
157  const word& kappaName() const
158  {
159  return kappaName_;
160  }
161 
162  //- Given patch temperature calculate corresponding K field
163  tmp<scalarField> kappa(const scalarField& Tp) const;
164 
165  //- Write
166  void write(Ostream&) const;
167 };
168 
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 } // End namespace Foam
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 #endif
177 
178 // ************************************************************************* //
Foam::temperatureCoupledBase::mtDirectionalSolidThermo
@ mtDirectionalSolidThermo
Definition: temperatureCoupledBase.H:115
Foam::scalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Definition: primitiveFieldsFwd.H:48
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::temperatureCoupledBase::alphaAniName_
const word alphaAniName_
Name of the non-Isotropic alpha (default: Anialpha)
Definition: temperatureCoupledBase.H:136
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
scalarField.H
NamedEnum.H
Foam::temperatureCoupledBase
Common functions for use in temperature coupled boundaries.
Definition: temperatureCoupledBase.H:104
Foam::temperatureCoupledBase::mtSolidThermo
@ mtSolidThermo
Definition: temperatureCoupledBase.H:114
Foam::temperatureCoupledBase::temperatureCoupledBase
temperatureCoupledBase(const fvPatch &patch, const word &calculationMethod, const word &kappaName, const word &alphaAniName)
Construct from patch and K name.
Definition: temperatureCoupledBase.C:58
Foam::temperatureCoupledBase::mtLookup
@ mtLookup
Definition: temperatureCoupledBase.H:116
Foam::temperatureCoupledBase::method_
const KMethodType method_
How to get K.
Definition: temperatureCoupledBase.H:130
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::temperatureCoupledBase::KMethodType
KMethodType
Type of supplied Kappa.
Definition: temperatureCoupledBase.H:111
Foam::temperatureCoupledBase::patch_
const fvPatch & patch_
Underlying patch.
Definition: temperatureCoupledBase.H:127
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::temperatureCoupledBase::mtFluidThermo
@ mtFluidThermo
Definition: temperatureCoupledBase.H:113
Foam::temperatureCoupledBase::kappaName
const word & kappaName() const
Name of thermal conductivity field.
Definition: temperatureCoupledBase.H:176
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::temperatureCoupledBase::KMethod
word KMethod() const
Method to obtain K.
Definition: temperatureCoupledBase.H:170
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::temperatureCoupledBase::kappaName_
const word kappaName_
Name of thermal conductivity field (if looked up from database)
Definition: temperatureCoupledBase.H:133
Foam::temperatureCoupledBase::KMethodTypeNames_
static const NamedEnum< KMethodType, 4 > KMethodTypeNames_
Definition: temperatureCoupledBase.H:124
Foam::temperatureCoupledBase::kappa
tmp< scalarField > kappa(const scalarField &Tp) const
Given patch temperature calculate corresponding K field.
Definition: temperatureCoupledBase.C:101
fvPatch.H
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::temperatureCoupledBase::write
void write(Ostream &) const
Write.
Definition: temperatureCoupledBase.C:225
Foam::NamedEnum< KMethodType, 4 >