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-2015 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
31  resistances can be specified through thicknessLayers and kappaLayers
32  entries.
33 
34  The thermal conductivity, \c kappa, can either be retrieved from the
35  mesh database using the \c lookup option, or from a \c solidThermo
36  or \c fluidThermo thermophysical package.
37 
38 
39  Specifies gradient and temperature such that the equations are the same
40  on both sides:
41  - refGradient = zero gradient
42  - refValue = neighbour value
43  - mixFraction = nbrKDelta / (nbrKDelta + myKDelta())
44 
45  where KDelta is heat-transfer coefficient K * deltaCoeffs
46 
47  \heading Patch usage
48 
49  \table
50  Property | Description | Required | Default value
51  kappa | thermal conductivity option | yes |
52  kappaName | name of thermal conductivity field | no |
53  Tnbr | name of the field | no | T
54  thicknessLayers | list of thicknesses per layer [m] | no |
55  kappaLayers | list of thermal conductivites per layer [W/m/K] | no |
56  \endtable
57 
58  Example of the boundary condition specification:
59  \verbatim
60  myPatch
61  {
62  type compressible::turbulentTemperatureCoupledBaffleMixed;
63  Tnbr T;
64  kappa lookup;
65  KappaName kappa;
66  thicknessLayers (0.1 0.2 0.3 0.4);
67  kappaLayers (1 2 3 4)
68  value uniform 300;
69  }
70  \endverbatim
71 
72  Needs to be on underlying mapped(Wall)FvPatch.
73 
74  Note: kappa : heat conduction at patch. Gets supplied how to lookup
75  calculate kappa:
76 
77  - 'lookup' : lookup volScalarField (or volSymmTensorField) with name
78  - 'fluidThermo' : use fluidThermo and compressible::RASmodel to calculate
79  kappa
80  - 'solidThermo' : use solidThermo kappa()
81  - 'directionalSolidThermo' directionalKappa()
82 
83 SourceFiles
84  turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
85 
86 \*---------------------------------------------------------------------------*/
87 
88 #ifndef turbulentTemperatureCoupledBaffleMixedFvPatchScalarField_H
89 #define turbulentTemperatureCoupledBaffleMixedFvPatchScalarField_H
90 
91 #include "mixedFvPatchFields.H"
92 #include "temperatureCoupledBase.H"
93 #include "scalarField.H"
94 
95 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
96 
97 namespace Foam
98 {
99 namespace compressible
100 {
101 
102 /*---------------------------------------------------------------------------*\
103  Class turbulentTemperatureCoupledBaffleMixedFvPatchScalarField Declaration
104 \*---------------------------------------------------------------------------*/
105 
106 class turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
107 :
108  public mixedFvPatchScalarField,
109  public temperatureCoupledBase
110 {
111  // Private data
112 
113  //- Name of field on the neighbour region
114  const word TnbrName_;
115 
116  //- Thickness of layers
118 
119  //- Conductivity of layers
121 
122  //- Total contact resistance
123  scalar contactRes_;
124 
125 
126 public:
127 
128  //- Runtime type information
129  TypeName("compressible::turbulentTemperatureCoupledBaffleMixed");
130 
131 
132  // Constructors
133 
134  //- Construct from patch and internal field
136  (
137  const fvPatch&,
139  );
140 
141  //- Construct from patch, internal field and dictionary
143  (
144  const fvPatch&,
146  const dictionary&
147  );
148 
149  //- Construct by mapping given
150  // turbulentTemperatureCoupledBaffleMixedFvPatchScalarField onto a
151  // new patch
153  (
155  const fvPatch&,
157  const fvPatchFieldMapper&
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:50
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::contactRes_
scalar contactRes_
Total contact resistance.
Definition: turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H:151
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
scalarField.H
Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::thicknessLayers_
scalarList thicknessLayers_
Thickness of layers.
Definition: turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H:145
Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::kappaLayers_
scalarList kappaLayers_
Conductivity of layers.
Definition: turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H:148
Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C:43
Foam::temperatureCoupledBase
Common functions for use in temperature coupled boundaries.
Definition: temperatureCoupledBase.H:104
Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C:258
Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C:157
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
Mixed boundary condition for temperature, to be used for heat-transfer on back-to-back baffles....
Definition: turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H:134
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::TnbrName_
const word TnbrName_
Name of field on the neighbour region.
Definition: turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H:142
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: combustionModel.C:30
mixedFvPatchFields.H
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
compressible
bool compressible
Definition: pEqn.H:40
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:45
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
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:51