pEqn.H
Go to the documentation of this file.
1 volScalarField rAU(1.0/UEqn().A());
3 
4 volVectorField HbyA("HbyA", U);
5 HbyA = rAU*UEqn().H();
6 
7 if (pimple.nCorrPISO() <= 1)
8 {
9  UEqn.clear();
10 }
11 
13 (
14  "phiHbyA",
15  (fvc::interpolate(HbyA) & mesh.Sf())
17 );
18 
19 MRF.makeRelative(phiHbyA);
20 adjustPhi(phiHbyA, U, p_gh);
21 
22 // Update the fixedFluxPressure BCs to ensure flux consistency
24 (
25  p_gh.boundaryField(),
26  (
27  phiHbyA.boundaryField()
28  - (mesh.Sf().boundaryField() & U.boundaryField())
29  )/(mesh.magSf().boundaryField()*rAUf.boundaryField())
30 );
31 
32 // Non-orthogonal pressure corrector loop
33 while (pimple.correctNonOrthogonal())
34 {
35  fvScalarMatrix p_ghEqn
36  (
38  );
39 
40  p_ghEqn.setReference(p_ghRefCell, p_ghRefValue);
41 
42  p_ghEqn.solve(mesh.solver(p_gh.select(pimple.finalInnerIter())));
43 
44  if (pimple.finalNonOrthogonalIter())
45  {
46  phi = phiHbyA - p_ghEqn.flux();
47  }
48 }
49 
50 #include "continuityErrs.H"
51 
52 // Explicitly relax pressure for momentum corrector
53 p_gh.relax();
54 
55 p = p_gh + (g & mesh.C());
56 
57 U = HbyA - rAU*fvc::grad(p_gh);
58 U.correctBoundaryConditions();
59 fvOptions.correct(U);
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()))
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, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
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
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