pEqn.H
Go to the documentation of this file.
1{
2 volScalarField rAU(1.0/UEqn.A());
3 volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
4 surfaceScalarField phiHbyA("phiHbyA", fvc::flux(HbyA));
5 MRF.makeRelative(phiHbyA);
7
8 tmp<volScalarField> rAtU(rAU);
9
10 if (simple.consistent())
11 {
12 rAtU = 1.0/(1.0/rAU - UEqn.H1());
13 phiHbyA +=
14 fvc::interpolate(rAtU() - rAU)*fvc::snGrad(p)*mesh.magSf();
15 HbyA -= (rAU - rAtU())*fvc::grad(p);
16 }
17
18 tUEqn.clear();
19
20 // Update the pressure BCs to ensure flux consistency
22
23 // Non-orthogonal pressure corrector loop
24 while (simple.correctNonOrthogonal())
25 {
26 fvScalarMatrix pEqn
27 (
28 fvm::laplacian(rAtU(), p) == fvc::div(phiHbyA)
29 );
30
31 pEqn.setReference(pRefCell, pRefValue);
32
33 pEqn.solve();
34
35 if (simple.finalNonOrthogonalIter())
36 {
37 phi = phiHbyA - pEqn.flux();
38 }
39 }
40
41 #include "continuityErrs.H"
42
43 // Explicitly relax pressure for momentum corrector
44 p.relax();
45
46 // Momentum corrector
47 U = HbyA - rAtU()*fvc::grad(p);
48 U.correctBoundaryConditions();
49 fvOptions.correct(U);
50}
fv::options & fvOptions
surfaceScalarField & phi
const scalar pRefValue
const label pRefCell
IOMRFZoneList & MRF
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
adjustPhi(phiHbyA, U, p_rgh)
tmp< volScalarField > rAtU(rAU)
tmp< volScalarField > rAU
Definition: initCorrectPhi.H:1
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:82
const dictionary & simple