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.transonic())
8 {
10  (
11  "phid",
13  *(
14  fvc::flux(HbyA)
15  + MRF.zeroFilter
16  (
18  )
19  )
20  );
21 
22  MRF.makeRelative(fvc::interpolate(psi), phid);
23 
24  while (pimple.correctNonOrthogonal())
25  {
26  fvScalarMatrix pEqn
27  (
28  fvm::ddt(psi, p)
29  + fvm::div(phid, p)
31  ==
32  coalParcels.Srho()
33  + fvOptions(psi, p, rho.name())
34  );
35 
36  pEqn.solve();
37 
38  if (pimple.finalNonOrthogonalIter())
39  {
40  phi == pEqn.flux();
41  }
42  }
43 }
44 else
45 {
47  (
48  "phiHbyA",
49  (
50  fvc::flux(rho*HbyA)
51  + MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi))
52  )
53  );
54 
55  MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
56 
57  // Update the pressure BCs to ensure flux consistency
58  constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
59 
60  while (pimple.correctNonOrthogonal())
61  {
62  fvScalarMatrix pEqn
63  (
64  fvm::ddt(psi, p)
65  + fvc::div(phiHbyA)
67  ==
68  coalParcels.Srho()
69  + fvOptions(psi, p, rho.name())
70  );
71 
72  pEqn.solve();
73 
74  if (pimple.finalNonOrthogonalIter())
75  {
76  phi = phiHbyA + pEqn.flux();
77  }
78  }
79 }
80 
81 #include "rhoEqn.H"
83 
84 U = HbyA - rAU*fvc::grad(p);
85 U.correctBoundaryConditions();
86 fvOptions.correct(U);
87 
88 K = 0.5*magSqr(U);
89 
90 if (thermo.dpdt())
91 {
92  dpdt = fvc::ddt(p);
93 }
rAU
Definition: pEqn.H:1
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
IOMRFZoneList & MRF
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
rhoReactionThermo & thermo
Definition: createFields.H:28
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:58
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
Solve the continuity for density.
phi
Definition: pEqn.H:104
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:57
volScalarField & dpdt
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:34
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.
phiHbyA
Definition: pEqn.H:32
U
Definition: pEqn.H:72
volVectorField & HbyA
Definition: pEqn.H:13
fvVectorMatrix & UEqn
Definition: UEqn.H:11
Calculates and prints the continuity errors.
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF)
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))