alphaEqn.H 979 Bytes
Newer Older
shunbo's avatar
shunbo committed
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
{
    // Temporarily making U relative to mesh motion
    if (mesh.moving())
    {
        U -= fvc::reconstruct(mesh.phi());
    }

    // Updating alpha1
    #include "alphaSuSp.H"
    advector.advect(Sp, Su);

    // Making U absolute again after advection step
    if (mesh.moving())
    {
        U += fvc::reconstruct(mesh.phi());
    }

    #include "rhofs.H"
    rhoPhi = advector.getRhoPhi(rho1f, rho2f);

    alpha2 = 1.0 - alpha1;
    mixture.correct();
}

scalar domainFraction = 0;
if (porosityEnabled)
{
    const volScalarField& porosity = tporosity.cref();
    rhoPhi *= scalar(1)/fvc::interpolate(porosity);
    domainFraction = alpha1.weightedAverage(mesh.Vsc()*porosity).value();
}
else
{
    domainFraction = alpha1.weightedAverage(mesh.Vsc()).value();
}

Info<< "Phase-1 volume fraction = "
    << domainFraction
    << "  Min(" << alpha1.name() << ") = " << min(alpha1).value()
    << "  Max(" << alpha1.name() << ") = " << max(alpha1).value()
    << endl;