pEqn.H
Go to the documentation of this file.
1 {
4 
6  (
7  "phiHbyASp",
8  (
10  + alphacf*rASpUcf*fvc::ddtCorr(Uc, phic, Ucf)
11  )
12  );
13 
14  if (p.needReference())
15  {
17  adjustPhi(phiHbyASp, Uc, p);
19  }
20 
22 
23  // Update the pressure BCs to ensure flux consistency
25 
26  // Non-orthogonal pressure corrector loop
27  while (pimple.correctNonOrthogonal())
28  {
29  fvScalarMatrix pEqn
30  (
31  fvm::laplacian(alphacf*rASpUcf, p)
32  ==
33  fvc::ddt(alphac)
34  + fvc::div(alphacf*phiHbyASp)
35  );
36 
37  pEqn.setReference
38  (
39  pressureReference.refCell(),
40  pressureReference.refValue()
41  );
42 
43  pEqn.solve();
44 
45  if (pimple.finalNonOrthogonalIter())
46  {
47  phic = phiHbyASp - pEqn.flux()/alphacf;
48 
49  // Explicitly relax pressure for momentum corrector
50  p.relax();
51 
52  Uc =
53  HbyA
54  + rAUc
56  (
57  (phicSUSu + phicSUSp*phic - pEqn.flux()/alphacf)/rASpUcf
58  );
59  Uc.correctBoundaryConditions();
61 
62  // Correct Ucf if the mesh is moving
63  fvc::correctUf(Ucf, Uc, phic);
64 
65  // Make the fluxes relative to the mesh motion
67  }
68  }
69 }
70 
71 #include "continuityErrs.H"
pressureReference & pressureReference
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
pimpleNoLoopControl & pimple
autoPtr< surfaceVectorField > Ucf
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
tmp< GeometricField< typename flux< Type >::type, fvsPatchField, surfaceMesh > > ddtCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
Definition: fvcDdt.C:170
MRF makeRelative(fvc::interpolate(rho), phiHbyA)
volScalarField rASpUc(1.0/(UcEqn.A() - cloudSUp/rhoc))
surfaceScalarField rASpUcf("Dp", fvc::interpolate(rASpUc))
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:59
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
p
Definition: pEqn.H:125
Calculates and prints the continuity errors.
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
Definition: fvcDdt.C:45
Foam::fvConstraints & fvConstraints
phic
Definition: correctPhic.H:2
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:34
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
adjustPhi(phiHbyA, Urel, p)
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> reconstruct(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
volVectorField HbyASp(rASpUc/rAUc *HbyA)
volVectorField & HbyA
Definition: pEqn.H:13
fvVectorMatrix UcEqn(fvm::ddt(alphac, Uc)+fvm::div(alphaPhic, Uc) - fvm::Sp(fvc::ddt(alphac)+fvc::div(alphaPhic), Uc)+continuousPhaseTurbulence->divDevTau(Uc)==(1.0/rhoc) *cloudSU)
surfaceScalarField phicSUSu(fvc::flux(rASpUc *cloudSUu/rhoc)+rASpUcf *(g &mesh.Sf()))
void makeAbsolute(surfaceScalarField &phi, const volVectorField &U)
Make the given flux absolute.
Definition: fvcMeshPhi.C:128
void correctUf(autoPtr< surfaceVectorField > &Uf, const volVectorField &U, const surfaceScalarField &phi, const MRFType &MRF)
phiHbyASp
Definition: pEqn.H:21
volScalarField rAUc(1.0/UcEqn.A())
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
Definition: fvcFlux.C:32
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
surfaceScalarField phicSUSp(fvc::interpolate(rASpUc *cloudSUp/rhoc))
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF)