pEqn.H
Go to the documentation of this file.
1 rho = thermo.rho();
2 
3 volScalarField rAU(1.0/UEqn.A());
6 
8 
10 (
11  "phiHbyA",
12  (
14  + MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi))
15  )
16  + phig
17 );
18 
19 MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
20 
21 // Update the pressure BCs to ensure flux consistency
23 
24 while (pimple.correctNonOrthogonal())
25 {
26  fvScalarMatrix p_rghEqn
27  (
29  + fvc::ddt(psi, rho)*gh
30  + fvc::ddt(psi)*pRef
31  + fvc::div(phiHbyA)
33  ==
34  parcels.Srho()
35  + surfaceFilm.Srho()
36  + fvOptions(psi, p_rgh, rho.name())
37  );
38 
39  p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
40 
41  if (pimple.finalNonOrthogonalIter())
42  {
43  phi = phiHbyA + p_rghEqn.flux();
44  U = HbyA + rAU*fvc::reconstruct((p_rghEqn.flux() + phig)/rhorAUf);
45  U.correctBoundaryConditions();
46  fvOptions.correct(U);
47  }
48 }
49 
50 p = p_rgh + rho*gh + pRef;
51 
52 #include "rhoEqn.H"
53 #include "compressibleContinuityErrs.H"
54 
55 K = 0.5*magSqr(U);
56 
57 if (thermo.dpdt())
58 {
59  dpdt = fvc::ddt(p);
60 }
Foam::fvc::reconstruct
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> reconstruct(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcReconstruct.C:56
Foam::constrainHbyA
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:35
Foam::fvc::snGrad
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcSnGrad.C:47
Foam::fvc::flux
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
ghf
const surfaceScalarField & ghf
Definition: setRegionFluidFields.H:18
rhoEqn.H
Solve the continuity for density.
phiHbyA
phiHbyA
Definition: pEqn.H:20
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
gh
const volScalarField & gh
Definition: setRegionFluidFields.H:17
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
surfaceFilm
regionModels::surfaceFilmModel & surfaceFilm
Definition: createFieldRefs.H:3
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
phig
surfaceScalarField phig("phig", -rhorAUf *ghf *fvc::snGrad(rho) *mesh.magSf())
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
p_rgh
p_rgh
Definition: pEqn.H:139
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)