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

3
if (pimple.nCorrPIMPLE() <= 1)
4
5
6
7
8
9
{
    UEqn.clear();
}

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

10
11
12
13
14
if (ddtPhiCorr)
{
    phi += fvc::ddtPhiCorr(rAU, U, phi);
}

15
16
17
18
19
20
21
if (p.needReference())
{
    fvc::makeRelative(phi, U);
    adjustPhi(phi, U, p);
    fvc::makeAbsolute(phi, U);
}

22
while (pimple.correctNonOrthogonal())
23
24
25
26
27
28
29
30
{
    fvScalarMatrix pEqn
    (
        fvm::laplacian(rAU, p) == fvc::div(phi)
    );

    pEqn.setReference(pRefCell, pRefValue);

31
    pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
32

33
    if (pimple.finalNonOrthogonalIter())
34
35
36
37
38
39
40
    {
        phi -= pEqn.flux();
    }
}

#include "continuityErrs.H"

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

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

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