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  *(
14  (
16  + MRF.zeroFilter
17  (
19  )
20  )
21  )
22  );
23 
25  MRF.makeRelative(fvc::interpolate(psi), phid);
26 
27  while (pimple.correctNonOrthogonal())
28  {
29  fvScalarMatrix pEqn
30  (
31  fvm::ddt(psi, p)
32  + fvm::div(phid, p)
34  ==
35  fvOptions(psi, p, rho.name())
36  );
37 
38  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
39 
40  if (pimple.finalNonOrthogonalIter())
41  {
42  phi == pEqn.flux();
43  }
44  }
45 }
46 else
47 {
49  (
50  "phiHbyA",
51  (
53  + MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, rhoUf))
54  )
55  );
56 
58  MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
59 
60  // Update the pressure BCs to ensure flux consistency
62 
63  while (pimple.correctNonOrthogonal())
64  {
65  fvScalarMatrix pEqn
66  (
67  fvm::ddt(psi, p)
68  + fvc::div(phiHbyA)
70  ==
71  fvOptions(psi, p, rho.name())
72  );
73 
74  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
75 
76  if (pimple.finalNonOrthogonalIter())
77  {
78  phi = phiHbyA + pEqn.flux();
79  }
80  }
81 }
82 
83 #include "rhoEqn.H"
84 #include "compressibleContinuityErrs.H"
85 
87 U.correctBoundaryConditions();
88 fvOptions.correct(U);
89 K = 0.5*magSqr(U);
90 
91 {
93  surfaceVectorField n(mesh.Sf()/mesh.magSf());
94  rhoUf += n*(fvc::absolute(phi, rho, U)/mesh.magSf() - (n & rhoUf));
95 }
96 
97 if (thermo.dpdt())
98 {
100 }
rhoUf
rhoUf
Definition: pEqn.H:89
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::fvc::meshPhi
tmp< surfaceScalarField > meshPhi(const volVectorField &U)
Definition: fvcMeshPhi.C:36
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
makeRelative
MRF makeRelative(fvc::interpolate(rho), phiHbyA)
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
Foam::surfaceVectorField
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
Definition: surfaceFieldsFwd.H:59
psi
const volScalarField & psi
Definition: createFieldRefs.H:1
rho
rho
Definition: pEqn.H:1
Foam::fvc::absolute
tmp< surfaceScalarField > absolute(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given relative flux in absolute form.
Definition: fvcMeshPhi.C:190
interpolate
mesh interpolate(rAU)
n
surfaceVectorField n(mesh.Sf()/mesh.magSf())
constrainPressure
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF)