FreeFOAM The Cross-Platform CFD Toolkit
pEqn.H
Go to the documentation of this file.
1 U = rUA*UEqn().H();
2 
3 if (nCorr <= 1)
4 {
5  UEqn.clear();
6 }
7 
10 
11 adjustPhi(phi, U, p);
12 
13 // Non-orthogonal pressure corrector loop
14 for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
15 {
16  // Pressure corrector
17  fvScalarMatrix pEqn
18  (
20  );
21 
22  pEqn.setReference(pRefCell, pRefValue);
23 
24  if
25  (
26  oCorr == nOuterCorr-1
27  && corr == nCorr-1
28  && nonOrth == nNonOrthCorr
29  )
30  {
31  pEqn.solve(mesh.solver("pFinal"));
32  }
33  else
34  {
35  pEqn.solve();
36  }
37 
38  if (nonOrth == nNonOrthCorr)
39  {
40  phi -= pEqn.flux();
41  }
42 }
43 
45 
46 // Explicitly relax pressure for momentum corrector except for last corrector
47 if (oCorr != nOuterCorr-1)
48 {
49  p.relax();
50 }
51 
52 U -= rUA*fvc::grad(p);
53 U.correctBoundaryConditions();