turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.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::compressible::
26  turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
27 
28 Description
29  Mixed boundary condition for temperature, to be used for heat-transfer
30  on back-to-back baffles. Optional thin thermal layer resistances can be
31  specified through thicknessLayers and kappaLayers entries.
32 
33  Specifies gradient and temperature such that the equations are the same
34  on both sides:
35  - refGradient = zero gradient
36  - refValue = neighbour value
37  - mixFraction = nbrKDelta / (nbrKDelta + myKDelta())
38 
39  where KDelta is heat-transfer coefficient K * deltaCoeffs
40 
41  The thermal conductivity \c kappa can either be retrieved from various
42  possible sources, as detailed in the class temperatureCoupledBase.
43 
44 Usage
45  \table
46  Property | Description | Required | Default value
47  Tnbr | name of the field | no | T
48  thicknessLayers | list of thicknesses per layer [m] | no |
49  kappaLayers | list of thermal conductivities per layer [W/m/K] | no |
50  kappaMethod | inherited from temperatureCoupledBase | inherited |
51  kappa | inherited from temperatureCoupledBase | inherited |
52  \endtable
53 
54  Example of the boundary condition specification:
55  \verbatim
56  <patchName>
57  {
58  type compressible::turbulentTemperatureCoupledBaffleMixed;
59  Tnbr T;
60  thicknessLayers (0.1 0.2 0.3 0.4);
61  kappaLayers (1 2 3 4);
62  kappaMethod lookup;
63  kappa kappa;
64  value uniform 300;
65  }
66  \endverbatim
67 
68  Needs to be on underlying mapped(Wall)FvPatch.
69 
70 See also
71  Foam::temperatureCoupledBase
72 
73 SourceFiles
74  turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
75 
76 \*---------------------------------------------------------------------------*/
77 
78 #ifndef turbulentTemperatureCoupledBaffleMixedFvPatchScalarField_H
79 #define turbulentTemperatureCoupledBaffleMixedFvPatchScalarField_H
80 
81 #include "mixedFvPatchFields.H"
82 #include "temperatureCoupledBase.H"
83 #include "scalarField.H"
84 
85 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
86 
87 namespace Foam
88 {
89 namespace compressible
90 {
91 
92 /*---------------------------------------------------------------------------*\
93  Class turbulentTemperatureCoupledBaffleMixedFvPatchScalarField Declaration
94 \*---------------------------------------------------------------------------*/
95 
96 class turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
97 :
98  public mixedFvPatchScalarField,
99  public temperatureCoupledBase
100 {
101  // Private data
102 
103  //- Name of field on the neighbour region
104  const word TnbrName_;
105 
106  //- Thickness of layers
107  scalarList thicknessLayers_;
108 
109  //- Conductivity of layers
110  scalarList kappaLayers_;
111 
112  //- Total contact resistance
113  scalar contactRes_;
114 
115 
116 public:
117 
118  //- Runtime type information
119  TypeName("compressible::turbulentTemperatureCoupledBaffleMixed");
120 
121 
122  // Constructors
123 
124  //- Construct from patch and internal field
126  (
127  const fvPatch&,
129  );
130 
131  //- Construct from patch, internal field and dictionary
133  (
134  const fvPatch&,
136  const dictionary&
137  );
138 
139  //- Construct by mapping given
140  // turbulentTemperatureCoupledBaffleMixedFvPatchScalarField onto a
141  // new patch
143  (
145  const fvPatch&,
147  const fvPatchFieldMapper&
148  );
149 
150  //- Construct and return a clone
151  virtual tmp<fvPatchScalarField> clone() const
152  {
154  (
156  (
157  *this
158  )
159  );
160  }
161 
162  //- Construct as copy setting internal field reference
164  (
167  );
168 
169  //- Construct and return a clone setting internal field reference
171  (
173  ) const
174  {
176  (
178  (
179  *this,
180  iF
181  )
182  );
183  }
184 
185 
186  // Member functions
187 
188  //- Update the coefficients associated with the patch field
189  virtual void updateCoeffs();
190 
191  //- Write
192  virtual void write(Ostream&) const;
193 };
194 
195 
196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197 
198 } // End namespace compressible
199 } // End namespace Foam
200 
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202 
203 #endif
204 
205 // ************************************************************************* //
Mixed boundary condition for temperature, to be used for heat-transfer on back-to-back baffles...
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::fvPatchFieldMapper.
List< scalar > scalarList
A List of scalars.
Definition: scalarList.H:50
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
TypeName("compressible::turbulentTemperatureCoupledBaffleMixed")
Runtime type information.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A class for managing temporary objects.
Definition: PtrList.H:54
Namespace for OpenFOAM.
bool compressible
Definition: pEqn.H:30