pEqn.H
Go to the documentation of this file.
1 rho = thermo.rho();
2 
3 volScalarField rAU(1.0/UEqn.A());
5 
6 volVectorField HbyA("HbyA", U);
7 HbyA = rAU*UEqn.H();
8 
9 if (pimple.transonic())
10 {
12  (
13  "phid",
15  *(
16  (fvc::interpolate(HbyA) & mesh.Sf())
18  )
19  );
20 
21  MRF.makeRelative(fvc::interpolate(psi), phid);
22 
23  while (pimple.correctNonOrthogonal())
24  {
25  fvScalarMatrix pEqn
26  (
27  fvm::ddt(psi, p)
28  + fvm::div(phid, p)
30  ==
31  fvOptions(psi, p, rho.name())
32  );
33 
34  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
35 
36  if (pimple.finalNonOrthogonalIter())
37  {
38  phi == pEqn.flux();
39  }
40  }
41 }
42 else
43 {
45  (
46  "phiHbyA",
47  (
48  (fvc::interpolate(rho*HbyA) & mesh.Sf())
50  )
51  );
52 
53  MRF.makeRelative(phiHbyA);
54 
55  while (pimple.correctNonOrthogonal())
56  {
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(mesh.solver(p.select(pimple.finalInnerIter())));
67 
68  if (pimple.finalNonOrthogonalIter())
69  {
70  phi = phiHbyA + pEqn.flux();
71  }
72  }
73 }
74 
75 #include "rhoEqn.H"
76 #include "compressibleContinuityErrs.H"
77 
78 U = HbyA - rAU*fvc::grad(p);
79 U.correctBoundaryConditions();
80 fvOptions.correct(U);
81 K = 0.5*magSqr(U);
82 
83 if (thermo.dpdt())
84 {
85  dpdt = fvc::ddt(p);
86 }
volScalarField & dpdt
phi
Definition: pEqn.H:20
CGAL::Exact_predicates_exact_constructions_kernel K
dimensioned< scalar > magSqr(const dimensioned< Type > &)
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
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
tmp< surfaceScalarField > interpolate(const RhoType &rho)
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
Definition: fvcDdt.C:45
dynamicFvMesh & mesh
const dictionary & pimple
p
Definition: pEqn.H:59
fv::IOoptionList & fvOptions
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
IOMRFZoneList & MRF
fvVectorMatrix UEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
surfaceScalarField phid("phid", fvc::interpolate(psi)*( (mesh.Sf()&fvc::interpolate(HbyA)) +rhorAUf *fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho) ))
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho *rAU))
const volScalarField & psi
Definition: createFields.H:24
phiHbyA
Definition: pEqn.H:21
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
volScalarField rAU(1.0/UEqn.A())
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcGrad.C:52
rho
Definition: pEqn.H:1
psiReactionThermo & thermo
Definition: createFields.H:32
U
Definition: pEqn.H:82
HbyA
Definition: pEqn.H:7