InjectionModelList.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 | Copyright (C) 2012-2016 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::InjectionModelList
26 
27 Description
28  List of injection models
29 
30 SourceFiles
31  InjectionModelListList.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef InjectionModelList_H
36 #define InjectionModelList_H
37 
38 #include "PtrList.H"
39 #include "InjectionModel.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class InjectionModelList Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 template<class CloudType>
51 class InjectionModelList
52 :
53  public PtrList<InjectionModel<CloudType>>
54 {
55 public:
56 
57  // Constructors
58 
59  //- Construct null from owner
61 
62  //- Construct from dictionary and cloud owner
63  InjectionModelList(const dictionary& dict, CloudType& owner);
64 
65  //- Construct copy
66  InjectionModelList(const InjectionModelList<CloudType>& im);
67 
68  //- Construct and return a clone
70  {
72  (
74  );
75  }
76 
77 
78  //- Destructor
79  virtual ~InjectionModelList();
80 
81 
82 
83  // Member Functions
84 
85  // Access
86 
87  //- Return the minimum start-of-injection time
88  scalar timeStart() const;
89 
90  //- Return the maximum end-of-injection time
91  scalar timeEnd() const;
92 
93  //- Volume of parcels to introduce relative to SOI
94  scalar volumeToInject(const scalar time0, const scalar time1);
95 
96  //- Return the average parcel mass
97  scalar averageParcelMass();
98 
99 
100  // Edit
101 
102  //- Set injector locations when mesh is updated
103  void updateMesh();
104 
105 
106  // Per-injection event functions
107 
108  //- Main injection loop
109  template<class TrackData>
110  void inject(TrackData& td);
111 
112  //- Main injection loop - steady-state
113  template<class TrackData>
114  void injectSteadyState(TrackData& td, const scalar trackTime);
115 
116 
117  // I-O
118 
119  //- Write injection info to stream
120  virtual void info(Ostream& os);
121 };
122 
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 } // End namespace Foam
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 #ifdef NoRepository
131  #include "InjectionModelList.C"
132 #endif
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #endif
137 
138 // ************************************************************************* //
virtual ~InjectionModelList()
Destructor.
dictionary dict
scalar volumeToInject(const scalar time0, const scalar time1)
Volume of parcels to introduce relative to SOI.
DSMCCloud< dsmcParcel > CloudType
scalar timeEnd() const
Return the maximum end-of-injection time.
InjectionModelList(CloudType &owner)
Construct null from owner.
void injectSteadyState(TrackData &td, const scalar trackTime)
Main injection loop - steady-state.
void updateMesh()
Set injector locations when mesh is updated.
scalar averageParcelMass()
Return the average parcel mass.
List of injection models.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
virtual void info(Ostream &os)
Write injection info to stream.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:53
void inject(TrackData &td)
Main injection loop.
virtual autoPtr< InjectionModelList< CloudType > > clone() const
Construct and return a clone.
Namespace for OpenFOAM.
scalar timeStart() const
Return the minimum start-of-injection time.