laserDTRM.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) 2017-2019 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::laserDTRM
28
29Group
30 grpRadiationModels
31
32Description
33 Discrete Tray Radiation Method for collimated radiation flux.
34 At the moment the particles are injected on a 2D disk in polar
35 coordinates providing starting and finish locations.
36
37 The ray is considered planar (no area divergence is considered). This
38 model was developed to represent a collimated laser beam.
39
40 The model is developed to work in a VOF framework, representing different
41 phases.
42
43 Reflection models are possible to set up between phases.
44
45 Different options are available in order to specify the power distribution
46 at the origin of the laser.
47
48SourceFiles
49 laserDTRM.C
50
51\*---------------------------------------------------------------------------*/
52
53#ifndef radiationModellaserDTRM_H
54#define radiationModellaserDTRM_H
55
56#include "radiationModel.H"
57#include "volFields.H"
58#include "surfaceFields.H"
59#include "Cloud.H"
60#include "DTRMParticle.H"
61#include "reflectionModel.H"
62#include "Function1.H"
64#include "labelField.H"
65#include "phasePairKey.H"
66#include "Enum.H"
67
68// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
69
70namespace Foam
71{
72namespace radiation
73{
74
75/*---------------------------------------------------------------------------*\
76 Class laserDTRM Declaration
77\*---------------------------------------------------------------------------*/
79class laserDTRM
80:
81 public radiationModel
82{
83public:
84
85 // Public enumeration
86
87 //- Modes of power distribution
89 {
94 };
95
96
97private:
98
99
100 // Private types
101
102 typedef
104
105
106 typedef
108 <
112 > reflectionModelTable;
113
114
115 // Private data
116
117 static const Enum<powerDistributionMode> powerDistNames_;
118
119 //- Operating mode for power distribution
121
122 //- DTRM particle cloud
123 Cloud<DTRMParticle> DTRMCloud_;
124
125 //- Number of particles
126 label nParticles_;
127
128 //- Number of theta angles
129 label ndTheta_;
130
131 //- Number of radials
132 label ndr_;
133
134 //- Maximum tracking length for particles
135 scalar maxTrackLength_;
136
137
138 // Laser parameters
139
140 //- Focal laser position
141 autoPtr<Function1<point>> focalLaserPosition_;
142
143 //- Direction
144 autoPtr<Function1<vector>> laserDirection_;
145
146 //- Focal lase radius
147 scalar focalLaserRadius_;
148
149 //- Quality beam laser (tan of the angle between the main direction
150 // (laserDirection) and the spreading rays (0: flat, 1:fully)
151 scalar qualityBeamLaser_;
152
153
154 // Gaussian power distribution entries
155
156 //- Sigma deviation
157 scalar sigma_;
158
159 //- Peak flux for GaussianPeak mode
160 scalar I0_;
161
162 //- Power
163 autoPtr<Function1<scalar>> laserPower_;
164
165
166 // Manual power distribution entries
167
168 //- Manual power distribution table. (theta, radius)
169 autoPtr<interpolation2DTable<scalar>> powerDistribution_;
170
171
172 // Reflection sub-model
173
174 //- Reflection model
175 reflectionModelTable reflections_;
176
177 //- Reflection switch
178 bool reflectionSwitch_;
179
180 //- Alpha value at which reflection is set
181 scalar alphaCut_;
182
183
184 // Fields
185
186
187 //- Absorption coefficient
189
190 //- Emission coefficient
192
193 //- Emission contribution
195
196 //- Volumetric heat source [W/m3]
198
199
200 // Private Member Functions
201
202 //- Initialise
203 void initialise();
204
205 //- Initialise reflection model
206 void initialiseReflection();
207
208 //- Calculate Intensity of the laser at p(t, theta) [W/m2]
209 scalar calculateIp(scalar r, scalar theta);
210
211 // Normal surface on the interface
213 (
214 const volScalarField& alpha1,
216 ) const;
217
218
219 //- No copy construct
220 laserDTRM(const laserDTRM&) = delete;
221
222 //- No copy assignment
223 void operator=(const laserDTRM&) = delete;
224
225
226public:
227
228 //- Runtime type information
229 TypeName("laserDTRM");
230
231
232 // Constructors
233
234 //- Construct from components
235 laserDTRM(const volScalarField& T);
236
237 //- Construct from components
238 laserDTRM(const dictionary& dict, const volScalarField& T);
239
240
241 //- Destructor
242 virtual ~laserDTRM() = default;
243
244
245 // Member functions
246
247 // Edit
248
249 //- Solve radiation equation(s)
250 void calculate();
251
252 //- Read radiation properties dictionary
253 bool read();
254
255 //- Number of bands for this radiation model
256 virtual label nBands() const;
257
258
259 // Access
260
261 //- Source term component (for power of T^4)
262 virtual tmp<volScalarField> Rp() const;
263
264 //- Source term component (constant)
266};
267
268
269// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
270
271} // End namespace radiation
272} // End namespace Foam
273
274// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
275
276#endif
277
278// ************************************************************************* //
const volScalarField & alpha1
const volScalarField & alpha2
Base cloud calls templated on particle type.
Definition: Cloud.H:68
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Definition: Enum.H:61
A HashTable similar to std::unordered_map.
Definition: HashTable.H:123
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
An ordered or unorder pair of phase names. Typically specified as follows.
Definition: phasePairKey.H:68
Discrete Tray Radiation Method for collimated radiation flux. At the moment the particles are injecte...
Definition: laserDTRM.H:81
laserDTRM(const volScalarField &T)
Construct from components.
TypeName("laserDTRM")
Runtime type information.
powerDistributionMode
Modes of power distribution.
Definition: laserDTRM.H:88
virtual label nBands() const
Number of bands for this radiation model.
virtual tmp< DimensionedField< scalar, volMesh > > Ru() const
Source term component (constant)
virtual tmp< volScalarField > Rp() const
Source term component (for power of T^4)
virtual ~laserDTRM()=default
Destructor.
laserDTRM(const dictionary &dict, const volScalarField &T)
Construct from components.
bool read()
Read radiation properties dictionary.
void calculate()
Solve radiation equation(s)
Top level model for radiation modelling.
A class for managing temporary objects.
Definition: tmp.H:65
const volScalarField & T
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Namespace for OpenFOAM.
dictionary dict
Hashing functor for phasePairKey.
Definition: phasePairKey.H:123
Foam::surfaceFields.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73