pEqn.H
Go to the documentation of this file.
1 {
2  volScalarField rAU(1.0/UEqn().A());
3  volVectorField HbyA("HbyA", U);
4  HbyA = rAU*UEqn().H();
5 
7  MRF.makeRelative(phiHbyA);
8  adjustPhi(phiHbyA, U, p);
9 
10  tmp<volScalarField> rAtU(rAU);
11 
12  if (simple.consistent())
13  {
14  rAtU = 1.0/(1.0/rAU - UEqn().H1());
15  phiHbyA +=
16  fvc::interpolate(rAtU() - rAU)*fvc::snGrad(p)*mesh.magSf();
17  HbyA -= (rAU - rAtU())*fvc::grad(p);
18  }
19 
20  UEqn.clear();
21 
22  // Non-orthogonal pressure corrector loop
23  while (simple.correctNonOrthogonal())
24  {
25  fvScalarMatrix pEqn
26  (
28  );
29 
30  pEqn.setReference(pRefCell, pRefValue);
31 
32  pEqn.solve();
33 
34  if (simple.finalNonOrthogonalIter())
35  {
36  phi = phiHbyA - pEqn.flux();
37  }
38  }
39 
40  #include "continuityErrs.H"
41 
42  // Explicitly relax pressure for momentum corrector
43  p.relax();
44 
45  // Momentum corrector
46  U = HbyA - rAtU()*fvc::grad(p);
47  U.correctBoundaryConditions();
48  fvOptions.correct(U);
49 }
pRefCell
const label pRefCell
Definition: setRegionFluidFields.H:27
Foam::fvc::snGrad
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcSnGrad.C:45
Foam::fvc::grad
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcGrad.C:52
p
p
Definition: pEqn.H:62
Foam::MULES::interpolate
tmp< surfaceScalarField > interpolate(const RhoType &rho)
Definition: IMULESTemplates.C:40
Foam::fvc::div
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
phi
phi
Definition: pEqn.H:20
A
simpleMatrix< scalar > A(Nc)
simple
Simple relative velocity model.
U
U
Definition: pEqn.H:46
Foam::fvc::laplacian
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
Foam::fvScalarMatrix
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
rAtU
tmp< volScalarField > rAtU(rAU)
UEqn
tmp< fvVectorMatrix > UEqn(fvm::div(phi, U)+MRF.DDt(U)+turbulence->divDevReff(U)==fvOptions(U))
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
MRF
IOMRFZoneList & MRF
Definition: setRegionFluidFields.H:15
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
rAU
volScalarField rAU("rAU", 1.0/UEqn().A())
adjustPhi
adjustPhi(phiHbyA, U, p)
HbyA
HbyA
Definition: pEqn.H:4
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:52
phiHbyA
phiHbyA
Definition: pEqn.H:21
pRefValue
const scalar pRefValue
Definition: setRegionFluidFields.H:28
fvOptions
fv::options & fvOptions
Definition: setRegionFluidFields.H:16