pEqn.H 762 Bytes
Newer Older
1
U = rAU*UEqn().H();
henry's avatar
henry committed
2

3
if (pimple.nCorr() <= 1)
henry's avatar
henry committed
4
5
6
7
8
{
    UEqn.clear();
}

phi = (fvc::interpolate(U) & mesh.Sf())
9
    + fvc::ddtPhiCorr(rAU, U, phi);
henry's avatar
henry committed
10
11
12
13

adjustPhi(phi, U, p);

// Non-orthogonal pressure corrector loop
14
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
henry's avatar
henry committed
15
16
17
18
{
    // Pressure corrector
    fvScalarMatrix pEqn
    (
19
        fvm::laplacian(rAU, p) == fvc::div(phi)
henry's avatar
henry committed
20
21
22
23
    );

    pEqn.setReference(pRefCell, pRefValue);

24
    pEqn.solve
henry's avatar
henry committed
25
    (
26
        mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
27
    );
henry's avatar
henry committed
28

29
    if (nonOrth == pimple.nNonOrthCorr())
henry's avatar
henry committed
30
31
32
33
34
35
36
    {
        phi -= pEqn.flux();
    }
}

#include "continuityErrs.H"

37
38
// Explicitly relax pressure for momentum corrector
p.relax();
henry's avatar
henry committed
39

40
U -= rAU*fvc::grad(p);
henry's avatar
henry committed
41
U.correctBoundaryConditions();