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 "mappedPatchFieldBase.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  public mappedPatchFieldBase<scalar>
104 {
105  // Private data
106 
107  //- Name of field on the neighbour region
108  const word TnbrName_;
109 
110  //- Thickness of layers
111  scalarList thicknessLayers_;
112 
113  //- Conductivity of layers
114  scalarList kappaLayers_;
115 
116  //- Total contact resistance
117  scalar contactRes_;
118 
119 
120 public:
121 
122  //- Runtime type information
123  TypeName("compressible::turbulentTemperatureCoupledBaffleMixed");
124 
125 
126  // Constructors
127 
128  //- Construct from patch and internal field
130  (
131  const fvPatch&,
133  );
134 
135  //- Construct from patch, internal field and dictionary
137  (
138  const fvPatch&,
140  const dictionary&
141  );
142 
143  //- Construct by mapping given
144  // turbulentTemperatureCoupledBaffleMixedFvPatchScalarField onto a
145  // new patch
147  (
149  const fvPatch&,
151  const fvPatchFieldMapper&
152  );
153 
154  //- Construct as copy setting internal field reference
156  (
158  );
159 
160  //- Construct and return a clone
161  virtual tmp<fvPatchScalarField> clone() const
162  {
164  (
166  (
167  *this
168  )
169  );
170  }
171 
172  //- Construct as copy setting internal field reference
174  (
177  );
178 
179  //- Construct and return a clone setting internal field reference
181  (
183  ) const
184  {
186  (
188  (
189  *this,
190  iF
191  )
192  );
193  }
194 
195 
196  // Member functions
197 
198  //- Update the coefficients associated with the patch field
199  virtual void updateCoeffs();
200 
201  //- Write
202  virtual void write(Ostream&) const;
203 };
204 
205 
206 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
207 
208 } // End namespace compressible
209 } // End namespace Foam
210 
211 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
212 
213 #endif
214 
215 // ************************************************************************* //
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:61
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
mappedPatchFieldBase.H
Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C:351
Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C:212
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:127
compressible
bool compressible
Definition: pEqn.H:2
Foam::mappedPatchFieldBase
Functionality for sampling fields using mappedPatchBase. Every call to mappedField() returns a sample...
Definition: mappedPatchFieldBase.H:104
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:189
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