pEqn.H
Go to the documentation of this file.
1 tmp<volVectorField> tHbyA;
3 {
4  tHbyA = constrainHbyA(trTU()&UEqn.H(), U, p);
5 }
6 else
7 {
8  tHbyA = constrainHbyA(trAU()*UEqn.H(), U, p);
9 }
11 
12 tUEqn.clear();
14 
15 MRF.makeRelative(phiHbyA);
16 
17 adjustPhi(phiHbyA, U, p);
18 
19 while (simple.correctNonOrthogonal())
20 {
21  tmp<fvScalarMatrix> tpEqn;
22 
24  {
25  tpEqn = (fvm::laplacian(trTU(), p) == fvc::div(phiHbyA));
26  }
27  else
28  {
29  tpEqn = (fvm::laplacian(trAU(), p) == fvc::div(phiHbyA));
30  }
31 
32  fvScalarMatrix pEqn = tpEqn.ref();
33 
34  pEqn.setReference(pRefCell, pRefValue);
35 
36  pEqn.solve();
37 
38  if (simple.finalNonOrthogonalIter())
39  {
40  phi = phiHbyA - pEqn.flux();
41  }
42 }
43 
44 #include "continuityErrs.H"
45 
46 // Explicitly relax pressure for momentum corrector
47 p.relax();
48 
50 {
51  U = HbyA - (trTU()&fvc::grad(p));
52 }
53 else
54 {
55  U = HbyA - (trAU()*fvc::grad(p));
56 }
57 
58 U.correctBoundaryConditions();
59 fvOptions.correct(U);
Foam::constrainHbyA
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:35
trTU
tmp< volTensorField > trTU
Definition: UEqn.H:22
simple
const dictionary & simple
Definition: readFluidMultiRegionSIMPLEControls.H:1
Foam::fvc::flux
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
pressureImplicitPorosity
bool pressureImplicitPorosity(false)
phiHbyA
phiHbyA
Definition: pEqn.H:20
Foam::fac::grad
tmp< GeometricField< typename outerProduct< vector, Type >::type, faPatchField, areaMesh >> grad(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facGrad.C:56
Foam::fac::div
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facDiv.C:50
MRF
IOMRFZoneList & MRF
Definition: setRegionFluidFields.H:22
HbyA
HbyA
Definition: pEqn.H:4
tUEqn
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
Foam::fvScalarMatrix
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:44
fvOptions
fv::options & fvOptions
Definition: setRegionFluidFields.H:23
p
p
Definition: pEqn.H:50
tHbyA
tmp< volVectorField > tHbyA
Definition: pEqn.H:1
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:62
U
U
Definition: pEqn.H:72
trAU
tmp< volScalarField > trAU
Definition: UEqn.H:21
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:54
phi
phi
Definition: pEqn.H:18
UEqn
fvVectorMatrix & UEqn
Definition: UEqn.H:13
Foam::fac::laplacian
tmp< GeometricField< Type, faPatchField, areaMesh > > laplacian(const GeometricField< Type, faPatchField, areaMesh > &vf, const word &name)
Definition: facLaplacian.C:47
adjustPhi
adjustPhi(phiHbyA, U, p_rgh)
pRefCell
const label pRefCell
Definition: setRegionFluidFields.H:36
pRefValue
const scalar pRefValue
Definition: setRegionFluidFields.H:37