pEqn.H
Go to the documentation of this file.
1 {
2  volScalarField rAU("rAU", 1.0/UEqn.A());
6  (
7  "phiHbyA",
10  );
12 
14  (
15  - ghf*fvc::snGrad(rho)*rAUf*mesh.magSf()
16  );
17 
19 
20  // Update the pressure BCs to ensure flux consistency
22 
23  while (pimple.correctNonOrthogonal())
24  {
26  (
28  );
29 
30  p_rghEqn.setReference
31  (
32  pressureReference.refCell(),
34  );
35 
36  p_rghEqn.solve();
37 
38  if (pimple.finalNonOrthogonalIter())
39  {
40  phi = phiHbyA - p_rghEqn.flux();
41 
42  U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf);
43  U.correctBoundaryConditions();
44  }
45  }
46 
47  #include "continuityErrs.H"
48 
49  p == p_rgh + rho*gh;
50 
51  if (p_rgh.needReference())
52  {
54  (
55  "p",
56  p.dimensions(),
57  pressureReference.refValue()
58  - getRefCellValue(p, pressureReference.refCell())
59  );
60  p_rgh = p - rho*gh;
61  }
62 }
rAU
Definition: pEqn.H:1
pressureReference & pressureReference
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
pimpleNoLoopControl & pimple
p_rgh
Definition: pEqn.H:160
U
Definition: pEqn.H:72
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
tmp< GeometricField< typename flux< Type >::type, fvsPatchField, surfaceMesh > > ddtCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
Definition: fvcDdt.C:170
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:59
fvMesh & mesh
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
scalar getRefCellValue(const volScalarField &field, const label refCelli)
Return the current value of field in the reference cell.
Definition: findRefCell.C:136
p
Definition: pEqn.H:125
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:58
phiHbyA
Definition: pEqn.H:30
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:34
const surfaceScalarField & ghf
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
fvScalarMatrix p_rghEqn(p_rgh, dimMass/dimTime)
phi
Definition: pEqn.H:98
adjustPhi(phiHbyA, Urel, p)
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> reconstruct(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
volVectorField & HbyA
Definition: pEqn.H:13
const surfaceScalarField phig(-rhorAUf *ghf *fvc::snGrad(rho) *mesh.magSf())
const volScalarField & gh
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU))
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
Definition: fvcFlux.C:32
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcSnGrad.C:45
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF)
rho
Definition: pEqn.H:1
fvVectorMatrix & UEqn
Definition: UEqn.H:13