Numerical Calculation of Laminar Flame Propagation with Parallelism Assignment ZERO, CS 267, UC Berkeley, Spring 2015 Xian Shi 1 bio I am a second-year Ph.D. student from Combustion Analysis/Modeling Lab, Department of Mechanical Engineering. My research interests are solving fundamental thermal, fluid and chemical problems. Specifically, I am currently working on numerical simulation of flame stratification, trying to explore the physics when flame propagates through charge stratification. As one of most engineering students, I am well trained to solve common computational assignments through writing simple scripts, however, without considering its efficiency and productivity. Therefore first of all, I would like to learn fundamentals of professional programming and improve my programming skills from working with other people. Second, with regard to parallel computing, I hope that after taking this course I will be able to identify parallel-computing possibilities and implement corresponding algorithms, in the field of scientific computing. While expecting that I will work on relevant topics (see last section) to my research, I am open to any perspective of scientific-computing problems. 2 parallel application - openfoam 2.1 Introduction The OpenFOAM (Open Field Operation and Manipulation) CFD (Computational Fluid Dynamics) Toolbox is a free, open source CFD software package (C++), which has an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to solid dynamics and electromagnetics. The structure of OpenFOAM is showed in Figure 1 on the following page, which is also the standard procedure solving scientific problems. Almost everything (including meshing, and pre- and post-processing) runs in parallel as standard, enabling users to take full advantage of computer hardware at their disposal.[1] Email: xshi@berkeley.edu 1
Parallel Application - OpenFOAM 2 Figure 1: Overview of OpenFOAM structure 2.2 Parallel Capability The method of parallel computing used by OpenFOAM is known as domain decomposition, in which the geometry and associated fields are broken into pieces and allocated to separate processors for solution. The process of parallel computation involves: decomposition of mesh and fields; running the application in parallel; and, post-processing the decomposed case. The parallel running uses the public domain openmpi implementation of the standard message passing interface (MPI). [2]. More details can be found in the referred user guide. 2.3 Performance Analysis I am not able to find a specific flame calculation case at this moment. For the purpose of performance analysis of OpenFOAM parallel capability, I selected the following example of water turbine simulation.[3] Water turbines are designed to extract energy from the water flowing through the water turbine runner. The available power is determined by the difference in the elevation of the tail water and head water multiplied with the water mass flow and gravity. In reaction turbines the flow enters the runner with a swirl and the runner is designed to remove that swirl before the water enters the draft tube. (Figure 2 on the next page) In the referred work both the runner and the draft tube were modeled in OpenFOAM. The results have been presented and validated in detail in [4]. As an example of result validation, the pressure coefficient at the upper and lower center lines of the draft tube are compared with both the experimental data and the CFX-5 computation in Figure 3 on page 4. The two computations are almost identical, and they are close to the experimental results. A parallel performance test has been made using the draft tube case, with about 10 6 cells. The decomposition of the domain into 2, 4, 8 and 16 subdomains were made using the automatic load-balanced decomposition (Metis) in OpenFOAM. The Linux cluster was a 4 node Dual socket AMD Opteron 280 (2.4 GHz, dual core) with 4GB DDR400 RAM, i.e. 4 cores (CPUs) per node and a total of 16 cores (CPUs). Two different interconnects were tested, a Gigabit Ethernet through an HP ProCurve 2824 Switch, and an Infiniband (PCI-X) through a Silverstorm 9024 Switch. The SuSE Linux Enterprise Server, Service pack 3 operating system was used. Figure 4 on page 5 (actually a table) shows that the execution time of the computations decreases as more CPUs are used. There is no significant difference between the paral-
More on Final Project 3 Figure 2: CAD model of the Holleforsen Kaplan turbine model and visualizations of the flow in the runner and draft tube lel runs using the different interconnects except when the computations are distributed on as many nodes as possible. 3 more on final project Currently I am working on one specific flame propagation scenario: opposed jet flame. The basic geometry is showed as Figure 5 on page 5 [5]. More details can be found in the referred paper. I have access to the original sequential code written in Fortran from the original authors. It runs well with small fuel species, such as hydrogen and methane. However, when it comes to heavier fuel species like n-heptane, the speed of calculation is not satisfactory. Therefore, I would like to work with someone who is interested, to add parallel-computing features into this existing code. Additionally, since there are two types of formulation to define this geometry of flame, it is also possible to write a parallel code from scratch. Please email me if you are interested so that we can discuss more details. references [1] Features of OpenFOAM. http://www.openfoam.org/features/ [2] OpenFOAM: The Open Source CFD Toolbox - User Guide. Version 2.3.1 (2014)
references 4 Figure 3: Computed integral quantities (a & b), and pressure coefficient distributions along the upper and lower centerlines (c & d). The only difference that can be seen is in (b), where OpenFOAM gives a slightly higher value at the end of the draft tube [3] Nilsson, Håkan. "Some experiences on the accuracy and parallel performance of OpenFOAM for CFD in water turbines." Applied Parallel Computing. State of the Art in Scientific Computing. Springer Berlin Heidelberg, 2007. 168-176. [4] Nilsson, H.: Evaluation of OpenFOAM for CFD of turbulent flow in water turbines. In: Proceedings of the 23rd IAHR Symposium in Yokohama (2006) [5] Lutz, Andrew E., et al. "OPPDIF: A Fortran program for computing opposed-flow diffusion flames." Sandia National Laboratories Report SAND96-8243 (1997).
references 5 Figure 4: Parallel performance using 1Gbit Ethernet (ETH) and Infiniband (IBA) interconnects. Packed vs. spread CPU distribution (the distribution of the processes on the nodes) Figure 5: Geometry of planar opposed flow flame