InjectionModelList.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2012-2023 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>
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
64 
65  //- Construct copy
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 
94  // Edit
95 
96  //- Set injector locations when mesh is updated
97  void topoChange();
98 
99 
100  // Per-injection event functions
101 
102  //- Main injection loop
103  template<class TrackCloudType>
104  void inject
105  (
106  TrackCloudType& cloud,
107  typename CloudType::parcelType::trackingData& td
108  );
109 
110  //- Main injection loop - steady-state
111  template<class TrackCloudType>
112  void injectSteadyState
113  (
114  TrackCloudType& cloud,
115  typename CloudType::parcelType::trackingData& td
116  );
117 
118 
119  // I-O
120 
121  //- Write injection info to stream
122  virtual void info(Ostream& os);
123 };
124 
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 } // End namespace Foam
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #ifdef NoRepository
133  #include "InjectionModelList.C"
134 #endif
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 #endif
139 
140 // ************************************************************************* //
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:80
List of injection models.
InjectionModelList(CloudType &owner)
Construct null from owner.
void topoChange()
Set injector locations when mesh is updated.
void inject(TrackCloudType &cloud, typename CloudType::parcelType::trackingData &td)
Main injection loop.
virtual ~InjectionModelList()
Destructor.
virtual void info(Ostream &os)
Write injection info to stream.
scalar timeStart() const
Return the minimum start-of-injection time.
void injectSteadyState(TrackCloudType &cloud, typename CloudType::parcelType::trackingData &td)
Main injection loop - steady-state.
virtual autoPtr< InjectionModelList< CloudType > > clone() const
Construct and return a clone.
scalar timeEnd() const
Return the maximum end-of-injection time.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: PtrList.H:75
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A cloud is a collection of lagrangian particles.
Definition: cloud.H:55
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
Namespace for OpenFOAM.
dictionary dict