pEqn.H
Go to the documentation of this file.
1{
2 volScalarField rAU("rAU", 1.0/UEqn.A());
3 surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
4 volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
5 surfaceScalarField phiHbyA
6 (
7 "phiHbyA",
8 fvc::flux(HbyA)
9 + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi)
10 );
12
13 surfaceScalarField phig
14 (
15 - ghf*fvc::snGrad(rho)*rAUf*mesh.magSf()
16 );
17
19
20 // Update the pressure BCs to ensure flux consistency
22
23 while (pimple.correctNonOrthogonal())
24 {
25 fvScalarMatrix p_rghEqn
26 (
27 fvm::laplacian(rAUf, p_rgh) == fvc::div(phiHbyA)
28 );
29
30 p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
31
32 p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
33
34 if (pimple.finalNonOrthogonalIter())
35 {
36 phi = phiHbyA - p_rghEqn.flux();
37
38 U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf);
39 U.correctBoundaryConditions();
40 }
41 }
42
43 #include "continuityErrs.H"
44
45 p == p_rgh + rho*gh;
46
47 if (p_rgh.needReference())
48 {
49 p += dimensionedScalar
50 (
51 "p",
52 p.dimensions(),
53 pRefValue - getRefCellValue(p, pRefCell)
54 );
55 p_rgh = p - rho*gh;
56 }
57}
volScalarField & p_rgh
surfaceScalarField & phi
const scalar pRefValue
const surfaceScalarField & ghf
const label pRefCell
const volScalarField & gh
pimpleControl & pimple
U
Definition: pEqn.H:72
volScalarField & p
surfaceScalarField phig("phig", -rhorAUf *ghf *fvc::snGrad(rho) *mesh.magSf())
fvVectorMatrix & UEqn
Definition: UEqn.H:13
phiHbyA
Definition: pcEqn.H:73
HbyA
Definition: pcEqn.H:74
dynamicFvMesh & mesh
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU))
adjustPhi(phiHbyA, U, p_rgh)
tmp< volScalarField > rAU
Definition: initCorrectPhi.H:1
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:82