| 研究生: |
林佾信 Lin, Yi-Hsin |
|---|---|
| 論文名稱: |
隱式靜直接模擬法的發展與其平行計算效能 Development of the Implicit Quiet Direct Simulation (QDS) Scheme and its Parallelization |
| 指導教授: |
李汶樺
Matthew R. Smith |
| 學位類別: |
碩士 Master |
| 系所名稱: |
工學院 - 機械工程學系 Department of Mechanical Engineering |
| 論文出版年: | 2016 |
| 畢業學年度: | 104 |
| 語文別: | 英文 |
| 論文頁數: | 132 |
| 中文關鍵詞: | 隱式計算 、牛頓法 、開放式多處理 、靜態直接模擬法 、壓縮稀疏矩陣 、庫倫數 、雙共軛梯度法 |
| 外文關鍵詞: | Implicit computation, Newton-Raphson, Parallel Computation, OpenMP, Computational Fluid Dynamics, Quiet Direct Simulation, Courant–Friedrichs–Lewy (CFL) number, BiCGStab |
| 相關次數: | 點閱:156 下載:1 |
| 分享至: |
| 查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
在計算流體力學的應用中,通常使用有限體積法(Finite Volume Method)配合顯式(Explicit)求解問題-利用上一步的物理性質求解通量,或隱式(Implicit)-同時求得物理性質以及通量,本研究利用方向解耦靜態直接模擬法(direction decoupled Quiet Direction Simulation)配合隱式以及較高的庫倫數(Courant–Friedrichs–Lewy number,CFL)。
本研究中,統御方程式(governing equation)為非線性,而傳統上利用隱式求解則需要化為線性方程式,因此應用牛頓-拉弗森法(Newton-Raphson method)解決非線性化問題,配合平衡通量法(Equilibrium Flux Method)或靜態直接模擬法(Quiet Direct Simulation)求解隱式之問題。牛頓-拉弗森法中需要計算雅可比反矩陣(inverse Jacobian matrix )與牛頓殘值(Newton Residual)的乘積,研究中利用有限差分法(Finite Difference Method)求解雅可比反矩陣,並用雙共軛梯度法(Biconjugate Gradient method)解出其乘積值,由於在雅可比矩陣中有許多零元素,這些不但大幅拖垮計算時間,更造成浪費記憶體的情況,因此在這裡引入壓縮稀疏矩陣(Compressed Sparse Matrix)。
另外,證明研究的可行性,將上述的方法應用在下列問題中:一維問題中-震波管的情形,二維問題包含-尤拉四震波的交互作用情形、尤拉四面波交互作用情形、爆炸波以及超音速流過階梯之情形,並使用開放式多處理(Open Multi-Processing),探討其平行化之效能。最後結論為1.隱式的庫倫數可以大於顯式,由於使用一階時間離散的關係,在隱式中較大庫倫數在精度上將會降低。2.在使用開放式多處理的情況下,開啟16線程(thread)比單一串行(serial thread)計算快上13.6倍左右的效能。3.在隱式計算上,應用壓縮稀疏矩陣能有驚人的效益和平行化的能力。此研究測試中央處理器為Genuine Intel(R) CPU @ 2.60GHz。
The application of Computational Fluid Dynamics (CFD) is an important part of any engineering analysis, with the Finite Volume Method (FVM) a key tool in modern CFD. Modern FVM simulations can be categorized into explicit simulations – where fluxes for the next time step are computed based on older values – or implicit simulations, where the new state and new fluxes across cell interfaces are computed simultaneously. This paper focuses on the application of the direction decoupled Quiet Direct Simulation (QDS) approach to implicit calculation, allowing the use of larger CFL numbers without resulting in instabilities. The governing equations are non-linear – conventional attempts at implementing an implicit approach norming involve the linearization of the governing equations. The QDS approach is fundamentally non-linear, hence this research centers on the solution of the non-linear equations. Hence, the Newton Raphson approach is employed to solve the non-linear equations for both the Equilibrium Flux Method (EFM) and the Quiet Direct Simulation (QDS). The Newton Raphson approach requires the inverse of the Jacobian of the residual functions. The Jacobian matrix is computed using a simple Finite Difference approach, while the Bi-Conjugate Stabilised (BiCGStab) method is employed for finding the Jacobian inverse. The Jacobian matrix has a considerable amount of non-zero elements, which not only influences computation time but also wastes a large amount of memory. To overcome this obstacle we employ the Compressed Sparse Matrix (CSR) storage technique.
In order to validate the implicit implementation of the QDS solver, we discuss the one-dimensional shock tube problem, a two-dimensional four contact interaction, the two dimensional four shock interaction and two dimensional blast wave problem, in addition to a hypersonic flow over a forward facing step. After comparison of the results against the EFM and existing results, we describe the parallel performance of the OpenMP implementation. The overall conclusions for the study can by summarized by (1) The allowable CFL number is greater for the implicit implementation than its equivalent explicit implementation – however, using a larger CFL number demonstrates the lower accuracy due to the use of a first order time discretization, (2) The speedup obtained using OpenMP with 16 cores is approximately 13.6x that of a single core, and demonstrating a high degree of parallel efficiency, (3) the application of CSR is critical to the efficient application and parallelization of the implicit solution.
[1] Dale A. Anderson, John C. Tannehill and Richard H. Pletcher, “Computational fluid mechanics and heat transfer”, Taylor & Francis, Washington, DC, 1984.
[2] Courant R., Friedrichs K. and Lewy H., "über die partiellen Differenzengleichungen der mathematischen Physik." Mathematische annalen, Vol. 100(1), pp. 32-74, 1928.
[3] Michael John Naughton, “On numerical boundary conditions for the Navier-Stokes equations”, California Institute of Technology, November 1985.
[4] Euler Leonard, “Principes généraux du mouvement des fluides”, Mémoires de l'Academie des Sciences de Berlin, 1757.
[5] Toro E.F., ”Riemann Solvers and Numerical Methods for Fluid Dynamics”, Springer, Berlin, Germany, 2009.
[6] Pullin, D.I., “Direct Simulation Methods for Compressible Ideal Gas Flow”, Journal of Computational Physics, Vol.34, pp. 231-244, 1980.
[7] M. N. Macrossan, M. R. Smith, M. V. Metchnik and P. A. Pinto, “True Direction Equilibrium Flux Method applications on rectangular 2D meshes”, Siberian Branch of the Russian Academy of Sciences, Russia, pp. 239-244, July 2006.
[8] G. A. Bird, “Molecular Gas Dynamics and the Direct Simulation of Gas Flows”, Claredon, Oxford, 1994.
[9] B. J. Albright, Don S. Lemons, Michael E. Jones and Dan Winske, “Quiet direct simulation of Eulerian fluids”, Phys Rev E Stat Nonlin Soft Matter Phys., May 2002.
[10] Smith M.R., Cave H.M., Wu J.S., Jermy M.C. and Chen Y.S., “An improved Quiet Direct Simulation method for Eulerian fluids using a second-order scheme”, Volume 228, Issue 6, pp. 2213–2224, April 2009.
[11] C.W. Lim, M.R. Smith, H.M. Cave, M.C. Jermy, J.-S. Wu and S.P. Krumdieck. “The direction decoupled Quiet Direct Simulation method for rapid simulation of axisymmetric inviscid unsteady flow in pulsed pressure chemical vapour deposition”, Computers & Fluids Volume 86, Pages 14–275, November 2013.
[12] Frank W. J. Olver, Daniel M. Lozier, Ronald F. Boisvert, and Charles W. Clark, “NIST Handbook of Mathematical Functions”, Cambridge University Press, 951 pages, 2010.
[13] Ravi Samtaney, “Computational Methods for Self-similar Solutions of the Compressible Euler Equations ”, Journal of Computational Physics, Volume 132, Issue 2, pp. 327–345, April 1997.
[14] Y. Saad, “Iterative Methods for Sparse Linear Systems”, SIAM, Philadelphia, PA, 2003.
[15] H.A van der Vorst. “BI-CGSTAB: a fast and smoothly converging variant of BI-CG for the solution of nonsymmetric linear systems”, SIAM Journal on Scientific and Statistical Computing, Volume 13, Issue 2, pp. 631-644, March 1992.
[16] Amdahl. G.M., “Validity of the single processor approach to achieving large scale computing capabilities”, In AFIPS Conference Proceedings, Vol. 30, pp. 483–485, 1967.
[17] Gustafson. J.L., “Reevaluating Amdahl's Law”, Communications of the ACM, Vol. 31(5), pp.532-533, 1988.
[18] Spinellis Diomidis, “A Critique of the Windows Application Programming Interface”, University of the Aegean, Karlovasi, Greece, 1997.
[19] Andi Kleen, “An NUMA API for Linux”, SUSE Labs, Aug. 2004.
[20] Roland W. Jeppson, “Steady Flow Analysis of Pipe Networks: An Instructional Manual”, Utah State University, Utah, 1974.
[21] Jeremiah Willcock and Andrew Lumsdaine, “Accelerating Sparse Matrix Computations via Data Compression”, ICS ’06 Proceedings of the 20th annual international conference on Supercomputing, pp. 307-316, 2006.
[22] Gary A. Sod, “A Survey of Several Finite Difference Methods for Systems of Nonlinear Hyperbolic Conservation Laws”, J. Comput. Phys., Vol. 27, pp.1-31, 1978.
[23] Carsten W. Schulz-Rinne, James P. Collins, and Harland M. Glaz,“Numerical solution of the Riemann problem for two-dimensional gas dynamics”, SIAM J. Sci. Compt., Vol. 14, pp. 1394–1414, 1993.
[24] Čada. M., and M. Torrilhon., “Compact third-order limiter functions for finite volume methods”, J. Compt. Phys., Vol. 228, pp. 4118–4145, 2009.
[25] Sung-IK Sohn, “A New TVD-MUSCL Scheme for Hyperbolic Conservation Laws”, Computers and Mathematics with Applications, Vol. 50, pp.231-248, 2005.
[26] Mario Soukup and Tarek S. Abdelrahman, “A Source-to-Source OpenMP Compiler”, Department of Electrical and Computer Engineering University of Toronto, Toronto, August 2001.
[27] Magnus Winter, “Benchmark and validation of Open Source CFD codes, with focus on compressible and rotating capabilities, for integration on the SimScale platform”, Department of Applied Mechanics Chalmers University of Technology Gothenburg, Sweden, 2013.
[28] Pulliam T.H., “Artificial Dissipation Models for the Euler Equations”, J. AIAA, Vol.24, pp. 1931-1940, 1986.
[29] Victor S. Ryaben'kii and Semyon V. Tsynkov, “A Theoretical Introduction to Numerical Analysis”, CRC Press, 552 pages, 2006.
[30] D. J. Struik, “A Source Book in Mathematics, 1200–1800”, Princeton Legacy Library, Originally published in 1986.
[31] M. N. Macrossan, ‘The equilibrium flux method for the calculation of flows with non-equilibrium chemical reactions’, J. Comput. Phys. Vol. 80, pp. 204-231, 1989.
[32] Randall J. LeVeque, “Wave Propagation Algorithms for Multi-dimensional Hyperbolic Systems”, J. Comput. Phys., Vol. 131, pp. 327-353, 1997.
[33] Ashley F. Emery “An evaluation of several differencing methods for inviscid fluid flow problems”, Volume 2 Issue 3, pp. 306–331, February 1968.
[34] Paul Woodward and Phillip Colella, “The numerical simulation of two-dimensional fluid flow with strong shocks”, Journal of Computational Physics, Vol. 54, pp.115-173, 1984.
[35] Leonid I. Sedov, “Similarity and Dimensional Methods in Mechanicals”, Academic Press, New York, 1959.
[36] Matthew R. Smith, “Introduction to Multi-Core CPU and GPU Computation”, Nation Cheng Kung University (class note), Tainan, 2013.
[37] Mark Harris, “Optimizing Parallel Reduction in CUDA”, NVIDIA Developer Technology, USA, 2007.
校內:2018-01-25公開