pEqn.H
Go to the documentation of this file.
1 rAU = 1.0/UEqn.A();
4 
5 if (pimple.nCorrPiso() <= 1)
6 {
7  tUEqn.clear();
8 }
9 
11 (
12  "phiHbyA",
14  + MRF.zeroFilter(rAUf*fvc::ddtCorr(U, phi, Uf))
15 );
16 
17 MRF.makeRelative(phiHbyA);
18 
19 if (p_gh.needReference())
20 {
22  adjustPhi(phiHbyA, U, p_gh);
24 }
25 
26 // Update the pressure BCs to ensure flux consistency
28 
29 // Non-orthogonal pressure corrector loop
30 while (pimple.correctNonOrthogonal())
31 {
32  fvScalarMatrix p_ghEqn
33  (
35  );
36 
37  p_ghEqn.setReference
38  (
39  pressureReference.refCell(),
40  pressureReference.refValue()
41  );
42 
43  p_ghEqn.solve();
44 
45  if (pimple.finalNonOrthogonalIter())
46  {
47  phi = phiHbyA - p_ghEqn.flux();
48 
49  // Explicitly relax pressure for momentum corrector
50  p_gh.relax();
51 
52  U = HbyA - rAU*fvc::grad(p_gh);
53  U.correctBoundaryConditions();
55  }
56 }
57 
58 #include "continuityErrs.H"
59 
60 // Correct Uf if the mesh is moving
62 
63 // Make the fluxes relative to the mesh motion
65 
66 p = p_gh + (g & mesh.C());
rAU
Definition: pEqn.H:1
pressureReference & pressureReference
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcGrad.C:52
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
pimpleNoLoopControl & pimple
IOMRFZoneList & MRF
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
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:58
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
phi
Definition: pEqn.H:99
dynamicFvMesh & mesh
Foam::fvConstraints & fvConstraints
void correctUf(autoPtr< surfaceVectorField > &Uf, const volVectorField &U, const surfaceScalarField &phi)
Definition: fvcMeshPhi.C:261
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:34
autoPtr< surfaceVectorField > Uf
MRF makeRelative(phiHbyA)
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevTau(U)==fvModels.source(rho, U))
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
phiHbyA
Definition: pEqn.H:32
adjustPhi(phiHbyA, Urel, p)
U
Definition: pEqn.H:72
volVectorField & HbyA
Definition: pEqn.H:13
void makeAbsolute(surfaceScalarField &phi, const volVectorField &U)
Make the given flux absolute.
Definition: fvcMeshPhi.C:114
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU))
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
const dimensionedVector & g
p
Definition: pEqn.H:101
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF)
fvVectorMatrix & UEqn
Definition: UEqn.H:13