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-2021 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 = qs_/kappa
36  - refValue = neighbour value
37  - mixFraction = nbrKDelta/(nbrKDelta + myKDelta())
38 
39  where KDelta is heat-transfer coefficient K*deltaCoeffs
40  and qs is the optional source heat flux.
41 
42  The thermal conductivity \c kappa can either be retrieved from various
43  possible sources, as detailed in the class temperatureCoupledBase.
44 
45 Usage
46  \table
47  Property | Description | Required | Default value
48  Tnbr | name of the field | no | T
49  thicknessLayers | list of thicknesses per layer [m] | no |
50  kappaLayers | list of thermal conductivities per layer [W/m/K] | no |
51  qs | Optional source heat flux [W/m^2] | no | 0
52  Qs | Optional heat source [W] | no | 0
53  \endtable
54 
55  Example of the boundary condition specification:
56  \verbatim
57  <patchName>
58  {
59  type compressible::turbulentTemperatureCoupledBaffleMixed;
60  Tnbr T;
61  thicknessLayers (0.1 0.2 0.3 0.4);
62  kappaLayers (1 2 3 4);
63  qs uniform 100; // Optional source heat flux [W/m^2]
64  value uniform 300;
65  }
66  \endverbatim
67 
68  Needs to be on underlying mapped(Wall)FvPatch.
69 
70  Note that in order to provide an optional heat source either qs or Qs
71  should be specified, not both.
72 
73 See also
74  Foam::temperatureCoupledBase
75 
76 SourceFiles
77  turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
78 
79 \*---------------------------------------------------------------------------*/
80 
81 #ifndef turbulentTemperatureCoupledBaffleMixedFvPatchScalarField_H
82 #define turbulentTemperatureCoupledBaffleMixedFvPatchScalarField_H
83 
84 #include "mixedFvPatchFields.H"
85 #include "temperatureCoupledBase.H"
86 #include "scalarField.H"
87 
88 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
89 
90 namespace Foam
91 {
92 namespace compressible
93 {
94 
95 /*---------------------------------------------------------------------------*\
96  Class turbulentTemperatureCoupledBaffleMixedFvPatchScalarField Declaration
97 \*---------------------------------------------------------------------------*/
98 
99 class turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
100 :
101  public mixedFvPatchScalarField,
102  public temperatureCoupledBase
103 {
104  // Private Data
105 
106  //- Name of field on the neighbour region
107  const word TnbrName_;
108 
109  //- Thickness of layers
110  scalarList thicknessLayers_;
111 
112  //- Conductivity of layers
113  scalarList kappaLayers_;
114 
115  //- Source heat flux [W/m^2]
116  scalarField qs_;
117 
118  //- Total contact resistance
119  scalar contactRes_;
120 
121 
122 public:
123 
124  //- Runtime type information
125  TypeName("compressible::turbulentTemperatureCoupledBaffleMixed");
126 
128  // Constructors
129 
130  //- Construct from patch and internal field
132  (
133  const fvPatch&,
135  );
136 
137  //- Construct from patch, internal field and dictionary
139  (
140  const fvPatch&,
142  const dictionary&
143  );
144 
145  //- Construct by mapping given
146  // turbulentTemperatureCoupledBaffleMixedFvPatchScalarField onto a
147  // new patch
149  (
151  const fvPatch&,
153  const fvPatchFieldMapper&
154  );
155 
156  //- Construct as copy setting internal field reference
158  (
161  );
162 
163  //- Construct and return a clone setting internal field reference
165  (
167  ) const
168  {
170  (
172  (
173  *this,
174  iF
175  )
176  );
177  }
178 
179 
180  // Member Functions
181 
182  //- Update the coefficients associated with the patch field
183  virtual void updateCoeffs();
184 
185  //- Write
186  virtual void write(Ostream&) const;
187 };
188 
189 
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 
192 } // End namespace compressible
193 } // End namespace Foam
194 
195 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196 
197 #endif
198 
199 // ************************************************************************* //
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:63
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
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.