FreeFOAM The Cross-Platform CFD Toolkit
pEqn.H
Go to the documentation of this file.
1 rho = thermo.rho();
2 
4 U = rUA*UEqn.H();
5 
7 {
9  (
10  "phid",
12  *((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U))
13  );
14 
15  for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
16  {
17  fvScalarMatrix pEqn
18  (
19  fvm::ddt(psi, p)
20  + fvm::div(phid, p, "div(phid,p)")
21  - fvm::laplacian(rho*rUA, p)
22  );
23 
24  pEqn.solve();
25 
26  if (nonOrth == nNonOrthCorr)
27  {
28  phi == pEqn.flux();
29  }
30  }
31 }
32 else
33 {
35  *((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U));
36 
37  for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
38  {
39  fvScalarMatrix pEqn
40  (
41  fvm::ddt(psi, p)
42  + fvc::div(phi)
43  - fvm::laplacian(rho*rUA, p)
44  );
45 
46  pEqn.solve();
47 
48  if (nonOrth == nNonOrthCorr)
49  {
50  phi += pEqn.flux();
51  }
52  }
53 }
54 
55 #include <finiteVolume/rhoEqn.H>
57 
58 U -= rUA*fvc::grad(p);
59 U.correctBoundaryConditions();
60 
62 
63 // ************************ vim: set sw=4 sts=4 et: ************************ //