| 研究生: |
陳彥志 Chen, Yen-Chih |
|---|---|
| 論文名稱: |
三角化平衡通量法應用圖形處理器速解尤拉與納維-史托克斯方程式之研究 Development of Triangular Equilibrium Flux Method Using Graphics Processing Unit Acceleration for Solving Euler and Navier-Stokes Equations |
| 指導教授: |
李汶樺
Matthew Ross Smith |
| 學位類別: |
碩士 Master |
| 系所名稱: |
工學院 - 機械工程學系 Department of Mechanical Engineering |
| 論文出版年: | 2014 |
| 畢業學年度: | 102 |
| 語文別: | 英文 |
| 論文頁數: | 168 |
| 中文關鍵詞: | 計算流體力學 、有限體積法 、平衡通量法 、三角化平衡通量法 、總變量遞減 、平行計算 、圖形處理器 、CUDA |
| 外文關鍵詞: | Computational Fluid Dynamics, Finite Volume Method, Equilibrium Flux Method, Triangular Equilibrium Flux Method, Total Variable Diminishing, Parallel Computing, Graphic Processing Units (GPU), CUDA |
| 相關次數: | 點閱:111 下載:1 |
| 分享至: |
| 查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
為了求解由尤拉(Euler)與納維-史托克斯(Navier-Stokes)方程式所統御之流動現象,本研究提出二種新方法稱為單一化平衡通量法(Uniform Equilibrium Flux Method, UEFM)及三角化平衡通量法(Triangular Equilibrium Flux Method, TEFM)。在傳統的平衡通量法(Equilibrium Flux Method, EFM)中,其通量計算是經由積分馬克斯威爾-波茲曼(Maxwell-Boltzmann)速度機率分布於速度空間而取得,然而,此速度機率分布函數與其積分包含指數函數與誤差函數。這些指數函數與誤差函數的複雜度使得在求解計算上需高度費時。因此,UEFM與TEFM法分別利用一系列經由設計的單一與三角機率速度分布近似馬克斯威爾-波茲曼速度機率分布。透過這種簡化方式可大幅降低計算上的時間成本。此外,將UEFM與TEFM通量鑄成方向解耦(direction-decoupled)之表面通量,兩者更進一步拓展至二階空間上的精確度。以泰勒級數(Taylor series)在空間上展開,二階分離的表面通量可重組在網格交界面上。MINMOD 與MC通量限制器(flux limiter)被用來避免由積分梯度項於速度與物理空間上所產生的非物理震盪。對一階TEFM法的數值耗散(numerical dissipation)分析結果顯示,TEFM質量通量之擴散係數(diffusion coefficient)與區域馬赫數有關,並且在高馬赫數其值會大幅降低。由於UEFM之質量通量無此特性,模擬結果將著重於TEFM法。利用輝達(Nvidia)的圖形處理器(Graphics Processing Units, GPU)與CUDA API將高階TEFM通量應用於大尺度之平行計算。因為TEFM通量的向量分離特性,GPU平行計算上相對較直接。GPU計算實踐透過幾個關鍵CUDA核心的建立,包含計算TEFM分離通量、分離通量梯度、納維-史托克斯黏性通量和狀態更新計算等。所有計算皆執行在GPU上,並使CPU在計算過程中閒置。為了確認一階及二階TEFM法之可行性,該方法被應用於解由尤拉方程式統御之無黏理想氣體的多種數值模擬,包含Sod’s 一維震波管問題、二維震波氣泡交互作用問題、尤拉二維四震波及四接觸面問題等。一維震波管模擬指出一階TEFM法的結果近乎等效於傳統的EFM法。此外,二階延伸之TEFM法改善了在接觸面(contact surface)與震波(shock wave)區域的解析度。二維數值模擬運用大量的計算網格與二階延伸則提供了更銳利的解析度在解大梯度的流體性質上。二維後台階(backward facing step)流動問題更進一步的演示利用TEFM法解納維-史托克斯方程式所統御之黏性理想流。在計算的加速效能結果顯示,相較於單核心 Intel i3-2120 CPU,運用輝達之GTX Titan,Tesla C2075和GTX 670 GPU 可達到上百倍之加速計算。
This study presents two new methods, named the “Uniform Equilibrium Flux Method” (UEFM) and “Triangular Equilibrium Flux Method” (TEFM) for solving flows governed by the Euler and Navier-Stokes equations. In the original Equilibrium Flux Method (EFM), the EFM fluxes are calculated by integrating the Maxwell-Boltzmann equilibrium velocity probability distribution function over velocity space. However, the equilibrium velocity probability distribution function and its integral contain both exponential and error functions. These exponential and error functions are complex – without closed form – and thus their solution is highly time-consuming. Accordingly, the proposed UEFM and TEFM methods use a series of uniform and triangular probability distribution functions designed to approximate the equilibrium velocity probability distribution function. This simplification results in a significant reduction in the computational cost. Furthermore, the extension of UEFM and TEFM method to the second order spatial accuracy is realized by casting of the present flux expressions as a direction-decoupled surface flux. Based on the Taylor series expansion in space, the second order split surface fluxes are able to be reconstructed at the cell interfaces. The MINMOD and MC flux limiters are employed to avoid the non-physical oscillations related to the integration of gradient terms over the velocity and physical space. The analysis of the numerical dissipation for the first order TEFM scheme predicts that the diffusion coefficient for TEFM mass flux is associated with the local Mach number and results in a significant decrease in diffusion with increasing Mach numbers. This does not occur with UEFM mass flux, and hence the majority of the results focus on the superior TEFM method. The higher order TEFM fluxes are then applied to large scale parallel computation using Nvidia’s Graphics Processing Units, or GPUs, through the CUDA API. Due to the vector split nature of the TEFM fluxes, the GPU parallel computation is relatively straight forward. The GPU computation is implemented through the creation of several key CUDA kernels for the evaluation of TEFM split fluxes, gradients of split fluxes, Navier-Stokes viscous fluxes and the state computations. All computations are executed entirely on the GPU device, leaving the CPU (host) idle during the computation stage. Multiple numerical benchmarks, including Sod’s one-dimensional shock tube problem, the two-dimensional shock bubble interaction, Euler two-dimensional four shocks and four contacts problems, are solved based on the Euler equation for an inviscid, ideal gas to verify both the first order and second order TEFM schemes. The one-dimensional shock tube problem indicates that the first order TEFM scheme demonstrates results appropriately equivalent to the original EFM method. In addition, the second order extension of TEFM method improves the resolution of contact surface and shock wave regions for the shock tube problem. The two-dimensional numerical implementations with various numbers of computational cells and second order extension provide sharp resolution in regions involving large gradients of flow properties. The two-dimensional backward facing step flow is further used to demonstrate the TEFM method for solving the Navier-Stokes equations with viscous, ideal flow. As the speedup results indicate, hundreds of times speedup can be achieved using the Nvidia’s GTX Titan, Tesla C2075 and GTX 670 GPU when compared with a single core of an Intel i3-2120 CPU.
[1] Amdahl G.M., “Validity of the Single Processor Approach to Achieving Large-Scale Computing Capabilities”, AFIPS Conference Proceedings, Vol. 30, pp. 483-485, 1967.
[2] Armaly B.F., Dursts F., Pereira J.C.F. and Schönung B., “Experimental and Theoretical Investigation of Backward-Facing Step Flow”, J. Fluid. Mech., Vol. 127, pp. 473-496, 1983.
[3] Čada M. and Torrilhon M., “Compact Third-Order Limiter Functions for Finite Volume Methods”, J. Comp. Phys., Vol. 228, pp. 4118-4145, 2009.
[4] Cebeci T., Shao J.P., Kafyeke F. and Laurendeau E., “Computational Fluid Dynamics for Engineers From Panel to Navier-Stokes Methods with Computer Programs”, Horizons Publishing Inc., California, 2005.
[5] Chen Y.-C., Smith M.R. and Ferguson A., “Analysis of the Second Order Accurate Uniform Equilibrium Flux Method and its Graphics Processing Unit Acceleration”, Journal of Computers and Fluids, Accepted, 2014.
[6] Ferguson A., Smith M.R. and Wu J.-S., “Accurate True Direction Solutions to the Euler Equations Using a Uniform Distribution Equilibrium Method”, CMES: Computer Modeling in Engineering & Sciences, Vol. 63, No. 1, 2010.
[7] Fick A., “On Liquid Diffusion”, Philosophical Magazine Series 4, Vol. 10, Issue 63, pp. 30-39, 1855.
[8] Flynn, M.J., “Very High-Speed Computing Systems”, Proceedings of the IEEE, Vol. 54, Number 12, pp. 1901-1909, 1966.
[9] Flynn, M.J., “Some Computer Organizations and Their Effectiveness”, IEEE Transactions on Computers, Vol. C-21, Number 9, pp. 948-960, 1972.
[10] Gustafson J.L., “Reevaluating Amdahl’s Law”, Communications of the ACM, Vol. 31, Number 5, pp. 532-533, 1988.
[11] Harten A., “High Resolution Schemes for Hyperbolic Conservation Laws”, J. Comp. Phys., Vol. 49, pp. 357-393, 1983.
[12] Hirsch C., “Numerical Computation of Internal and External Flows”, Vol. 1, John Wiley and Sons, N.Y., 1988.
[13] Lax P.D. and Wendroff B., “Systems of Conservation Laws”, Comm. Pure Appl. Math., Vol. 13, pp. 217-237, 1960.
[14] LeVeque R.J., “Wave Propagation Algorithms for Multidimensional Hyperbolic Systems”, J. Comp. Phys., Vol. 131, pp. 327-353, 1997.
[15] LeVeque R.J., “Finite Volume Methods for Hyperbolic Problems”, Cambridge University Press, United Kingdom, 2004.
[16] Lindholm E., Nickolls J., Oberman S. and Montrym J., “Nvidia Tesla: A Unified Graphics and Computing Architecture”, IEEE Micro, Vol. 28, pp. 39-55, 2008.
[17] Macrossan M.N., “The Equilibrium Flux Method for the Calculation of Flows with Non-equilibrium Chemical Reactions”, J. Comp. Phys., Vol. 80, pp. 204- 231., 1989.
[18] Nvidia, “NVIDIA’s Next Generation CUDATM Compute Architecture: FermiTM”, Whitepaper, NVIDIA Corporation, 2009.
[19] Nvidia, “NVIDIA’s Next Generation CUDATM Compute Architecture: Kepler TM GK110”, Whitepaper, NVIDIA Corporation, 2012.
[20] Nvidia, “CUDA Compiler Driver NVCC”, Reference Guide, NVIDIA Corporation, 2014.
[21] Nvidia, “CUDA C Programming Guide”, Design Guide, NVIDIA Corporation, 2014.
[22] Pulliam T.H., “Artificial Dissipation Models for the Euler Equations”, J. AIAA, Vol. 24, pp. 1931-1940, 1986.
[23] Pullin D.I., “Direct Simulation Methods for Compressible Inviscid Ideal-Gas Flow”, J. Comp. Phys., Vol. 34, pp. 231-244, 1980.
[24] Roe P.L., “Characteristic-Based Schemes for the Euler Equations”, Ann. Rev. Fluid Mech. Vol. 18, pp. 337-365, 1986.
[25] Rusanov V.V., “The Calculation of the Interaction of Non-stationary Shock Waves and Obstacles”, J. Comput. Math. Phys. USSR, Vol. 1, pp. 267-279, 1961.
[26] Schulz-Rinne C.W., Collins J.P., and H.M. Glaz, “Numerical Solution of the Riemann Problem for Two-Dimensional Gas Dynamics”, SIAM J. Sci. Compt., Vol. 14, pp. 1394-1414, 1993.
[27] Smith M.R., “The True Direction Equilibrium Flux Method and its Application”, The University of Queensland, 2008.
[28] Smith M.R., Macrossan M.N. and Abdel-jawad M.M., “Effects of Direction Decoupling in Flux Calculation in Euler Solvers”, J. Comp. Phys., Vol. 227, pp. 4142-4161, 2008.
[29] Smith M.R., Chen Y.-C., Liu J.-Y., Ferguson A. and Wu J.-S., “Extension of the Uniform Equilibrium Flux Method (UEFM) to Higher Order Accuracy and its Graphics Processing Unit Acceleration”, International Conference on Parallel Computational Fluid Dynamics, China, 2013.
[30] Smits A.J. and Dussauge J.P., “Turbulent Shear Layers in Supersonic Flow”, Springer, 2006.
[31] Sod G.A., “A Survey of Several Finite Difference Methods for Systems of Nonlinear Hyperbolic Conservation Laws”, J. Comp. Phys., Vol. 27, pp. 1-31, 1978.
[32] Sweby P.K., “High Resolution Schemes Using Flux Limiters for Hyperbolic Conservation Laws”, SIAM J. Numer. Anal., Vol. 21, pp. 995-1011, 1984.
[33] Toro E.F., “Riemann Solvers and Numerical Methods for Fluid Dynamics”, Springer, Berlin, 2009.
[34] Van Leer B., “Towards the Ultimate Conservative Difference Scheme II. Monotonicity and Conservation Combined in a Second Order Scheme”, J. Comp. Phys., Vol. 14, pp. 361-370, 1974.
[35] Van Leer B., “Towards the Ultimate Conservative Difference Scheme III. Upstream-Centered Finite-Difference Schemes for Ideal Compressible Flow”, J. Comp. Phys., Vol. 23, Issue 3, pp. 263-275, 1977.
[36] Warming R.F. and Beam R.M., “Upwind second order difference schemes and applications in aerodynamics”, AIAA J., Vol. 14, pp. 1241-1249, 1976.
[37] White F.M., “Viscous Fluid Flow”, McGraw-Hill Inc., Unite States of America, 1991.