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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::compressible::
28  turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
29 
30 Description
31  Mixed boundary condition for temperature, to be used for heat-transfer
32  on back-to-back baffles. Optional thin thermal layer resistances can be
33  specified through thicknessLayers and kappaLayers entries.
34 
35  Specifies gradient and temperature such that the equations are the same
36  on both sides:
37  - refGradient = zero gradient
38  - refValue = neighbour value
39  - mixFraction = nbrKDelta / (nbrKDelta + myKDelta())
40 
41  where KDelta is heat-transfer coefficient K * deltaCoeffs
42 
43  The thermal conductivity \c kappa can either be retrieved from various
44  possible sources, as detailed in the class temperatureCoupledBase.
45 
46 Usage
47  \table
48  Property | Description | Required | Default value
49  Tnbr | name of the field | no | T
50  thicknessLayers | list of thicknesses per layer [m] | no |
51  kappaLayers | list of thermal conductivities per layer [W/m/K] | no |
52  kappaMethod | inherited from temperatureCoupledBase | inherited |
53  kappa | inherited from temperatureCoupledBase | inherited |
54  \endtable
55 
56  Example of the boundary condition specification:
57  \verbatim
58  <patchName>
59  {
60  type compressible::turbulentTemperatureCoupledBaffleMixed;
61  Tnbr T;
62  thicknessLayers (0.1 0.2 0.3 0.4);
63  kappaLayers (1 2 3 4);
64  kappaMethod lookup;
65  kappa kappa;
66  value uniform 300;
67  }
68  \endverbatim
69 
70  Needs to be on underlying mapped(Wall)FvPatch.
71 
72 See also
73  Foam::temperatureCoupledBase
74 
75 SourceFiles
76  turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
77 
78 \*---------------------------------------------------------------------------*/
79 
80 #ifndef turbulentTemperatureCoupledBaffleMixedFvPatchScalarField_H
81 #define turbulentTemperatureCoupledBaffleMixedFvPatchScalarField_H
82 
83 #include "mixedFvPatchFields.H"
84 #include "temperatureCoupledBase.H"
85 #include "scalarField.H"
86 
87 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
88 
89 namespace Foam
90 {
91 namespace compressible
92 {
93 
94 /*---------------------------------------------------------------------------*\
95  Class turbulentTemperatureCoupledBaffleMixedFvPatchScalarField Declaration
96 \*---------------------------------------------------------------------------*/
97 
98 class turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
99 :
100  public mixedFvPatchScalarField,
101  public temperatureCoupledBase
102 {
103  // Private data
104 
105  //- Name of field on the neighbour region
106  const word TnbrName_;
107 
108  //- Thickness of layers
109  scalarList thicknessLayers_;
110 
111  //- Conductivity of layers
112  scalarList kappaLayers_;
113 
114  //- Total contact resistance
115  scalar contactRes_;
116 
117 
118 public:
119 
120  //- Runtime type information
121  TypeName("compressible::turbulentTemperatureCoupledBaffleMixed");
122 
123 
124  // Constructors
125 
126  //- Construct from patch and internal field
128  (
129  const fvPatch&,
131  );
132 
133  //- Construct from patch, internal field and dictionary
135  (
136  const fvPatch&,
138  const dictionary&
139  );
140 
141  //- Construct by mapping given
142  // turbulentTemperatureCoupledBaffleMixedFvPatchScalarField onto a
143  // new patch
145  (
147  const fvPatch&,
149  const fvPatchFieldMapper&
150  );
151 
152  //- Construct and return a clone
153  virtual tmp<fvPatchScalarField> clone() const
154  {
156  (
158  (
159  *this
160  )
161  );
162  }
163 
164  //- Construct as copy setting internal field reference
166  (
169  );
170 
171  //- Construct and return a clone setting internal field reference
173  (
175  ) const
176  {
178  (
180  (
181  *this,
182  iF
183  )
184  );
185  }
186 
187 
188  // Member functions
189 
190  //- Update the coefficients associated with the patch field
191  virtual void updateCoeffs();
192 
193  //- Write
194  virtual void write(Ostream&) const;
195 };
196 
197 
198 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 
200 } // End namespace compressible
201 } // End namespace Foam
202 
203 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204 
205 #endif
206 
207 // ************************************************************************* //
Foam::scalarList
List< scalar > scalarList
A List of scalars.
Definition: scalarList.H:64
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:59
scalarField.H
Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C:46
Foam::temperatureCoupledBase
Common functions used in temperature coupled boundaries.
Definition: temperatureCoupledBase.H:110
Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C:267
Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C:166
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
Mixed boundary condition for temperature, to be used for heat-transfer on back-to-back baffles....
Definition: turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H:126
compressible
bool compressible
Definition: pEqn.H:2
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H:181
temperatureCoupledBase.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
mixedFvPatchFields.H
Foam::List< scalar >
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::TypeName
TypeName("compressible::turbulentTemperatureCoupledBaffleMixed")
Runtime type information.
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54