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
KinematicLookupTableInjection
KinematicLookupTableInjection.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::KinematicLookupTableInjection
26
27
Description
28
Particle injection sources read from look-up table. Each row corresponds to
29
an injection site.
30
31
(
32
(x y z) (u v w) d rho mDot // injector 1
33
(x y z) (u v w) d rho mDot // injector 2
34
...
35
(x y z) (u v w) d rho mDot // injector N
36
);
37
38
where:
39
x, y, z = global cartesian co-ordinates [m]
40
u, v, w = global cartesian velocity components [m/s]
41
d = diameter [m]
42
rho = density [kg/m3]
43
mDot = mass flow rate [kg/m3]
44
45
SourceFiles
46
KinematicLookupTableInjection.C
47
48
\*---------------------------------------------------------------------------*/
49
50
#ifndef KinematicLookupTableInjection_H
51
#define KinematicLookupTableInjection_H
52
53
#include <
lagrangianIntermediate/InjectionModel.H
>
54
#include <
lagrangianIntermediate/kinematicParcelInjectionDataIOList.H
>
55
56
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57
58
namespace
Foam
59
{
60
61
/*---------------------------------------------------------------------------*\
62
Class KinematicLookupTableInjection Declaration
63
\*---------------------------------------------------------------------------*/
64
65
template
<
class
CloudType>
66
class
KinematicLookupTableInjection
67
:
68
public
InjectionModel
<CloudType>
69
{
70
// Private data
71
72
//- Name of file containing injector/parcel data
73
const
word
inputFileName_;
74
75
//- Injection duration - common to all injection sources
76
const
scalar duration_;
77
78
//- Number of parcels per injector - common to all injection sources
79
const
label nParcelsPerSecond_;
80
81
//- List of injectors
82
kinematicParcelInjectionDataIOList
injectors_;
83
84
//- List of injector cells per injector
85
List<label>
injectorCells_;
86
87
88
protected
:
89
90
// Protected member functions
91
92
//- Number of parcels to introduce over the time step relative to SOI
93
label
parcelsToInject
94
(
95
const
scalar time0,
96
const
scalar time1
97
)
const
;
98
99
//- Volume of parcels to introduce over the time step relative to SOI
100
scalar
volumeToInject
101
(
102
const
scalar time0,
103
const
scalar time1
104
)
const
;
105
106
107
public
:
108
109
//- Runtime type information
110
TypeName
(
"KinematicLookupTableInjection"
);
111
112
113
// Constructors
114
115
//- Construct from dictionary
116
KinematicLookupTableInjection
117
(
118
const
dictionary
&
dict
,
119
CloudType&
owner
120
);
121
122
123
//- Destructor
124
virtual
~KinematicLookupTableInjection
();
125
126
127
// Member Functions
128
129
//- Flag to indicate whether model activates injection model
130
bool
active
()
const
;
131
132
//- Return the end-of-injection time
133
scalar
timeEnd
()
const
;
134
135
136
// Injection geometry
137
138
//- Set the injection position and owner cell
139
virtual
void
setPositionAndCell
140
(
141
const
label parcelI,
142
const
label nParcels,
143
const
scalar time,
144
vector
& position,
145
label& cellOwner
146
);
147
148
//- Set the parcel properties
149
virtual
void
setProperties
150
(
151
const
label parcelI,
152
const
label nParcels,
153
const
scalar time,
154
typename
CloudType::parcelType&
parcel
155
);
156
157
//- Flag to identify whether model fully describes the parcel
158
virtual
bool
fullyDescribed
()
const
;
159
160
//- Return flag to identify whether or not injection of parcelI is
161
// permitted
162
virtual
bool
validInjection
(
const
label parcelI);
163
};
164
165
166
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167
168
}
// End namespace Foam
169
170
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171
172
#ifdef NoRepository
173
# include "
KinematicLookupTableInjection.C
"
174
#endif
175
176
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177
178
#endif
179
180
// ************************ vim: set sw=4 sts=4 et: ************************ //