-
Notifications
You must be signed in to change notification settings - Fork 5
/
YEqns.H
56 lines (53 loc) · 1.63 KB
/
YEqns.H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
for (phaseModel& phase : fluid.phases())
{
PtrList<volScalarField>& Y = phase.Y();
if (!Y.empty())
{
//- Su phase source terms
PtrList<volScalarField::Internal> Sus(Y.size());
//- Sp phase source terms
PtrList<volScalarField::Internal> Sps(Y.size());
forAll(Sus, i)
{
Sus.set
(
i,
new volScalarField::Internal
(
IOobject
(
"Su" + phase.name(),
mesh.time().timeName(),
mesh
),
mesh,
dimensionedScalar(dimless/dimTime, Zero)
)
);
Sps.set
(
i,
new volScalarField::Internal
(
IOobject
(
"Sp" + phase.name(),
mesh.time().timeName(),
mesh
),
mesh,
dimensionedScalar(dimless/dimTime, Zero)
)
);
}
forAll(Y, i)
{
// Calculate mass exchange for species consistent with
// alpha's source terms.
fluid.massSpeciesTransfer(phase, Sus[i], Sps[i], Y[i].name());
}
phase.solveYi(Sus, Sps);
}
}
}