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);
Foam::fvc::snGrad
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcSnGrad.C:47
rAtUrel
tmp< volScalarField > rAtUrel(rAUrel)
Foam::fvc::flux
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
Urel
Urel
Definition: pEqn.H:56
phiHbyA
phiHbyA
Definition: pEqn.H:20
Foam::fac::grad
tmp< GeometricField< typename outerProduct< vector, Type >::type, faPatchField, areaMesh >> grad(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facGrad.C:56
Foam::fac::div
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facDiv.C:50
rAUrel
volScalarField rAUrel(1.0/UrelEqn.A())
pimple
pimpleControl & pimple
Definition: setRegionFluidFields.H:56
HbyA
HbyA
Definition: pEqn.H:4
Foam::fvScalarMatrix
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:44
fvOptions
fv::options & fvOptions
Definition: setRegionFluidFields.H:23
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
ddtCorr
ddtCorr
Definition: readControls.H:9
Foam::max
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:47
p
p
Definition: pEqn.H:50
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
UrelEqn
fvVectorMatrix & UrelEqn
Definition: UrelEqn.H:11
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:62
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:54
phi
phi
Definition: pEqn.H:18
tUrelEqn
tmp< fvVectorMatrix > tUrelEqn(fvm::ddt(Urel)+fvm::div(phi, Urel)+turbulence->divDevReff(Urel)+SRF->Su()==fvOptions(Urel))
Foam::fac::laplacian
tmp< GeometricField< Type, faPatchField, areaMesh > > laplacian(const GeometricField< Type, faPatchField, areaMesh > &vf, const word &name)
Definition: facLaplacian.C:47
adjustPhi
adjustPhi(phiHbyA, U, p_rgh)
interpolate
mesh interpolate(rAU)
pRefCell
const label pRefCell
Definition: setRegionFluidFields.H:36
constrainPressure
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF)
pRefValue
const scalar pRefValue
Definition: setRegionFluidFields.H:37