pEqn.H
Go to the documentation of this file.
1 volScalarField rAU(1.0/UEqn.A());
4 (
5  "phiHbyA",
8 );
9 
10 MRF.makeRelative(phiHbyA);
11 
12 adjustPhi(phiHbyA, U, p);
13 
14 tmp<volScalarField> rAtU(rAU);
15 
16 if (pimple.consistent())
17 {
18  rAtU = 1.0/max(1.0/rAU - UEqn.H1(), 0.1/rAU);
19  phiHbyA +=
20  fvc::interpolate(rAtU() - rAU)*fvc::snGrad(p)*mesh.magSf();
21  HbyA -= (rAU - rAtU())*fvc::grad(p);
22 }
23 
24 if (pimple.nCorrPISO() <= 1)
25 {
26  tUEqn.clear();
27 }
28 
29 // Update the pressure BCs to ensure flux consistency
31 
32 // Non-orthogonal pressure corrector loop
33 while (pimple.correctNonOrthogonal())
34 {
35  // Pressure corrector
36  fvScalarMatrix pEqn
37  (
39  );
40 
41  pEqn.setReference(pRefCell, pRefValue);
42 
43  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
44 
45  if (pimple.finalNonOrthogonalIter())
46  {
47  phi = phiHbyA - pEqn.flux();
48  }
49 }
50 
51 #include "continuityErrs.H"
52 
53 // Explicitly relax pressure for momentum corrector
54 p.relax();
55 
57 U.correctBoundaryConditions();
58 fvOptions.correct(U);
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcGrad.C:52
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
U
Definition: pEqn.H:83
p
Definition: pEqn.H:50
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
phiHbyA
Definition: pEqn.H:20
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
tmp< GeometricField< typename flux< Type >::type, fvsPatchField, surfaceMesh > > ddtCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
Definition: fvcDdt.C:155
const dictionary & pimple
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
tmp< surfaceScalarField > interpolate(const RhoType &rho)
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
fv::options & fvOptions
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
dynamicFvMesh & mesh
IOMRFZoneList & MRF
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:33
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF)
adjustPhi(phiHbyA, U, p_rgh)
const scalar pRefValue
const label pRefCell
volVectorField & HbyA
Definition: pEqn.H:13
tmp< volScalarField > rAtU(rAU)
fvVectorMatrix & UEqn
Definition: UEqn.H:13
phi
Definition: pEqn.H:18
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
Definition: fvcFlux.C:32
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcSnGrad.C:45
volScalarField rAU(1.0/UEqn.A())