ParticleDose.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) 2022 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::ParticleDose
28
29Group
30 grpLagrangianIntermediateFunctionObjects
31
32Description
33 Calculate the doses absorbed by a particle as the time integral
34 of the particle track along the radiation field G [w/m2].
35
36 Operands:
37 \table
38 Operand | Type | Location
39 input | - | -
40 output file | - | -
41 output field | scalarField | <time>/lagrangian/<cloud>/D
42 \endtable
43
44Usage
45 Minimal example by using \c constant/<CloudProperties>:
46 \verbatim
47 cloudFunctions
48 {
49 ParticleDose1
50 {
51 // Mandatory entries
52 type ParticleDose;
53 GName G;
54 }
55 }
56 \endverbatim
57
58 where the entries mean:
59 \table
60 Property | Description | Type | Reqd | Deflt
61 type | Type name: ParticleDose | word | yes | -
62 GName | Name of the radiation field | word | yes | -
63 \endtable
64
65SourceFiles
66 ParticleDose.C
67
68\*---------------------------------------------------------------------------*/
69
70#ifndef Foam_ParticleDose_H
71#define Foam_ParticleDose_H
72
73#include "CloudFunctionObject.H"
74
75// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
76
77namespace Foam
78{
79
80/*---------------------------------------------------------------------------*\
81 Class ParticleDose Declaration
82\*---------------------------------------------------------------------------*/
83
84template<class CloudType>
85class ParticleDose
86:
87 public CloudFunctionObject<CloudType>
88{
89 // Private Data
90
91 // Typedefs
92
93 //- Convenience typedef for parcel type
94 typedef typename CloudType::parcelType parcelType;
95
96
97 //- Incident radiation field name
98 word GName_;
99
100
101public:
102
103 //- Runtime type information
104 TypeName("particleDose");
105
106
107 // Generated Methods
108
109 //- No copy assignment
110 void operator=(const ParticleDose<CloudType>&) = delete;
111
112
113 // Constructors
114
115 //- Construct from dictionary
117 (
120 const word& modelName
121 );
122
123 //- Copy construct
125
126 //- Construct and return a clone
128 {
130 (
131 new ParticleDose<CloudType>(*this)
132 );
133 }
134
135
136 //- Destructor
137 virtual ~ParticleDose() = default;
138
139
140 // Member Functions
141
142 //- Post-evolve hook
143 virtual void postEvolve(const typename parcelType::trackingData& td);
144};
145
146
147// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148
149} // End namespace Foam
150
151// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152
153#ifdef NoRepository
154 #include "ParticleDose.C"
155#endif
156
157// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158
159#endif
161// ************************************************************************* //
Templated cloud function object base class.
const CloudType & owner() const
Return const access to the owner cloud.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:75
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:220
Calculate the doses absorbed by a particle as the time integral of the particle track along the radia...
Definition: ParticleDose.H:121
virtual autoPtr< CloudFunctionObject< CloudType > > clone() const
Construct and return a clone.
Definition: ParticleDose.H:160
TypeName("particleDose")
Runtime type information.
ParticleDose(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
Definition: ParticleDose.C:35
virtual void postEvolve(const typename parcelType::trackingData &td)
Post-evolve hook.
Definition: ParticleDose.C:61
void operator=(const ParticleDose< CloudType > &)=delete
No copy assignment.
virtual ~ParticleDose()=default
Destructor.
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
Class used to pass data into container.
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:113
const word & modelName() const
Return const access to the name of the sub-model.
Definition: subModelBase.C:107
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73