allVariablesCoupledBase.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 allVariablesCoupledBase_H
70 #define allVariablesCoupledBase_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 allVariablesCoupledBase
86 {
87 public:
88 
89 
90 
91 protected:
92 
93  // Protected data
94  //
95  //- Underlying patch
96  const fvPatch& patch_;
97 
98  //- How to get K
99  const TMethodType method_;
100 
101  //- Name of thermal conductivity field (if looked up from database)
102  const word TName_;
103 
104 
105 
106 public:
107 
108  // Constructors
109 
110  //- Construct from patch and K name
112  (
113  const fvPatch& patch,
114  const word& calculationMethod,
115  const word& TName,
116  );
117 
118  //- Construct from patch and dictionary
120  (
121  const fvPatch& patch,
122  const dictionary& dict
123  );
124 
125  //- Construct from patch and temperatureCoupledBase
127  (
128  const fvPatch& patch,
129  const temperatureCoupledBase& base
130  );
131 
132 
133  // Member functions
134 
135  //- Method to obtain K
136  word TMethod() const
137  {
138  return method_;
139  }
140 
141  //- Name of thermal conductivity field
142  const word& TName() const
143  {
144  return Name_;
145  }
146 
147  //- Given patch temperature calculate corresponding T field
148  tmp<scalarField> T(const scalarField& Tp) const;
149 
150  //- Write
151  void write(Ostream&) const;
152 };
153 
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 } // End namespace Foam
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 #endif
162 
163 // ************************************************************************* //
Foam::scalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Definition: primitiveFieldsFwd.H:48
Foam::allVariablesCoupledBase::method_
const TMethodType method_
How to get K.
Definition: allVariablesCoupledBase.H:118
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::allVariablesCoupledBase::TName
const word & TName() const
Name of thermal conductivity field.
Definition: allVariablesCoupledBase.H:161
Foam::allVariablesCoupledBase::write
void write(Ostream &) const
Write.
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
scalarField.H
Foam::allVariablesCoupledBase::TName_
const word TName_
Name of thermal conductivity field (if looked up from database)
Definition: allVariablesCoupledBase.H:121
NamedEnum.H
Foam::temperatureCoupledBase
Common functions for use in temperature coupled boundaries.
Definition: temperatureCoupledBase.H:104
Foam::allVariablesCoupledBase::T
tmp< scalarField > T(const scalarField &Tp) const
Given patch temperature calculate corresponding T field.
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::allVariablesCoupledBase::temperatureCoupledBase
temperatureCoupledBase(const fvPatch &patch, const word &calculationMethod, const word &TName,)
Construct from patch and K name.
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::allVariablesCoupledBase::TMethod
word TMethod() const
Method to obtain K.
Definition: allVariablesCoupledBase.H:155
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::allVariablesCoupledBase
Definition: allVariablesCoupledBase.H:104
fvPatch.H
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::allVariablesCoupledBase::patch_
const fvPatch & patch_
Underlying patch.
Definition: allVariablesCoupledBase.H:115