YEqns.H
Go to the documentation of this file.
1{
2 for (multiphaseInter::phaseModel& phase : fluid.phases())
3 {
4 PtrList<volScalarField>& Y = phase.Y();
5
6 if (!Y.empty())
7 {
8 //- Su phase source terms
9 PtrList<volScalarField::Internal> Sus(Y.size());
10 //- Sp phase source terms
11 PtrList<volScalarField::Internal> Sps(Y.size());
12
13 forAll(Sus, i)
14 {
15 Sus.set
16 (
17 i,
18 new volScalarField::Internal
19 (
20 IOobject
21 (
22 "Su" + phase.name(),
23 mesh.time().timeName(),
24 mesh
25 ),
26 mesh,
27 dimensionedScalar(dimless/dimTime, Zero)
28 )
29 );
30 Sps.set
31 (
32 i,
33 new volScalarField::Internal
34 (
35 IOobject
36 (
37 "Sp" + phase.name(),
38 mesh.time().timeName(),
39 mesh
40 ),
41 mesh,
42 dimensionedScalar(dimless/dimTime, Zero)
43 )
44 );
45 }
46
47 forAll(Y, i)
48 {
49 // Calculate mass exchange for species consistent with
50 // alpha's source terms.
51 fluid.massSpeciesTransfer(phase, Sus[i], Sps[i], Y[i].name());
52 }
53 phase.solveYi(Sus, Sps);
54 }
55 }
56}
twoPhaseSystem & fluid
PtrList< volScalarField > & Y
dynamicFvMesh & mesh
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:333