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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2012-2017 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::InjectionModelList
28
29Description
30 List of injection models
31
32SourceFiles
33 InjectionModelListList.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef InjectionModelList_H
38#define InjectionModelList_H
39
40#include "PtrList.H"
41#include "InjectionModel.H"
42
43// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45namespace Foam
46{
47
48/*---------------------------------------------------------------------------*\
49 Class InjectionModelList Declaration
50\*---------------------------------------------------------------------------*/
51
52template<class CloudType>
54:
55 public PtrList<InjectionModel<CloudType>>
56{
57public:
58
59 // Constructors
60
61 //- Construct null from owner
63
64 //- Construct from dictionary and cloud owner
66
67 //- Construct copy
69
70 //- Construct and return a clone
72 {
74 (
76 );
77 }
78
79
80 //- Destructor
81 virtual ~InjectionModelList();
82
83
84
85 // Member Functions
86
87 // Access
88
89 //- Return the minimum start-of-injection time
90 scalar timeStart() const;
91
92 //- Return the maximum end-of-injection time
93 scalar timeEnd() const;
94
95 //- Volume of parcels to introduce relative to SOI
96 scalar volumeToInject(const scalar time0, const scalar time1);
97
98 //- Return the average parcel mass
99 scalar averageParcelMass();
100
101
102 // Edit
103
104 //- Set injector locations when mesh is updated
105 void updateMesh();
106
107
108 // Per-injection event functions
109
110 //- Main injection loop
111 template<class TrackCloudType>
112 void inject
113 (
114 TrackCloudType& cloud,
116 );
117
118 //- Main injection loop - steady-state
119 template<class TrackCloudType>
121 (
122 TrackCloudType& cloud,
124 const scalar trackTime
125 );
126
127
128 // I-O
129
130 //- Write injection info to stream
131 virtual void info(Ostream& os);
132};
133
134
135// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136
137} // End namespace Foam
138
139// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140
141#ifdef NoRepository
142 #include "InjectionModelList.C"
143#endif
144
145// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146
147#endif
148
149// ************************************************************************* //
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:75
List of injection models.
void inject(TrackCloudType &cloud, typename CloudType::parcelType::trackingData &td)
Main injection loop.
virtual ~InjectionModelList()
Destructor.
scalar volumeToInject(const scalar time0, const scalar time1)
Volume of parcels to introduce relative to SOI.
virtual void info(Ostream &os)
Write injection info to stream.
scalar timeStart() const
Return the minimum start-of-injection time.
scalar averageParcelMass()
Return the average parcel mass.
void injectSteadyState(TrackCloudType &cloud, typename CloudType::parcelType::trackingData &td, const scalar trackTime)
Main injection loop - steady-state.
virtual autoPtr< InjectionModelList< CloudType > > clone() const
Construct and return a clone.
void updateMesh()
Set injector locations when mesh is updated.
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:62
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: PtrList.H:73
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A cloud is a registry collection of lagrangian particles.
Definition: cloud.H:60
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Class used to pass data into container.
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
dictionary dict