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
42  (
43  pressureReference.refCell(),
44  pressureReference.refValue()
45  );
46 
47  pEqn.solve();
48 
49  if (pimple.finalNonOrthogonalIter())
50  {
51  phi = phiHbyA - pEqn.flux();
52  }
53 }
54 
55 #include "continuityErrs.H"
56 
57 p.relax();
58 
59 // Momentum corrector
61 Urel.correctBoundaryConditions();
fvVectorMatrix & UrelEqn
Definition: UrelEqn.H:11
pressureReference & pressureReference
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
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
pimpleNoLoopControl & pimple
tmp< fvVectorMatrix > tUrelEqn(fvm::ddt(Urel)+fvm::div(phi, Urel)+turbulence->divDevSigma(Urel)+SRF->Su()==fvModels.source(Urel))
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:170
tmp< volScalarField > rAtUrel(rAUrel)
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:59
fvMesh & mesh
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
p
Definition: pEqn.H:125
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:58
phiHbyA
Definition: pEqn.H:30
Foam::fvConstraints & fvConstraints
Urel
Definition: pEqn.H:60
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
phi
Definition: pEqn.H:98
adjustPhi(phiHbyA, Urel, p)
volVectorField & HbyA
Definition: pEqn.H:13
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
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF)