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
ConeInjectionMP
ConeInjectionMP.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) 2008-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::ConeInjectionMP
26
27
Description
28
Cone injection multi-point
29
30
- User specifies
31
- time of start of injection
32
- injector positions
33
- directions (along injection axes)
34
- parcel flow rate
35
- parcel velocities
36
- inner and outer cone angles
37
- Parcel diameters obtained by PDF model
38
39
SourceFiles
40
ConeInjectionMP.C
41
42
\*---------------------------------------------------------------------------*/
43
44
#ifndef ConeInjectionMP_H
45
#define ConeInjectionMP_H
46
47
#include <
lagrangianIntermediate/InjectionModel.H
>
48
#include <
pdf/pdf.H
>
49
#include <
OpenFOAM/vectorList.H
>
50
51
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52
53
namespace
Foam
54
{
55
56
// Forward declaration of classes
57
58
template
<
class
Type>
59
class
DataEntry;
60
61
/*---------------------------------------------------------------------------*\
62
Class ConeInjectionMP Declaration
63
\*---------------------------------------------------------------------------*/
64
65
template
<
class
CloudType>
66
class
ConeInjectionMP
67
:
68
public
InjectionModel
<CloudType>
69
{
70
// Private data
71
72
//- Name of file containing positions data
73
const
word
positionsFile_;
74
75
//- Field of injector positions
76
vectorIOField
positions_;
77
78
//- Field of cell labels corresoponding to injector positions
79
labelList
injectorCells_;
80
81
//- Name of file containing axes data
82
const
word
axesFile_;
83
84
//- Field of injector positions
85
vectorIOField
axes_;
86
87
//- Injection duration [s]
88
const
scalar duration_;
89
90
//- Number of parcels to introduce per injector
91
const
label parcelsPerInjector_;
92
93
//- Volume flow rate of parcels to introduce relative to SOI [m^3]
94
const
autoPtr<DataEntry<scalar>
> volumeFlowRate_;
95
96
//- Parcel velocity magnitude relative to SOI [m/s]
97
const
autoPtr<DataEntry<scalar>
> Umag_;
98
99
//- Inner cone angle relative to SOI [deg]
100
const
autoPtr<DataEntry<scalar>
> thetaInner_;
101
102
//- Outer cone angle relative to SOI [deg]
103
const
autoPtr<DataEntry<scalar>
> thetaOuter_;
104
105
//- Parcel size PDF model
106
const
autoPtr<pdfs::pdf>
parcelPDF_;
107
108
//- Number of parcels per injector already injected
109
mutable
label nInjected_;
110
111
112
// Tangential vectors to the direction vector
113
114
//- First tangential vector
115
vectorList
tanVec1_;
116
117
//- Second tangential vector
118
vectorList
tanVec2_;
119
120
121
protected
:
122
123
// Protected member functions
124
125
//- Number of parcels to introduce over the time step
126
label
parcelsToInject
127
(
128
const
scalar time0,
129
const
scalar time1
130
)
const
;
131
132
//- Number of parcels to introduce over the time step
133
scalar
volumeToInject
134
(
135
const
scalar time0,
136
const
scalar time1
137
)
const
;
138
139
140
public
:
141
142
//- Runtime type information
143
TypeName
(
"ConeInjectionMP"
);
144
145
146
// Constructors
147
148
//- Construct from dictionary
149
ConeInjectionMP
150
(
151
const
dictionary
&
dict
,
152
CloudType&
owner
153
);
154
155
156
//- Destructor
157
virtual
~ConeInjectionMP
();
158
159
160
// Member Functions
161
162
//- Flag to indicate whether model activates injection model
163
bool
active
()
const
;
164
165
//- Return the end-of-injection time
166
scalar
timeEnd
()
const
;
167
168
169
// Injection geometry
170
171
//- Set the injection position and owner cell
172
virtual
void
setPositionAndCell
173
(
174
const
label parcelI,
175
const
label nParcels,
176
const
scalar time,
177
vector
& position,
178
label& cellOwner
179
);
180
181
//- Set the parcel properties
182
virtual
void
setProperties
183
(
184
const
label parcelI,
185
const
label nParcels,
186
const
scalar time,
187
typename
CloudType::parcelType&
parcel
188
);
189
190
//- Flag to identify whether model fully describes the parcel
191
virtual
bool
fullyDescribed
()
const
;
192
193
//- Return flag to identify whether or not injection of parcelI is
194
// permitted
195
virtual
bool
validInjection
(
const
label parcelI);
196
};
197
198
199
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
200
201
}
// End namespace Foam
202
203
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204
205
#ifdef NoRepository
206
# include "
ConeInjectionMP.C
"
207
#endif
208
209
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
210
211
#endif
212
213
// ************************ vim: set sw=4 sts=4 et: ************************ //