pEqn.H
Go to the documentation of this file.
1 {
2  rAU = 1.0/UEqn().A();
4 
5  volVectorField HbyA("HbyA", U);
6  HbyA = rAU*UEqn().H();
7 
8  if (pimple.nCorrPISO() <= 1)
9  {
10  UEqn.clear();
11  }
12 
14  (
15  "phiHbyA",
16  (fvc::interpolate(HbyA) & mesh.Sf())
17  + rAUf*fvc::ddtCorr(U, Uf)
18  );
19 
20  MRF.makeRelative(phiHbyA);
21 
22  if (p_gh.needReference())
23  {
25  adjustPhi(phiHbyA, U, p_gh);
27  }
28 
29  // Update the fixedFluxPressure BCs to ensure flux consistency
31  (
32  p_gh.boundaryField(),
33  (
34  phiHbyA.boundaryField()
35  - (mesh.Sf().boundaryField() & U.boundaryField())
36  )/(mesh.magSf().boundaryField()*rAUf.boundaryField())
37  );
38 
39  // Non-orthogonal pressure corrector loop
40  while (pimple.correctNonOrthogonal())
41  {
42  fvScalarMatrix p_ghEqn
43  (
45  );
46 
47  p_ghEqn.setReference(p_ghRefCell, p_ghRefValue);
48 
49  p_ghEqn.solve(mesh.solver(p_gh.select(pimple.finalInnerIter())));
50 
51  if (pimple.finalNonOrthogonalIter())
52  {
53  phi = phiHbyA - p_ghEqn.flux();
54 
55  // Explicitly relax pressure for momentum corrector
56  p_gh.relax();
57 
58  U = HbyA - rAU*fvc::grad(p_gh);
59  U.correctBoundaryConditions();
60  fvOptions.correct(U);
61  }
62  }
63 
64  #include "continuityErrs.H"
65 
66  {
68  surfaceVectorField n(mesh.Sf()/mesh.magSf());
69  Uf += n*(phi/mesh.magSf() - (n & Uf));
70  }
71 
72  // Make the fluxes relative to the mesh motion
74 
75  p = p_gh + (g & mesh.C());
76 }
Uf
Definition: pEqn.H:78
phi
Definition: pEqn.H:20
setSnGrad< fixedFluxPressureFvPatchScalarField >(p_rgh.boundaryField(),( phiHbyA.boundaryField() -MRF.relative(mesh.Sf().boundaryField()&U.boundaryField()) *rho.boundaryField() )/(mesh.magSf().boundaryField()*rhorAUf.boundaryField()))
void makeAbsolute(surfaceScalarField &phi, const volVectorField &U)
Make the given flux absolute.
Definition: fvcMeshPhi.C:113
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU))
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
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
const dictionary & pimple
p
Definition: pEqn.H:59
fv::IOoptionList & fvOptions
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, fvsPatchField, surfaceMesh > surfaceScalarField
MRF makeRelative(fvc::interpolate(rho), phiHbyA)
phiHbyA
Definition: pEqn.H:21
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
adjustPhi(phiHbyA, U, p_rgh)
volScalarField rAU(1.0/UEqn.A())
const dimensionedVector & g
surfaceVectorField n(mesh.Sf()/mesh.magSf())
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
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
U
Definition: pEqn.H:82
HbyA
Definition: pEqn.H:7