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  (
24  + fvm::div(phid, p)
26  ==
27  betav*fvOptions(psi, p, rho.name())
28  );
29 
30  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
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  (
54  + fvc::div(phiHbyA)
56  ==
57  betav*fvOptions(psi, p, rho.name())
58  );
59 
60  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
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();
74 fvOptions.correct(U);
75 K = 0.5*magSqr(U);
76 
77 if (thermo.dpdt())
78 {
79  dpdt = fvc::ddt(p);
80 }
Foam::constrainHbyA
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:35
phid
surfaceScalarField phid("phid", fvc::interpolate(psi) *(fvc::flux(HbyA)+MRF.zeroFilter(rhorAUf *fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho))))
Foam::fvc::flux
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
phiHbyA
phiHbyA
Definition: pEqn.H:20
Foam::fac::grad
tmp< GeometricField< typename outerProduct< vector, Type >::type, faPatchField, areaMesh >> grad(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facGrad.C:56
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
invA
volSymmTensorField invA(inv(I *UEqn.A()+drag->Dcu()))
Foam::fac::div
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facDiv.C:50
Foam::magSqr
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
K
CGAL::Exact_predicates_exact_constructions_kernel K
Definition: CGALTriangulation3DKernel.H:58
pimple
pimpleControl & pimple
Definition: setRegionFluidFields.H:56
HbyA
HbyA
Definition: pEqn.H:4
Foam::fvScalarMatrix
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:44
fvOptions
fv::options & fvOptions
Definition: setRegionFluidFields.H:23
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
ddtCorr
ddtCorr
Definition: readControls.H:9
rhoEqn.H
Solve the continuity for density.
p
p
Definition: pEqn.H:50
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
rAU
volScalarField rAU(1.0/UEqn.A())
betav
const volScalarField & betav
Definition: setRegionSolidFields.H:35
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:62
U
U
Definition: pEqn.H:72
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:54
Foam::fac::ddt
tmp< GeometricField< Type, faPatchField, areaMesh > > ddt(const dimensioned< Type > dt, const faMesh &mesh)
Definition: facDdt.C:47
phi
phi
Definition: pEqn.H:18
UEqn
fvVectorMatrix & UEqn
Definition: UEqn.H:13
dpdt
volScalarField & dpdt
Definition: setRegionFluidFields.H:32
Foam::fac::laplacian
tmp< GeometricField< Type, faPatchField, areaMesh > > laplacian(const GeometricField< Type, faPatchField, areaMesh > &vf, const word &name)
Definition: facLaplacian.C:47
psi
const volScalarField & psi
Definition: createFieldRefs.H:1
rho
rho
Definition: pEqn.H:1
interpolate
mesh interpolate(rAU)