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
clouds
Templates
ReactingCloud
ReactingCloud_.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::ReactingCloud
26
27
Description
28
Templated base class for reacting cloud
29
30
- Adds to thermodynamic cloud
31
- Variable composition (single phase)
32
- Phase change
33
34
SourceFiles
35
ReactingCloudI.H
36
ReactingCloud.C
37
38
\*---------------------------------------------------------------------------*/
39
40
#ifndef ReactingCloud_H
41
#define ReactingCloud_H
42
43
#include <
lagrangianIntermediate/ThermoCloud_.H
>
44
#include <
lagrangianIntermediate/reactingCloud.H
>
45
#include <
reactionThermophysicalModels/multiComponentMixture.H
>
46
47
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49
namespace
Foam
50
{
51
52
// Forward declaration of classes
53
54
template
<
class
CloudType>
55
class
CompositionModel;
56
57
template
<
class
CloudType>
58
class
PhaseChangeModel;
59
60
/*---------------------------------------------------------------------------*\
61
Class ReactingCloud Declaration
62
\*---------------------------------------------------------------------------*/
63
64
template
<
class
ParcelType>
65
class
ReactingCloud
66
:
67
public
ThermoCloud
<ParcelType>,
68
public
reactingCloud
69
{
70
public
:
71
72
//- Type of thermodynamics the cloud was instantiated for
73
typedef
typename
ParcelType::thermoType
thermoType
;
74
75
76
private
:
77
78
// Private Member Functions
79
80
//- Disallow default bitwise copy construct
81
ReactingCloud
(
const
ReactingCloud
&);
82
83
//- Disallow default bitwise assignment
84
void
operator=(
const
ReactingCloud
&);
85
86
87
protected
:
88
89
// Protected data
90
91
//- Parcel constant properties
92
typename
ParcelType::constantProperties
constProps_
;
93
94
//- Multi-component carrier phase thermo
95
multiComponentMixture<thermoType>
&
mcCarrierThermo_
;
96
97
98
// References to the cloud sub-models
99
100
//- Reacting composition model
101
autoPtr<CompositionModel<ReactingCloud<ParcelType>
> >
102
compositionModel_
;
103
104
//- Reacting phase change model
105
autoPtr<PhaseChangeModel<ReactingCloud<ParcelType>
> >
106
phaseChangeModel_
;
107
108
109
// Sources
110
111
//- Mass transfer fields - one per carrier phase specie
112
PtrList<DimensionedField<scalar, volMesh>
>
rhoTrans_
;
113
114
115
// Check
116
117
//- Total mass transferred to continuous phase via phase change
118
scalar
dMassPhaseChange_
;
119
120
121
// Protected Member Functions
122
123
// New parcel helper functions
124
125
//- Check that size of a composition field is valid
126
void
checkSuppliedComposition
127
(
128
const
scalarField
& YSupplied,
129
const
scalarField
&
Y
,
130
const
word
& YName
131
);
132
133
134
// Cloud evolution functions
135
136
//- Pre-evolve
137
void
preEvolve
();
138
139
//- Evolve the cloud
140
void
evolveCloud
();
141
142
//- Post-evolve
143
void
postEvolve
();
144
145
146
public
:
147
148
// Constructors
149
150
//- Construct given carrier gas fields
151
ReactingCloud
152
(
153
const
word
&
cloudName
,
154
const
volScalarField
&
rho
,
155
const
volVectorField
&
U
,
156
const
dimensionedVector
&
g
,
157
basicThermo
&
thermo
,
158
bool
readFields
=
true
159
);
160
161
162
//- Destructor
163
virtual
~ReactingCloud
();
164
165
166
//- Type of parcel the cloud was instantiated for
167
typedef
ParcelType
parcelType
;
168
169
170
// Member Functions
171
172
// Access
173
174
//- Return the constant properties
175
inline
const
typename
ParcelType::constantProperties&
176
constProps
()
const
;
177
178
//- Return const access to multi-component carrier phase thermo
179
inline
const
multiComponentMixture<thermoType>
&
180
mcCarrierThermo
()
const
;
181
182
//- Return access to multi-component carrier phase thermo
183
inline
multiComponentMixture<thermoType>
&
mcCarrierThermo
();
184
185
186
// Sub-models
187
188
//- Return reference to reacting composition model
189
inline
const
CompositionModel<ReactingCloud<ParcelType>
>&
190
composition
()
const
;
191
192
//- Return reference to reacting phase change model
193
inline
const
PhaseChangeModel<ReactingCloud<ParcelType>
>&
194
phaseChange
()
const
;
195
196
197
// Sources
198
199
//- Mass
200
201
//- Return reference to mass source for field i
202
inline
DimensionedField<scalar, volMesh>
&
203
rhoTrans
(
const
label i);
204
205
//- Return reference to mass source fields
206
inline
PtrList<DimensionedField<scalar, volMesh>
>&
207
rhoTrans
();
208
209
//- Return tmp mass source for field i - fully explicit
210
inline
tmp<DimensionedField<scalar, volMesh>
>
211
Srho
(
const
label i)
const
;
212
213
//- Return tmp total mass source for carrier phase
214
// - fully explicit
215
inline
tmp<DimensionedField<scalar, volMesh>
>
Srho
()
const
;
216
217
218
// Check
219
220
//- Print cloud information
221
void
info
()
const
;
222
223
//- Add to cumulative phase change mass transfer
224
void
addToMassPhaseChange
(
const
scalar dMass);
225
226
227
// Cloud evolution functions
228
229
//- Check parcel properties
230
void
checkParcelProperties
231
(
232
ParcelType&
parcel
,
233
const
scalar lagrangianDt,
234
const
bool
fullyDescribed
235
);
236
237
//- Reset the spray source terms
238
void
resetSourceTerms
();
239
240
//- Evolve the spray (inject, move)
241
void
evolve
();
242
};
243
244
245
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
246
247
}
// End namespace Foam
248
249
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
250
251
#include "
ReactingCloudI_.H
"
252
253
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
254
255
#ifdef NoRepository
256
# include "
ReactingCloud_.C
"
257
#endif
258
259
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
260
261
#endif
262
263
// ************************ vim: set sw=4 sts=4 et: ************************ //