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  *(
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(mesh.solver(p.select(pimple.finalInnerIter())));
37 
38  if (pimple.finalNonOrthogonalIter())
39  {
40  phi == pEqn.flux();
41  }
42  }
43 }
44 else
45 {
47  (
48  "phiHbyA",
49  (
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
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(mesh.solver(p.select(pimple.finalInnerIter())));
73 
74  if (pimple.finalNonOrthogonalIter())
75  {
76  phi = phiHbyA + pEqn.flux();
77  }
78  }
79 }
80 
81 #include "rhoEqn.H"
82 #include "compressibleContinuityErrs.H"
83 
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 }
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:37
rho
Definition: pEqn.H:1
p
Definition: pEqn.H:50
volScalarField rAU(1.0/UEqn.A())
phiHbyA
Definition: pEqn.H:20
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
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
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:85
CGAL::Exact_predicates_exact_constructions_kernel K
Solve the continuity for density.
surfaceScalarField phid("phid", fvc::interpolate(psi) *(fvc::flux(HbyA)+MRF.zeroFilter(rhorAUf *fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho))))
fv::options & fvOptions
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:84
psiReactionThermo & thermo
Definition: createFields.H:28
dynamicFvMesh & mesh
IOMRFZoneList & MRF
tmp< GeometricField< Type, faPatchField, areaMesh > > laplacian(const GeometricField< Type, faPatchField, areaMesh > &vf, const word &name)
Definition: facLaplacian.C:40
volScalarField & dpdt
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:28
HbyA
Definition: pEqn.H:4
pimpleControl & pimple
U
Definition: pEqn.H:72
mesh interpolate(rAU)
fvVectorMatrix & UEqn
Definition: UEqn.H:13
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF)
phi
Definition: pEqn.H:18
const volScalarField & psi
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho *rAU))
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
tmp< GeometricField< typename outerProduct< vector, Type >::type, faPatchField, areaMesh >> grad(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facGrad.C:49