pEqn.H
Go to the documentation of this file.
1 rho = thermo.rho();
2 
3 volScalarField rAU(1.0/UEqn.A());
5 
6 if (pimple.transonic())
7 {
9  (
10  "phid",
12  *(
16  )
17  );
18 
19  while (pimple.correctNonOrthogonal())
20  {
21  fvScalarMatrix pEqn
22  (
23  betav*fvm::ddt(psi, p)
24  + fvm::div(phid, p)
26  ==
27  betav*fvModels.source(psi, p, rho.name())
28  );
29 
30  pEqn.solve();
31 
32  if (pimple.finalNonOrthogonalIter())
33  {
34  phi == pEqn.flux();
35  }
36  }
37 }
38 else
39 {
41  (
42  "phiHbyA",
43  (
46  )
47  );
48 
49  while (pimple.correctNonOrthogonal())
50  {
51  fvScalarMatrix pEqn
52  (
53  betav*fvm::ddt(psi, p)
54  + fvc::div(phiHbyA)
56  ==
57  betav*fvModels.source(psi, p, rho.name())
58  );
59 
60  pEqn.solve();
61 
62  if (pimple.finalNonOrthogonalIter())
63  {
64  phi = phiHbyA + pEqn.flux();
65  }
66  }
67 }
68 
69 #include "rhoEqn.H"
70 #include "continuityErrs.H"
71 
72 U = HbyA - (invA & (betav*fvc::grad(p)));
73 U.correctBoundaryConditions();
75 K = 0.5*magSqr(U);
76 
77 if (thermo.dpdt())
78 {
79  dpdt = fvc::ddt(p);
80 }
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
fluidReactionThermo & thermo
Definition: createFields.H:28
pimpleNoLoopControl & pimple
U
Definition: pEqn.H:72
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, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:59
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
p
Definition: pEqn.H:125
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
Definition: fvcDdt.C:45
Solve the continuity for density.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:58
volScalarField & dpdt
volSymmTensorField invA(inv(I *UEqn.A()+drag->Dcu()))
phiHbyA
Definition: pEqn.H:30
Foam::fvConstraints & fvConstraints
const volScalarField & psi
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.
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
Foam::fvModels & fvModels
phi
Definition: pEqn.H:98
volVectorField & HbyA
Definition: pEqn.H:13
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
fvVectorMatrix & UEqn
Definition: UEqn.H:13