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"
Foam::fvc::reconstruct
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> reconstruct(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcReconstruct.C:54
pRefCell
const label pRefCell
Definition: setRegionFluidFields.H:27
p
p
Definition: pEqn.H:62
continuityErrs.H
Calculates and prints the continuity errors.
Foam::MULES::interpolate
tmp< surfaceScalarField > interpolate(const RhoType &rho)
Definition: IMULESTemplates.C:40
Foam::fvc::div
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
setSnGrad< fixedFluxPressureFvPatchScalarField >
setSnGrad< fixedFluxPressureFvPatchScalarField >(p_rgh.boundaryField(),(phiHbyA.boundaryField() - MRF.relative(mesh.Sf().boundaryField() &U.boundaryField()))/(mesh.magSf().boundaryField() *rAUf.boundaryField()))
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::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
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
phic
phic
Definition: alphaEqnsSubCycle.H:5
rAUcf
surfaceScalarField rAUcf("Dp", fvc::interpolate(rAUc))
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
HbyA
HbyA
Definition: pEqn.H:4
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
pRefValue
const scalar pRefValue
Definition: setRegionFluidFields.H:28
rAUc
volScalarField rAUc(1.0/UcEqn.A())
phicForces
surfaceScalarField phicForces((fvc::interpolate(rAUc *cloudVolSUSu/rhoc) &mesh.Sf())+rAUcf *(g &mesh.Sf()))