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 }
Foam::fvc::grad
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcGrad.C:52
p
p
Definition: pEqn.H:62
Foam::MULES::interpolate
tmp< surfaceScalarField > interpolate(const RhoType &rho)
Definition: IMULESTemplates.C:40
Foam::fvc::div
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
g
const dimensionedVector & g
Definition: setRegionFluidFields.H:33
setSnGrad< fixedFluxPressureFvPatchScalarField >
setSnGrad< fixedFluxPressureFvPatchScalarField >(p_rgh.boundaryField(),(phiHbyA.boundaryField() - MRF.relative(mesh.Sf().boundaryField() &U.boundaryField()))/(mesh.magSf().boundaryField() *rAUf.boundaryField()))
phi
phi
Definition: pEqn.H:20
U
U
Definition: pEqn.H:46
Foam::fvc::laplacian
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
Foam::fvScalarMatrix
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
Foam::fvc::ddtCorr
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
UEqn
tmp< fvVectorMatrix > UEqn(fvm::div(phi, U)+MRF.DDt(U)+turbulence->divDevReff(U)==fvOptions(U))
n
surfaceVectorField n(mesh.Sf()/mesh.magSf())
MRF
IOMRFZoneList & MRF
Definition: setRegionFluidFields.H:15
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
rAU
volScalarField rAU("rAU", 1.0/UEqn().A())
adjustPhi
adjustPhi(phiHbyA, U, p)
HbyA
HbyA
Definition: pEqn.H:4
makeRelative
MRF makeRelative(phiHbyA)
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:52
pimple
const dictionary & pimple
Definition: readFluidMultiRegionPIMPLEControls.H:1
phiHbyA
phiHbyA
Definition: pEqn.H:21
Foam::fvc::makeAbsolute
void makeAbsolute(surfaceScalarField &phi, const volVectorField &U)
Make the given flux absolute.
Definition: fvcMeshPhi.C:113
Foam::surfaceVectorField
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
Definition: surfaceFieldsFwd.H:55
Uf
Uf
Definition: pEqn.H:78
fvOptions
fv::options & fvOptions
Definition: setRegionFluidFields.H:16
rAUf
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU))