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();
7  (
8  "phiU",
9  (fvc::interpolate(U) & mesh.Sf())
10  + fvc::ddtPhiCorr(rAU, rho, U, phi)
11  );
12 
13  adjustPhi(phiU, U, p_rgh);
14 
15  phi = phiU +
16  (
17  fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)
19  )*rAUf*mesh.magSf();
20 
21  for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
22  {
23  fvScalarMatrix p_rghEqn
24  (
25  fvm::laplacian(rAUf, p_rgh) == fvc::div(phi)
26  );
27 
28  p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
29 
30  p_rghEqn.solve
31  (
32  mesh.solver
33  (
34  p_rgh.select(corr == nCorr-1 && nonOrth == nNonOrthCorr)
35  )
36  );
37 
38  if (nonOrth == nNonOrthCorr)
39  {
40  phi -= p_rghEqn.flux();
41  }
42  }
43 
44  U += rAU*fvc::reconstruct((phi - phiU)/rAUf);
45  U.correctBoundaryConditions();
46 
48 
49  p == p_rgh + rho*gh;
50 
51  if (p_rgh.needReference())
52  {
54  (
55  "p",
56  p.dimensions(),
58  );
59  p_rgh = p - rho*gh;
60  }
61 }
62 
63 // ************************ vim: set sw=4 sts=4 et: ************************ //