pEqn.H
Go to the documentation of this file.
1 {
2  volScalarField rAU(1.0/UEqn.A());
3  volVectorField HbyA("HbyA", U);
4  HbyA = rAU*UEqn.H();
5 
6 
7  // Define coefficients and pseudo-velocities for RCM interpolation
8  // M[U] = AU - H = -grad(p)
9  // U = H/A - 1/A grad(p)
10  // H/A = U + 1/A grad(p)
12  (
13  "rhorAUf",
15  );
16 
18  (
19  "rhoHbyAf",
22  );
23 
24  #include "resetBoundaries.H"
25 
26  if (pimple.nCorrPISO() <= 1)
27  {
28  tUEqn.clear();
29  }
30 
31  if (pimple.transonic())
32  {
34  << "\nTransonic option not available for " << args.executable()
35  << exit(FatalError);
36  }
37  else
38  {
39  // Rhie & Chow interpolation (part 1)
41  (
42  "phiHbyA",
43  (
44  (rhoHbyAf & mesh.Sf())
47  * fvc::alphaCorr(U, phiByRho, pimple.finalInnerIter())
48  )
49  );
50 
51  MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
52 
53  // Non-orthogonal pressure corrector loop
54  while (pimple.correctNonOrthogonal())
55  {
56  // Pressure corrector
57  fvScalarMatrix pEqn
58  (
59  fvm::ddt(psi, p)
60  + fvc::div(phiHbyA)
62  ==
63  fvOptions(psi, p, rho.name())
64  );
65 
66  pEqn.solve(p.select(pimple.finalInnerIter()));
67 
68  // Rhie & Chow interpolation (part 2)
69  if (pimple.finalNonOrthogonalIter())
70  {
71  phi = phiHbyA + pEqn.flux();
72  }
73  }
74  }
75 
77 
78  #include "rhoEqn.H"
79  #include "compressibleContinuityErrs.H"
80 
81  // Explicitly relax pressure for momentum corrector
82  p.relax();
83 
85  U.correctBoundaryConditions();
86  fvOptions.correct(U);
87 }
88 
89 rho = thermo.rho();
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:37
rho
Definition: pEqn.H:1
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:125
p
Definition: pEqn.H:50
volScalarField rAU(1.0/UEqn.A())
error FatalError
Error stream (stdout output on all processes), with additional &#39;FOAM FATAL ERROR&#39; header text and sta...
phiHbyA
Definition: pEqn.H:20
tmp< GeometricField< typename flux< Type >::type, fvsPatchField, surfaceMesh > > ddtCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
Definition: fvcDdt.C:165
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facDiv.C:43
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
tmp< GeometricField< Type, faPatchField, areaMesh > > ddt(const dimensioned< Type > dt, const faMesh &mesh)
Definition: facDdt.C:40
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:82
fv::options & fvOptions
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:81
phiByRho
Definition: pEqn.H:76
psiReactionThermo & thermo
Definition: createFields.H:28
dynamicFvMesh & mesh
IOMRFZoneList & MRF
const word & executable() const noexcept
Name of executable without the path.
Definition: argListI.H:44
tmp< GeometricField< Type, faPatchField, areaMesh > > laplacian(const GeometricField< Type, faPatchField, areaMesh > &vf, const word &name)
Definition: facLaplacian.C:40
HbyA
Definition: pEqn.H:4
tmp< GeometricField< scalar, fvsPatchField, surfaceMesh > > alphaCorr(const GeometricField< vector, fvPatchField, volMesh > &U, const GeometricField< scalar, fvsPatchField, surfaceMesh > &phiU, const bool finalIter)
pimpleControl & pimple
U
Definition: pEqn.H:72
mesh interpolate(rAU)
fvVectorMatrix & UEqn
Definition: UEqn.H:13
phi
Definition: pEqn.H:18
const volScalarField & psi
surfaceVectorField rhoHbyAf("rhoHbyAf", fvc::interpolate(rho) *fvc::interpolate(U)+rhorAUf *fvc::interpolate(fvc::grad(p)))
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Foam::argList args(argc, argv)
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho *rAU))
tmp< GeometricField< typename outerProduct< vector, Type >::type, faPatchField, areaMesh >> grad(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facGrad.C:51