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.nCorrPISO() <= 1)
8 {
9  tUEqn.clear();
10 }
11 
12 if (pimple.transonic())
13 {
15  (
16  "phid",
18  *(
20  + MRF.zeroFilter
21  (
23  )
24  )
25  );
26 
27  MRF.makeRelative(fvc::interpolate(psi), phid);
28 
29  while (pimple.correctNonOrthogonal())
30  {
31  fvScalarMatrix pEqn
32  (
33  fvm::ddt(psi, p)
34  + fvm::div(phid, p)
36  ==
37  fvOptions(psi, p, rho.name())
38  );
39 
40  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
41 
42  if (pimple.finalNonOrthogonalIter())
43  {
44  phi == pEqn.flux();
45  }
46  }
47 }
48 else
49 {
51  (
52  "phiHbyA",
53  (
55  + MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi))
56  )
57  );
58 
59  MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
60 
61  // Update the pressure BCs to ensure flux consistency
63 
64  while (pimple.correctNonOrthogonal())
65  {
66  fvScalarMatrix pEqn
67  (
68  fvm::ddt(psi, p)
69  + fvc::div(phiHbyA)
71  ==
72  fvOptions(psi, p, rho.name())
73  );
74 
75  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
76 
77  if (pimple.finalNonOrthogonalIter())
78  {
79  phi = phiHbyA + pEqn.flux();
80  }
81  }
82 }
83 
84 #include "rhoEqn.H"
85 #include "compressibleContinuityErrs.H"
86 
87 // Explicitly relax pressure for momentum corrector
88 p.relax();
89 
91 U.correctBoundaryConditions();
92 fvOptions.correct(U);
93 K = 0.5*magSqr(U);
94 
95 if (pressureControl.limit(p))
96 {
97  p.correctBoundaryConditions();
98 }
99 
100 rho = thermo.rho();
101 
102 if (thermo.dpdt())
103 {
104  dpdt = fvc::ddt(p);
105 }
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
tUEqn
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
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
pressureControl
const pressureControl & pressureControl
Definition: setRegionFluidFields.H:67
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)
constrainPressure
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF)