pEqn.H
Go to the documentation of this file.
1 rho = thermo.rho();
2 
5 
6 if (pimple.transonic())
7 {
9  (
10  "phid",
12  *(
14  + fvc::interpolate(betav*rho*rAU)*fvc::ddtCorr(rho, U, phi)
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.sourceProxy(rho, p)
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  (
45  + fvc::interpolate(betav*rho*rAU)*fvc::ddtCorr(rho, U, phi)
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.sourceProxy(rho, p)
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 }
Solve the continuity for density.
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
tmp< fvMatrix< Type > > sourceProxy(const VolField< Type > &eqnField) const
Return source for an equation.
volSymmTensorField invA(inv(I *UEqn.A()+drag->Dcu()))
fvVectorMatrix & UEqn
Definition: UEqn.H:11
Calculates and prints the continuity errors.
Foam::fvConstraints & fvConstraints(Foam::fvConstraints::New(mesh))
Foam::fvModels & fvModels(Foam::fvModels::New(mesh))
pimpleControl pimple(mesh)
const volScalarField & psi
K
Definition: pEqn.H:75
volScalarField rAU(1.0/UEqn.A())
U
Definition: pEqn.H:72
rho
Definition: pEqn.H:1
volVectorField & HbyA
Definition: pEqn.H:13
surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(rho) *fvc::flux(HbyA))
tmp< SurfaceField< typename innerProduct< vector, Type >::type > > flux(const VolField< Type > &vf)
Return the face-flux field obtained from the given volVectorField.
static tmp< SurfaceField< Type > > interpolate(const VolField< Type > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
tmp< VolField< Type > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
Definition: fvcDdt.C:45
tmp< VolField< Type > > laplacian(const VolField< Type > &vf, const word &name)
Definition: fvcLaplacian.C:45
tmp< VolField< typename outerProduct< vector, Type >::type > > grad(const SurfaceField< Type > &ssf)
Definition: fvcGrad.C:46
tmp< VolField< Type > > div(const SurfaceField< Type > &ssf)
Definition: fvcDiv.C:47
tmp< SurfaceField< typename Foam::flux< Type >::type > > ddtCorr(const VolField< Type > &U, const SurfaceField< Type > &Uf)
Definition: fvcDdt.C:196
VolField< vector > volVectorField
Definition: volFieldsFwd.H:65
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
SurfaceField< scalar > surfaceScalarField
void constrainHbyA(volVectorField &HbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:34
VolField< scalar > volScalarField
Definition: volFieldsFwd.H:64
dimensioned< scalar > magSqr(const dimensioned< Type > &)
volScalarField & p
fluidMulticomponentThermo & thermo
Definition: createFields.H:31