FreeFOAM The Cross-Platform CFD Toolkit
pEqn.H
Go to the documentation of this file.
1 rho = thermo.rho();
2 
4 U = UEqn.H()/A;
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)
21  - fvm::laplacian(rho/A, p)
22  ==
23  Sevap
24  );
25 
26  pEqn.solve();
27 
28  if (nonOrth == nNonOrthCorr)
29  {
30  phi == pEqn.flux();
31  }
32  }
33 }
34 else
35 {
37  *((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U));
38 
39  for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
40  {
41  fvScalarMatrix pEqn
42  (
43  fvm::ddt(psi, p)
44  + fvc::div(phi)
45  - fvm::laplacian(rho/A, p)
46  ==
47  Sevap
48  );
49 
50  pEqn.solve();
51 
52  if (nonOrth == nNonOrthCorr)
53  {
54  phi += pEqn.flux();
55  }
56  }
57 }
58 
59 #include "rhoEqn.H"
61 
62 U -= fvc::grad(p)/A;
63 U.correctBoundaryConditions();
64 
66 
67 // ************************ vim: set sw=4 sts=4 et: ************************ //