pEqn.H
Go to the documentation of this file.
1{
2 rAU = 1.0/UEqn.A();
3 surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
4 volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_gh));
5
6 if (pimple.nCorrPISO() <= 1)
7 {
8 tUEqn.clear();
9 }
10
11 surfaceScalarField phiHbyA
12 (
13 "phiHbyA",
14 fvc::flux(HbyA)
15 + MRF.zeroFilter(rAUf*fvc::ddtCorr(U, Uf))
16 );
17
18 MRF.makeRelative(phiHbyA);
19
20 if (p_gh.needReference())
21 {
22 fvc::makeRelative(phiHbyA, U);
23 adjustPhi(phiHbyA, U, p_gh);
24 fvc::makeAbsolute(phiHbyA, U);
25 }
26
27 // Update the pressure BCs to ensure flux consistency
29
30 // Non-orthogonal pressure corrector loop
31 while (pimple.correctNonOrthogonal())
32 {
33 fvScalarMatrix p_ghEqn
34 (
35 fvm::laplacian(rAUf, p_gh) == fvc::div(phiHbyA)
36 );
37
38 p_ghEqn.setReference(p_ghRefCell, p_ghRefValue);
39
40 p_ghEqn.solve(mesh.solver(p_gh.select(pimple.finalInnerIter())));
41
42 if (pimple.finalNonOrthogonalIter())
43 {
44 phi = phiHbyA - p_ghEqn.flux();
45
46 // Explicitly relax pressure for momentum corrector
47 p_gh.relax();
48
49 U = HbyA - rAU*fvc::grad(p_gh);
50 U.correctBoundaryConditions();
51 fvOptions.correct(U);
52 }
53 }
54
55 #include "continuityErrs.H"
56
57 {
58 Uf = fvc::interpolate(U);
59 surfaceVectorField n(mesh.Sf()/mesh.magSf());
60 Uf += n*(phi/mesh.magSf() - (n & Uf));
61 }
62
63 // Make the fluxes relative to the mesh motion
64 fvc::makeRelative(phi, U);
65
66 p = p_gh + (g & mesh.C());
67}
label n
const uniformDimensionedVectorField & g
fv::options & fvOptions
surfaceScalarField & phi
IOMRFZoneList & MRF
pimpleControl & pimple
U
Definition: pEqn.H:72
volScalarField & p
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
fvVectorMatrix & UEqn
Definition: UEqn.H:13
phiHbyA
Definition: pcEqn.H:73
HbyA
Definition: pcEqn.H:74
dynamicFvMesh & mesh
autoPtr< surfaceVectorField > Uf
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU))
adjustPhi(phiHbyA, U, p_rgh)
tmp< volScalarField > rAU
Definition: initCorrectPhi.H:1