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