pEqn.H
Go to the documentation of this file.
1 volScalarField rAU(1.0/UEqn.A());
4 (
5  "phiHbyA",
7  + MRF.zeroFilter(fvc::interpolate(rAU)*fvc::ddtCorr(U, phi))
8 );
9 
10 MRF.makeRelative(phiHbyA);
11 
12 adjustPhi(phiHbyA, U, p);
13 
14 // Update the pressure BCs to ensure flux consistency
16 
17 // Non-orthogonal pressure corrector loop
18 while (piso.correctNonOrthogonal())
19 {
20  // Pressure corrector
21 
22  fvScalarMatrix pEqn
23  (
25  );
26 
27  pEqn.setReference
28  (
29  pressureReference.refCell(),
30  pressureReference.refValue()
31  );
32 
33  pEqn.solve();
34 
35  if (piso.finalNonOrthogonalIter())
36  {
37  phi = phiHbyA - pEqn.flux();
38  }
39 }
40 
41 #include "continuityErrs.H"
42 
44 U.correctBoundaryConditions();
rAU
Definition: pEqn.H:1
pressureReference & pressureReference
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcGrad.C:52
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
U
Definition: pEqn.H:72
mixture MRF().makeRelative(phiHbyA)
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
pisoControl piso(mesh)
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:59
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
p
Definition: pEqn.H:125
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:58
phiHbyA
Definition: pEqn.H:30
Foam::fvConstraints & fvConstraints
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:34
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.
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
phi
Definition: pEqn.H:98
adjustPhi(phiHbyA, Urel, p)
volVectorField & HbyA
Definition: pEqn.H:13
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
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF)
fvVectorMatrix & UEqn
Definition: UEqn.H:13