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 if (p.needReference())
13 {
15  adjustPhi(phiHbyA, U, p);
17 }
18 
19 tmp<volScalarField> rAtU(rAU);
20 
21 if (pimple.consistent())
22 {
23  rAtU = 1.0/max(1.0/rAU - UEqn.H1(), 0.1/rAU);
24  phiHbyA +=
25  fvc::interpolate(rAtU() - rAU)*fvc::snGrad(p)*mesh.magSf();
26  HbyA -= (rAU - rAtU())*fvc::grad(p);
27 }
28 
29 if (pimple.nCorrPISO() <= 1)
30 {
31  tUEqn.clear();
32 }
33 
34 // Update the pressure BCs to ensure flux consistency
36 
37 // Non-orthogonal pressure corrector loop
38 while (pimple.correctNonOrthogonal())
39 {
40  fvScalarMatrix pEqn
41  (
43  );
44 
45  pEqn.setReference(pRefCell, pRefValue);
46 
47  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
48 
49  if (pimple.finalNonOrthogonalIter())
50  {
51  phi = phiHbyA - pEqn.flux();
52  }
53 }
54 
55 #include "continuityErrs.H"
56 
57 // Explicitly relax pressure for momentum corrector
58 p.relax();
59 
60 U = HbyA - rAtU*fvc::grad(p);
61 U.correctBoundaryConditions();
62 fvOptions.correct(U);
63 
64 {
66  surfaceVectorField n(mesh.Sf()/mesh.magSf());
67  Uf += n*(phi/mesh.magSf() - (n & Uf));
68 }
69 
70 // Make the fluxes relative to the mesh motion
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcGrad.C:52
surfaceVectorField n(mesh.Sf()/mesh.magSf())
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
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
const dictionary & pimple
Uf
Definition: pEqn.H:67
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
void makeAbsolute(surfaceScalarField &phi, const volVectorField &U)
Make the given flux absolute.
Definition: fvcMeshPhi.C:114
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())
MRF makeRelative(fvc::interpolate(rho), phiHbyA)