AtomizationModel.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-------------------------------------------------------------------------------
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::AtomizationModel
28
29Group
30 grpLagrangianIntermediateAtomizationSubModels
31
32Description
33 Templated atomization model class
34
35SourceFiles
36 AtomizationModel.C
37 AtomizationModelNew.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef AtomizationModel_H
42#define AtomizationModel_H
43
44#include "IOdictionary.H"
45#include "autoPtr.H"
47#include "CloudSubModelBase.H"
48
49// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50
51namespace Foam
52{
53
54/*---------------------------------------------------------------------------*\
55 Class AtomizationModel Declaration
56\*---------------------------------------------------------------------------*/
57
58template<class CloudType>
60:
61 public CloudSubModelBase<CloudType>
62{
63public:
64
65 //- Runtime type information
66 TypeName("atomizationModel");
67
68 //- Declare runtime constructor selection table
70 (
71 autoPtr,
74 (
75 const dictionary& dict,
77 ),
78 (dict, owner)
79 );
80
81
82 // Constructors
83
84 //- Construct null from owner
86
87 //- Construct from dictionary
89 (
90 const dictionary& dict,
92 const word& type
93 );
94
95 //- Construct copy
97
98 //- Construct and return a clone
99 virtual autoPtr<AtomizationModel<CloudType>> clone() const = 0;
100
101
102 //- Destructor
103 virtual ~AtomizationModel();
104
105
106 //- Selector
108 (
109 const dictionary& dict,
111 );
112
113
114 // Member Functions
115
116 //- Average temperature calculation
117 scalar Taverage(const scalar& Tliq, const scalar& Tc) const;
118
119 //- Initial value of liquidCore
120 virtual scalar initLiquidCore() const = 0;
121
122 //- Flag to indicate if chi needs to be calculated
123 virtual bool calcChi() const = 0;
125 virtual void update
126 (
127 const scalar dt,
128 scalar& d,
129 scalar& liquidCore,
130 scalar& tc,
131 const scalar rho,
132 const scalar mu,
133 const scalar sigma,
134 const scalar volFlowRate,
135 const scalar rhoAv,
136 const scalar Urel,
137 const vector& pos,
138 const vector& injectionPos,
139 const scalar pAmbient,
140 const scalar chi,
142 ) const = 0;
143};
144
145
146// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147
148} // End namespace Foam
149
150// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152#define makeAtomizationModel(CloudType) \
153 \
154 typedef Foam::CloudType::sprayCloudType sprayCloudType; \
155 defineNamedTemplateTypeNameAndDebug \
156 ( \
157 Foam::AtomizationModel<sprayCloudType>, \
158 0 \
159 ); \
160 \
161 namespace Foam \
162 { \
163 defineTemplateRunTimeSelectionTable \
164 ( \
165 AtomizationModel<sprayCloudType>, \
166 dictionary \
167 ); \
168 }
169
171#define makeAtomizationModelType(SS, CloudType) \
172 \
173 typedef Foam::CloudType::sprayCloudType sprayCloudType; \
174 defineNamedTemplateTypeNameAndDebug(Foam::SS<sprayCloudType>, 0); \
175 \
176 Foam::AtomizationModel<sprayCloudType>:: \
177 adddictionaryConstructorToTable<Foam::SS<sprayCloudType>> \
178 add##SS##CloudType##sprayCloudType##ConstructorToTable_;
179
180
181// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182
183#ifdef NoRepository
184 #include "AtomizationModel.C"
185#endif
186
187// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188
189#endif
190
191// ************************************************************************* //
Templated atomization model class.
virtual void update(const scalar dt, scalar &d, scalar &liquidCore, scalar &tc, const scalar rho, const scalar mu, const scalar sigma, const scalar volFlowRate, const scalar rhoAv, const scalar Urel, const vector &pos, const vector &injectionPos, const scalar pAmbient, const scalar chi, Random &rndGen) const =0
declareRunTimeSelectionTable(autoPtr, AtomizationModel, dictionary,(const dictionary &dict, CloudType &owner),(dict, owner))
Declare runtime constructor selection table.
virtual ~AtomizationModel()
Destructor.
TypeName("atomizationModel")
Runtime type information.
virtual scalar initLiquidCore() const =0
Initial value of liquidCore.
virtual bool calcChi() const =0
Flag to indicate if chi needs to be calculated.
virtual autoPtr< AtomizationModel< CloudType > > clone() const =0
Construct and return a clone.
scalar Taverage(const scalar &Tliq, const scalar &Tc) const
Average temperature calculation.
static autoPtr< AtomizationModel< CloudType > > New(const dictionary &dict, CloudType &owner)
Selector.
Base class for cloud sub-models.
const CloudType & owner() const
Return const access to the owner cloud.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:75
Random number generator.
Definition: Random.H:60
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
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:113
A class for handling words, derived from Foam::string.
Definition: word.H:68
const volScalarField & mu
mesh update()
Urel
Definition: pEqn.H:56
Namespace for OpenFOAM.
dimensionedScalar pos(const dimensionedScalar &ds)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:598
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73
Random rndGen
Definition: createFields.H:23