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)
16  )
17  );
18 
19  MRF.makeRelative(fvc::interpolate(psi), phid);
20 
21  while (pimple.correctNonOrthogonal())
22  {
23  fvScalarMatrix pEqn
24  (
25  fvm::ddt(psi, p)
26  + fvm::div(phid, p)
28  ==
29  coalParcels.Srho()
30  + fvOptions(psi, p, rho.name())
31  );
32 
33  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
34 
35  if (pimple.finalNonOrthogonalIter())
36  {
37  phi == pEqn.flux();
38  }
39  }
40 }
41 else
42 {
44  (
45  "phiHbyA",
46  (
47  fvc::flux(rho*HbyA)
49  )
50  );
51 
52  MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
53 
54  // Update the pressure BCs to ensure flux consistency
55  constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
56 
57  while (pimple.correctNonOrthogonal())
58  {
59  fvScalarMatrix pEqn
60  (
61  fvm::ddt(psi, p)
62  + fvc::div(phiHbyA)
64  ==
65  coalParcels.Srho()
66  + fvOptions(psi, p, rho.name())
67  );
68 
69  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
70 
71  if (pimple.finalNonOrthogonalIter())
72  {
73  phi = phiHbyA + pEqn.flux();
74  }
75  }
76 }
77 
78 #include "rhoEqn.H"
79 #include "compressibleContinuityErrs.H"
80 
81 U = HbyA - rAU*fvc::grad(p);
82 U.correctBoundaryConditions();
83 fvOptions.correct(U);
84 
85 K = 0.5*magSqr(U);
86 
87 if (thermo.dpdt())
88 {
89  dpdt = fvc::ddt(p);
90 }
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
U
Definition: pEqn.H:83
p
Definition: pEqn.H:50
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:155
const dictionary & pimple
tmp< surfaceScalarField > interpolate(const RhoType &rho)
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
Solve the continuity for density.
fv::options & fvOptions
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho *rAU))
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
psiReactionThermo & thermo
Definition: createFields.H:31
dynamicFvMesh & mesh
IOMRFZoneList & MRF
volScalarField & dpdt
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:33
surfaceScalarField phid("phid", fvc::interpolate(psi)*(fvc::flux(HbyA)+rhorAUf *fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)))
dimensioned< scalar > magSqr(const dimensioned< Type > &)
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF)
volVectorField & HbyA
Definition: pEqn.H:13
fvVectorMatrix & UEqn
Definition: UEqn.H:13
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
rho
Definition: pEqn.H:1
volScalarField rAU(1.0/UEqn.A())