pEqn.H
Go to the documentation of this file.
1 {
2  volScalarField rAUrel(1.0/UrelEqn().A());
3  volVectorField HbyA("HbyA", Urel);
4  HbyA = rAUrel*UrelEqn().H();
5 
8 
9  tmp<volScalarField> rAtUrel(rAUrel);
10 
11  if (simple.consistent())
12  {
13  rAtUrel = 1.0/(1.0/rAUrel - UrelEqn().H1());
14  phiHbyA +=
16  HbyA -= (rAUrel - rAtUrel())*fvc::grad(p);
17  }
18 
19  UrelEqn.clear();
20 
21  // Non-orthogonal pressure corrector loop
22  while (simple.correctNonOrthogonal())
23  {
24  fvScalarMatrix pEqn
25  (
27  );
28 
29  pEqn.setReference(pRefCell, pRefValue);
30 
31  pEqn.solve();
32 
33  if (simple.finalNonOrthogonalIter())
34  {
35  phi = phiHbyA - pEqn.flux();
36  }
37  }
38 
39  #include "continuityErrs.H"
40 
41  // Explicitly relax pressure for momentum corrector
42  p.relax();
43 
44  // Momentum corrector
46  Urel.correctBoundaryConditions();
47  fvOptions.correct(Urel);
48 }
phi
Definition: pEqn.H:20
Urel
Definition: pEqn.H:53
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
p
Definition: pEqn.H:59
fv::IOoptionList & fvOptions
const scalar pRefValue
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
volScalarField rAUrel(1.0/UrelEqn().A())
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
tmp< volScalarField > rAtUrel(rAUrel)
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
adjustPhi(phiHbyA, U, p_rgh)
const label pRefCell
const dictionary & simple
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
HbyA
Definition: pEqn.H:7
tmp< fvVectorMatrix > UrelEqn(fvm::ddt(Urel)+fvm::div(phi, Urel)+turbulence->divDevReff(Urel)+SRF->Su()==fvOptions(Urel))