项目作者: obrienadam

项目描述 :
Unstructured 2D multiphase solver with immersed boundary methods.
高级语言: C++
项目地址: git://github.com/obrienadam/Phase.git
创建时间: 2016-03-28T21:52:22Z
项目社区:https://github.com/obrienadam/Phase

开源协议:GNU General Public License v3.0

下载


  1. <!-- Page Heading -->
  2. <div class="row">
  3. <div class="col-lg-12">
  4. <h1 class="page-header">Phase
  5. <small>Unstructured 2D Multiphase Solver</small>
  6. </h1>
  7. </div>
  8. </div>
  9. <!-- /.row -->
  10. <div class="row">
  11. <div class="col-md-12">
  12. <h3>About</h3>
  13. <p>
  14. Phase is a lightweight unstructured finite-volume solver for multiphase fluid equations. The intention of this
  15. project is to provide a platform allowing for rapid development and testing of new finite-volume methods. The
  16. framework allows the programmer to implement finite-volume equations almost as they would be written on paper.
  17. For example, if one wishes to implement the equations for the SIMPLE method of Patankar and Spalding, the following
  18. code can be used for the momentum equation:
  19. </p>
  20. <pre class="prettyprint lang-cpp linenums">

uEqn = (fv::ddt(rho, u, timeStep) + fv::div(rho*u, u) == fv::laplacian(mu, u) - fv::grad(p));
uEqn
.relax(omegaMomentum);
double error = uEqn
.solve();

  1. <p>
  2. And, for the pressure correction equation:
  3. </p>
  4. <pre class="prettyprint lang-cpp linenums">

pCorrEqn = (fv::laplacian(rho*d, pCorr) == m);
double error = pCorrEqn
.solve();

  1. <p>
  2. The <code class="prettyprint lang-cpp">fv</code> namespace contains all of the standard finite-volume
  3. operators. Users can easily define
  4. their own discretization schemes for either advection or diffusion and combine them with the operators that
  5. already exist within the framework.
  6. </p>
  7. <p>
  8. Each of the finite-volume functions constructs a sparse matrix representing the discretized form of the dependent variable
  9. and combines them. The euqation itself is solved using the efficient multi-threaded Bi-Conjugate Gradient Stabilized (BiCGStab)
  10. iterative method in conjuction with an Incomplete Lower-Upper Triangular (ILUT) factorization preconditioner available in the
  11. freely available <a href="http://eigen.tuxfamily.org/index.php?title=Main_Page">Eigen</a> C++ library.
  12. </p>
  13. <h3>Installation</h3>
  14. <p>
  15. Phase depends on the following third-party development libaries:
  16. <ul>
  17. <li>
  18. CMake 2.8.11
  19. </li>
  20. <li>
  21. Boost 1.53
  22. </li>
  23. <li>
  24. Eigen 3.2
  25. </li>
  26. <li>
  27. CGAL 4.7
  28. </li>
  29. </ul>
  30. </p>
  31. <p>
  32. The most recent version can be found <a href="https://www.github.com/obrienadam/Phase">here</a>. To clone
  33. this repository, open a terminal and type the commmand:
  34. </p>
  35. <p>
  36. <samp>> git clone https://www.github.com/obrienadam/Phase</samp>
  37. </p>
  38. <p>
  39. Then, assuming that the repository was cloned into the home directory, navigate to the project directory:
  40. </p>
  41. <p>
  42. <samp>> cd ~/Phase</samp>
  43. </p>
  44. <p>
  45. and run the command
  46. </p>
  47. <p>
  48. <samp>> cmake CMakeLists.txt -DCMAKE_BUILD_TYPE=Release</samp>
  49. </p>
  50. <p>
  51. to generate the make files. Then, build the project with
  52. </p>
  53. <p>
  54. <samp>> make all</samp>
  55. </p>
  56. <p>
  57. The solver binaries will be placed into <samp>$HOME/Phase/modules</samp>. In order to run a case, such
  58. as the 2D lid driven cavity case, navigate to the case directory:
  59. </p>
  60. <p>
  61. <samp>> cd ~/Phase/Examples/LidDrivenCavity</samp>
  62. </p>
  63. <p>
  64. and execute the desired solver from the case directory; for example:
  65. </p>
  66. <p>
  67. <samp>> ~/Phase/modules/phasePiso</samp>
  68. </p>
  69. </div>
  70. <hr>
  71. <!-- Footer -->
  72. <footer>
  73. <div class="row">
  74. <div class="col-lg-12">
  75. <p>Copyright © Adam O'Brien 2015</p>
  76. </div>
  77. </div>
  78. <!-- /.row -->
  79. </footer>