pEqn.H
Go to the documentation of this file.
1 volScalarField rAU(1.0/UEqn().A());
2 volVectorField HbyA("HbyA", U);
3 HbyA = rAU*UEqn().H();
4 
6 (
7  "phiHbyA",
8  (fvc::interpolate(HbyA) & mesh.Sf())
10 );
11 
12 MRF.makeRelative(phiHbyA);
13 
14 adjustPhi(phiHbyA, U, p);
15 
16 tmp<volScalarField> rAtU(rAU);
17 
18 if (pimple.consistent())
19 {
20  rAtU = 1.0/max(1.0/rAU - UEqn().H1(), 0.1/rAU);
21  phiHbyA +=
22  fvc::interpolate(rAtU() - rAU)*fvc::snGrad(p)*mesh.magSf();
23  HbyA -= (rAU - rAtU())*fvc::grad(p);
24 }
25 
26 if (pimple.nCorrPISO() <= 1)
27 {
28  UEqn.clear();
29 }
30 
32 
33 // Update the fixedFluxPressure BCs to ensure flux consistency
35 (
36  p.boundaryField(),
37  (
38  phiHbyA.boundaryField()
39  - MRF.relative(mesh.Sf().boundaryField() & U.boundaryField())
40  )/(mesh.magSf().boundaryField()*rAUf.boundaryField())
41 );
42 
43 // Non-orthogonal pressure corrector loop
44 while (pimple.correctNonOrthogonal())
45 {
46  // Pressure corrector
47  fvScalarMatrix pEqn
48  (
49  fvm::laplacian(rAUf, p) == fvc::div(phiHbyA)
50  );
51 
52  pEqn.setReference(pRefCell, pRefValue);
53 
54  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
55 
56  if (pimple.finalNonOrthogonalIter())
57  {
58  phi = phiHbyA - pEqn.flux();
59  }
60 }
61 
62 #include "continuityErrs.H"
63 
64 // Explicitly relax pressure for momentum corrector
65 p.relax();
66 
68 U.correctBoundaryConditions();
69 fvOptions.correct(U);
tmp< volScalarField > rAtU(rAU)
phi
Definition: pEqn.H:20
setSnGrad< fixedFluxPressureFvPatchScalarField >(p_rgh.boundaryField(),( phiHbyA.boundaryField() -MRF.relative(mesh.Sf().boundaryField()&U.boundaryField()) *rho.boundaryField() )/(mesh.magSf().boundaryField()*rhorAUf.boundaryField()))
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU))
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< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
tmp< surfaceScalarField > interpolate(const RhoType &rho)
dynamicFvMesh & mesh
const dictionary & pimple
p
Definition: pEqn.H:59
fv::IOoptionList & fvOptions
const scalar pRefValue
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
IOMRFZoneList & MRF
fvVectorMatrix UEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
phiHbyA
Definition: pEqn.H:21
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcSnGrad.C:45
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
adjustPhi(phiHbyA, U, p_rgh)
volScalarField rAU(1.0/UEqn.A())
const label pRefCell
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcGrad.C:52
U
Definition: pEqn.H:82
HbyA
Definition: pEqn.H:7