pEqn.H 827 Bytes
Newer Older
1
2
U = rAU*UEqn().H();

3
if (pimple.nCorr() <= 1)
4
5
6
7
8
9
10
11
12
13
14
15
16
{
    UEqn.clear();
}

phi = (fvc::interpolate(U) & mesh.Sf());

if (p.needReference())
{
    fvc::makeRelative(phi, U);
    adjustPhi(phi, U, p);
    fvc::makeAbsolute(phi, U);
}

17
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
18
19
20
21
22
23
24
25
26
27
{
    fvScalarMatrix pEqn
    (
        fvm::laplacian(rAU, p) == fvc::div(phi)
    );

    pEqn.setReference(pRefCell, pRefValue);

    pEqn.solve
    (
28
        mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
29
30
    );

31
    if (nonOrth == pimple.nNonOrthCorr())
32
33
34
35
36
37
38
    {
        phi -= pEqn.flux();
    }
}

#include "continuityErrs.H"

39
// Explicitly relax pressure for momentum corrector
40
41
42
43
44
45
46
p.relax();

// Make the fluxes relative to the mesh motion
fvc::makeRelative(phi, U);

U -= rAU*fvc::grad(p);
U.correctBoundaryConditions();