pEqn.H
Go to the documentation of this file.
1 {
2  volScalarField rAU(1.0/UEqn().A());
3  volVectorField HbyA("HbyA", U);
4  HbyA = rAU*UEqn().H();
5 
7  MRF.makeRelative(phiHbyA);
8  adjustPhi(phiHbyA, U, p);
9 
10  tmp<volScalarField> rAtU(rAU);
11 
12  if (simple.consistent())
13  {
14  rAtU = 1.0/(1.0/rAU - UEqn().H1());
15  phiHbyA +=
16  fvc::interpolate(rAtU() - rAU)*fvc::snGrad(p)*mesh.magSf();
17  HbyA -= (rAU - rAtU())*fvc::grad(p);
18  }
19 
20  UEqn.clear();
21 
22  // Non-orthogonal pressure corrector loop
23  while (simple.correctNonOrthogonal())
24  {
25  fvScalarMatrix pEqn
26  (
28  );
29 
30  pEqn.setReference(pRefCell, pRefValue);
31 
32  pEqn.solve();
33 
34  if (simple.finalNonOrthogonalIter())
35  {
36  phi = phiHbyA - pEqn.flux();
37  }
38  }
39 
40  #include "continuityErrs.H"
41 
42  // Explicitly relax pressure for momentum corrector
43  p.relax();
44 
45  // Momentum corrector
46  U = HbyA - rAtU()*fvc::grad(p);
47  U.correctBoundaryConditions();
48  fvOptions.correct(U);
49 }
tmp< volScalarField > rAtU(rAU)
phi
Definition: pEqn.H:20
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
tmp< surfaceScalarField > interpolate(const RhoType &rho)
dynamicFvMesh & mesh
p
Definition: pEqn.H:59
fv::IOoptionList & fvOptions
const scalar pRefValue
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
IOMRFZoneList & MRF
fvVectorMatrix UEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
phiHbyA
Definition: pEqn.H:21
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcSnGrad.C:45
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
adjustPhi(phiHbyA, U, p_rgh)
volScalarField rAU(1.0/UEqn.A())
const label pRefCell
const dictionary & simple
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcGrad.C:52
U
Definition: pEqn.H:82
HbyA
Definition: pEqn.H:7