pEqn.H
Go to the documentation of this file.
2 volVectorField HbyA("HbyA", Urel);
4 
6 (
7  "phiHbyA",
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  tUrelEqn.clear();
27 }
28 
29 // Update the pressure BCs to ensure flux consistency
31 
32 // Non-orthogonal pressure corrector loop
33 while (pimple.correctNonOrthogonal())
34 {
35  // Pressure corrector
36  fvScalarMatrix pEqn
37  (
39  );
40 
41  pEqn.setReference(pRefCell, pRefValue);
42 
43  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
44 
45  if (pimple.finalNonOrthogonalIter())
46  {
47  phi = phiHbyA - pEqn.flux();
48  }
49 }
50 
51 #include "continuityErrs.H"
52 
53 p.relax();
54 
55 // Momentum corrector
57 Urel.correctBoundaryConditions();
58 fvOptions.correct(Urel);
fvVectorMatrix & UrelEqn
Definition: UrelEqn.H:11
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
p
Definition: pEqn.H:50
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
phiHbyA
Definition: pEqn.H:20
volScalarField rAUrel(1.0/UrelEqn.A())
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:155
tmp< volScalarField > rAtUrel(rAUrel)
const dictionary & pimple
tmp< surfaceScalarField > interpolate(const RhoType &rho)
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
fv::options & fvOptions
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
dynamicFvMesh & mesh
Urel
Definition: pEqn.H:56
tmp< fvVectorMatrix > tUrelEqn(fvm::ddt(Urel)+fvm::div(phi, Urel)+turbulence->divDevReff(Urel)+SRF->Su()==fvOptions(Urel))
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF)
adjustPhi(phiHbyA, U, p_rgh)
const scalar pRefValue
const label pRefCell
volVectorField & HbyA
Definition: pEqn.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
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcSnGrad.C:45