greyDiffusiveRadiationMixedFvPatchScalarField.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-2016 OpenFOAM Foundation
9 Copyright (C) 2016-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::radiation::greyDiffusiveRadiationMixedFvPatchScalarField
29
30Group
31 grpThermoBoundaryConditions
32
33Description
34 This boundary condition provides a grey-diffuse condition for radiation
35 intensity, \c I, for use with the finite-volume discrete-ordinates model
36 (fvDOM), in which the radiation temperature is retrieved from the
37 temperature field boundary condition.
38
39 An external radiative heat flux can be added using \c qRadExt. If
40 \c qRadExtDir is specified, this ray closest to this direction is used.
41 Otherwise, the face normal is used as direction to set \c qRadExt.
42
43Usage
44 Example of the boundary condition specification:
45 \verbatim
46 <patchName>
47 {
48 // Mandatory entries
49 type greyDiffusiveRadiation;
50
51 // Optional entries
52 T T;
53 qRadExt <scalar>;
54 qRadExtDir <vector>;
55
56 // Inherited entries
57 ...
58 }
59 \endverbatim
60
61 where the entries mean:
62 \table
63 Property | Description | Type | Reqd | Deflt
64 type | Type name: greyDiffusiveRadiation | word | yes | -
65 T | Name of temperature field | word | no | T
66 qRadExt | Radiative external flux | scalar | no | Zero
67 qRadExtDir | Radiative external flux direction | vector | no | Zero
68 \endtable
69
70 The inherited entries are elaborated in:
71 - \link mixedFvPatchFields.H \endlink
72
73See also
74 - Foam::radiation::radiationModel
75 - Foam::radiation::fvDOM
76 - Foam::radiationCoupledBase
77 - Foam::mixedFvPatchField
78
79SourceFiles
80 greyDiffusiveRadiationMixedFvPatchScalarField.C
81
82\*---------------------------------------------------------------------------*/
83
84#ifndef radiation_greyDiffusiveRadiationMixedFvPatchScalarField_H
85#define radiation_greyDiffusiveRadiationMixedFvPatchScalarField_H
86
87#include "mixedFvPatchFields.H"
88
89// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
90
91namespace Foam
92{
93namespace radiation
94{
95/*---------------------------------------------------------------------------*\
96 Class greyDiffusiveRadiationMixedFvPatchScalarField Declaration
97\*---------------------------------------------------------------------------*/
98
99class greyDiffusiveRadiationMixedFvPatchScalarField
100:
101 public mixedFvPatchScalarField
102{
103 // Private Data
104
105 //- Name of temperature field
106 word TName_;
107
108 //- External radiative flux
109 scalar qRadExt_;
110
111 //- External radiative flux direction
112 vector qRadExtDir_;
113
114
115public:
116
117 //- Runtime type information
118 TypeName("greyDiffusiveRadiation");
119
120
121 // Constructors
122
123 //- Construct from patch and internal field
125 (
126 const fvPatch&,
127 const DimensionedField<scalar, volMesh>&
128 );
129
130 //- Construct from patch, internal field and dictionary
132 (
133 const fvPatch&,
135 const dictionary&
136 );
137
138 //- Construct by mapping given a
139 //- greyDiffusiveRadiationMixedFvPatchScalarField onto a new patch
141 (
143 const fvPatch&,
145 const fvPatchFieldMapper&
146 );
148 //- Construct as copy
150 (
152 );
153
154 //- Construct and return a clone
155 virtual tmp<fvPatchScalarField> clone() const
156 {
158 (
160 );
161 }
162
163 //- Construct as copy setting internal field reference
165 (
168 );
169
170 //- Construct and return a clone setting internal field reference
172 (
174 ) const
175 {
177 (
179 );
180 }
181
182
183 // Member Functions
185 // Access
186
187 //- Return the temperature field name
188 const word& TName() const noexcept
189 {
190 return TName_;
191 }
192
193 //- Return reference to the temperature field name to allow
194 //- adjustment
196 {
197 return TName_;
198 }
199
201 // Evaluation
202
203 //- Update the coefficients associated with the patch field
204 virtual void updateCoeffs();
205
206
207 // I-O
208
209 //- Write
210 virtual void write(Ostream&) const;
211};
212
213
214// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215
216} // End namespace Foam
218
219// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
220
221#endif
222
223// ************************************************************************* //
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:62
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
This boundary condition provides a grey-diffuse condition for radiation intensity,...
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
const word & TName() const noexcept
Return the temperature field name.
greyDiffusiveRadiationMixedFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
TypeName("greyDiffusiveRadiation")
Runtime type information.
A class for managing temporary objects.
Definition: tmp.H:65
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
A class for handling words, derived from Foam::string.
Definition: word.H:68
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Namespace for OpenFOAM.
const direction noexcept
Definition: Scalar.H:223
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73