pEqn.H
Go to the documentation of this file.
1 {
2  rAU = 1.0/UEqn.A();
6  (
7  "phiHbyA",
10  );
11  MRF.makeRelative(phiHbyA);
12 
13  if (p_rgh.needReference())
14  {
18  }
19 
21  (
22  (
23  mixture.surfaceTensionForce()
25  )*rAUf*mesh.magSf()
26  );
27 
29 
30  // Update the pressure BCs to ensure flux consistency
32 
33  while (pimple.correctNonOrthogonal())
34  {
35  fvScalarMatrix p_rghEqn
36  (
38  );
39 
40  p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
41 
42  p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
43 
44  if (pimple.finalNonOrthogonalIter())
45  {
46  phi = phiHbyA - p_rghEqn.flux();
47 
48  p_rgh.relax();
49 
50  U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf);
51  U.correctBoundaryConditions();
52  fvOptions.correct(U);
53  }
54  }
55 
56  #include "continuityErrs.H"
57 
58  {
60  surfaceVectorField n(mesh.Sf()/mesh.magSf());
61  Uf += n*(phi/mesh.magSf() - (n & Uf));
62  }
63 
64  // Make the fluxes relative to the mesh motion
66 
67  p == p_rgh + rho*gh;
68 
69  if (p_rgh.needReference())
70  {
72  (
73  "p",
74  p.dimensions(),
76  );
77  p_rgh = p - rho*gh;
78  }
79 }
surfaceVectorField n(mesh.Sf()/mesh.magSf())
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
U
Definition: pEqn.H:83
p
Definition: pEqn.H:50
phiHbyA
Definition: pEqn.H:20
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:155
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
const dictionary & pimple
Uf
Definition: pEqn.H:67
tmp< surfaceScalarField > interpolate(const RhoType &rho)
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:130
fv::options & fvOptions
const surfaceScalarField & ghf
dynamicFvMesh & mesh
IOMRFZoneList & MRF
surfaceScalarField phig("phig",-rhorAUf *ghf *fvc::snGrad(rho)*mesh.magSf())
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:33
p_rgh
Definition: pEqn.H:120
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF)
adjustPhi(phiHbyA, U, p_rgh)
Info<< "Reading field p_rgh\n"<< endl;volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Reading field U\n"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Creating phaseChangeTwoPhaseMixture\n"<< endl;autoPtr< phaseChangeTwoPhaseMixture > mixture
Definition: createFields.H:33
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)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
volVectorField & HbyA
Definition: pEqn.H:13
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
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
rho
Definition: pEqn.H:1
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcSnGrad.C:45
MRF makeRelative(fvc::interpolate(rho), phiHbyA)