FreeFOAM The Cross-Platform CFD Toolkit
pEqn.H
Go to the documentation of this file.
1 {
2  volScalarField rUA = 1.0/UEqn.A();
4 
5  U = rUA*UEqn.H();
6 
8  (
9  "phiU",
10  (fvc::interpolate(U) & mesh.Sf())
11  + fvc::ddtPhiCorr(rUA, rho, U, phi)
12  );
13 
14  adjustPhi(phiU, U, p_rgh);
15 
16  phi = phiU +
17  (
18  fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)
20  )*rUAf*mesh.magSf();
21 
22  Pair<tmp<volScalarField> > vDotP = twoPhaseProperties->vDotP();
23  const volScalarField& vDotcP = vDotP[0]();
24  const volScalarField& vDotvP = vDotP[1]();
25 
26  for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
27  {
28  fvScalarMatrix p_rghEqn
29  (
31  - (vDotvP - vDotcP)*(pSat - rho*gh) + fvm::Sp(vDotvP - vDotcP, p_rgh)
32  );
33 
34  p_rghEqn.setReference(pRefCell, pRefValue);
35 
36  p_rghEqn.solve
37  (
38  mesh.solver
39  (
40  p_rgh.select
41  (
42  finalIter
43  && corr == nCorr-1
44  && nonOrth == nNonOrthCorr
45  )
46  )
47  );
48 
49  if (nonOrth == nNonOrthCorr)
50  {
51  phi += p_rghEqn.flux();
52  }
53  }
54 
55  U += rUA*fvc::reconstruct((phi - phiU)/rUAf);
56  U.correctBoundaryConditions();
57 
59 
60  p == p_rgh + rho*gh;
61 
62  if (p_rgh.needReference())
63  {
65  (
66  "p",
67  p.dimensions(),
69  );
70  p_rgh = p - rho*gh;
71  }
72 }
73 
74 // ************************ vim: set sw=4 sts=4 et: ************************ //