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  (
15  fvc::flux(HbyA)
16  + MRF.zeroFilter
17  (
19  )
20  )
21  )
22  );
23 
24  fvc::makeRelative(phid, psi, U);
25  MRF.makeRelative(fvc::interpolate(psi), phid);
26 
27  while (pimple.correctNonOrthogonal())
28  {
29  fvScalarMatrix pEqn
30  (
31  fvm::ddt(psi, p)
32  + fvm::div(phid, p)
34  ==
35  fvOptions(psi, p, rho.name())
36  );
37 
38  pEqn.solve();
39 
40  if (pimple.finalNonOrthogonalIter())
41  {
42  phi == pEqn.flux();
43  }
44  }
45 }
46 else
47 {
49  (
50  "phiHbyA",
51  (
52  fvc::flux(rho*HbyA)
53  + MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, rhoUf))
54  )
55  );
56 
57  fvc::makeRelative(phiHbyA, rho, U);
58  MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
59 
60  // Update the pressure BCs to ensure flux consistency
61  constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
62 
63  while (pimple.correctNonOrthogonal())
64  {
65  fvScalarMatrix pEqn
66  (
67  fvm::ddt(psi, p)
68  + fvc::div(phiHbyA)
70  ==
71  fvOptions(psi, p, rho.name())
72  );
73 
74  pEqn.solve();
75 
76  if (pimple.finalNonOrthogonalIter())
77  {
78  phi = phiHbyA + pEqn.flux();
79  }
80  }
81 }
82 
83 #include "rhoEqn.H"
85 
86 U = HbyA - rAU*fvc::grad(p);
87 U.correctBoundaryConditions();
88 fvOptions.correct(U);
89 K = 0.5*magSqr(U);
90 
91 {
93  surfaceVectorField n(mesh.Sf()/mesh.magSf());
94  rhoUf += n*(fvc::absolute(phi, rho, U)/mesh.magSf() - (n & rhoUf));
95 }
96 
97 if (thermo.dpdt())
98 {
100 }
rAU
Definition: pEqn.H:1
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
IOMRFZoneList & MRF
rhoUf
Definition: pEqn.H:94
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
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
rhoReactionThermo & thermo
Definition: createFields.H:28
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:58
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
phi
Definition: pEqn.H:104
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:57
volScalarField & dpdt
dynamicFvMesh & mesh
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:34
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.
phiHbyA
Definition: pEqn.H:32
tmp< surfaceScalarField > absolute(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given relative flux in absolute form.
Definition: fvcMeshPhi.C:188
U
Definition: pEqn.H:72
volVectorField & HbyA
Definition: pEqn.H:13
fvVectorMatrix & UEqn
Definition: UEqn.H:11
tmp< surfaceScalarField > meshPhi(const volVectorField &U)
Definition: fvcMeshPhi.C:34
Calculates and prints the continuity errors.
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF)
const volScalarField & psi
surfaceVectorField n(mesh.Sf()/mesh.magSf())
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))
MRF makeRelative(fvc::interpolate(rho), phiHbyA)