Loading...
Searching...
No Matches
thermalBaffleFvPatchScalarField.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-2017 OpenFOAM Foundation
9 Copyright (C) 2020-2022 OpenCFD Ltd
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::compressible::thermalBaffleFvPatchScalarField
29
30Group
31 grpThermoBoundaryConditions
32
33Description
34 This boundary condition provides a coupled temperature condition between
35 multiple mesh regions.
36
37 The regions are generally referred to as the:
38 - primary region,
39 - and baffle region.
40
41 The primary region creates the baffle region and evolves its energy
42 equation either:
43 - 1-D, normal to each patch face
44 - 3-D, normal and tangential components
45
46 The thermodynamic properties of the baffle material are specified via
47 dictionary entries on the master patch.
48
49 The underlying polyPatch on the primary region needs to be defined
50 as a complete mappedWall. i.e:
51
52 \verbatim
53 type mappedWall;
54 sampleMode nearestPatchFace;
55 samplePatch <patchName>;
56 sampleRegion <regionName>;
57
58 coupleGroup <coupleGroupName>;
59
60 \endverbatim
61
62 The /keyword{internal} is true when the thermal baffle is used on internal
63 faces and the baffle is coupled on both sides (bottom and top).
64
65 If this baffle is used on a patch set internal = false. By default is
66 true.
67
68 \table
69 Property | Description | Required | Default value
70 Tnbr | name of the field | no | T
71 qrNbr | name of the radiative flux in the nbr region | no | none
72 qr | name of the radiative flux in this region | no | none
73 thicknessLayers | inherited from temperatureCoupledBase | inherited
74 kappaLayers | inherited from temperatureCoupledBase | inherited
75 kappaMethod | inherited from temperatureCoupledBase | inherited
76 kappa | inherited from temperatureCoupledBase | inherited
77 thermalInertia | Add thermal inertia to wall node | no | false
78 region | Name of the solid region | yes
79 active | Active | yes
80 internal | Is the baffle an internal regiion | no | true
81 thermoType | Solid thermo type | yes
82 mixture | Mixture solid | yes
83 radiation | Radiation model in the solid | yes
84 extrudeModel | Extrude model | yes
85 nLayers | Number of cell across the ragion | yes
86 expansionRatio | Expansion ratio for the solid region | yes
87 columnCells | true for 1D or false for 3D region | yes
88
89 \endtable
90
91Usage
92 Example of the boundary condition specification:
93 \verbatim
94 <masterPatchName>
95 {
96 type compressible::thermalBaffle;
97
98 // Underlying coupled boundary condition
99 Tnbr T;
100 kappaMethod fluidThermo; // or solidThermo
101 kappa none;
102 qrNbr qr;//or none.Name of qr field on neighbourregion
103 qr none;// or none.Name of qr field on localregion
104 value uniform 300;
105
106 // Baffle region name
107 region baffleRegion;
108 active yes;
109 internal yes;
110
111 // Solid thermo in solid region
112 thermoType
113 {
114 type heSolidThermo;
115 mixture pureMixture;
116 transport constIso;
117 thermo hConst;
118 equationOfState rhoConst;
119 specie specie;
120 energy sensibleEnthalpy;
121 }
122
123 mixture
124 {
125 specie
126 {
127 molWeight 20;
128 }
129 transport
130 {
131 kappa 0.01;
132 }
133 thermodynamics
134 {
135 Hf 0;
136 Cp 15;
137 }
138 density
139 {
140 rho 80;
141 }
142 }
143
144 radiation
145 {
146 radiationModel opaqueSolid;
147 absorptionEmissionModel none;
148 scatterModel none;
149 }
150
151 // Extrude model for new region
152
153 extrudeModel linearNormal;
154 nLayers 50;
155 expansionRatio 1;
156 columnCells false; //3D or 1D
157 linearNormalCoeffs
158 {
159 thickness 0.02;
160 }
161
162 }
163 \endverbatim
164
165 If the thermal baffle is used on internal faces of the primary region,
166 then the slave in this region is defined as :
167
168 Slave patch on primary region:
169 \verbatim
170 <slavePatchName>
171 {
172 type compressible::thermalBaffle;
173 kappaMethod fluidThermo;
174 kappa none;
175 value uniform 300;
176 \endverbatim
177
178 Patches on baffle region:
179 \verbatim
180 bottom
181 {
182 type compressible::thermalBaffle;
183 kappaMethod solidThermo;
184 kappa none;
185 value uniform 300;
186 }
187
188 top
189 {
190 type compressible::thermalBaffle;
191 kappaMethod solidThermo;
192 kappa none;
193 value uniform 300;
194 }
195 \endverbatim
196
197See also
198 Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
199 Foam::regionModels::thermalBaffleModels::thermalBaffleModel
200
201SourceFiles
202 thermalBaffleFvPatchScalarField.C
203
204\*---------------------------------------------------------------------------*/
205
206#ifndef Foam_thermalBaffleFvPatchScalarField_H
207#define Foam_thermalBaffleFvPatchScalarField_H
208
209#include "regionModel.H"
210#include "thermalBaffleModel.H"
211#include "extrudePatchMesh.H"
213
214// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215
216
217namespace Foam
218{
219namespace compressible
220{
221
222/*---------------------------------------------------------------------------*\
223 Class thermalBaffleFvPatchScalarField Declaration
224\*---------------------------------------------------------------------------*/
225
227:
229{
230 // Typedefs
231
232 //- The parent boundary condition type
233 typedef
235 parent_bctype;
236
237 //- The baffle region model
238 typedef
239 regionModels::thermalBaffleModels::thermalBaffleModel
240 baffleType;
241
242
243 // Private Data
244
245 //- Enumeration of patch IDs
246 enum patchID
247 {
248 bottomPatchID,
249 topPatchID,
250 sidePatchID
251 };
252
253 //- Is the baffle owner
254 bool owner_;
255
256 //- Is the baffle internal
257 bool internal_;
258
259 //- Dictionary
260 dictionary dict_;
261
262 //- Thermal baffle
263 autoPtr<baffleType> baffle_;
264
265 //- Auto pointer to extrapolated mesh from patch
266 autoPtr<extrudePatchMesh> extrudeMeshPtr_;
267
268
269 // Private Member Functions
270
271 //- Extrude mesh
272 void createPatchMesh();
273
274public:
275
276 //- Runtime type information
277 TypeName("compressible::thermalBaffle");
278
279
280 // Constructors
281
282 //- Construct from patch and internal field
284 (
285 const fvPatch&,
286 const DimensionedField<scalar, volMesh>&
287 );
288
289 //- Construct from patch, internal field and dictionary
291 (
292 const fvPatch&,
293 const DimensionedField<scalar, volMesh>&,
294 const dictionary&
295 );
296
297 //- Construct by mapping given
298 // thermalBaffleFvPatchScalarField onto a new patch
300 (
302 const fvPatch&,
303 const DimensionedField<scalar, volMesh>&,
305 );
306
307 //- Construct as copy setting internal field reference
309 (
312 );
313
314 //- Return a clone
315 virtual tmp<fvPatchField<scalar>> clone() const
316 {
317 return fvPatchField<scalar>::Clone(*this);
318 }
319
320 //- Clone with an internal field reference
322 (
324 ) const
325 {
326 return fvPatchField<scalar>::Clone(*this, iF);
327 }
328
329
330 // Member Functions
331
332 //- Update the coefficients associated with the patch field
333 virtual void updateCoeffs();
334
335 //- Write
336 virtual void write(Ostream&) const;
337};
338
339
340// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
341
342} // End namespace compressible
343} // End namespace Foam
344
345// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
346
347
348#endif
349
350// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
This boundary condition provides a coupled temperature condition between multiple mesh regions.
thermalBaffleFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual tmp< fvPatchField< scalar > > clone(const DimensionedField< scalar, volMesh > &iF) const
Clone with an internal field reference.
virtual tmp< fvPatchField< scalar > > clone() const
Return a clone.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName("compressible::thermalBaffle")
Runtime type information.
Mixed boundary condition for temperature and radiation heat transfer, suitable for multiregion cases....
turbulentTemperatureRadCoupledMixedFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
A FieldMapper for finite-volume patch fields.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition fvPatch.H:71
A class for managing temporary objects.
Definition tmp.H:75
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68