pEqn.H
Go to the documentation of this file.
1 {
2  rAU = 1.0/UEqn.A();
5 
6  if (pimple.nCorrPISO() <= 1)
7  {
8  tUEqn.clear();
9  }
10 
12  (
13  "phiHbyA",
15  + MRF.zeroFilter(rAUf*fvc::ddtCorr(U, Uf))
16  );
17 
18  MRF.makeRelative(phiHbyA);
19 
20  if (p_gh.needReference())
21  {
23  adjustPhi(phiHbyA, U, p_gh);
25  }
26 
27  // Update the pressure BCs to ensure flux consistency
29 
30  // Non-orthogonal pressure corrector loop
31  while (pimple.correctNonOrthogonal())
32  {
33  fvScalarMatrix p_ghEqn
34  (
36  );
37 
38  p_ghEqn.setReference(p_ghRefCell, p_ghRefValue);
39 
40  p_ghEqn.solve(mesh.solver(p_gh.select(pimple.finalInnerIter())));
41 
42  if (pimple.finalNonOrthogonalIter())
43  {
44  phi = phiHbyA - p_ghEqn.flux();
45 
46  // Explicitly relax pressure for momentum corrector
47  p_gh.relax();
48 
49  U = HbyA - rAU*fvc::grad(p_gh);
50  U.correctBoundaryConditions();
51  fvOptions.correct(U);
52  }
53  }
54 
55  #include "continuityErrs.H"
56 
57  {
59  surfaceVectorField n(mesh.Sf()/mesh.magSf());
60  Uf += n*(phi/mesh.magSf() - (n & Uf));
61  }
62 
63  // Make the fluxes relative to the mesh motion
65 
66  p = p_gh + (g & mesh.C());
67 }
Foam::constrainHbyA
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:35
Foam::fvc::flux
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
phiHbyA
phiHbyA
Definition: pEqn.H:20
Foam::fac::grad
tmp< GeometricField< typename outerProduct< vector, Type >::type, faPatchField, areaMesh >> grad(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facGrad.C:56
Foam::fac::div
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facDiv.C:50
MRF
IOMRFZoneList & MRF
Definition: setRegionFluidFields.H:22
pimple
pimpleControl & pimple
Definition: setRegionFluidFields.H:56
HbyA
HbyA
Definition: pEqn.H:4
tUEqn
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
Foam::fvScalarMatrix
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:44
fvOptions
fv::options & fvOptions
Definition: setRegionFluidFields.H:23
makeRelative
MRF makeRelative(fvc::interpolate(rho), phiHbyA)
ddtCorr
ddtCorr
Definition: readControls.H:9
p
p
Definition: pEqn.H:50
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
g
const uniformDimensionedVectorField & g
Definition: createFluidFields.H:24
rAU
volScalarField rAU(1.0/UEqn.A())
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:60
U
U
Definition: pEqn.H:72
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:54
phi
phi
Definition: pEqn.H:18
UEqn
fvVectorMatrix & UEqn
Definition: UEqn.H:13
Uf
Uf
Definition: pEqn.H:107
Foam::fac::laplacian
tmp< GeometricField< Type, faPatchField, areaMesh > > laplacian(const GeometricField< Type, faPatchField, areaMesh > &vf, const word &name)
Definition: facLaplacian.C:47
Foam::fvc::makeAbsolute
void makeAbsolute(surfaceScalarField &phi, const volVectorField &U)
Make the given flux absolute.
Definition: fvcMeshPhi.C:116
Foam::surfaceVectorField
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
Definition: surfaceFieldsFwd.H:57
adjustPhi
adjustPhi(phiHbyA, U, p_rgh)
interpolate
mesh interpolate(rAU)
n
surfaceVectorField n(mesh.Sf()/mesh.magSf())
constrainPressure
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF)
rAUf
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU))