turbulentTemperatureRadCoupledMixedFvPatchScalarField.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) 2017-2021 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::
29 turbulentTemperatureRadCoupledMixedFvPatchScalarField
30
31Description
32 Mixed boundary condition for temperature and radiation heat transfer
33 to be used for in multiregion cases. Optional thin thermal layer
34 resistances can be specified through thicknessLayers and kappaLayers
35 entries.
36
37 The thermal conductivity \c kappa can either be retrieved from various
38 possible sources, as detailed in the class temperatureCoupledBase.
39
40Usage
41 \table
42 Property | Description | Required | Default value
43 Tnbr | name of the field | no | T
44 qrNbr | name of the radiative flux in the nbr region | no | none
45 qr | name of the radiative flux in this region | no | none
46 thicknessLayers | list of thicknesses per layer [m] | no |
47 kappaLayers | list of thermal conductivites per layer [W/m/K] | no |
48 thicknessLayer | single thickness of layer [m] | no |
49 kappaLayer | corresponding thermal conductivity [W/m/K] | no |
50 kappaMethod | inherited from temperatureCoupledBase | inherited |
51 kappa | inherited from temperatureCoupledBase | inherited |
52 thermalInertia | Add thermal inertia to wall node | no | false
53 \endtable
54
55 Example of the boundary condition specification:
56 \verbatim
57 <patchName>
58 {
59 type compressible::turbulentTemperatureRadCoupledMixed;
60 Tnbr T;
61 qrNbr qr; // or none. Name of qr field on neighbour region
62 qr qr; // or none. Name of qr field on local region
63 thicknessLayers (0.1 0.2 0.3 0.4);
64 kappaLayers (1 2 3 4);
65 thermalInertia false/true;
66 kappaMethod lookup;
67 kappa kappa;
68 value uniform 300;
69 }
70 \endverbatim
71
72 Needs to be on underlying mapped(Wall)FvPatch.
73
74See also
75 Foam::temperatureCoupledBase
76
77SourceFiles
78 turbulentTemperatureRadCoupledMixedFvPatchScalarField.C
79
80\*---------------------------------------------------------------------------*/
81
82#ifndef turbulentTemperatureRadCoupledMixedFvPatchScalarField_H
83#define turbulentTemperatureRadCoupledMixedFvPatchScalarField_H
84
85#include "mixedFvPatchFields.H"
87#include "scalarList.H"
89
90// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
91
92namespace Foam
93{
94namespace compressible
95{
96
97/*---------------------------------------------------------------------------*\
98 Class turbulentTemperatureRadCoupledMixedFvPatchScalarField Declaration
99\*---------------------------------------------------------------------------*/
100
101class turbulentTemperatureRadCoupledMixedFvPatchScalarField
102:
103 public mixedFvPatchScalarField,
104 public temperatureCoupledBase,
105 public mappedPatchFieldBase<scalar>
106{
107
108 // Private Data
109
110 //- Name of field on the neighbour region
111 const word TnbrName_;
112
113 //- Name of the radiative heat flux in the neighbour region
114 const word qrNbrName_;
115
116 //- Name of the radiative heat flux in local region
117 const word qrName_;
118
119 //- Thickness of layers (either scalarList or a single PatchFunction1)
120 scalarList thicknessLayers_;
121 autoPtr<PatchFunction1<scalar>> thicknessLayer_;
122
123 //- Conductivity of layers
124 scalarList kappaLayers_;
125 autoPtr<PatchFunction1<scalar>> kappaLayer_;
126
127 //- Thermal inertia term
128 Switch thermalInertia_;
129
130
131 // Private Functions
132
133 //- Return local alphaSfDelta
134 tmp<scalarField> alphaSfDelta() const;
135
136 //- Return delta enthalpy between regions
137 tmp<scalarField> deltaH() const;
138
139 //- Return the sum of deltaCoeff*alpha from nbr and local
140 tmp<scalarField> beta() const;
141
142
143 //- Calculate coefficients for assembly matrix
144 tmp<Field<scalar>> coeffs
145 (
146 fvMatrix<scalar>& matrix,
147 const Field<scalar>&,
148 const label
149 ) const;
150
151
152public:
153
154 //- Runtime type information
155 TypeName("compressible::turbulentTemperatureRadCoupledMixed");
156
157
158 // Constructors
159
160 //- Construct from patch and internal field
162 (
163 const fvPatch&,
165 );
166
167 //- Construct from patch, internal field and dictionary
169 (
170 const fvPatch&,
172 const dictionary&
173 );
174
175 //- Construct by mapping given
176 // turbulentTemperatureCoupledBaffleMixedFvPatchScalarField onto a
177 // new patch
179 (
180 const
182 const fvPatch&,
184 const fvPatchFieldMapper&
185 );
186
187 //- Construct as copy
189 (
191 );
192
193 //- Construct and return a clone
194 virtual tmp<fvPatchScalarField> clone() const
195 {
197 (
199 (
200 *this
201 )
202 );
203 }
204
205 //- Construct as copy setting internal field reference
207 (
210 );
211
212 //- Construct and return a clone setting internal field reference
214 (
216 ) const
217 {
219 (
221 (
222 *this,
223 iF
224 )
225 );
226 }
227
228
229 // Member Functions
230
231 // Mapping functions
232
233 //- Map (and resize as needed) from self given a mapping object
234 virtual void autoMap
235 (
236 const fvPatchFieldMapper&
237 );
238
239 //- Reverse map the given fvPatchField onto this fvPatchField
240 virtual void rmap
241 (
243 const labelList&
244 );
245
246
247 //- Given patch temperature calculate corresponding K field. Override
248 //- temperatureCoupledBase::kappa to includes effect of any
249 //- explicit kappaThickness
250 virtual tmp<scalarField> kappa(const scalarField& Tp) const;
251
252 //- Update the coefficients associated with the patch field
253 virtual void updateCoeffs();
254
255 //- Manipulate matrix
256 virtual void manipulateMatrix
257 (
259 const label iMatrix,
260 const direction cmpt
261 );
262
263
264 //- Write
265 virtual void write(Ostream& os) const;
267
268
269// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
270
271} // End namespace compressible
272} // End namespace Foam
273
274// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
275
276#endif
277
278// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic templated field type.
Definition: Field.H:82
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:78
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Mixed boundary condition for temperature and radiation heat transfer to be used for in multiregion ca...
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual void rmap(const fvPatchField< scalar > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
TypeName("compressible::turbulentTemperatureRadCoupledMixed")
Runtime type information.
virtual void manipulateMatrix(fvMatrix< scalar > &m, const label iMatrix, const direction cmpt)
Manipulate matrix.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvMatrix.H:121
A FieldMapper for finite-volume patch fields.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:82
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
Functionality for sampling fields using mappedPatchBase. Every call to mappedField() returns a sample...
Common functions used in temperature coupled boundaries.
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
OBJstream os(runTime.globalPath()/outputName)
bool compressible
Definition: pEqn.H:2
Namespace for OpenFOAM.
List< scalar > scalarList
A List of scalars.
Definition: scalarList.H:64
uint8_t direction
Definition: direction.H:56
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73