Loading...
Searching...
No Matches
specularRadiationMixedFvPatchScalarField.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) 2023 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::radiation::specularRadiationMixedFvPatchScalarField
28
29Description
30 This boundary condition provides a specular radiation condition for
31 axisymmetric and symmetry-plane \c fvDOM computations.
32
33 References:
34 \verbatim
35 Standard model (tag:KE):
36 Kumar, P., & Eswaran, V. (2013).
37 A methodology to solve 2D and axisymmetric radiative
38 transfer problems using a general 3D solver.
39 Journal of heat transfer, 135(12).
40 DOI:10.1115/1.4024674
41 \endverbatim
42
43Usage
44 Example of the boundary condition specification:
45 \verbatim
46 <patchName>
47 {
48 // Mandatory entries
49 type specularRadiation;
50
51 // Optional entries
52 interpolate <bool>;
53
54 // Inherited entries
55 patchType <word>;
56 ...
57 }
58 \endverbatim
59
60 where the entries mean:
61 \table
62 Property | Description | Type | Reqd | Deflt
63 type | Type name: turbulentDigitalFilterInlet | word | yes | -
64 interpolate | Flag to enable ray-intensity interp | bool | no | false
65 \endtable
66
67 The inherited entries are elaborated in:
68 - \link mixedFvPatchFields.H \endlink
69
70Note
71 - The condition is limited to the underlying \c wedge and \c symmetryPlane
72 conditions.
73
74SourceFiles
75 specularRadiationMixedFvPatchScalarField.C
76
77\*---------------------------------------------------------------------------*/
78
79#ifndef Foam_specularRadiationMixedFvPatchScalarField_H
80#define Foam_specularRadiationMixedFvPatchScalarField_H
81
82#include "mixedFvPatchFields.H"
83
84// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
85
86namespace Foam
87{
88namespace radiation
89{
90
91/*---------------------------------------------------------------------------*\
92 Class specularRadiationMixedFvPatchScalarField Declaration
93\*---------------------------------------------------------------------------*/
94
96:
97 public mixedFvPatchScalarField
98{
99 // Private Data
100
101 //- Patch normal vector
102 vector n_;
103
104 //- Ray index of this ray
105 label rayID_;
106
107 //- Band index of this ray
108 label lambdaID_;
109
110 //- Flag to enable ray-intensity interpolation
111 const bool interpolate_;
112
113
114 // Private Member Functions
115
116 //- Return the corresponding azimuth angle of a given Cartesian vector
117 scalar azimuthAngle(const vector& d) const;
118
119 //- Return the corresponding polar angle of a given Cartesian vector
120 scalar polarAngle(const vector& d) const;
121
122 //- Return interpolated ray intensity
123 tmp<scalarField> interpolateI
124 (
125 const fvDOM& dom,
126 const label closestRayID
127 ) const;
128
129 //- Return the index of complementary ray
130 label calcComplementaryRayID(const fvDOM& dom) const;
131
132
133public:
134
135 //- Runtime type information
136 TypeName("specularRadiation");
137
138
139 // Constructors
140
141 //- Construct from patch and internal field
143 (
144 const fvPatch&,
146 );
147
148 //- Construct from patch, internal field and dictionary
150 (
151 const fvPatch&,
153 const dictionary&
154 );
155
156 //- Construct by mapping given
157 //- specularRadiationMixedFvPatchScalarField onto a new patch
159 (
161 const fvPatch&,
163 const fvPatchFieldMapper&
164 );
165
166 //- Construct as copy
168 (
170 );
171
172 //- Construct as copy setting internal field reference
174 (
177 );
178
179 //- Return a clone
180 virtual tmp<fvPatchField<scalar>> clone() const
181 {
182 return fvPatchField<scalar>::Clone(*this);
183 }
184
185 //- Clone with an internal field reference
187 (
189 ) const
190 {
191 return fvPatchField<scalar>::Clone(*this, iF);
192 }
193
194
195 // Member Functions
196
197 //- Update the coefficients associated with the patch field
198 virtual void updateCoeffs();
199
200 //- Write
201 virtual void write(Ostream&) const;
202};
203
204
205// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206
207} // End namespace radiation
208} // End namespace Foam
209
210// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211
212
213#endif
214
215// ************************************************************************* //
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:59
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
A FieldMapper for finite-volume patch fields.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition fvPatch.H:71
Finite Volume Discrete Ordinates Method. Solves the RTE equation for n directions in a participating ...
Definition fvDOM.H:117
This boundary condition provides a specular radiation condition for axisymmetric and symmetry-plane f...
specularRadiationMixedFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual tmp< fvPatchField< scalar > > clone(const DimensionedField< scalar, volMesh > &iF) const
Clone with an internal field reference.
virtual tmp< fvPatchField< scalar > > clone() const
Return a clone.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName("specularRadiation")
Runtime type information.
A class for managing temporary objects.
Definition tmp.H:75
Namespace for radiation modelling.
Namespace for OpenFOAM.
Vector< scalar > vector
Definition vector.H:57
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68