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 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::compressible::thermalBaffleFvPatchScalarField
29 
30 Group
31  grpThermoBoundaryConditions
32 
33 Description
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 
91 Usage
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 
197 See also
198  Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
199  Foam::regionModels::thermalBaffleModels::thermalBaffleModel
200 
201 SourceFiles
202  thermalBaffleFvPatchScalarField.C
203 
204 \*---------------------------------------------------------------------------*/
205 
206 #ifndef thermalBaffleFvPatchScalarField_H
207 #define thermalBaffleFvPatchScalarField_H
208 
209 
210 #include "autoPtr.H"
211 #include "regionModel.H"
212 #include "thermalBaffleModel.H"
213 #include "extrudePatchMesh.H"
215 
216 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
217 
218 
219 namespace Foam
220 {
221 namespace compressible
222 {
223 
224 /*---------------------------------------------------------------------------*\
225  Class thermalBaffleFvPatchScalarField Declaration
226 \*---------------------------------------------------------------------------*/
227 
228 class thermalBaffleFvPatchScalarField
229 :
230  public turbulentTemperatureRadCoupledMixedFvPatchScalarField
231 {
232  // Typedefs
233 
234  //- The baffle region model
235  typedef
236  regionModels::thermalBaffleModels::thermalBaffleModel
237  baffleType;
238 
239 
240  // Private Data
241 
242  //- Enumeration of patch IDs
243  enum patchID
244  {
245  bottomPatchID,
246  topPatchID,
247  sidePatchID
248  };
249 
250  //- Is the baffle owner
251  bool owner_;
252 
253  //- Is the baffle internal
254  bool internal_;
255 
256  //- Thermal baffle
257  autoPtr<baffleType> baffle_;
258 
259  //- Dictionary
260  dictionary dict_;
261 
262  //- Auto pointer to extrapolated mesh from patch
263  autoPtr<extrudePatchMesh> extrudeMeshPtr_;
264 
265 
266  // Private Member Functions
267 
268  //- Extrude mesh
269  void createPatchMesh();
270 
271 public:
272 
273  //- Runtime type information
274  TypeName("compressible::thermalBaffle");
275 
276 
277  // Constructors
278 
279  //- Construct from patch and internal field
281  (
282  const fvPatch&,
283  const DimensionedField<scalar, volMesh>&
284  );
285 
286  //- Construct from patch, internal field and dictionary
288  (
289  const fvPatch&,
290  const DimensionedField<scalar, volMesh>&,
291  const dictionary&
292  );
293 
294  //- Construct by mapping given
295  // thermalBaffleFvPatchScalarField onto a new patch
297  (
299  const fvPatch&,
300  const DimensionedField<scalar, volMesh>&,
301  const fvPatchFieldMapper&
302  );
303 
304 
305  //- Construct and return a clone
307  {
309  (
311  );
312  }
313 
314  //- Construct as copy setting internal field reference
316  (
319  );
320 
321  //- Construct and return a clone setting internal field reference
323  (
325  ) const
326  {
328  (
329  new thermalBaffleFvPatchScalarField(*this, iF)
330  );
331  }
332 
333 
334  // Member Functions
335 
336  //- Update the coefficients associated with the patch field
337  virtual void updateCoeffs();
338 
339  //- Write
340  virtual void write(Ostream&) const;
341 };
342 
343 
344 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
345 
346 } // End namespace compressible
347 } // End namespace Foam
348 
349 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
350 
351 
352 #endif
353 
354 // ************************************************************************* //
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName("compressible::thermalBaffle")
Runtime type information.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
bool compressible
Definition: pEqn.H:2
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
thermalBaffleFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: areaFieldsFwd.H:42
A class for managing temporary objects.
Definition: HashPtrTable.H:50
This boundary condition provides a coupled temperature condition between multiple mesh regions...
Namespace for OpenFOAM.