pEqn.H
Go to the documentation of this file.
1 rho = thermo.rho();
2 
3 volScalarField rAU(1.0/UEqn.A());
5 
6 volVectorField HbyA("HbyA", U);
7 HbyA = rAU*UEqn.H();
8 
9 if (pimple.transonic())
10 {
12  (
13  "phid",
15  *(
16  (
17  (fvc::interpolate(HbyA) & mesh.Sf())
19  )
20  )
21  );
22 
24  MRF.makeRelative(fvc::interpolate(psi), phid);
25 
26  while (pimple.correctNonOrthogonal())
27  {
28  fvScalarMatrix pEqn
29  (
30  fvm::ddt(psi, p)
31  + fvm::div(phid, p)
33  ==
34  fvOptions(psi, p, rho.name())
35  );
36 
37  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
38 
39  if (pimple.finalNonOrthogonalIter())
40  {
41  phi == pEqn.flux();
42  }
43  }
44 }
45 else
46 {
48  (
49  "phiHbyA",
50  (
51  (fvc::interpolate(rho*HbyA) & mesh.Sf())
53  )
54  );
55 
57  MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
58 
59  while (pimple.correctNonOrthogonal())
60  {
61  fvScalarMatrix pEqn
62  (
63  fvm::ddt(psi, p)
64  + fvc::div(phiHbyA)
66  ==
67  fvOptions(psi, p, rho.name())
68  );
69 
70  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
71 
72  if (pimple.finalNonOrthogonalIter())
73  {
74  phi = phiHbyA + pEqn.flux();
75  }
76  }
77 }
78 
79 #include "rhoEqn.H"
80 #include "compressibleContinuityErrs.H"
81 
83 U.correctBoundaryConditions();
84 fvOptions.correct(U);
85 K = 0.5*magSqr(U);
86 
87 {
89  surfaceVectorField n(mesh.Sf()/mesh.magSf());
90  rhoUf += n*(fvc::absolute(phi, rho, U)/mesh.magSf() - (n & rhoUf));
91 }
92 
93 if (thermo.dpdt())
94 {
96 }
Foam::fvc::grad
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcGrad.C:52
p
p
Definition: pEqn.H:62
phid
surfaceScalarField phid("phid", fvc::interpolate(psi) *((mesh.Sf() &fvc::interpolate(HbyA))+rhorAUf *fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)))
Foam::MULES::interpolate
tmp< surfaceScalarField > interpolate(const RhoType &rho)
Definition: IMULESTemplates.C:40
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
Foam::fvc::div
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
Foam::fvc::meshPhi
tmp< surfaceScalarField > meshPhi(const volVectorField &U)
Definition: fvcMeshPhi.C:33
dpdt
volScalarField & dpdt
Definition: setRegionFluidFields.H:12
phi
phi
Definition: pEqn.H:20
U
U
Definition: pEqn.H:46
K
CGAL::Exact_predicates_exact_constructions_kernel K
Definition: CGALTriangulation3DKernel.H:56
Foam::fvc::laplacian
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
Foam::fvScalarMatrix
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
Foam::fvc::ddtCorr
tmp< GeometricField< typename flux< Type >::type, fvsPatchField, surfaceMesh > > ddtCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
Definition: fvcDdt.C:155
UEqn
tmp< fvVectorMatrix > UEqn(fvm::div(phi, U)+MRF.DDt(U)+turbulence->divDevReff(U)==fvOptions(U))
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
n
surfaceVectorField n(mesh.Sf()/mesh.magSf())
MRF
IOMRFZoneList & MRF
Definition: setRegionFluidFields.H:15
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
rhorAUf
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho *rAU))
rho
rho
Definition: pEqn.H:3
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
rAU
volScalarField rAU("rAU", 1.0/UEqn().A())
HbyA
HbyA
Definition: pEqn.H:4
psi
const volScalarField & psi
Definition: setRegionFluidFields.H:13
makeRelative
MRF makeRelative(phiHbyA)
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:52
pimple
const dictionary & pimple
Definition: readFluidMultiRegionPIMPLEControls.H:1
phiHbyA
phiHbyA
Definition: pEqn.H:21
Foam::fvc::ddt
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
Definition: fvcDdt.C:45
rhoUf
rhoUf
Definition: pEqn.H:90
Foam::surfaceVectorField
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
Definition: surfaceFieldsFwd.H:55
Foam::magSqr
dimensioned< scalar > magSqr(const dimensioned< Type > &)
Foam::fvc::absolute
tmp< surfaceScalarField > absolute(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given relative flux in absolute form.
Definition: fvcMeshPhi.C:187
fvOptions
fv::options & fvOptions
Definition: setRegionFluidFields.H:16