pEqn.H
Go to the documentation of this file.
1
2volScalarField rAU(1.0/UEqn.A());
3volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
4
5surfaceScalarField phiHbyA("phiHbyA", fvc::flux(HbyA));
6
7if (pimple.ddtCorr())
8{
9 phiHbyA += MRF.zeroFilter(fvc::interpolate(rAU)*fvc::ddtCorr(U, phi, Uf));
10}
11
12MRF.makeRelative(phiHbyA);
13
14if (p.needReference())
15{
16 fvc::makeRelative(phiHbyA, U);
18 fvc::makeAbsolute(phiHbyA, U);
19}
20
21
22// Update the pressure BCs to ensure flux consistency
24
25// Non-orthogonal pressure corrector loop
26while (pimple.correctNonOrthogonal())
27{
28 fvScalarMatrix pEqn
29 (
30 fvm::laplacian(rAU, p)
31 ==
32 fvc::div(phiHbyA)
33 );
34
35 pEqn.setReference(pRefCell, pRefValue);
36
37 pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
38
39 if (pimple.finalNonOrthogonalIter())
40 {
41 phi = phiHbyA - pEqn.flux();
42 }
43}
44
45#include "continuityErrs.H"
46
47p.relax();
48
49U = HbyA - rAU*fvc::grad(p);
50U.correctBoundaryConditions();
51fvOptions.correct(U);
52
53// Correct rhoUf if the mesh is moving
54fvc::correctUf(Uf, U, phi);
55
56// Make the fluxes relative to the mesh motion
57fvc::makeRelative(phi, U);
58
fv::options & fvOptions
surfaceScalarField & phi
const scalar pRefValue
const label pRefCell
IOMRFZoneList & MRF
pimpleControl & pimple
U
Definition: pEqn.H:72
volScalarField & p
fvVectorMatrix & UEqn
Definition: UEqn.H:13
phiHbyA
Definition: pcEqn.H:73
HbyA
Definition: pcEqn.H:74
dynamicFvMesh & mesh
autoPtr< surfaceVectorField > Uf
adjustPhi(phiHbyA, U, p_rgh)
tmp< volScalarField > rAU
Definition: initCorrectPhi.H:1