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  *(
16  )
17  );
18 
19  MRF.makeRelative(fvc::interpolate(psi), phid);
20 
21  while (pimple.correctNonOrthogonal())
22  {
23  fvScalarMatrix pEqn
24  (
25  fvm::ddt(psi, p)
26  + fvm::div(phid, p)
28  ==
29  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  (
48  )
49  );
50 
51  MRF.makeRelative(phiHbyA);
52 
53  // Update the pressure BCs to ensure flux consistency
55 
56  while (pimple.correctNonOrthogonal())
57  {
58  fvScalarMatrix pEqn
59  (
60  fvm::ddt(psi, p)
61  + fvc::div(phiHbyA)
63  ==
64  fvOptions(psi, p, rho.name())
65  );
66 
67  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
68 
69  if (pimple.finalNonOrthogonalIter())
70  {
71  phi = phiHbyA + pEqn.flux();
72  }
73  }
74 }
75 
76 #include "rhoEqn.H"
77 #include "compressibleContinuityErrs.H"
78 
80 U.correctBoundaryConditions();
81 fvOptions.correct(U);
82 K = 0.5*magSqr(U);
83 
84 if (thermo.dpdt())
85 {
86  dpdt = fvc::ddt(p);
87 }
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
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)