turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2020 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  \endtable
51 
52  Example of the boundary condition specification:
53  \verbatim
54  <patchName>
55  {
56  type compressible::turbulentTemperatureCoupledBaffleMixed;
57  Tnbr T;
58  thicknessLayers (0.1 0.2 0.3 0.4);
59  kappaLayers (1 2 3 4);
60  value uniform 300;
61  }
62  \endverbatim
63 
64  Needs to be on underlying mapped(Wall)FvPatch.
65 
66 See also
67  Foam::temperatureCoupledBase
68 
69 SourceFiles
70  turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
71 
72 \*---------------------------------------------------------------------------*/
73 
74 #ifndef turbulentTemperatureCoupledBaffleMixedFvPatchScalarField_H
75 #define turbulentTemperatureCoupledBaffleMixedFvPatchScalarField_H
76 
77 #include "mixedFvPatchFields.H"
78 #include "temperatureCoupledBase.H"
79 #include "scalarField.H"
80 
81 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
82 
83 namespace Foam
84 {
85 namespace compressible
86 {
87 
88 /*---------------------------------------------------------------------------*\
89  Class turbulentTemperatureCoupledBaffleMixedFvPatchScalarField Declaration
90 \*---------------------------------------------------------------------------*/
91 
92 class turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
93 :
94  public mixedFvPatchScalarField,
95  public temperatureCoupledBase
96 {
97  // Private Data
98 
99  //- Name of field on the neighbour region
100  const word TnbrName_;
101 
102  //- Thickness of layers
103  scalarList thicknessLayers_;
104 
105  //- Conductivity of layers
106  scalarList kappaLayers_;
107 
108  //- Total contact resistance
109  scalar contactRes_;
111 
112 public:
113 
114  //- Runtime type information
115  TypeName("compressible::turbulentTemperatureCoupledBaffleMixed");
116 
117 
118  // Constructors
119 
120  //- Construct from patch and internal field
122  (
123  const fvPatch&,
125  );
126 
127  //- Construct from patch, internal field and dictionary
129  (
130  const fvPatch&,
132  const dictionary&
133  );
134 
135  //- Construct by mapping given
136  // turbulentTemperatureCoupledBaffleMixedFvPatchScalarField onto a
137  // new patch
139  (
141  const fvPatch&,
143  const fvPatchFieldMapper&
144  );
145 
146  //- Construct as copy setting internal field reference
148  (
151  );
152 
153  //- Construct and return a clone setting internal field reference
155  (
157  ) const
158  {
160  (
162  (
163  *this,
164  iF
165  )
166  );
167  }
168 
169 
170  // Member Functions
171 
172  //- Update the coefficients associated with the patch field
173  virtual void updateCoeffs();
174 
175  //- Write
176  virtual void write(Ostream&) const;
177 };
178 
179 
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 
182 } // End namespace compressible
183 } // End namespace Foam
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 #endif
188 
189 // ************************************************************************* //
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:156
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:62
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
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:54
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:53
Namespace for OpenFOAM.