pEqn.H
Go to the documentation of this file.
1 {
2  volScalarField rAU("rAU", 1.0/UEqn.A());
5 
7 
9  (
10  "phiHbyA",
12  + MRF.zeroFilter(rAUf*fvc::ddtCorr(U, phi))
13  + phig
14  );
15 
16  MRF.makeRelative(phiHbyA);
17 
18  // Update the pressure BCs to ensure flux consistency
20 
21  while (pimple.correctNonOrthogonal())
22  {
23  fvScalarMatrix p_rghEqn
24  (
26  );
27 
28  p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
29 
30  p_rghEqn.solve(p_rgh.select(pimple.finalInnerIter()));
31 
32  if (pimple.finalNonOrthogonalIter())
33  {
34  // Calculate the conservative fluxes
35  phi = phiHbyA - p_rghEqn.flux();
36 
37  // Explicitly relax pressure for momentum corrector
38  p_rgh.relax();
39 
40  // Correct the momentum source with the pressure gradient flux
41  // calculated from the relaxed pressure
42  U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf);
43  U.correctBoundaryConditions();
44  fvOptions.correct(U);
45 
46  // Correct Uf if the mesh is moving
48 
49  // Make the fluxes relative to the mesh motion
51  }
52  }
53 
54  #include "continuityErrs.H"
55 
56  p = p_rgh + rhok*gh;
57 
58  if (p_rgh.needReference())
59  {
61  (
62  "p",
63  p.dimensions(),
65  );
66  p_rgh = p - rhok*gh;
67  }
68 }
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:37
p
Definition: pEqn.H:50
volScalarField rAU(1.0/UEqn.A())
phiHbyA
Definition: pEqn.H:20
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
surfaceScalarField phig("phig", -rhorAUf *ghf *fvc::snGrad(rho) *mesh.magSf())
tmp< GeometricField< typename flux< Type >::type, fvsPatchField, surfaceMesh > > ddtCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
Definition: fvcDdt.C:165
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facDiv.C:43
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:82
scalar getRefCellValue(const volScalarField &field, const label refCelli)
Return the current value of field in the reference cell.
Definition: findRefCell.C:127
fv::options & fvOptions
const surfaceScalarField & ghf
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:81
dynamicFvMesh & mesh
IOMRFZoneList & MRF
tmp< GeometricField< Type, faPatchField, areaMesh > > laplacian(const GeometricField< Type, faPatchField, areaMesh > &vf, const word &name)
Definition: facLaplacian.C:40
void correctUf(autoPtr< surfaceVectorField > &Uf, const volVectorField &U, const surfaceScalarField &phi)
Definition: fvcMeshPhi.C:218
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:28
HbyA
Definition: pEqn.H:4
p_rgh
Definition: pEqn.H:139
pimpleControl & pimple
const scalar pRefValue
const label pRefCell
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU))
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> reconstruct(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
U
Definition: pEqn.H:72
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
mesh interpolate(rAU)
fvVectorMatrix & UEqn
Definition: UEqn.H:13
const volScalarField & gh
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF)
phi
Definition: pEqn.H:18
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
MRF makeRelative(fvc::interpolate(rho), phiHbyA)
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcSnGrad.C:40
rhok
Definition: TEqn.H:27
Uf
Definition: pEqn.H:64