pEqn.H
Go to the documentation of this file.
1 {
3 
5  (
6  "phiHbyA",
9  );
10 
11  MRF.makeRelative(phiHbyA);
13 
15  (
16  phicForces +
17  (
20  )*rAUcf*mesh.magSf()
21  );
22 
24 
25  // Update the pressure BCs to ensure flux consistency
27 
28  while (pimple.correctNonOrthogonal())
29  {
30  surfaceScalarField Dp("Dp", alphacf*rAUcf);
31 
32  fvScalarMatrix p_rghEqn
33  (
35  ==
36  fvc::ddt(alphac) + fvc::div(alphacf*phiHbyA)
37  );
38 
39  p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
40 
41  p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
42 
43  if (pimple.finalNonOrthogonalIter())
44  {
45  phi = phiHbyA - p_rghEqn.flux()/alphacf;
46 
47  p_rgh.relax();
48 
49  U =
50  HbyA
51  + rAUc*fvc::reconstruct((phig - p_rghEqn.flux()/alphacf)/rAUcf);
52 
53  U.correctBoundaryConditions();
54 
55  fvOptions.correct(U);
56  }
57  }
58 
59  #include "continuityErrs.H"
60 
61  p == p_rgh + rho*gh;
62 
63  if (p_rgh.needReference())
64  {
66  (
67  "p",
68  p.dimensions(),
70  );
71  p_rgh = p - rho*gh;
72  }
73 }
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:37
rho
Definition: pEqn.H:1
p
Definition: pEqn.H:50
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< typename flux< Type >::type, fvsPatchField, surfaceMesh > > ddtCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
Definition: fvcDdt.C:165
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
tmp< GeometricField< Type, faPatchField, areaMesh > > ddt(const dimensioned< Type > dt, const faMesh &mesh)
Definition: facDdt.C:40
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
fv::options & fvOptions
const surfaceScalarField & ghf
surfaceScalarField rAUcf("Dp", fvc::interpolate(rAUc))
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
HbyA
Definition: pEqn.H:4
p_rgh
Definition: pEqn.H:139
pimpleControl & pimple
adjustPhi(phiHbyA, U, p_rgh)
const scalar pRefValue
const label pRefCell
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> reconstruct(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
U
Definition: pEqn.H:72
Calculates and prints the continuity errors.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
mesh interpolate(rAU)
fvVectorMatrix & UEqn
Definition: UEqn.H:13
const volScalarField & gh
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF)
volScalarField rAUc(1.0/UcEqn.A())
phi
Definition: pEqn.H:18
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcSnGrad.C:40
surfaceScalarField phicForces(fvc::flux(rAUc *cloudVolSUSu/rhoc)+rAUcf *(g &mesh.Sf()))
const volScalarField & alpha1