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

3
if (pimple.nCorrPISO() <= 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
while (pimple.correctNonOrthogonal())
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(mesh.solver(p.select(pimple.finalInnerIter())));
henry's avatar
henry committed
25

26
    if (pimple.finalNonOrthogonalIter())
henry's avatar
henry committed
27
28
29
30
31
32
33
    {
        phi -= pEqn.flux();
    }
}

#include "continuityErrs.H"

34
35
// Explicitly relax pressure for momentum corrector
p.relax();
henry's avatar
henry committed
36

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