pEqn.H
Go to the documentation of this file.
1 {
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 }
pRefCell
const label pRefCell
Definition: setRegionFluidFields.H:27
Foam::fvc::snGrad
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcSnGrad.C:45
rAUrel
volScalarField rAUrel(1.0/UrelEqn().A())
Foam::fvc::grad
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcGrad.C:52
p
p
Definition: pEqn.H:62
UrelEqn
tmp< fvVectorMatrix > UrelEqn(fvm::div(phi, Urel)+turbulence->divDevReff(Urel)+SRF->Su()==fvOptions(Urel))
Foam::MULES::interpolate
tmp< surfaceScalarField > interpolate(const RhoType &rho)
Definition: IMULESTemplates.C:40
Foam::fvc::div
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
phi
phi
Definition: pEqn.H:20
A
simpleMatrix< scalar > A(Nc)
simple
Simple relative velocity model.
Foam::fvc::laplacian
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
Foam::fvScalarMatrix
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
Urel
Urel
Definition: pEqn.H:45
rAtUrel
tmp< volScalarField > rAtUrel(rAUrel)
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
adjustPhi
adjustPhi(phiHbyA, U, p)
HbyA
HbyA
Definition: pEqn.H:4
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:52
phiHbyA
phiHbyA
Definition: pEqn.H:21
pRefValue
const scalar pRefValue
Definition: setRegionFluidFields.H:28
fvOptions
fv::options & fvOptions
Definition: setRegionFluidFields.H:16