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 }
10 volVectorField& HbyA = tHbyA.ref();
11 
12 tUEqn.clear();
13 surfaceScalarField phiHbyA("phiHbyA", fvc::flux(HbyA));
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);
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
fv::options & fvOptions
p
Definition: pEqn.H:50
IOMRFZoneList & MRF
phiHbyA
Definition: pEqn.H:20
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
tmp< volTensorField > trTU
Definition: UEqn.H:22
tmp< volVectorField > tHbyA
Definition: pEqn.H:1
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:33
adjustPhi(phiHbyA, U, p_rgh)
Internal & ref()
Return a reference to the dimensioned internal field.
U
Definition: pEqn.H:72
label pRefCell
Definition: createFields.H:106
fvVectorMatrix & UEqn
Definition: UEqn.H:13
phi
Definition: pEqn.H:18
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
Switch pressureImplicitPorosity(false)
tmp< volScalarField > trAU
Definition: UEqn.H:21
scalar pRefValue
Definition: createFields.H:107
simpleControl simple(mesh)