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 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::ParticleDose
28 
29 Group
30  grpLagrangianIntermediateFunctionObjects
31 
32 Description
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 
44 Usage
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 
65 SourceFiles
66  ParticleDose.C
67 
68 \*---------------------------------------------------------------------------*/
69 
70 #ifndef Foam_ParticleDose_H
71 #define Foam_ParticleDose_H
72 
73 #include "CloudFunctionObject.H"
74 
75 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
76 
77 namespace Foam
78 {
79 
80 /*---------------------------------------------------------------------------*\
81  Class ParticleDose Declaration
82 \*---------------------------------------------------------------------------*/
83 
84 template<class CloudType>
85 class 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 
101 public:
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
115  //- Construct from dictionary
117  (
118  const dictionary& dict,
119  CloudType& owner,
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
160 
161 // ************************************************************************* //
void operator=(const ParticleDose< CloudType > &)=delete
No copy assignment.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
ParticleDose(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
Definition: ParticleDose.C:28
const word & modelName() const
Return const access to the name of the sub-model.
Definition: subModelBase.C:98
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:104
const CloudType & owner() const
Return const access to the owner cloud.
A class for handling words, derived from Foam::string.
Definition: word.H:63
virtual autoPtr< CloudFunctionObject< CloudType > > clone() const
Construct and return a clone.
Definition: ParticleDose.H:170
virtual ~ParticleDose()=default
Destructor.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:290
TypeName("particleDose")
Runtime type information.
Calculate the doses absorbed by a particle as the time integral of the particle track along the radia...
Definition: ParticleDose.H:114
virtual void postEvolve(const typename parcelType::trackingData &td)
Post-evolve hook.
Definition: ParticleDose.C:54
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:67
Namespace for OpenFOAM.