pEqn.H
Go to the documentation of this file.
1 {
2  rAU = 1.0/UEqn.A();
6  (
7  "phiHbyA",
9  );
10 
11  if (p_rgh.needReference())
12  {
16  }
17 
19  (
20  (
21  interface.surfaceTensionForce()
23  )*faceMask*rAUf*mesh.magSf()
24  );
25 
27 
28  // Update the pressure BCs to ensure flux consistency
30 
31  Pair<tmp<volScalarField>> vDotP = mixture->vDotP();
32  const volScalarField& vDotcP = vDotP[0]();
33  const volScalarField& vDotvP = vDotP[1]();
34 
35  while (pimple.correctNonOrthogonal())
36  {
37  fvScalarMatrix p_rghEqn
38  (
40  - (vDotvP - vDotcP)*(mixture->pSat() - rho*gh)
42  );
43 
44 
45  //p_rghEqn.setReference(pRefCell, pRefValue);
46  p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
47 
48  p_rghEqn.solve(p_rgh.select(pimple.finalInnerIter()));
49 
50  if (pimple.finalNonOrthogonalIter())
51  {
52  phi = phiHbyA + p_rghEqn.flux();
53 
54  p_rgh.relax();
55 
56  U =
57  cellMask
58  *(HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rAUf));
59 
60  U.correctBoundaryConditions();
61  fvOptions.correct(U);
62  }
63  }
64 
65  #include "continuityErrs.H"
66 
67  {
69  surfaceVectorField n(mesh.Sf()/mesh.magSf());
70  Uf += n*(phi/mesh.magSf() - (n & Uf));
71  }
72 
73  // Make the fluxes relative to the mesh motion
75 
76  // Zero faces H-I for transport Eq after pEq
77  phi *= faceMask;
78 
79  p == p_rgh + rho*gh;
80 
81  if (p_rgh.needReference())
82  {
84  (
85  "p",
86  p.dimensions(),
88  );
89  p_rgh = p - rho*gh;
90  }
91 }
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:37
rho
Definition: pEqn.H:1
p
Definition: pEqn.H:50
volScalarField rAU(1.0/UEqn.A())
phiHbyA
Definition: pEqn.H:20
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
const volScalarField & vDotvP
Definition: pEqn.H:34
surfaceScalarField phig("phig", -rhorAUf *ghf *fvc::snGrad(rho) *mesh.magSf())
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facDiv.C:43
Info<< "Creating temperaturePhaseChangeTwoPhaseMixture\"<< endl;autoPtr< temperaturePhaseChangeTwoPhaseMixture > mixture
Definition: createFields.H:39
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
const volScalarField & vDotcP
Definition: pEqn.H:33
interfaceProperties interface(alpha1, U, thermo->transportPropertiesDict())
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:76
scalar getRefCellValue(const volScalarField &field, const label refCelli)
Return the current value of field in the reference cell.
Definition: findRefCell.C:127
fv::options & fvOptions
const surfaceScalarField & ghf
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:72
Pair< tmp< volScalarField > > vDotP
Definition: pEqn.H:32
dynamicFvMesh & mesh
tmp< GeometricField< Type, faPatchField, areaMesh > > laplacian(const GeometricField< Type, faPatchField, areaMesh > &vf, const word &name)
Definition: facLaplacian.C:40
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:28
HbyA
Definition: pEqn.H:4
faceMask
Definition: setCellMask.H:43
p_rgh
Definition: pEqn.H:139
pimpleControl & pimple
adjustPhi(phiHbyA, U, p_rgh)
const scalar pRefValue
const label pRefCell
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU))
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.
mesh interpolate(rAU)
fvVectorMatrix & UEqn
Definition: UEqn.H:13
void makeAbsolute(surfaceScalarField &phi, const volVectorField &U)
Make the given flux absolute.
Definition: fvcMeshPhi.C:109
const volScalarField & gh
surfaceVectorField n(mesh.Sf()/mesh.magSf())
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF)
phi
Definition: pEqn.H:18
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
MRF makeRelative(fvc::interpolate(rho), phiHbyA)
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcSnGrad.C:40
Uf
Definition: pEqn.H:64
zeroField Sp
Definition: alphaSuSp.H:2