pEqn.H
Go to the documentation of this file.
1 rho = thermo.rho();
2 
3 volScalarField rAU(1.0/UEqn.A());
4 
5 volVectorField HbyA("HbyA", U);
6 HbyA = invA & UEqn.H();
7 
8 if (pimple.transonic())
9 {
11  (
12  "phid",
14  *(
15  (fvc::interpolate(HbyA) & mesh.Sf())
18  )
19  );
20 
21  while (pimple.correctNonOrthogonal())
22  {
23  fvScalarMatrix pEqn
24  (
26  + fvm::div(phid, p)
28  ==
29  betav*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::interpolate(rho*HbyA) & mesh.Sf())
48  )
49  );
50 
51  while (pimple.correctNonOrthogonal())
52  {
53  fvScalarMatrix pEqn
54  (
56  + fvc::div(phiHbyA)
58  ==
59  betav*fvOptions(psi, p, rho.name())
60  );
61 
62  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
63 
64  if (pimple.finalNonOrthogonalIter())
65  {
66  phi = phiHbyA + pEqn.flux();
67  }
68  }
69 }
70 
71 #include "rhoEqn.H"
72 #include "continuityErrs.H"
73 
74 U = HbyA - (invA & (betav*fvc::grad(p)));
75 U.correctBoundaryConditions();
76 fvOptions.correct(U);
77 K = 0.5*magSqr(U);
78 
79 if (thermo.dpdt())
80 {
81  dpdt = fvc::ddt(p);
82 }
Foam::fvc::grad
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcGrad.C:52
p
p
Definition: pEqn.H:62
phid
surfaceScalarField phid("phid", fvc::interpolate(psi) *((mesh.Sf() &fvc::interpolate(HbyA))+rhorAUf *fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)))
invA
volSymmTensorField invA(inv(I *UEqn.A()+drag->Dcu()))
Foam::MULES::interpolate
tmp< surfaceScalarField > interpolate(const RhoType &rho)
Definition: IMULESTemplates.C:40
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
Foam::fvc::div
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
dpdt
volScalarField & dpdt
Definition: setRegionFluidFields.H:12
phi
phi
Definition: pEqn.H:20
U
U
Definition: pEqn.H:46
K
CGAL::Exact_predicates_exact_constructions_kernel K
Definition: CGALTriangulation3DKernel.H:56
Foam::fvc::laplacian
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
Foam::fvScalarMatrix
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
Foam::fvc::ddtCorr
tmp< GeometricField< typename flux< Type >::type, fvsPatchField, surfaceMesh > > ddtCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
Definition: fvcDdt.C:155
UEqn
tmp< fvVectorMatrix > UEqn(fvm::div(phi, U)+MRF.DDt(U)+turbulence->divDevReff(U)==fvOptions(U))
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
rhoEqn.H
Solve the continuity for density.
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
rho
rho
Definition: pEqn.H:3
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
rAU
volScalarField rAU("rAU", 1.0/UEqn().A())
HbyA
HbyA
Definition: pEqn.H:4
psi
const volScalarField & psi
Definition: setRegionFluidFields.H:13
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:52
betav
const volScalarField & betav
Definition: setRegionSolidFields.H:30
pimple
const dictionary & pimple
Definition: readFluidMultiRegionPIMPLEControls.H:1
phiHbyA
phiHbyA
Definition: pEqn.H:21
Foam::fvc::ddt
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
Definition: fvcDdt.C:45
Foam::magSqr
dimensioned< scalar > magSqr(const dimensioned< Type > &)
fvOptions
fv::options & fvOptions
Definition: setRegionFluidFields.H:16