pEqn.H
Go to the documentation of this file.
1{
3 volVectorField HbyA("HbyA", Urel);
5
6 surfaceScalarField phiHbyA("phiHbyA", fvc::flux(HbyA));
8
9 tmp<volScalarField> rAtUrel(rAUrel);
10
11 if (simple.consistent())
12 {
13 rAtUrel = 1.0/(1.0/rAUrel - UrelEqn.H1());
14 phiHbyA +=
15 fvc::interpolate(rAtUrel() - rAUrel)*fvc::snGrad(p)*mesh.magSf();
16 HbyA -= (rAUrel - rAtUrel())*fvc::grad(p);
17 }
18
19 tUrelEqn.clear();
20
21 // Update the pressure BCs to ensure flux consistency
23
24 // Non-orthogonal pressure corrector loop
25 while (simple.correctNonOrthogonal())
26 {
27 fvScalarMatrix pEqn
28 (
29 fvm::laplacian(rAtUrel(), p) == fvc::div(phiHbyA)
30 );
31
32 pEqn.setReference(pRefCell, pRefValue);
33
34 pEqn.solve();
35
36 if (simple.finalNonOrthogonalIter())
37 {
38 phi = phiHbyA - pEqn.flux();
39 }
40 }
41
42 #include "continuityErrs.H"
43
44 // Explicitly relax pressure for momentum corrector
45 p.relax();
46
47 // Momentum corrector
48 Urel = HbyA - rAtUrel()*fvc::grad(p);
49 Urel.correctBoundaryConditions();
50 fvOptions.correct(Urel);
51}
fv::options & fvOptions
surfaceScalarField & phi
const scalar pRefValue
const label pRefCell
volScalarField & p
phiHbyA
Definition: pcEqn.H:73
HbyA
Definition: pcEqn.H:74
dynamicFvMesh & mesh
adjustPhi(phiHbyA, U, p_rgh)
tmp< volScalarField > rAtUrel(rAUrel)
Urel
Definition: pEqn.H:56
volScalarField rAUrel(1.0/UrelEqn.A())
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:82
tmp< fvVectorMatrix > tUrelEqn(fvm::ddt(Urel)+fvm::div(phi, Urel)+turbulence->divDevReff(Urel)+SRF->Su()==fvOptions(Urel))
fvVectorMatrix & UrelEqn
Definition: UrelEqn.H:11
const dictionary & simple