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 | Copyright (C) 2011-2017 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::thermalBaffleFvPatchScalarField
26 
27 Group
28  grpThermoBoundaryConditions
29 
30 Description
31  This boundary condition provides a coupled temperature condition between
32  multiple mesh regions.
33 
34  The regions are generally referred to as the:
35  - primary region,
36  - and baffle region.
37 
38  The primary region creates the baffle region and evolves its energy
39  equation either:
40  - 1-D, normal to each patch face
41  - 2-D, normal and tangential components
42 
43  The thermodynamic properties of the baffle material are specified via
44  dictionary entries on the master patch.
45 
46 Usage
47  Example of the boundary condition specification:
48  \verbatim
49  <masterPatchName>
50  {
51  type compressible::thermalBaffle;
52 
53  // Underlaying coupled boundary condition
54  Tnbr T;
55  kappa fluidThermo; // or solidThermo
56  KappaName none;
57  qrNbr qr;//or none.Name of qr field on neighbourregion
58  qr none;// or none.Name of qr field on localregion
59  value uniform 300;
60 
61  // Baffle region name
62  regionName baffleRegion;
63  active yes;
64 
65  // Solid thermo in solid region
66  thermoType
67  {
68  type heSolidThermo;
69  mixture pureMixture;
70  transport constIso;
71  thermo hConst;
72  equationOfState rhoConst;
73  specie specie;
74  energy sensibleEnthalpy;
75  }
76 
77  mixture
78  {
79  specie
80  {
81  molWeight 20;
82  }
83  transport
84  {
85  kappa 0.01;
86  }
87  thermodynamics
88  {
89  Hf 0;
90  Cp 15;
91  }
92  density
93  {
94  rho 80;
95  }
96  }
97 
98  radiation
99  {
100  radiationModel opaqueSolid;
101  absorptionEmissionModel none;
102  scatterModel none;
103  }
104 
105  // Extrude model for new region
106 
107  extrudeModel linearNormal;
108  nLayers 50;
109  expansionRatio 1;
110  columnCells false; //3D or 1D
111  linearNormalCoeffs
112  {
113  thickness 0.02;
114  }
115 
116  }
117  \endverbatim
118 
119  Slave patch on primary region:
120  \verbatim
121  <slavePatchName>
122  {
123  type compressible::thermalBaffle;
124  kappa fluidThermo;
125  kappaName none;
126  value uniform 300;
127  \endverbatim
128 
129  Patches on baffle region:
130  \verbatim
131  bottom
132  {
133  type compressible::thermalBaffle;
134  kappa solidThermo;
135  kappaName none;
136  value uniform 300;
137  }
138 
139  top
140  {
141  type compressible::thermalBaffle;
142  kappa solidThermo;
143  kappaName none;
144  value uniform 300;
145  }
146  \endverbatim
147 
148 See also
149  Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
150  Foam::regionModels::thermalBaffleModels::thermalBaffleModel
151 
152 SourceFiles
153  thermalBaffleFvPatchScalarField.C
154 
155 \*---------------------------------------------------------------------------*/
156 
157 #ifndef thermalBaffleFvPatchScalarField_H
158 #define thermalBaffleFvPatchScalarField_H
159 
160 
161 #include "autoPtr.H"
162 #include "regionModel.H"
163 #include "thermalBaffleModel.H"
164 #include "extrudePatchMesh.H"
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 
170 namespace Foam
171 {
172 namespace compressible
173 {
174 
175 /*---------------------------------------------------------------------------*\
176  Class thermalBaffleFvPatchScalarField Declaration
177 \*---------------------------------------------------------------------------*/
180 :
182 {
183  // Private data
184 
185  //- Enumeration of patch IDs
186  enum patchID
187  {
188  bottomPatchID,
189  topPatchID,
190  sidePatchID
191  };
192 
193  //- Is the baffle owner
194  bool owner_;
195 
196  //- Thermal baffle
198 
199  //- Dictionary
200  dictionary dict_;
201 
202  //- Auto pointer to extrapolated mesh from patch
203  autoPtr<extrudePatchMesh> extrudeMeshPtr_;
204 
205 
206  // Private member functions
207 
208  //- Extrude mesh
209  void createPatchMesh();
210 
211 public:
212 
213  //- Runtime type information
214  TypeName("compressible::thermalBaffle");
215 
216 
217  // Constructors
218 
219  //- Construct from patch and internal field
221  (
222  const fvPatch&,
224  );
225 
226  //- Construct from patch, internal field and dictionary
228  (
229  const fvPatch&,
231  const dictionary&
232  );
233 
234  //- Construct by mapping given
235  // thermalBaffleFvPatchScalarField onto a new patch
237  (
239  const fvPatch&,
241  const fvPatchFieldMapper&
242  );
243 
244 
245  //- Construct and return a clone
246  virtual tmp<fvPatchScalarField> clone() const
247  {
249  (
251  );
252  }
253 
254  //- Construct as copy setting internal field reference
256  (
259  );
260 
261  //- Construct and return a clone setting internal field reference
263  (
265  ) const
266  {
268  (
269  new thermalBaffleFvPatchScalarField(*this, iF)
270  );
271  }
272 
273 
274  // Member functions
275 
276 
277  // Mapping functions
278 
279  //- Map (and resize as needed) from self given a mapping object
280  virtual void autoMap
281  (
282  const fvPatchFieldMapper&
283  );
284 
285  //- Reverse map the given fvPatchField onto this fvPatchField
286  virtual void rmap
287  (
288  const fvPatchScalarField&,
289  const labelList&
290  );
291 
292 
293  //- Update the coefficients associated with the patch field
294  virtual void updateCoeffs();
295 
296  //- Write
297  virtual void write(Ostream&) const;
298 };
299 
300 
301 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
302 
303 } // End namespace compressible
304 } // End namespace Foam
305 
306 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
307 
308 
309 #endif
310 
311 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Mixed boundary condition for temperature and radiation heat transfer to be used for in multiregion ca...
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:66
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName("compressible::thermalBaffle")
Runtime type information.
Foam::fvPatchFieldMapper.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
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...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
A class for managing temporary objects.
Definition: PtrList.H:53
This boundary condition provides a coupled temperature condition between multiple mesh regions...
Namespace for OpenFOAM.
bool compressible
Definition: pEqn.H:30