pEqn.H
Go to the documentation of this file.
1 {
2  if (correctPhi)
3  {
4  rAU.ref() = 1.0/UEqn.A();
5  }
6  else
7  {
8  rAU = 1.0/UEqn.A();
9  }
10 
14  (
15  "phiHbyA",
18  );
19 
20  if (p_rgh.needReference())
21  {
25  }
26 
28  (
29  (
30  mixture.surfaceTensionForce()
32  )*rAUf*mesh.magSf()
33  );
34 
36 
37  // Update the pressure BCs to ensure flux consistency
39 
40  Pair<tmp<volScalarField>> vDotP = mixture.vDotP();
41  const volScalarField& vDotcP = vDotP[0]();
42  const volScalarField& vDotvP = vDotP[1]();
43 
44  while (pimple.correctNonOrthogonal())
45  {
46  fvScalarMatrix p_rghEqn
47  (
49  - (vDotvP - vDotcP)*(mixture.pSat() - rho*gh)
50  + fvm::Sp(vDotvP - vDotcP, p_rgh)
51  );
52 
53  p_rghEqn.setReference(pRefCell, pRefValue);
54 
55  p_rghEqn.solve();
56 
57  if (pimple.finalNonOrthogonalIter())
58  {
59  phi = phiHbyA + p_rghEqn.flux();
60 
61  U = HbyA + rAU()*fvc::reconstruct((phig + p_rghEqn.flux())/rAUf);
62  U.correctBoundaryConditions();
63  fvOptions.correct(U);
64  }
65  }
66 
67  // Correct Uf if the mesh is moving
69 
70  // Make the fluxes relative to the mesh motion
72 
73  p == p_rgh + rho*gh;
74 
75  if (p_rgh.needReference())
76  {
78  (
79  "p",
80  p.dimensions(),
82  );
83  p_rgh = p - rho*gh;
84  }
85 
86  if (!correctPhi)
87  {
88  rAU.clear();
89  }
90 }
rAU
Definition: pEqn.H:1
phiHbyA
Definition: pEqn.H:22
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
fv::options & fvOptions
rho
Definition: pEqn.H:1
pimpleNoLoopControl & pimple
p
Definition: pEqn.H:50
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU))
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
surfaceScalarField phig("phig", -rhorAUf *ghf *fvc::snGrad(rho) *mesh.magSf())
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
p_rgh
Definition: pEqn.H:140
correctPhi
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
scalar getRefCellValue(const volScalarField &field, const label refCelli)
Return the current value of field in the reference cell.
Definition: findRefCell.C:136
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
dynamicFvMesh & mesh
void correctUf(autoPtr< surfaceVectorField > &Uf, const volVectorField &U, const surfaceScalarField &phi)
Definition: fvcMeshPhi.C:223
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:33
autoPtr< surfaceVectorField > Uf
const surfaceScalarField & ghf
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.
adjustPhi(phiHbyA, Urel, p)
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> reconstruct(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
U
Definition: pEqn.H:72
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
volVectorField & HbyA
Definition: pEqn.H:13
label pRefCell
Definition: createFields.H:106
fvVectorMatrix & UEqn
Definition: UEqn.H:13
void makeAbsolute(surfaceScalarField &phi, const volVectorField &U)
Make the given flux absolute.
Definition: fvcMeshPhi.C:114
const volScalarField & gh
phi
Definition: pEqn.H:18
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF)
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
phaseChangeTwoPhaseMixture & mixture
Definition: createFields.H:38
MRF makeRelative(fvc::interpolate(rho), phiHbyA)
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcSnGrad.C:45
scalar pRefValue
Definition: createFields.H:107
zeroField Sp
Definition: alphaSuSp.H:2