pEqn.H
Go to the documentation of this file.
1 {
2  rAU = 1.0/UEqn.A();
3 
5 
6  volVectorField H("H", UEqn.H());
7 
8  volVectorField HbyA("HbyA", U);
9 
11 
13 
14  MRF.makeRelative(phiHbyA);
15 
17  (
18  (
19  mixture.surfaceTensionForce()
20  - ghf*fvc::snGrad(cellMask*rho)
21  )*rAUf*faceMask*mesh.magSf()
22  );
23 
25 
27  {
29  }
30 
31  // Update the pressure BCs to ensure flux consistency
33 
34  while (pimple.correctNonOrthogonal())
35  {
36  fvScalarMatrix p_rghEqn
37  (
39  );
40 
41  p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
42 
43  p_rghEqn.solve(p_rgh.select(pimple.finalInnerIter()));
44 
45  if (pimple.finalNonOrthogonalIter())
46  {
47  phi = phiHbyA - p_rghEqn.flux();
48 
49  p_rgh.relax();
50 
51  U =
52  cellMask*
53  (
54  HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf)
55  );
56 
57  U.correctBoundaryConditions();
58  fvOptions.correct(U);
59  }
61  {
62  oversetPatchPhiErr(p_rghEqn, phiHbyA);
63  }
64  }
65 
66  #include "continuityErrs.H"
67 
68  {
70  surfaceVectorField n(mesh.Sf()/mesh.magSf());
71  Uf += n*(phi/mesh.magSf() - (n & Uf));
72  }
73 
74  // Make the fluxes relative to the mesh motion
76 
77  // Zero faces H-I for transport Eq after pEq
78  phi *= faceMask;
79 
80  p == p_rgh + rho*gh;
81 
82  if (p_rgh.needReference())
83  {
85  (
86  "p_rgh",
87  p.dimensions(),
89  );
90  p == p_rgh + rho*gh;
91  }
92 }
volVectorField H("H", UEqn.H())
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.
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
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:82
scalar getRefCellValue(const volScalarField &field, const label refCelli)
Return the current value of field in the reference cell.
Definition: findRefCell.C:127
oversetPatchErrOutput
fv::options & fvOptions
const surfaceScalarField & ghf
label zoneIdMass
dynamicFvMesh & mesh
IOMRFZoneList & MRF
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
bool oversetAdjustPhi(surfaceScalarField &phi, const volVectorField &U, const label zoneId=-1)
Adjust the balance of fluxes to obey continuity.
HbyA
Definition: pEqn.H:4
faceMask
Definition: setCellMask.H:43
p_rgh
Definition: pEqn.H:139
void oversetPatchPhiErr(const fvScalarMatrix &m, const surfaceScalarField &phi)
Prints out sum of m.flux and phi over the fringe faces.
pimpleControl & pimple
Calculates and prints the continuity errors.
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
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