pEqn.H
Go to the documentation of this file.
1 {
2  rAU = 1.0/UEqn.A();
4 
5  volVectorField HbyA("HbyA", U);
6  HbyA = rAU*UEqn.H();
7 
9  (
10  "phiHbyA",
11  (fvc::interpolate(HbyA) & mesh.Sf())
13  );
14  MRF.makeRelative(phiHbyA);
15 
16  if (p_rgh.needReference())
17  {
21  }
22 
24  (
25  (
26  mixture.surfaceTensionForce()
28  )*rAUf*mesh.magSf()
29  );
30 
32 
33  // Update the fixedFluxPressure BCs to ensure flux consistency
35  (
36  p_rgh.boundaryField(),
37  (
38  phiHbyA.boundaryField()
39  - (mesh.Sf().boundaryField() & U.boundaryField())
40  )/(mesh.magSf().boundaryField()*rAUf.boundaryField())
41  );
42 
43  while (pimple.correctNonOrthogonal())
44  {
45  fvScalarMatrix p_rghEqn
46  (
48  );
49 
50  p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
51 
52  p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
53 
54  if (pimple.finalNonOrthogonalIter())
55  {
56  phi = phiHbyA - p_rghEqn.flux();
57 
58  p_rgh.relax();
59 
60  U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf);
61  U.correctBoundaryConditions();
62  fvOptions.correct(U);
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  p == p_rgh + rho*gh;
78 
79  if (p_rgh.needReference())
80  {
82  (
83  "p",
84  p.dimensions(),
86  );
87  p_rgh = p - rho*gh;
88  }
89 }
Uf
Definition: pEqn.H:78
phi
Definition: pEqn.H:20
setSnGrad< fixedFluxPressureFvPatchScalarField >(p_rgh.boundaryField(),( phiHbyA.boundaryField() -MRF.relative(mesh.Sf().boundaryField()&U.boundaryField()) *rho.boundaryField() )/(mesh.magSf().boundaryField()*rhorAUf.boundaryField()))
void makeAbsolute(surfaceScalarField &phi, const volVectorField &U)
Make the given flux absolute.
Definition: fvcMeshPhi.C:113
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU))
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> reconstruct(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
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
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
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
volScalarField & p_rgh
tmp< surfaceScalarField > interpolate(const RhoType &rho)
dynamicFvMesh & mesh
surfaceScalarField phig(-rhorAUf *ghf *fvc::snGrad(rho)*mesh.magSf())
const dictionary & pimple
p
Definition: pEqn.H:59
fv::IOoptionList & fvOptions
const scalar pRefValue
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
IOMRFZoneList & MRF
fvVectorMatrix UEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
MRF makeRelative(fvc::interpolate(rho), phiHbyA)
phiHbyA
Definition: pEqn.H:21
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcSnGrad.C:45
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
adjustPhi(phiHbyA, U, p_rgh)
scalar getRefCellValue(const volScalarField &field, const label refCelli)
Return the current value of field in the reference cell.
Definition: findRefCell.C:154
volScalarField rAU(1.0/UEqn.A())
surfaceVectorField n(mesh.Sf()/mesh.magSf())
const label pRefCell
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
rho
Definition: pEqn.H:1
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
U
Definition: pEqn.H:82
const surfaceScalarField & ghf
HbyA
Definition: pEqn.H:7
const volScalarField & gh