pEqn.H
Go to the documentation of this file.
1 {
2  volScalarField rAU(1.0/UEqn.A());
4 
5  volVectorField HbyA("HbyA", U);
6  HbyA = constrainHbyA(cellMask*rAU*UEqn.H(), U, p);
7 
8  tUEqn.clear();
9 
11 
12  adjustPhi(phiHbyA, U, p);
13 
15  {
17  }
18 
19  // Non-orthogonal pressure corrector loop
20  while (simple.correctNonOrthogonal())
21  {
22  fvScalarMatrix pEqn
23  (
25  );
26 
27  pEqn.setReference(pRefCell, pRefValue);
28 
29  pEqn.solve();
30 
31  if (simple.finalNonOrthogonalIter())
32  {
33  phi = phiHbyA - pEqn.flux();
34  }
35  }
36 
37  #include "continuityErrs.H"
38 
39  // Explicitly relax pressure for momentum corrector
40  p.relax();
41 
42  // Momentum corrector
44  //mesh.interpolate(gradP);
45 
46  U = HbyA - rAU*cellMask*gradP;
47  U.correctBoundaryConditions();
48  fvOptions.correct(U);
49 }
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:37
p
Definition: pEqn.H:50
volScalarField rAU(1.0/UEqn.A())
phiHbyA
Definition: pEqn.H:20
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facDiv.C:43
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:82
fv::options & fvOptions
volVectorField gradP(fvc::grad(p))
Calculates and prints the continuity errors.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:81
tmp< GeometricField< Type, faPatchField, areaMesh > > laplacian(const GeometricField< Type, faPatchField, areaMesh > &vf, const word &name)
Definition: facLaplacian.C:40
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:28
bool oversetAdjustPhi(surfaceScalarField &phi, const volVectorField &U, const label zoneId=-1)
Adjust the balance of fluxes to obey continuity.
HbyA
Definition: pEqn.H:4
faceMask
Definition: setCellMask.H:43
adjustPhi(phiHbyA, U, p_rgh)
const scalar pRefValue
const label pRefCell
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU))
const dictionary & simple
U
Definition: pEqn.H:72
mesh interpolate(rAU)
fvVectorMatrix & UEqn
Definition: UEqn.H:13
phi
Definition: pEqn.H:18
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
tmp< GeometricField< typename outerProduct< vector, Type >::type, faPatchField, areaMesh >> grad(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facGrad.C:51