pEqn.H
Go to the documentation of this file.
1 rho = thermo.rho();
2 
3 volScalarField rAU(1.0/UEqn.A());
6 
7 if (pimple.nCorrPISO() <= 1)
8 {
9  tUEqn.clear();
10 }
11 
12 if (pimple.transonic())
13 {
15  (
16  "phid",
18  *(
19  fvc::flux(HbyA)
20  + MRF.zeroFilter
21  (
23  )
24  )
25  );
26 
27  MRF.makeRelative(fvc::interpolate(psi), phid);
28 
29  while (pimple.correctNonOrthogonal())
30  {
31  fvScalarMatrix pEqn
32  (
33  fvm::ddt(psi, p)
34  + fvm::div(phid, p)
36  ==
37  fvOptions(psi, p, rho.name())
38  );
39 
40  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
41 
42  if (pimple.finalNonOrthogonalIter())
43  {
44  phi == pEqn.flux();
45  }
46  }
47 }
48 else
49 {
51  (
52  "phiHbyA",
53  (
54  fvc::flux(rho*HbyA)
55  + MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi))
56  )
57  );
58 
59  MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
60 
61  // Update the pressure BCs to ensure flux consistency
62  constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
63 
64  while (pimple.correctNonOrthogonal())
65  {
66  fvScalarMatrix pEqn
67  (
68  fvm::ddt(psi, p)
69  + fvc::div(phiHbyA)
71  ==
72  fvOptions(psi, p, rho.name())
73  );
74 
75  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
76 
77  if (pimple.finalNonOrthogonalIter())
78  {
79  phi = phiHbyA + pEqn.flux();
80  }
81  }
82 }
83 
84 #include "rhoEqn.H"
85 #include "compressibleContinuityErrs.H"
86 
87 // Explicitly relax pressure for momentum corrector
88 p.relax();
89 
90 U = HbyA - rAU*fvc::grad(p);
91 U.correctBoundaryConditions();
92 fvOptions.correct(U);
93 K = 0.5*magSqr(U);
94 
95 if (pressureControl.limit(p))
96 {
97  p.correctBoundaryConditions();
98  rho = thermo.rho();
99 }
100 
101 if (thermo.dpdt())
102 {
103  dpdt = fvc::ddt(p);
104 }
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
rho
Definition: pEqn.H:1
pimpleNoLoopControl & pimple
p
Definition: pEqn.H:50
volScalarField rAU(1.0/UEqn.A())
IOMRFZoneList & MRF
phiHbyA
Definition: pEqn.H:20
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< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
rhoReactionThermo & thermo
Definition: createFields.H:28
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
CGAL::Exact_predicates_exact_constructions_kernel K
surfaceScalarField phid("phid", fvc::interpolate(psi) *(fvc::flux(HbyA)+MRF.zeroFilter(rhorAUf *fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho))))
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
Definition: fvcDdt.C:45
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
volScalarField & dpdt
dynamicFvMesh & mesh
pressureControl & pressureControl
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:33
dimensioned< scalar > magSqr(const dimensioned< Type > &)
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.
U
Definition: pEqn.H:72
volVectorField & HbyA
Definition: pEqn.H:13
fvVectorMatrix & UEqn
Definition: UEqn.H:13
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF)
phi
Definition: pEqn.H:18
const volScalarField & psi
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
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho *rAU))