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  *(
15  + MRF.zeroFilter
16  (
18  )
19  )
20  );
21 
22  MRF.makeRelative(fvc::interpolate(psi), phid);
23 
24  while (pimple.correctNonOrthogonal())
25  {
26  fvScalarMatrix pEqn
27  (
28  fvm::ddt(psi, p)
29  + fvm::div(phid, p)
31  ==
32  coalParcels.Srho()
33  + fvOptions(psi, p, rho.name())
34  );
35 
36  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
37 
38  if (pimple.finalNonOrthogonalIter())
39  {
40  phi == pEqn.flux();
41  }
42  }
43 }
44 else
45 {
47  (
48  "phiHbyA",
49  (
51  + MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi))
52  )
53  );
54 
55  MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
56 
57  // Update the pressure BCs to ensure flux consistency
59 
60  while (pimple.correctNonOrthogonal())
61  {
62  fvScalarMatrix pEqn
63  (
64  fvm::ddt(psi, p)
65  + fvc::div(phiHbyA)
67  ==
68  coalParcels.Srho()
69  + fvOptions(psi, p, rho.name())
70  );
71 
72  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
73 
74  if (pimple.finalNonOrthogonalIter())
75  {
76  phi = phiHbyA + pEqn.flux();
77  }
78  }
79 }
80 
81 #include "rhoEqn.H"
82 #include "compressibleContinuityErrs.H"
83 
85 U.correctBoundaryConditions();
86 fvOptions.correct(U);
87 
88 K = 0.5*magSqr(U);
89 
90 if (thermo.dpdt())
91 {
92  dpdt = fvc::ddt(p);
93 }
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...
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
MRF
IOMRFZoneList & MRF
Definition: setRegionFluidFields.H:22
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
rhorAUf
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho *rAU))
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
ddtCorr
ddtCorr
Definition: readControls.H:9
p
p
Definition: pEqn.H:50
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
rAU
volScalarField rAU(1.0/UEqn.A())
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
rhoEqn.H
Solve the continuity for density.
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)
constrainPressure
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF)