All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
thermalBaffleFvPatchScalarField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2022 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 Description
28  This boundary condition provides a coupled temperature condition between
29  multiple mesh regions.
30 
31  The regions are generally referred to as the:
32  - primary region,
33  - and baffle region.
34 
35  The primary region creates the baffle region and evolves its energy
36  equation either:
37  - 1-D, normal to each patch face
38  - 2-D, normal and tangential components
39 
40  The thermodynamic properties of the baffle material are specified via
41  dictionary entries on the master patch.
42 
43 Usage
44  Example of the boundary condition specification:
45  \verbatim
46  <masterPatchName>
47  {
48  type compressible::thermalBaffle;
49 
50  // Underlying coupled boundary condition
51  Tnbr T;
52  qrNbr qr;//or none.Name of qr field on neighbourregion
53  qr none;// or none.Name of qr field on localregion
54  value uniform 300;
55 
56  // Baffle region name
57  regionName baffleRegion;
58 
59  // Solid thermo in solid region
60  thermoType
61  {
62  type heSolidThermo;
63  mixture pureMixture;
64  transport constIso;
65  thermo eConst;
66  equationOfState rhoConst;
67  specie specie;
68  energy sensibleInternalEnergy;
69  }
70 
71  mixture
72  {
73  specie
74  {
75  molWeight 20;
76  }
77  transport
78  {
79  kappa 0.01;
80  }
81  thermodynamics
82  {
83  Hf 0;
84  Cv 15;
85  }
86  density
87  {
88  rho 80;
89  }
90  }
91 
92  radiation
93  {
94  radiationModel opaqueSolid;
95  absorptionEmissionModel none;
96  scatterModel none;
97  }
98 
99  // Extrude model for new region
100 
101  extrudeModel linearNormal;
102  nLayers 50;
103  expansionRatio 1;
104  columnCells false; //3D or 1D
105  linearNormalCoeffs
106  {
107  thickness 0.02;
108  }
109 
110  }
111  \endverbatim
112 
113  Slave patch on primary region:
114  \verbatim
115  <slavePatchName>
116  {
117  type compressible::thermalBaffle;
118  value uniform 300;
119  \endverbatim
120 
121  Patches on baffle region:
122  \verbatim
123  bottom
124  {
125  type compressible::thermalBaffle;
126  value uniform 300;
127  }
128 
129  top
130  {
131  type compressible::thermalBaffle;
132  value uniform 300;
133  }
134  \endverbatim
135 
136 See also
137  Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
138  Foam::regionModels::thermalBaffleModels::thermalBaffleModel
139 
140 SourceFiles
141  thermalBaffleFvPatchScalarField.C
142 
143 \*---------------------------------------------------------------------------*/
144 
145 #ifndef thermalBaffleFvPatchScalarField_H
146 #define thermalBaffleFvPatchScalarField_H
147 
148 #include "thermalBaffleModel.H"
149 #include "extrudePatchMesh.H"
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 namespace Foam
155 {
156 namespace compressible
157 {
158 
159 /*---------------------------------------------------------------------------*\
160  Class thermalBaffleFvPatchScalarField Declaration
161 \*---------------------------------------------------------------------------*/
164 :
166 {
167  // Private Data
168 
169  //- Dictionary
170  dictionary dict_;
171 
172  //- The neighbouring baffle patch name
173  const word nbrPatch_;
174 
175  //- Thermal baffle mesh extruded from this patch
176  autoPtr<extrudePatchMesh> baffleMeshPtr_;
177 
178  //- Thermal baffle model
180 
181 
182  // Private Member Functions
183 
184  //- Is this patch in the primary region?
185  bool primary() const;
186 
187  //- Is this patch the owner?
188  bool owner() const;
189 
190  //- Check consistency of the patch settings
191  void checkPatches() const;
192 
193  //- Check consistency of the patch field settings
194  void checkPatchFields() const;
195 
196  //- Construct and return the thermal baffle mesh
197  autoPtr<extrudePatchMesh> initBaffleMesh() const;
198 
199  //- Construct and return the thermal baffle model
201 
202 
203 public:
204 
205  //- Runtime type information
206  TypeName("compressible::thermalBaffle");
207 
208 
209  // Constructors
210 
211  //- Construct from patch and internal field
213  (
214  const fvPatch&,
216  );
217 
218  //- Construct from patch, internal field and dictionary
220  (
221  const fvPatch&,
223  const dictionary&
224  );
225 
226  //- Construct by mapping given
227  // thermalBaffleFvPatchScalarField onto a new patch
229  (
231  const fvPatch&,
233  const fvPatchFieldMapper&
234  );
235 
236  //- Construct as copy setting internal field reference
238  (
241  );
242 
243  //- Construct and return a clone setting internal field reference
245  (
247  ) const
248  {
250  (
251  new thermalBaffleFvPatchScalarField(*this, iF)
252  );
253  }
254 
255 
256  // Member Functions
257 
258  // Mapping functions
259 
260  //- Map (and resize as needed) from self given a mapping object
261  // Used to update fields following mesh topology change
262  virtual void autoMap(const fvPatchFieldMapper&);
263 
264  //- Reverse map the given fvPatchField onto this fvPatchField
265  // Used to reconstruct fields
266  virtual void rmap(const fvPatchScalarField&, const labelList&);
267 
268  //- Reset the fvPatchField to the given fvPatchField
269  // Used for mesh to mesh mapping
270  virtual void reset(const fvPatchScalarField&);
271 
272 
273  //- Update the coefficients associated with the patch field
274  virtual void updateCoeffs();
275 
276  //- Write
277  virtual void write(Ostream&) const;
278 };
279 
280 
281 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
282 
283 } // End namespace compressible
284 } // End namespace Foam
285 
286 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
287 
288 #endif
289 
290 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:63
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.
A class for handling words, derived from string.
Definition: word.H:59
TypeName("compressible::thermalBaffle")
Runtime type information.
Foam::fvPatchFieldMapper.
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
thermalBaffleFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void reset(const fvPatchScalarField &)
Reset the fvPatchField to the given fvPatchField.
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.