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::interpolate(HbyA) & mesh.Sf())
16  )
17  );
18 
20  MRF.makeRelative(fvc::interpolate(psi), phid);
21 
22  while (pimple.correctNonOrthogonal())
23  {
24  fvScalarMatrix pEqn
25  (
26  fvm::ddt(psi, p)
27  + fvm::div(phid, p)
29  ==
30  fvOptions(psi, p, rho.name())
31  );
32 
33  pEqn.solve(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::interpolate(rho*HbyA) & mesh.Sf())
49  )
50  );
51 
53  MRF.makeRelative(phiHbyA);
54 
55  // Update the pressure BCs to ensure flux consistency
57 
58  while (pimple.correctNonOrthogonal())
59  {
60  fvScalarMatrix pEqn
61  (
62  fvm::ddt(psi, p)
63  + fvc::div(phiHbyA)
65  ==
66  fvOptions(psi, p, rho.name())
67  );
68 
69  pEqn.solve(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 
82 U.correctBoundaryConditions();
83 fvOptions.correct(U);
84 K = 0.5*magSqr(U);
85 
86 {
88  surfaceVectorField n(mesh.Sf()/mesh.magSf());
89  rhoUf += n*(fvc::absolute(phi, rho, U)/mesh.magSf() - (n & rhoUf));
90 }
91 
92 if (thermo.dpdt())
93 {
94  dpdt = fvc::ddt(p);
95 
96  if (mesh.moving())
97  {
99  }
100 }
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< 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
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
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:82
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))))
fv::options & fvOptions
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:81
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
rhoUf
Definition: pEqn.H:89
tmp< surfaceScalarField > absolute(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given relative flux in absolute form.
Definition: fvcMeshPhi.C:183
U
Definition: pEqn.H:72
mesh interpolate(rAU)
fvVectorMatrix & UEqn
Definition: UEqn.H:13
tmp< surfaceScalarField > meshPhi(const volVectorField &U)
Definition: fvcMeshPhi.C:29
surfaceVectorField n(mesh.Sf()/mesh.magSf())
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))
MRF makeRelative(fvc::interpolate(rho), phiHbyA)
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:51