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  fvOptions(psi, p, rho.name())
30  );
31 
32  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
33 
34  if (pimple.finalNonOrthogonalIter())
35  {
36  phi == pEqn.flux();
37  }
38  }
39 }
40 else
41 {
43  (
44  "phiHbyA",
45  (
46  fvc::flux(rho*HbyA)
48  )
49  );
50 
51  MRF.makeRelative(phiHbyA);
52 
53  // Update the pressure BCs to ensure flux consistency
54  constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
55 
56  while (pimple.correctNonOrthogonal())
57  {
58  fvScalarMatrix pEqn
59  (
60  fvm::ddt(psi, p)
61  + fvc::div(phiHbyA)
63  ==
64  fvOptions(psi, p, rho.name())
65  );
66 
67  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
68 
69  if (pimple.finalNonOrthogonalIter())
70  {
71  phi = phiHbyA + pEqn.flux();
72  }
73  }
74 }
75 
76 #include "rhoEqn.H"
77 #include "compressibleContinuityErrs.H"
78 
79 U = HbyA - rAU*fvc::grad(p);
80 U.correctBoundaryConditions();
81 fvOptions.correct(U);
82 K = 0.5*magSqr(U);
83 
84 if (thermo.dpdt())
85 {
86  dpdt = fvc::ddt(p);
87 }
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
volScalarField rAU(1.0/UEqn.A())
IOMRFZoneList & MRF
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:170
rhoReactionThermo & thermo
Definition: createFields.H:28
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
surfaceScalarField phid("phid", fvc::interpolate(psi) *(fvc::flux(HbyA)+MRF.zeroFilter(rhorAUf *fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho))))
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
volScalarField & dpdt
dynamicFvMesh & mesh
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:33
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.
U
Definition: pEqn.H:72
volVectorField & HbyA
Definition: pEqn.H:13
fvVectorMatrix & UEqn
Definition: UEqn.H:13
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF)
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
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho *rAU))