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 
10 
12 (
13  "phiHbyA",
14  (
15  (fvc::interpolate(rho*HbyA) & mesh.Sf())
17  )
18  + phig
19 );
20 
21 MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
22 
23 // Update the fixedFluxPressure BCs to ensure flux consistency
25 (
26  p_rgh.boundaryField(),
27  (
28  phiHbyA.boundaryField()
29  - MRF.relative(mesh.Sf().boundaryField() & U.boundaryField())
30  *rho.boundaryField()
31  )/(mesh.magSf().boundaryField()*rhorAUf.boundaryField())
32 );
33 
34 while (pimple.correctNonOrthogonal())
35 {
36  fvScalarMatrix p_rghEqn
37  (
38  fvc::ddt(psi, rho)*gh
39  + fvc::div(phiHbyA)
40  + fvm::ddt(psi, p_rgh)
42  ==
43  parcels.Srho()
44  + surfaceFilm.Srho()
45  + fvOptions(psi, p_rgh, rho.name())
46  );
47 
48  p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
49 
50  if (pimple.finalNonOrthogonalIter())
51  {
52  phi = phiHbyA + p_rghEqn.flux();
53  U = HbyA + rAU*fvc::reconstruct((p_rghEqn.flux() + phig)/rhorAUf);
54  U.correctBoundaryConditions();
55  fvOptions.correct(U);
56  }
57 }
58 
59 p = p_rgh + rho*gh;
60 
61 #include "rhoEqn.H"
62 #include "compressibleContinuityErrs.H"
63 
64 K = 0.5*magSqr(U);
65 
66 if (thermo.dpdt())
67 {
68  dpdt = fvc::ddt(p);
69 }
volScalarField & dpdt
phi
Definition: pEqn.H:20
CGAL::Exact_predicates_exact_constructions_kernel K
setSnGrad< fixedFluxPressureFvPatchScalarField >(p_rgh.boundaryField(),( phiHbyA.boundaryField() -MRF.relative(mesh.Sf().boundaryField()&U.boundaryField()) *rho.boundaryField() )/(mesh.magSf().boundaryField()*rhorAUf.boundaryField()))
dimensioned< scalar > magSqr(const dimensioned< Type > &)
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> reconstruct(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
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
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
volScalarField & p_rgh
tmp< surfaceScalarField > interpolate(const RhoType &rho)
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
Definition: fvcDdt.C:45
dynamicFvMesh & mesh
surfaceScalarField phig(-rhorAUf *ghf *fvc::snGrad(rho)*mesh.magSf())
const dictionary & pimple
p
Definition: pEqn.H:59
Solve the continuity for density.
fv::IOoptionList & fvOptions
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
IOMRFZoneList & MRF
fvVectorMatrix UEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho *rAU))
const volScalarField & psi
Definition: createFields.H:24
phiHbyA
Definition: pEqn.H:21
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcSnGrad.C:45
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
volScalarField rAU(1.0/UEqn.A())
filmModelType & surfaceFilm
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
rho
Definition: pEqn.H:1
psiReactionThermo & thermo
Definition: createFields.H:32
U
Definition: pEqn.H:82
const surfaceScalarField & ghf
HbyA
Definition: pEqn.H:7
const volScalarField & gh