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 -------------------------------------------------------------------------------
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::AtomizationModel
28 
29 Group
30  grpLagrangianIntermediateAtomizationSubModels
31 
32 Description
33  Templated atomization model class
34 
35 SourceFiles
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"
46 #include "runTimeSelectionTables.H"
47 #include "CloudSubModelBase.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class AtomizationModel Declaration
56 \*---------------------------------------------------------------------------*/
57 
58 template<class CloudType>
59 class AtomizationModel
60 :
61  public CloudSubModelBase<CloudType>
62 {
63 public:
64 
65  //- Runtime type information
66  TypeName("atomizationModel");
67 
68  //- Declare runtime constructor selection table
70  (
71  autoPtr,
73  dictionary,
74  (
75  const dictionary& dict,
76  CloudType& owner
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,
91  CloudType& owner,
92  const word& type
93  );
94 
95  //- Construct copy
96  AtomizationModel(const AtomizationModel<CloudType>& am);
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
107  static autoPtr<AtomizationModel<CloudType>> New
108  (
109  const dictionary& dict,
110  CloudType& owner
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;
124 
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,
141  Random& rndGen
142  ) const = 0;
143 };
144 
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 } // End namespace Foam
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
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 
170 
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 // ************************************************************************* //
Foam::AtomizationModel::update
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
Foam::constant::physicoChemical::mu
const dimensionedScalar mu
Atomic mass unit.
Definition: createFieldRefs.H:4
Urel
Urel
Definition: pEqn.H:56
Foam::AtomizationModel::calcChi
virtual bool calcChi() const =0
Flag to indicate if chi needs to be calculated.
rho
rho
Definition: readInitialConditions.H:88
Foam::AtomizationModel::clone
virtual autoPtr< AtomizationModel< CloudType > > clone() const =0
Construct and return a clone.
AtomizationModel.C
CloudSubModelBase.H
Foam::AtomizationModel::New
static autoPtr< AtomizationModel< CloudType > > New(const dictionary &dict, CloudType &owner)
Selector.
Definition: AtomizationModelNew.C:36
Foam::CloudType
DSMCCloud< dsmcParcel > CloudType
Definition: makeDSMCParcelBinaryCollisionModels.C:38
Foam::AtomizationModel::~AtomizationModel
virtual ~AtomizationModel()
Destructor.
Definition: AtomizationModel.C:67
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::AtomizationModel::initLiquidCore
virtual scalar initLiquidCore() const =0
Initial value of liquidCore.
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::AtomizationModel::TypeName
TypeName("atomizationModel")
Runtime type information.
Foam::vector
Vector< scalar > vector
A scalar version of the templated Vector.
Definition: vector.H:51
Foam::AtomizationModel::AtomizationModel
AtomizationModel(CloudType &owner)
Construct null from owner.
Definition: AtomizationModel.C:34
IOdictionary.H
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::AtomizationModel::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, AtomizationModel, dictionary,(const dictionary &dict, CloudType &owner),(dict, owner))
Declare runtime constructor selection table.
Foam::type
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:590
rndGen
Random rndGen
Definition: createFields.H:23
sigma
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties)
Foam::AtomizationModel::Taverage
scalar Taverage(const scalar &Tliq, const scalar &Tc) const
Average temperature calculation.
Definition: AtomizationModel.C:75
Foam::pos
dimensionedScalar pos(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:177
autoPtr.H