pEqn.H
Go to the documentation of this file.
1 {
3  volVectorField HbyA("HbyA", Urel);
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  tUrelEqn.clear();
20 
21  // Update the pressure BCs to ensure flux consistency
23 
24  // Non-orthogonal pressure corrector loop
25  while (simple.correctNonOrthogonal())
26  {
27  fvScalarMatrix pEqn
28  (
30  );
31 
32  pEqn.setReference(pRefCell, pRefValue);
33 
34  pEqn.solve();
35 
36  if (simple.finalNonOrthogonalIter())
37  {
38  phi = phiHbyA - pEqn.flux();
39  }
40  }
41 
42  #include "continuityErrs.H"
43 
44  // Explicitly relax pressure for momentum corrector
45  p.relax();
46 
47  // Momentum corrector
49  Urel.correctBoundaryConditions();
50  fvOptions.correct(Urel);
51 }
fvVectorMatrix & UrelEqn
Definition: UrelEqn.H:11
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
fv::options & fvOptions
p
Definition: pEqn.H:50
phiHbyA
Definition: pEqn.H:20
volScalarField rAUrel(1.0/UrelEqn.A())
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
tmp< volScalarField > rAtUrel(rAUrel)
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
dynamicFvMesh & mesh
Urel
Definition: pEqn.H:56
tmp< fvVectorMatrix > tUrelEqn(fvm::ddt(Urel)+fvm::div(phi, Urel)+turbulence->divDevReff(Urel)+SRF->Su()==fvOptions(Urel))
adjustPhi(phiHbyA, U, p_rgh)
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.
volVectorField & HbyA
Definition: pEqn.H:13
label pRefCell
Definition: createFields.H:106
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF)
phi
Definition: pEqn.H:18
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
scalar pRefValue
Definition: createFields.H:107
simpleControl simple(mesh)