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 + MRF.zeroFilter(fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi))
10 );
11 MRF.makeRelative(phiHbyA);
13
14 surfaceScalarField phig
15 (
16 (
17 - ghf*fvc::snGrad(rho)
18 )*rAUf*mesh.magSf()
19 );
20
22
23 // Update the pressure BCs to ensure flux consistency
25
26 while (pimple.correctNonOrthogonal())
27 {
28 fvScalarMatrix p_rghEqn
29 (
30 fvm::laplacian(rAUf, p_rgh) == fvc::div(phiHbyA)
31 );
32
33 p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
34
35 p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
36
37 if (pimple.finalNonOrthogonalIter())
38 {
39 phi = phiHbyA - p_rghEqn.flux();
40
41 p_rgh.relax();
42
43 U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf);
44 U.correctBoundaryConditions();
45 fvOptions.correct(U);
46 }
47 }
48
49 #include "continuityErrs.H"
50
51 p == p_rgh + rho*gh;
52
53 if (p_rgh.needReference())
54 {
55 p += dimensionedScalar
56 (
57 "p",
58 p.dimensions(),
59 pRefValue - getRefCellValue(p, pRefCell)
60 );
61 p_rgh = p - rho*gh;
62 }
63}
volScalarField & p_rgh
fv::options & fvOptions
surfaceScalarField & phi
const scalar pRefValue
const surfaceScalarField & ghf
const label pRefCell
IOMRFZoneList & MRF
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