Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
lagrangian
intermediate
submodels
Kinematic
InjectionModel
ManualInjection
ManualInjection.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) 1991-2010 OpenCFD Ltd.
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::ManualInjection
26
27
Description
28
Manual injection
29
30
- User specifies
31
- Total mass to inject
32
- Parcel positions in file @c positionsFile
33
- Initial parcel velocity
34
- Parcel diameters obtained by PDF model
35
- All parcels introduced at SOI
36
37
SourceFiles
38
ManualInjection.C
39
40
\*---------------------------------------------------------------------------*/
41
42
#ifndef ManualInjection_H
43
#define ManualInjection_H
44
45
#include <
lagrangianIntermediate/InjectionModel.H
>
46
#include <
pdf/pdf.H
>
47
48
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50
namespace
Foam
51
{
52
53
/*---------------------------------------------------------------------------*\
54
Class ManualInjection Declaration
55
\*---------------------------------------------------------------------------*/
56
57
template
<
class
CloudType>
58
class
ManualInjection
59
:
60
public
InjectionModel
<CloudType>
61
{
62
// Private data
63
64
//- Name of file containing positions data
65
const
word
positionsFile_;
66
67
//- Field of parcel positions
68
vectorIOField
positions_;
69
70
//- Field of parcel diameters
71
scalarList
diameters_;
72
73
//- Initial parcel velocity
74
const
vector
U0_;
75
76
//- Parcel size PDF model
77
const
autoPtr<pdfs::pdf>
parcelPDF_;
78
79
//- Number of particles represented by each parcel
80
scalar nParticlesPerParcel_;
81
82
83
protected
:
84
85
// Protected member functions
86
87
//- Number of parcels to introduce over the time step relative to SOI
88
label
parcelsToInject
89
(
90
const
scalar time0,
91
const
scalar time1
92
)
const
;
93
94
//- Volume of parcels to introduce over the time step relative to SOI
95
scalar
volumeToInject
96
(
97
const
scalar time0,
98
const
scalar time1
99
)
const
;
100
101
102
public
:
103
104
//- Runtime type information
105
TypeName
(
"ManualInjection"
);
106
107
108
// Constructors
109
110
//- Construct from dictionary
111
ManualInjection
112
(
113
const
dictionary
&
dict
,
114
CloudType&
owner
115
);
116
117
118
//- Destructor
119
virtual
~ManualInjection
();
120
121
122
// Member Functions
123
124
//- Flag to indicate whether model activates injection model
125
bool
active
()
const
;
126
127
//- Return the end-of-injection time
128
scalar
timeEnd
()
const
;
129
130
131
// Injection geometry
132
133
//- Set the injection position and owner cell
134
virtual
void
setPositionAndCell
135
(
136
const
label parcelI,
137
const
label nParcels,
138
const
scalar time,
139
vector
& position,
140
label& cellOwner
141
);
142
143
//- Set the parcel properties
144
virtual
void
setProperties
145
(
146
const
label parcelI,
147
const
label nParcels,
148
const
scalar time,
149
typename
CloudType::parcelType&
parcel
150
);
151
152
//- Flag to identify whether model fully describes the parcel
153
virtual
bool
fullyDescribed
()
const
;
154
155
//- Return flag to identify whether or not injection of parcelI is
156
// permitted
157
virtual
bool
validInjection
(
const
label parcelI);
158
};
159
160
161
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162
163
}
// End namespace Foam
164
165
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166
167
#ifdef NoRepository
168
# include <
lagrangianIntermediate/ManualInjection.C
>
169
#endif
170
171
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172
173
#endif
174
175
// ************************ vim: set sw=4 sts=4 et: ************************ //