pEqn.H
Go to the documentation of this file.
1 {
2  volScalarField rAU(1.0/UEqn.A());
5  MRF.makeRelative(phiHbyA);
6  adjustPhi(phiHbyA, U, p);
7 
8  tmp<volScalarField> rAtU(rAU);
9 
10  if (simple.consistent())
11  {
12  rAtU = 1.0/(1.0/rAU - UEqn.H1());
13  phiHbyA +=
14  fvc::interpolate(rAtU() - rAU)*fvc::snGrad(p)*mesh.magSf();
15  HbyA -= (rAU - rAtU())*fvc::grad(p);
16  }
17 
18  tUEqn.clear();
19 
20  // Update the pressure BCs to ensure flux consistency
22 
23  // Non-orthogonal pressure corrector loop
24  while (simple.correctNonOrthogonal())
25  {
26  fvScalarMatrix pEqn
27  (
29  );
30 
31  pEqn.setReference(pRefCell, pRefValue);
32 
33  pEqn.solve();
34 
35  if (simple.finalNonOrthogonalIter())
36  {
37  phi = phiHbyA - pEqn.flux();
38  }
39  }
40 
41  #include "continuityErrs.H"
42 
43  // Explicitly relax pressure for momentum corrector
44  p.relax();
45 
46  // Momentum corrector
47  U = HbyA - rAtU()*fvc::grad(p);
48  U.correctBoundaryConditions();
49  fvOptions.correct(U);
50 }
Foam::constrainHbyA
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:35
Foam::fvc::snGrad
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcSnGrad.C:47
simple
const dictionary & simple
Definition: readFluidMultiRegionSIMPLEControls.H:1
Foam::fvc::flux
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
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
rAtU
tmp< volScalarField > rAtU(rAU)
Foam::fac::div
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facDiv.C:50
MRF
IOMRFZoneList & MRF
Definition: setRegionFluidFields.H:22
HbyA
HbyA
Definition: pEqn.H:4
tUEqn
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
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
p
p
Definition: pEqn.H:50
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
rAU
volScalarField rAU(1.0/UEqn.A())
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:62
U
U
Definition: pEqn.H:72
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:54
phi
phi
Definition: pEqn.H:18
UEqn
fvVectorMatrix & UEqn
Definition: UEqn.H:13
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