FreeFOAM The Cross-Platform CFD Toolkit
pEqn.H
Go to the documentation of this file.
1 {
2  volScalarField rAU = 1.0/UEqn.A();
4 
5  U = rAU*UEqn.H();
6 
8  (
9  "phiU",
10  (fvc::interpolate(U) & mesh.Sf())
11  //+ fvc::ddtPhiCorr(rAU, rho, U, phi)
12  );
13  mrfZones.relativeFlux(phiU);
14 
15  adjustPhi(phiU, U, p_rgh);
16 
17  phi = phiU +
18  (
19  mixture.surfaceTensionForce()
21  )*rAUf*mesh.magSf();
22 
23  for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
24  {
25  fvScalarMatrix p_rghEqn
26  (
27  fvm::laplacian(rAUf, p_rgh) == fvc::div(phi)
28  );
29 
30  p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
31 
32  p_rghEqn.solve
33  (
34  mesh.solver
35  (
36  p_rgh.select(corr == nCorr-1 && nonOrth == nNonOrthCorr)
37  )
38  );
39 
40  if (nonOrth == nNonOrthCorr)
41  {
42  phi -= p_rghEqn.flux();
43  }
44  }
45 
46  U += rAU*fvc::reconstruct((phi - phiU)/rAUf);
47  U.correctBoundaryConditions();
48 
50 
51  p == p_rgh + rho*gh;
52 
53  if (p_rgh.needReference())
54  {
56  (
57  "p",
58  p.dimensions(),
60  );
61  p_rgh = p - rho*gh;
62  }
63 }