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  *(
13  (fvc::interpolate(U) & mesh.Sf())
14  + fvc::ddtPhiCorr(rUA, rho, U, phi)
15  )
16  );
17 
18  for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
19  {
20  fvScalarMatrix pEqn
21  (
22  fvm::ddt(psi, p)
23  + fvm::div(phid, p)
24  - fvm::laplacian(rho*rUA, p)
25  ==
26  Sevap
27  );
28 
29  pEqn.solve();
30 
31  if (nonOrth == nNonOrthCorr)
32  {
33  phi == pEqn.flux();
34  }
35  }
36 }
37 else
38 {
39  phi =
41  *(
42  (fvc::interpolate(U) & mesh.Sf())
43  + fvc::ddtPhiCorr(rUA, rho, U, phi)
44  );
45 
46  for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
47  {
48  fvScalarMatrix pEqn
49  (
50  fvm::ddt(psi, p)
51  + fvc::div(phi)
52  - fvm::laplacian(rho*rUA, p)
53  ==
54  Sevap
55  );
56 
57  pEqn.solve();
58 
59  if (nonOrth == nNonOrthCorr)
60  {
61  phi += pEqn.flux();
62  }
63  }
64 }
65 
68 
69 U -= rUA*fvc::grad(p);
70 U.correctBoundaryConditions();
71 
73 
74 // ************************ vim: set sw=4 sts=4 et: ************************ //