pEqn.H
Go to the documentation of this file.
1 {
2  volVectorField HbyA("HbyA", Uc);
3  HbyA = rAUc*UcEqn.H();
4 
6  (
7  "phiHbyA",
8  (
9  (fvc::interpolate(HbyA) & mesh.Sf())
10  + alphacf*rAUcf*fvc::ddtCorr(Uc, phic)
11  + phicForces
12  )
13  );
14 
15  // Update the fixedFluxPressure BCs to ensure flux consistency
17  (
18  p.boundaryField(),
19  (
20  phiHbyA.boundaryField()
21  - (mesh.Sf().boundaryField() & Uc.boundaryField())
22  )/(mesh.magSf().boundaryField()*rAUcf.boundaryField())
23  );
24 
25  // Non-orthogonal pressure corrector loop
26  while (pimple.correctNonOrthogonal())
27  {
28  fvScalarMatrix pEqn
29  (
30  fvm::laplacian(alphacf*rAUcf, p)
31  ==
32  fvc::ddt(alphac) + fvc::div(alphacf*phiHbyA)
33  );
34 
35  pEqn.setReference(pRefCell, pRefValue);
36 
37  pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
38 
39  if (pimple.finalNonOrthogonalIter())
40  {
41  phic = phiHbyA - pEqn.flux()/alphacf;
42 
43  p.relax();
44 
45  Uc = HbyA
46  + rAUc*fvc::reconstruct((phicForces - pEqn.flux()/alphacf)/rAUcf);
47  Uc.correctBoundaryConditions();
48  }
49  }
50 }
51 
52 #include "continuityErrs.H"
surfaceScalarField phicForces((fvc::interpolate(rAUc *cloudVolSUSu/rhoc)&mesh.Sf())+rAUcf *(g &mesh.Sf()))
fvVectorMatrix UcEqn(fvm::ddt(alphac, Uc)+fvm::div(alphaPhic, Uc)-fvm::Sp(fvc::ddt(alphac)+fvc::div(alphaPhic), Uc)+continuousPhaseTurbulence->divDevRhoReff(Uc)==(1.0/rhoc)*cloudSU)
setSnGrad< fixedFluxPressureFvPatchScalarField >(p_rgh.boundaryField(),( phiHbyA.boundaryField() -MRF.relative(mesh.Sf().boundaryField()&U.boundaryField()) *rho.boundaryField() )/(mesh.magSf().boundaryField()*rhorAUf.boundaryField()))
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
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
volScalarField rAUc(1.0/UcEqn.A())
const dictionary & pimple
p
Definition: pEqn.H:59
const scalar pRefValue
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
phiHbyA
Definition: pEqn.H:21
Calculates and prints the continuity errors.
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
const label pRefCell
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
surfaceScalarField rAUcf("Dp", fvc::interpolate(rAUc))
HbyA
Definition: pEqn.H:7