pEqn.H
Go to the documentation of this file.
1 {
3 
5  (
6  "phiHbyA",
7  (
9  + alphacf*rAUcf*fvc::ddtCorr(Uc, Ucf)
10  )
11  );
12 
13  if (p.needReference())
14  {
16  adjustPhi(phiHbyA, Uc, p);
18  }
19 
21 
22  // Update the pressure BCs to ensure flux consistency
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
47  *fvc::reconstruct((phicForces - pEqn.flux()/alphacf)/rAUcf);
48  Uc.correctBoundaryConditions();
49 
50  {
51  Ucf = fvc::interpolate(Uc);
52  surfaceVectorField n(mesh.Sf()/mesh.magSf());
53  Ucf += n*(phic/mesh.magSf() - (n & Ucf));
54  }
55 
56  // Make the fluxes relative to the mesh motion
58  }
59  }
60 }
61 
62 #include "continuityErrs.H"
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::flux
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
phiHbyA
phiHbyA
Definition: pEqn.H:20
UcEqn
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)
Foam::fac::div
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facDiv.C:50
phic
surfaceScalarField phic(mixture.cAlpha() *mag(alphaPhic/mesh.magSf()))
pimple
pimpleControl & pimple
Definition: setRegionFluidFields.H:56
HbyA
HbyA
Definition: pEqn.H:4
Foam::fvScalarMatrix
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:44
phicForces
surfaceScalarField phicForces(fvc::flux(rAUc *cloudVolSUSu/rhoc)+rAUcf *(g &mesh.Sf()))
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
rAUcf
surfaceScalarField rAUcf("Dp", fvc::interpolate(rAUc))
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:62
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
Foam::fac::laplacian
tmp< GeometricField< Type, faPatchField, areaMesh > > laplacian(const GeometricField< Type, faPatchField, areaMesh > &vf, const word &name)
Definition: facLaplacian.C:47
Foam::fvc::makeAbsolute
void makeAbsolute(surfaceScalarField &phi, const volVectorField &U)
Make the given flux absolute.
Definition: fvcMeshPhi.C:116
Foam::surfaceVectorField
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
Definition: surfaceFieldsFwd.H:59
adjustPhi
adjustPhi(phiHbyA, U, p_rgh)
rAUc
volScalarField rAUc(1.0/UcEqn.A())
interpolate
mesh interpolate(rAU)
n
surfaceVectorField n(mesh.Sf()/mesh.magSf())
pRefCell
const label pRefCell
Definition: setRegionFluidFields.H:36
constrainPressure
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF)
pRefValue
const scalar pRefValue
Definition: setRegionFluidFields.H:37