pEqn.H
Go to the documentation of this file.
2 volVectorField HbyA("HbyA", Urel);
3 HbyA = rAUrel*UrelEqn().H();
4 
6 (
7  "phiHbyA",
8  (fvc::interpolate(HbyA) & mesh.Sf())
10 );
11 
13 
14 tmp<volScalarField> rAtUrel(rAUrel);
15 
16 if (pimple.consistent())
17 {
18  rAtUrel = 1.0/max(1.0/rAUrel - UrelEqn().H1(), 0.1/rAUrel);
19  phiHbyA +=
21  HbyA -= (rAUrel - rAtUrel())*fvc::grad(p);
22 }
23 
24 if (pimple.nCorrPISO() <= 1)
25 {
26  UrelEqn.clear();
27 }
28 
29 // Non-orthogonal pressure corrector loop
30 while (pimple.correctNonOrthogonal())
31 {
32  // Pressure corrector
33  fvScalarMatrix pEqn
34  (
36  );
37 
38  pEqn.setReference(pRefCell, pRefValue);
39 
40  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
41 
42  if (pimple.finalNonOrthogonalIter())
43  {
44  phi = phiHbyA - pEqn.flux();
45  }
46 }
47 
48 #include "continuityErrs.H"
49 
50 p.relax();
51 
52 // Momentum corrector
54 Urel.correctBoundaryConditions();
55 fvOptions.correct(Urel);
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
rAUrel
volScalarField rAUrel(1.0/UrelEqn().A())
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
UrelEqn
tmp< fvVectorMatrix > UrelEqn(fvm::div(phi, Urel)+turbulence->divDevReff(Urel)+SRF->Su()==fvOptions(Urel))
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)
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
Foam::fvc::ddtCorr
tmp< GeometricField< typename flux< Type >::type, fvsPatchField, surfaceMesh > > ddtCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
Definition: fvcDdt.C:155
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
Urel
Urel
Definition: pEqn.H:45
rAtUrel
tmp< volScalarField > rAtUrel(rAUrel)
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
Foam::max
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
adjustPhi
adjustPhi(phiHbyA, U, p)
HbyA
HbyA
Definition: pEqn.H:4
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:52
pimple
const dictionary & pimple
Definition: readFluidMultiRegionPIMPLEControls.H:1
phiHbyA
phiHbyA
Definition: pEqn.H:21
pRefValue
const scalar pRefValue
Definition: setRegionFluidFields.H:28
fvOptions
fv::options & fvOptions
Definition: setRegionFluidFields.H:16