Loading...
Searching...
No Matches
pEqn.H
Go to the documentation of this file.
1{
2 rAU = 1.0/UEqn.A();
3
4 surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
5
6 volVectorField H("H", UEqn.H());
7
8 volVectorField HbyA("HbyA", U);
9
11
12 surfaceScalarField phiHbyA("phiHbyA", fvc::flux(HbyA));
13
14 MRF.makeRelative(phiHbyA);
15
16 surfaceScalarField phig
17 (
18 (
19 mixture.surfaceTensionForce()
20 - ghf*fvc::snGrad(cellMask*rho)
21 )*rAUf*faceMask*mesh.magSf()
22 );
23
25
27 {
28 oversetAdjustPhi(phiHbyA, U, zoneIdMass);
29 }
30
31 // Update the pressure BCs to ensure flux consistency
33
34 while (pimple.correctNonOrthogonal())
35 {
36 fvScalarMatrix p_rghEqn
37 (
38 fvm::laplacian(rAUf, p_rgh) == fvc::div(phiHbyA)
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 {
69 Uf = fvc::interpolate(U);
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
75 fvc::makeRelative(phi, U);
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}
label n
Calculates and prints the continuity errors.
volScalarField & p_rgh
fv::options & fvOptions
const scalar pRefValue
const surfaceScalarField & ghf
const label pRefCell
IOMRFZoneList & MRF
const volScalarField & gh
pimpleControl & pimple
U
Definition pEqn.H:72
volScalarField & p
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF)
surfaceScalarField phig("phig", -rhorAUf *ghf *fvc::snGrad(rho) *mesh.magSf())
fvVectorMatrix & UEqn
Definition UEqn.H:13
phiHbyA
Definition pcEqn.H:73
HbyA
Definition pcEqn.H:74
dynamicFvMesh & mesh
volScalarField H(IOobject("H", runTime.timeName(), mesh.thisDb(), IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, dimensionedScalar(dimLength, Zero))
autoPtr< surfaceVectorField > Uf
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU))
volVectorField H("H", UEqn.H())
tmp< volScalarField > rAU
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
scalar getRefCellValue(const volScalarField &field, const label refCelli)
Return the current value of field in the reference cell.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
oversetPatchErrOutput
label zoneIdMass
faceMask
Definition setCellMask.H:43
Info<< "Creating temperaturePhaseChangeTwoPhaseMixture\n"<< endl;autoPtr< temperaturePhaseChangeTwoPhaseMixture > mixture