Full text
UPC CTTC Adaptive mesh refinement method for CFD applications Centre Tecnològic de Transferència de Calor Departament de Màquines i Motors Tèrmics Universitat Politècnica de Catalunya Oscar Luis Antepara Zambrano Doctoral Thesis
Adaptive mesh refinement method for CFD applications Oscar Luis Antepara Zambrano TESI DOCTORAL presentada al Departament de Màquines i Motors Tèrmics ESEIAAT Universitat Politècnica de Catalunya per a l’obtenció del grau de Doctor per la UPC Terrassa, December 12, 2018
Adaptive mesh refinement method for CFD applications Oscar Luis Antepara Zambrano Director de la tesi Dr. Assensi Oliva Llena Co-directors de la Tesi Dr. Guillem Colomer Rey Dr. Néstor Vinicio Balcázar Arciniega
To my parents and brother: Eduardo, Luisa and Andrés. Thanks for the support.
Acknowledgements I would like to acknowledge to Professor Assensi Oliva Llena for the opportunity and the advices during my time at the Centro Tecnológico de Transferencia de Calor (CTTC) at the Technical University of Catalonia (UPC). My sincere thanks to my advisors, colleagues and all the people that I have met during my Ph.D. time, that in one way or another have helped me during my stay. I would like to acknowledge to Professor Petros Koumoutsakos for accepting me to do a research stay about adaptivity methods in the CSE-LAB at ETH Zürich. Finally, I would also like to acknowledge the financial support in the form of a doctoral scholarship DI-14-06886 of the Ministerio de Economía y Competitividad and 2015DI-68 of the Secretaria d’ ´ Universitats i Recerca del Departament d’ ´ Economia i Coneixement de la Generalitat de Catalunya, Spain. i
viii Abstract This thesis focuses on the study of turbulent flows and two-phase flows using an AMR framework. The cases studied for LES of turbulent flows applications are the flow around one and two separated square cylinders, and the flow around a simplified car model. In this context, a physics-based refinement criterion is developed, consisting of the residual velocity calculated from a multi-scale decomposition of the instantaneous velocity. This criteria ensures grid adaptation following the main vortical structures and giving enough mesh resolution on the zones of interest, i.e., flow separation, turbulent wakes, and vortex shedding. Various quantities of interest were measured and compared with numerical and experimental references, showing the capability of this methodology in effectively cluster mesh elements where is needed and getting accurate numerical results. The cases studied for the two-phase flows are the DNS of 2D and 3D gravity-driven bubble on regular and complex domains, with a particular focus on the wobbling regime where their oscillatory paths require a vast computational domain, and the use of AMR is convenient. The numerical methodology is applied to a series of verification and validation test, which includes a comparative study of different interface capturing methods on the gravity-driven bubbles, a static drop test to measure the error induced by the surface tension model, and validations tests against experimental data. A study of rising bubbles in the wobbling regime and the effect of dimensionless numbers on the dynamic behavior of the bubbles are presented. The cases selected are in the range of mid-high Reynolds numbers, where bubble shapes, oscillation paths, and hairpin-like vortical structures are depicted to show the capability of our methodology to reproduce the main physical features in this regime. Moreover, the use of tetrahedral AMR is applied for the numerical simulation of gravity-driven bubbles in complex domains. On this topic, the methodology is validated on bubbles rising in cylindrical channels with different topology, where the study of these cases contributed to having new numerical research and physical insight in the development of a rising bubble with wall effects.
1 Introduction 1.1 Background and Motivation Computational fluid dynamics (CFD) has become important in the last decades as a tool to simulate fluid dynamics numerically. As the computational power increases rapidly over the years, the development of algorithms to join this growing development is of great interest to the research community. Diverse CFD codes have been developed for diverse applications as turbulent flows, multiphase flows, combustion or magnetohydrodynamics. Moreover, the users of these algorithms are coming from the research community, as well as, the industrial sector, to increase the physical understanding, improve industrial designs, or as a computational tool that can complement experimental studies. One limitation of this topic is the computational resources used to solve flow dynamics problems. As the physical phenomenon is getting more complicated to evaluate, the use of Large-Eddy Simulations (LES) or Direct Numerical Simulations (DNS) requires mid-large computational effort to accurate solve turbulent and twophase flows. Diverse solutions to this problem have arisen, like the improvement of the models, development of high-order schemes , or the use of mesh refinement techniques . In this thesis will focus the attention into the last one, where several techniques have been developed to reduce the computational resources used for numerical simulations by manipulating the mesh. On the refinement mesh techniques, adaptive mesh refinement algorithms (AMR) is the most well know method applied to partial differential equations [1,2]. AMR for hexahedral and tetrahedral elements have been developed for particular flow applications [3 – 8] . Hexahedral AMR is the most common algorithm because it is relatively easy to implement and has been widely used for turbulent and 1
2Chapter 1. Introduction multiphase flows. Different AMR approaches exist around the research community like the block-based [2] , and the cell-based algorithms [9] , which have shown good performance in particular and different applications. On this context, this thesis brings a hexahedral AMR that is coupled to a CFD unstructured code TermoFluids [10], where our AMR formulation works with turbulent flows, multiphase flows [11 – 17] or any CFD application, as far as, the numerical schemes developed for the physical governing equations follows a collocated unstructured finite-volume discretization [18 – 20] . Tetrahedral AMR has been recently an open research topic, more related to industrial applications, where complex geometries/designs lead to the use of unstructured grids to solve the governing equations [21] . The main issues arise, for the development of tetrahedral AMR, to avoid non-conforming elements, keep an acceptable mesh quality and be able to execute 3D unsteady numerical simulations. Taking into account these issues, this thesis looks for the development of a tetrahedral AMR for turbulent and two-phase flows using complex solid objects or complex boundaries/domains. Tetrahedral AMR follows a regular refinement and the numerical schemes given for the unstructured discretization of our CFD code allows the use of non-conformal elements [11 – 14,18 – 20,22,23]. Moreover, a geometrical criterion is followed to preserve the quality of the subdivided mesh elements [24] . AMR has been used mainly to solve partial differential equations, with applicability to many fields including computational fluid dynamics. On this topic, AMR for turbulent flows has been developed in the context of different discretization methods methods [8,25 – 27]. This thesis brings new numerical research on the application of AMR for LES of turbulent flow around bluff bodies, as well as, the introduction of a physicsbased criterion based on a variational multiscale decomposition of the instantaneous velocity, which can be applied to a wide range of turbulent flows problems. On the other hand, AMR for two-phase flows has been widely applied to different topics, i.e., bubbles, droplets, jets, free surface [28 – 32] . Most of the hexahedral AMR has been coupled with interfacial capturing methods for 2D and 3D problems. In this thesis, the AMR is coupled with a Conservative Level-Set for unstructured meshes that has been developed before in our research center by [11 – 14,22,23], to bring new numerical research in the gravity-driven bubbles area. Bubbles in the wobbling regime present path instabilities that need a large computational domain and enough grid resolution to get an accurate representation of the interface and the vortical structures that appear on the lower surface of the bubble. Moreover, the numerical simulation of wobbling bubbles at mid-high Reynolds number is still a challenging problem. Another application related to two-phase flows is the simulation of bubbles and droplets in complex domains and
1.2 Objectives of this thesis 3 channels. These numerical experiments are required on the designing of microchannels in the chemical and nano industry. Where, the use of unstructured grids is a way to approach this cases [6,7]. However, the use of extensive computational resources, when using unstructured grids, lead an opportunity to develop AMR methods for these applications. Here, a tetrahedral AMR for two-phase flows is introduced to solve gravitydriven bubbles in cylindrical domains, vertical and complex channels, to research the wall effect on the rising motion of a bubble. 1.2 Objectives of this thesis The development of adaptive mesh refinement algorithms is required for multi-scale simulations where different grid resolutions are needed according to the problem. Where in some areas a coarse or a fine mesh has to be defined and adapted to the flow features. This methodology leads to a reduction of the computational efforts and adds an automatic grid generation, which in most of the cases, is a bottleneck issue on computational fluid dynamics simulations. Considering the applications described in this thesis, which are turbulent and two-phase flows, the main objectives of this thesis are: • Development of an adaptive mesh refinement algorithm for the hexahedral and tetrahedral mesh to be used on collocated unstructured grids. The algorithm will work on a finite-volume CFD framework. • Establish proper refinement criteria for the different applications of this thesis, which in the case of LES of turbulent flows around bluff bodies, the mesh elements have to be clustered near the objects and flow separations, wakes, laminarturbulent transitions; or in the DNS of two-phase flows, the features of interest are the interface between fluids and vortical structures. • Show the capability of this methodology to solve 2D and 3D LES of turbulent flows around bluff bodies and DNS of two-phase flows. Moreover, the use of this formulation might allow the advance in the understanding on the physics of the flow separation and vortex generation on the flow around different objects; and the bubble dynamics in wobbling regime and the gravity-driven bubble in vertical/complex channels. As the proposed framework works in a high-performance environment due to the LES and DNS simulations of fluid dynamics, the resulting code also works on parallel
4Chapter 1. Introduction computers. Moreover, the use of hexahedral or tetrahedral AMR leads to simulate fluid dynamics applications on complex geometries/boundaries, which can be used in industrial cases as well. 1.3 Outline of the thesis This thesis is focused on the development of an adaptive mesh refinement for computational fluid dynamics applications using hexahedral and tetrahedral meshes. The main objective of using these algorithms is the reduction of computational resources, without losing accuracy, to solve highly demanding numerical simulations related to LES of turbulent flows and DNS of two-phase flows. The thesis is organized as follows. Chapter 2presents the governing equations and the numerical schemes to solve Navier-Stokes Equations for a single-phase fluid flow. For turbulent flows, the spatial discretization preserves symmetry properties of the differential operators and the time integration scheme follows an efficient self-adaptive strategy. A description of the LES model used in this thesis is presented, where a wall-adaptive local-eddy viscosity within a variational multiscale method is applied for the turbulent applications. In this chapter, the AMR algorithm for hexahedral meshes is introduced as well. The AMR algorithm is based in a quad/octree data structure to keep track of the refinement/coarsening process. An overview of the parallelization and load balance strategy is reported. For LES of turbulent flows, a refinement criterion is introduced to capture the main vortical structures for these cases. This criterion consists of the residual velocity calculated from a multiscale decomposition of the instantaneous velocity. The AMR methodology is tested for a series of verification an validation cases, which are the Rankine vortex and flow around one/two square cylinders. An additional test case for the 3D turbulent flow over a simplified car model can be found on the Appendix A. First and second order statistics are compared with numerical and experimental references from the literature to asses the accuracy and applicability of the algorithms. In Chapter 3, the use of AMR for hexahedral meshes for two-phase flows is presented. An unstructured conservative level-set method developed to keep track of the interface between fluids is combined with a variable density scheme to simulate incompressible two-phase flows, as introduced in [11,14,17,23]. Physical properties are smoothly varied along the interface to avoid numerical perturbations. In addition, a comparative analysis between different interfacial capture methods [11,13,14,17,23] with AMR for 2D and 3D gravity-driven bubbles can be found in Appendix C. The AMR algorithm is based in a quad/octree data structure to keep track of the refinement/coarsening
References 5 process. For DNS of two-phase flows, 2D and 3D gravity-driven bubbles are simulated. Different interface capturing methods has been tested, as well as, verification cases for the adaptivity in two-phase flows are presented. Moreover, a study of rising bubbles with path instabilities and the effect of the dimensionless numbers in the dynamic behavior in the wobbling regime is described. Chapter 4presents the research work related to DNS of two-phase flows using tetrahedral AMR framework. Tetrahedral AMR follows an octree data structure for the refinement/coarsening of the mesh elements. A geometric criterion is established for the regular refinement process to keep the mesh quality. In Appendix B, can be found a mesh multiplication algortihm based on the 8-subdivision procedure of different mesh elements and its application to CFD simulations. The tetrahedral AMR coupled with the unstructured conservative Level Set [11,14,17,23] is verified and validated with different numerical cases, as the rising bubbles in cylindrical domains, vertical channels, and complex channels, where wall effect on the rising bubbles is researched. The last Chapter is dedicated to the conclusions and further work. References [1] M.J. Berger. Adaptive mesh refinement for hyperbolic partial differential equations. Journal of Computational Physics, 53(3):484–512, 1984. [2] M.J. Berger and R.J. LeVeque. An adaptive cartesian mesh algorithm for the euler equations in arbitrary geometries. 9th Computational Fluid Dynamics Conference, AIAA, 1989. [3] S. Prudhomme and J.T. Oden. A posteriori error estimation and error control for finite element approximations of the time-dependent navier-stokes equations. Finite Elements in Analysis and Design, 33(4):247–262, 1999. [4] J. Hoffman. Computation of mean drag for bluff body problems using adaptive dns/les. SIAM Journal on Scientific Computing, 27(1):184–207, 2005. [5] S. Berrone and M. Marro. Space–time adaptive simulations for unsteady navier–stokes problems. Computers & Fluids, 38(6):1132–1144, 2009. [6] Zheng X., Lowengrub J., Anderson A., and Cristini V. Adaptive unstructured volume remeshing – ii: Application to two- and three-dimensional level-set simulations of multiphase flow. Journal of Computational Physics, 208(2):626–650, 2005.
6Chapter 1. Introduction [7] Anderson A., Zheng X., and Cristini V. Adaptive unstructured volume remeshing – i: The method. Journal of Computational Physics, 208(2):616–625, 2005. [8] Rossi R., Cotela J., Lafontaine N.M., Dadvand P., and Idelsohn S.R. Parallel adaptive mesh refinement for incompressible flow problems. Computers & Fluids, 80:342–355, 2013. [9] K.G. Powell, P. L. Roe, and J. Quirk. Adaptive-mesh algorithms for computational fluid dynamics. In M. Y. Hussaini, A. Kumar, and M. D. Salas, editors, Algorithmic Trends in Computational Fluid Dynamics, 53:303–337, 1993. [10] Termo Fluids S.L. . http://www.termofluids.com/. [11] N. Balcázar, L. Jofre, O. Lehmkhul, J. Castro, and J. Rigola. A finite-volume/levelset method for simulating two-phase flows on unstructured grids. International Journal of Multiphase Flow, 64:55–72, 2014. [12] N. Balcázar, O. Lemhkuhl, J. Rigola, and A. Oliva. A multiple marker level-set method for simulation of deformable fluid particles. International Journal of Multiphase Flow, 74:125–142, 2015. [13] N. Balcázar, O. Lemhkuhl, L. Jofre, J. Rigola, and A. Oliva. A coupled volume-of- fluid/level-set method for simulation of two-phase flows on unstructured meshes. Computers & Fluids, 124:12–29, 2016. [14] N. Balcázar, J. Rigola, J. Castro, and A. Oliva. A level-set model for thermocapillary motion of deformable fluid particles. International Journal of Heat and Fluid Flow, 62, Part B:324–343, 2016. [15] N. Balcázar, O. Lehmkuhl, J. Castro, and A. Oliva. Dns of the rising motion of a swarm of bubbles in a confined vertical channel. In: Grigoriadis D., Geurts B., Kuerten H., Fröhlich J., Armenio V. (eds) Direct and Large-Eddy Simulation X. ERCOFTAC Series, 24, 2018. [16] N. Balcázar, J. Castro, J. Chiva, and A. Oliva. Dns of falling droplets in a vertical channel. International journal of computational methods and experimental measurements, 24:398–410, 2018. [17] N. Balcázar. Numerical simulation of multiphase-flows: Level-set techniques. Ph.D. Thesis, 2014.
References 7 [18] I. Rodríguez, R. Borrell, O. Lehmkuhl, C.D. Perez-Segarra, and A. Oliva. Direct numerical simulation of the flow over a sphere at re = 3700. Journal of Fluid Mechanics, 679:263–287, 2011. [19] O. Lehmkuhl, I. Rodríguez, R. Borrell, and A. Oliva. Low-frequency unsteadiness in the vortex formation region of a circular cylinder. Physics of Fluids, 25, 2013. [20] L. Jofre, O. Lehmkuhl, J. Ventosa, F. X. Trias, and A. Oliva. Conservation properties of unstructured finite-volume mesh schemes for the navier-stokes equations. Numerical Heat Transfer, Part B: Fundamentals, 65(1):53–79, 2013. [21] Park M., Krakos J., Michal T., Loseille A., and Alonso J. Unstructured grid adaptation: status, potential impacts, and recommended investments toward cfd vision 2030. 2016. [22] N. Balcázar, O. Lemhkuhl, L. Jofre, and A. Oliva. Level-set simulations of buoyancydriven motion of single and multiple bubbles. International Journal of Heat and Fluid Flow, 56:91–107, 2015. [23] N. Balcázar, J. Castro, J. Rigola, and A. Oliva. Dns of the wall effect on the motion of bubble swarms. Procedia Computer Science, 108C:2008–2017, 2017. [24] A. Liu and B. Joe. Quality local refinement of tetrahedral meshes based on 8- subtetrahedron subdivision. Mathematics of Computation, 65(215):1183–1200, 1996. [25] J.P.P. Magalhaes, D.M.S. Albuquerque, J.M.C. Pereira, and J.C.F. Pereira. Adaptive mesh finite-volume calculation of 2d lid-cavity corner vortices. Journal of Computational Physics, 243:365–381, 2013. [26] M. Dumbser, O. Zanotti, A. Hidalgo, and D. Balsara. Ader-weno finite volume schemes with space–time adaptive mesh refinement. Journal of Computational Physics, 248:257–286, 2013. [27] S.J. Kamkar, A.M. Wissink, V. Sankaran, and A. Jameson. Feature-driven cartesian adaptive mesh refinement for vortex-dominated flows. Journal of Computational Physics, 230(16):6271–6298, 2011. [28] M. Sussman, A.S. Almgren, J.B. Bell, P. Colella, L.H. Howell, and M.L. Welcome. An adaptive level set approach for incompressible two-phase flows. Journal of Computational Physics, 148:81–124, 1999.
8Chapter 1. Introduction [29] S. Popinet. Gerris a tree-based adaptive solver for the incompressible euler equations in complex geometries. Journal of Computational Physics, 190:572–600, 2003. [30] H.D. Ceniceros, R.L. Nos, and A.M. Roma. Three-dimensional, fully adaptive simulations of phase-field fluid models. Journal of Computational Physics, 229:6135– 6155, 2010. [31] M.R. Pivello, M.M. Villar, R. Serfaty, A.M. Roma, and A. Silveira-Neto. A fully adaptive front tracking method for the simulation of two phase flows. International Journal of Multiphase Flow, 58:72–82, 2014. [32] J.S. Hua, P. Lin, and J.F. Stene. Numerical simulation of gas bubbles rising in viscous liquids at high reynolds number. Moving Interface Problems and Applications in Fluid Dynamics, Contemporary Mathematics, 466:17–34, 2008.
2 Parallel adaptive mesh refinement for large-eddy simulations of turbulent flows Main contents of this chapter have been published in: O. Antepara, O. Lehmkhul, R. Borrell, J. Chiva, and A. Oliva. Parallel adaptive mesh refinement for large-eddy simulations of turbulent flows. Computers & Fluids, 110:48–61, 2015. Abstract. In this chapter a parallel adaptive mesh refinement (AMR) strategy for large eddy simulations (LES) of turbulent flows is presented. The underlying discretization of the Navier- Stokes equations is based on a finite-volume symmetry-preserving formulation, with the aim of preserving the symmetry properties of the continuous differential operators and ensure both, stability and conservation of kinetic-energy balance. The conservation properties are tested for the meshes resulting from the AMR process, which typically contain transitions between zones with different level of refinement. Our AMR scheme applies a cell-based refinement technique, with a physics-based refinement criteria based on the variational multi-scale (VMS) decomposition theory. The overall AMR process, from the selection of the cells to be refined/coarsened till the pre-processing of the resulting mesh, has been implemented in a parallel code, for which the parallel performance has been attested on an AMD Opteron based supercomputer. Finally, the robustness and accuracy of our methodology is shown on the numerical simulation of the turbulent flow around a square cylinder at Re = 22000 and the turbulent flow around two side-by-side square cylinders at Re = 21000. 9
16 Chapter 2. Parallel adaptive mesh refinement for large-eddy simulations of turbulent flows Note that, in the geometric and algebraic parallel operations, each parallel process may need elements owned by others. Therefore, a copy of the required elements, owned by other processors is attached. Those copies of external elements attached to each subdomain are referred as its halo. Its important to remark that any element of a halo is a copy, meaning that the original element is owned by another parallel process. Thus, if the original element changes in the owner parallel process, the copy stored in the halo must be updated before using it. Otherwise, the results of the sequential and parallel executions would differ. Any mesh element is uniquely determined by its local identifier (lid), which refers to its position in a local storing container. However, the lid only identifies the element locally, i.e. different elements owned by different parallel processes may have the same lid. In order to globally determine each element, we use global identifiers (gid). For each mesh element type, a topology object is created that contains the information of its corresponding local/global identifiers, that defines the domain decomposition (owned/halo elements) and, also the communication scheme required to update the halos. 2.3.3 Algorithm description Writing a parallel AMR code for scientific computations is a laborious work. The overall AMR process, from the selection of the cells to be refined or coarsened, till the pre-processing of the resulting mesh, has been implemented in parallel, based on the standard domain decomposition (DD) method. The major aspects regarding the parallelization, are the definition of a global order (i.e. the gids) for the discrete elements of the new mesh, and the operations performed to keep coherence on the subdomains borders. The AMR algorithm inputs are the old mesh, i.e., the mesh being adapted, a list of global identifiers of cells and its corresponding level of refinement and, a tree data structure that keeps track of the cells decomposition, see Fig. 2.2. The algorithm output is a new adapted mesh gathered into an unique data file from the submeshes generated by the different parallel processes, see Fig. 2.3. Parallel IO operations are performed by means of the HDF5 library [34]. Finally, the new mesh partitioning is done with ParMETIS library, to achieve load-balance. This leads to a new partitioned mesh, that will be used for the next simulation step, see Fig. 2.4. The intermediate solutions are transmitted to the new mesh by means of interpolations based on the tree data structure. For the refinement process each solution data of
2.3 Adaptive Mesh Refinement 17 Figure 2.2: AMR mesh showing various levels of refinement and its corresponding quadtree data structure. Figure 2.3: Schematic figure for the inputs/outputs of the algorithm
18 Chapter 2. Parallel adaptive mesh refinement for large-eddy simulations of turbulent flows Figure 2.4: Parallel partitioning, among 32 processors, for different meshes in the solution of a square cylinder problem. The dark lines indicate partition boundaries. the parent cell is set to its child cells, and for the coarsening process an average solution is given from the child cells to its corresponding parent cell. A description of the code is presented in Algorithm 1, divided in four main steps. Algorithm 1 • Step1 (S1). Read the old mesh and prepare the cells to be refined/coarsened. In this step, each processor uploads the old mesh from a data file and reads the list of cells with its corresponding level of refinement. If this level match with the cell level stored in the data file, the cells is not modified. However, if the level is higher, the cells will be refined. Differently than the refinement process, the coarsening is performed automatically (without requiring input data). The list of cells to be coarsened consist on the cells with level higher than 0 which are not in the input list of cells and neither are their neighbor cells. These operations are carried out according to the tree data structure. Moreover, communications are held between neighboring subdomains to ensure that the resolution between neighbor cells only changes by a factor of two.
2.3 Adaptive Mesh Refinement 19 • Step2 (S2). Create a new mesh with the cells that are not modified. A mesh object is created with the elements that are not going to be refined/coarsened. A new index ordering is established for each processor, where collective communications are held in order to create an unique global index for each element. Storing containers are used to save the geometric information of the elements, meanwhile the information regarding the neighboring relations between elements is filled during the storing process. Communications are necessary to share the new global indexes of the elements on the boundary of the subdomains in order to complete the definition neighboring relations. • Step3 (S3). Create the new mesh elements and determine its corresponding global indexes. With the list of cells to be refined/coarsened, each processor will create the new vertices, cells and faces using the information of the old mesh and the tree data structure. In the case of the refinement process, new vertex are created by averaging the adjacent vertices coordinates of the parent cell. Then, the rest of the elements corresponding to the four/eight new cells are created. For the coarsening process, a new cell is created with all its corresponding elements. Finally, an index ordering is established for the new elements, taking into account the already existing elements from the Step 2. Collective communications are also required for this task. The new geometric elements created on the boundary of the subdomains need to be shared between parallel processes in order to ensure coherence and to complete the definition the neighboring relations • Step4 (S4). Create a data file with the new mesh. Finally, all processors are synchronized and the data is gathered to create a HDF5 data file that contains the information of the new mesh that is used in the next step of the solution procedure. The creation of the HDF5 data file consist in two steps: first, collective communications are held in order to determine the global size of the data to be written. Second, each parallel process writes its respective information in a specific position determined by the global index of the elements. Hyperslab HDF5 functionalities are used in order to optimize this process. 2.3.4 Parallel Performance The strong speed up of the AMR algorithm has been assessed for an initial Cartesian mesh of 1.1 million cells of which 1% are refined. In order to discard imbalance effects, the cells to be refined are homogeneously distributed throughout the domain. This test
20 Chapter 2. Parallel adaptive mesh refinement for large-eddy simulations of turbulent flows has been performed in an AMD Opteron based cluster (AMD Opteron 6272, 16-core processors at 2.1 GHz, 64 GB RAM linked with the infiniband QDR 4X network and a DDN S2A9900 with 80 disks of 1 Tb, obtaining a storage capacity of 64 Tb and writing at 2.6 Gbytes/s with a parallel file system called Lustre), engaging up to 256 CPU-cores. The relative weight as the number of CPU-cores grows, is shown in Table 2.1, for each of the four steps of Algorithm 1. Step 4, the creation of the final mesh file, is the part of the algorithm that further increases its cost, therefore, it becomes the main limitation for the speedup. The creation of this mesh file is managed by means of the HDF5 library, unfortunately, it does not provide good parallel performance on the writing operation. Contrary, the reading operation, performed in Step 1 with the same library, scales properly. Table 2.1: Relative weight (%) of each of the four steps of Algorithm 1 for different number of CPU-cores. Number of CPU 32 64 128 256 Step 1 37.9 32.5 25.3 21.7 Step 2 18.8 15.6 13.0 12.5 Step 3 23.3 18.8 13.5 9.9 Step 4 20.0 33.1 48.2 55.9 In Figure 2.5, is shown the strong speedup for both, the overall algorithm and also the algorithm obtained by discarding IO operations; i.e the original part of it. The parallel efficiency is clearly penalized by the IO operations. With 256 CPU-cores it reaches up to 90% for the rest of the code, but decreases down to 50% when the IO operations are included. Further work needs to be performed in order to extend the scalability to higher number of CPU-cores. 2.3.5 Conservation tests In order to analyze the conservation properties for the proposed adaptive mesh refinement method, a Rankine vortex problem is chosen as test case. The Rankine vortex model is given by the combination of a rigid-body rotation within a core, a decay of angular velocity outside and zero mass flux at the boundaries. The tangential velocity, uθ, of a Rankine vortex with circulation, Γ, and radius, R, is given by
2.3 Adaptive Mesh Refinement 21 0 2 4 6 8 32 64 128 256 Strong speed-up Number of CPU Ideal AMR AMR without IO Figure 2.5: Strong speedup of the AMR algorithm with and without IO operations. uθ(r)= Γr/2πR2rÉR, Γ/2πr r >R.(2.8) In particular, the Rankine vortex solved in this section is placed in the center of a 3-D domain (1.0 x 1.0 x h), the initial tangential velocity reaches a maximum of 0.16 m / s at radius R= 0.01 m , and circulation equals Γ= 0.032 πm2 / s . The density and viscosity of the fluid are ρ= 1.0 kg / m3 and ν= 0.01 m2 / s , respectively. The domain is an adaptive mesh, with a refined area in the middle with 3 levels of refinement (Fig. 2.6), where the refinement criteria is based on the vorticity field. All boundaries are slip walls. Since there is no flow across the domain boundaries, if any difference exists between physical dissipation and the rate of change of total kinetic energy, it is due to the pressure error term, that arises from the special definition for the normal face velocity needed to exactly conserve mass in the collocated scheme [28,29,35]. For this test, a second-order spectro-consistent schemes on a collocated unstructured grid arrangement in a finite volume context was used. The difference between rate of change of total kinetic energy, dk / dt =d ( 1 2u·u )/ dt , and physical dissipation, −νω·ω ,
22 Chapter 2. Parallel adaptive mesh refinement for large-eddy simulations of turbulent flows Figure 2.6: Illustration of the computational domain with 3 levels of refinement. for an adaptive mesh was calculated at every time step using Eq. 2.9, and is compared with an uniform mesh with 6.4·103cells. Results are plotted in Figure 2.7. X c∈Ω d(1 2uc·uc) dt Vc+X f∈F(∂Ω) 1 2ua·(2φf−φa)ˆ UfAf=−1 ρX f∈F(∂Ω) pfˆ UfAf −δt ρ2X c∈Ω pcX f∈F(c) 1 2"1 VcX f∈F(c) pfˆ nfAf+1 Vnb X f∈F(nb) pfˆ nfAf#·ˆ nfAf +δt ρ2X c∈Ω pcX f∈F(c)·(pnb −pc)Af δdf¸+νX c∈Ω uc·X f∈F(c) (unb −uc)Af δdf (2.9) Results show a slightly perturbation when the mesh changes due to symmetry inconsistencies on the operators in the time integration. Thus, conservation is affected and dissipation is generated, but this phenomena is imperceptible for the global simulation as can be seen in Figure 7. Moreover, results show that the collocated scheme presents a decreasing difference of order 10−9for both uniform and AMR mesh. However, it is important to notice that the kinetic energy error does not have a significant impact on the physics of the problem, because of the mesh size and time steps are small enough when direct numerical simulation (DNS) or large-eddy simulation (LES) are used to solve turbulent problems. This have been shown by Rodríguez et al. and Lehmkuhl el al. [15,27,31], which solve turbulent flows using the collocated scheme
2.3 Adaptive Mesh Refinement 23 Figure 2.7: Difference between kinetic energy rate of change and physical dissipation using collocated scheme versus time with ν= 0 . 01 (left)Entire simulation (right) Zoom in when the mesh has changed.
24 Chapter 2. Parallel adaptive mesh refinement for large-eddy simulations of turbulent flows by means of DNS and LES techniques. 2.3.6 Refinement criteria Physics-based mesh adaptivity requires criteria to establish measures that will indicate the refinement/coarsening process of the mesh. As mentioned earlier, we adopt in this work a mesh adaptivity criteria based on our physical understanding of the flow to identify the critical regions of the problem. For turbulent flows around bluff bodies considered here, measure of the residual velocity was calculated using the VMS scale separation theory, to focus on small scales range from the solution of the Navier-Stokes equations, and can be defined as: u0=u−u(2.10) where u0 is the residual velocity, u is the instantaneous velocity and u is the filtered velocity. In the present work to calculate the filtered velocity, we used a non-uniform Laplace filter based on a Gaussian filter that are normalized, conservative and also selfadjoint [26]. Thereby can be calculated on a general unstructured grid. The measure presented here is defined as: φc= ku0k(2.11) where φc∈Rm is the residual velocity magnitude (here m applies for the total number of control volumes (CV) of the discretized domain). To identify the cells to be refined and coarsened, a global maximum value of the criteria is established. φmaxno=max[φc] (2.12) Moreover, the global maximum value is averaged in time to keep a smooth adaptation effect. φmaxn=[φmaxn(t)+φmaxno(∆t)] 1 t+∆t(2.13)
2.3 Adaptive Mesh Refinement 25 Then, an average value is calculated with the cell values above 10% of the global maximum value to avoid the cells where the residual velocity is near to zero. φavgn= m X 0 f(φc)·φc m X 0 f(φc) (2.14) where, f(φc) is given by, f(φc)= 1φcÊ0.1(φmaxn), 0φc<0.1(φmaxn).(2.15) Therefore, the threshold can be defined as ²c=φavgn φc (2.16) With this parameter, the cells to be refined are those with ²cÊ 2. Based on our experience, a more conservative approach for the coarsen process was adopted, for which the coarsening limit to the cells with ²c< 2 and those who are not neighbors with the cells marked to be refined. In Figure 2.8, an example of the use of this criteria for the square cylinder problem at Re=22000 is shown. Most of the vortical structures are captured in refined cells whether near the object and in the wake region. Other measures can be considered, i.e. the vorticity field. But, as can be seen in Figure 2.9, the results are not very promising because this field is flow-dependent, therefore there are important zones that are not refined even if a vortical structure is present. Moreover, the use of this field requires continual tuning depending on the flow problem, as studied by S.J. Kamkar [11] The residual velocity criteria presents a better behavior and the threshold can be established in a general way to resolve basic turbulent problems without user intervention of the refinement process. This criteria, with the parameters established in this section, has been applied in other turbulent problems, using an immersed boundary technique, like the flow over a circular cylinder at Re=3900 and the flow past a NACA 0012 at Reynolds number Re =5·105with a low angle-of-attack AOA =5o. The criteria has worked well for both problems where the flow over a circular cylinder exhibits a transition to turbulence in separated shear layers, and interactions
32 Chapter 2. Parallel adaptive mesh refinement for large-eddy simulations of turbulent flows 1e-05 0.0001 0.001 0.01 0.1 1 10 100 0.001 0.01 0.1 1 10 100 φ f f = 0.133 Figure 2.15: Power spectral density graph shows a peak at f=0.133 cross-streamwise velocity profile and its fluctuations are plotted at different locations near the cylinder (at x/D = -0.5, x/D = -0.25, x/D = 0.5, x/D = 1.5 and x/D = 3, Figure 2.16 and 2.17). For comparison the experimental results from Lyn, D.A. et al. [18,19] are also included. As can be seen, the AMR-LES results present good agreement with the experimental data. The first-order statistics are quite well predicted near the body and in the wake region. But, slightly differences can be observed at the velocity fluctuations near the body, therefore a finest grid is required for a better prediction. It is also interesting to observe some minor discrepancies in the wake region (x/D = 1.5), whereas the transition takes place in the separate shear layers on the side of the cylinder.
2.4 Numerical results of turbulent flows using AMR-LES 33 Figure 2.16: Comparison with experimental data. (up) Average streamwise velocity (down) Root mean square streamwise velocity fluctuations
34 Chapter 2. Parallel adaptive mesh refinement for large-eddy simulations of turbulent flows Figure 2.17: Comparison with experimental data. (up) Average cross-streamwise velocity (down) Root mean square cross-streamwise velocity fluctuations
2.4 Numerical results of turbulent flows using AMR-LES 35 These good results can be attributed to the use of a conservative discretization of the convective and diffusive operators, as they preserve the kinetic energy balance. It should be pointed out that the refinement criteria presented here, shows a good behavior following the small vortical structures, given the spatial resolution needed to achieve better numerical results for the LES model. It also can be noticed that the impact on the results of the dynamic procedure within the VMS-LES approach is rather small, and it is attributed to separation of the scales, where the turbulent viscosity modeling is acting directly only on the resolved small scales. With this strategy, SGS viscosity is only introduced in the unresolved small scales improving the behavior of the LES model. 2.4.2 Flow around two side-by-side square cylinders at Re=21000 Numerical simulations of the flow around two side-by-side square cylinders at Reynolds number Re = 21000 [23,24] (Reynolds number is defined in terms of the free-stream velocity Uref and and the square length L) and g*=g/L=6 (gap ratio is defined as g*=g/L, where g represents the spacing between the square cylinder surfaces) have been carried out. Solutions are obtained in a computational domain of dimensions 41L x 28L x 4L where the first square cylinder is located at x = 10, y = 10, and the second square cylinder is located at x = 10, y = 17 (see Fig. 2.18). All coordinates are referred to body axes unless remarked. The x axis is stream-wise, y is the cross-wise and z is span-wise direction. The boundary conditions at the inflow consist of a uniform velocity (u,v,w)=(1,0,0). At the outflow boundary, a pressure-based condition is imposed. No-slip conditions on the square surfaces are prescribed. Periodic boundary conditions are used in the spanwise direction. The characteristics for the adaptive method are the same used for the single square cylinder mentioned in the last section. At the end of the simulation the total mesh has around (2.06MCVs) and 16 planes, for the periodic direction, have been also considered for this simulation. In Figure 2.19, a detail of the mesh of the plane in the region of the square cylinders is depicted. As can be seen, control volumes have been clustered near the cylinders surfaces, as well as in the wake region. LES computation have been performed with the VMS-WALE model, and the results show that the Strouhal number obtained is 13.3, which is in good agreement with the value measured in experiments and numerical studies. As can be seen, the flow structure behind each square cylinder is independent. There are not close interactions between the shear layers and the flow separation that occurs near the surfaces of the cylinders,
36 Chapter 2. Parallel adaptive mesh refinement for large-eddy simulations of turbulent flows Figure 2.18: Computational domain for turbulent flow around two side-by-side square cylinders at Re=21000 Figure 2.19: Illustration LES of turbulent flow around two side-by-side square cylinders (left)Vorticity structures (right) computational grid.
2.5 Concluding remarks 37 Table 2.3: Time-averaged flow parameters for flow around two side-by-side square cylinders at Re=21000, where 1 identifies the upper cylinder and 2 the lower cylinder. Cd1mean Cl1mean Cd2mean Cl2mean St Present work 2.001 -0.085 2.056 0.069 0.13 Mirzaei (Num) [24] 2.117 -0.075 2.117 -0.075 0.13 Yen (Exp) [23] 2.08 - 2.08 - 0.13 thus the vortex shedding frequency is similar to the result for the singular square cylinder. A complete comparison of aerodynamic coefficients against experimental and numerical data [23,24] is depicted in Table 2.3. A good agreement between the calculated results and the experimental/numerical data has been achieved for this gap. It should be noted, that the flow structure exhibits anti-phase vortex shedding [23,24], where two distinct vortex streets separate from the cylinders and vortices can stably proceeds to the far downstream wake zone, see Figure 2.19. It also can be noticed, that the refinement criteria and the adaptive parameters used for the single square cylinder have been used for the two side-by-side square cylinders, where most of the flow features were captured and control volumes were clustered in the regions where the grid must be dense enough to capture all the flow scales. 2.5 Concluding remarks A parallel adaptive mesh refinement algorithm has been presented. It has been developed to optimize the LES simulation of turbulent flows. The underlying discretization of the Navier-Stokes equations has been arranged by means of a non dissipative symmetry preserving method. And a new refinement criteria tightly coupled with the LES model has been developed. The work presented is focused on three main aspects. First of all we assessed the conservation properties of the discretization for the meshes resulting from the AMR process, characterized by the transitions between zones with different level of refinement. Tests performed for a Rankine vortex problem, show an almost negligible kinetic energy error without any noticeable impact on the physics of the problem. Secondly, a new mesh adaptivity criterion has been developed. It is based on the VMS scales separation theory, which allows to better discriminate the unresolved scales of motion. This methodology, has been successfully tested for different bluff body problems without particular tuning for any of them.
38 Chapter 2. Parallel adaptive mesh refinement for large-eddy simulations of turbulent flows Third, the overall AMR algorithm has been developed to be executed in parallel. In particular, the algorithm shows a good strong speedup with up to 256 CPU-cores, on the refinement of an homogeneously distributed group of cells of a Cartesian mesh. We have assessed that the principal limitation for the parallel performance are the IO operations. The speedup of the rest of the algorithm reaches 90% on 256 CPU-cores. Further work needs to be done in order to extend the parallelization to larger numbers of CPU-cores. Finally, the AMR-LES method has been applied on the simulation of the turbulent flow around a square cylinder at Re = 22000 and turbulent flow around two side-by- side square cylinders at Re=21000. Main features of the flow (flow separation, vortex shedding, turbulent wake, etc) were successfully captured. Numerical results are in good agreement with previous references demonstrating the robustness of the presented approach. References [1] M.J. Berger. Adaptive mesh refinement for hyperbolic partial differential equations. Journal of Computational Physics, 53(3):484–512, 1984. [2] M.J. Berger and R.J. LeVeque. An adaptive cartesian mesh algorithm for the euler equations in arbitrary geometries. 9th Computational Fluid Dynamics Conference, AIAA, 1989. [3] K.G. Powell, P. L. Roe, and J. Quirk. Adaptive-mesh algorithms for computational fluid dynamics. In M. Y. Hussaini, A. Kumar, and M. D. Salas, editors, Algorithmic Trends in Computational Fluid Dynamics, 53:303–337, 1993. [4] S. Prudhomme and J.T. Oden. A posteriori error estimation and error control for finite element approximations of the time-dependent navier-stokes equations. Finite Elements in Analysis and Design, 33(4):247–262, 1999. [5] J. Hoffman. Computation of mean drag for bluff body problems using adaptive dns/les. SIAM Journal on Scientific Computing, 27(1):184–207, 2005. [6] J. Hoffman and C. Johnson. Stability of the dual navier–stokes equations and efficient computation of mean output in turbulent flow using adaptive dns/les. Computer Methods in Applied Mechanics and Engineering, 195(13):1709–1721, 2006.
References 39 [7] S. Berrone and M. Marro. Space–time adaptive simulations for unsteady navier–stokes problems. Computers & Fluids, 38(6):1132–1144, 2009. [8] J.P.P. Magalhaes, D.M.S. Albuquerque, J.M.C. Pereira, and J.C.F. Pereira. Adaptive mesh finite-volume calculation of 2d lid-cavity corner vortices. Journal of Computational Physics, 243:365–381, 2013. [9] C.P.T. Gao X., and Groth. A parallel solution – adaptive method for threedimensional turbulent non-premixed combusting flows. Journal of Computational Physics, 229(9):3250 – 3275, 2010. [10] M. Dumbser, O. Zanotti, A. Hidalgo, and D. Balsara. Ader-weno finite volume schemes with space–time adaptive mesh refinement. Journal of Computational Physics, 248:257–286, 2013. [11] S.J. Kamkar, A.M. Wissink, V. Sankaran, and A. Jameson. Feature-driven cartesian adaptive mesh refinement for vortex-dominated flows. Journal of Computational Physics, 230(16):6271–6298, 2011. [12] Termo Fluids S.L. . http://www.termofluids.com/. [13] R.W.C.P. Verstappen and A.E.P. Veldman. Symmetry-preserving discretization of turbulent flow. Journal of Computational Physics, 187(1):343–368, 2003. [14] O. Lehmkuhl, I. Rodríguez, R. Borrell, and A. Oliva. Low-frequency unsteadiness in the vortex formation region of a circular cylinder. Physics of Fluids, 25, 2013. [15] I. Rodríguez, R. Borrell, O. Lehmkuhl, C.D. Perez-Segarra, and A. Oliva. Direct numerical simulation of the flow over a sphere at re = 3700. Journal of Fluid Mechanics, 679:263–287, 2011. [16] F. Nicoud and F. Ducros. Subgrid-scale stress modeling based on the square of the velocity gradient tensor. Flow, Turbulence and Combustion, 62:183–200, 1999. [17] T.J.R. Hughes, L. Mazzei, and K.E. Jansen. Large eddy simulation and the variational multiscale method. Computing and Visualization in Science, 3:47–59, 2000. [18] D.A. Lyn, S. Einav, W. Rodi, and J.H. Park. A laser-doppler velocimetry study of ensemble-averaged characteristics of the turbulent near wake of a square cylinder. Journal of Fluid Mechanics, 304:285–319, 1995.
40 Chapter 2. Parallel adaptive mesh refinement for large-eddy simulations of turbulent flows [19] D.A. Lyn and W Rodi. The flapping shear layer formed by flow separation from the forward corner of a square cylinder. Journal of Fluid Mechanics, 267:353–376, 1994. [20] A. Sohankar and L. Davidson. Large eddy simulation of flow past a square cylinder: Comparison of different subgrid scale models. Journal of Fluids Engineering, 122:39–47, 1999. [21] R.W.C.P. Verstappen and A.E.P. Veldman. Fourth-order dns of flow past a square cylinder: First results. Direct and Large-Eddy Simulation II ERCOFTAC Series, 5:381–384, 1997. [22] S.C. Luo, Md.G. Yazdani, Y.T. Chew, and T.S. Lee. Effects of incidence and afterbody shape on flow past bluffy cylinders. Journal of Wind Engineering and Industrial Aerodynamics, 53(3):375–399, 1994. [23] S.C. Yen and J.H. Liu. Wake flow behind two side-by-side square cylinders. International Journal of Heat and Fluid Flow, 32(1):41–51, 2011. [24] M. Mirzaei and A. Sohankar. Numerical study of convective heat transfer and fluid flow around two side by side square cylinders using k−w−v2−f turbulence model. Heat Mass Transfer, 49:1755–1769, 2013. [25] P. Sagaut. Large eddy simulation for incompressible flows. 2006. [26] A.W. Vreman. The adjoint filter operator in large-eddy simulation of turbulent flow. Physics of Fluids, 16(6), 2004. [27] O. Lehmkuhl, I. Rodríguez, A. Baez, A. Oliva, and C.D. Perez-Segarra. On the large eddy simulations for the flow around aerodynamic profiles using unstructured grids. Computers & Fluids, 84:176–189, 2013. [28] L. Jofre, O. Lehmkuhl, J. Ventosa, F. X. Trias, and A. Oliva. Conservation properties of unstructured finite-volume mesh schemes for the navier-stokes equations. Numerical Heat Transfer, Part B: Fundamentals, 65(1):53–79, 2013. [29] F.X. Trias, O. Lehmkuhl, A. Oliva, C.D. Perez-Segarra, and R.W.C.P. Verstappen. Symmetry-preserving discretization of navier stokes equations on collocated unstructured grids. Journal of Computational Physics, 258:246–267, 2014.
References 41 [30] F.X. Trias and O. Lehmkuhl. A self-adaptive strategy for the time integration of navier-stokes equations. Numerical Heat Transfer, Part B: Fundamentals, 60(2):116–134, 2011. [31] I. Rodríguez, O. Lehmkuhl, R. Borrell, and A. Oliva. Flow dynamics in the wake of a sphere at sub-critical reynolds numbers. Computers & Fluids, 80:233–243, 2013. [32] R. Borrell, O. Lehmkuhl, F.X. Trias, and A. Oliva. Parallel direct poisson solver for discretisations with one fourier diagonalisable direction. Journal of Computational Physics, 230(12):4723–4741, 2011. [33] G. Karypis, K. Schloegel, and V. Kumar. Parmetis, parallel graph partitioning and sparse matrix ordering library. 1998. [34] The HDF Group. Hierarchical data format version 5. http://www.hdfgroup.org/ HDF5. [35] F.N. Felten and T.S. Lund. Kinetic energy conservation issues associated with the collocated mesh scheme for incompressible flow. Journal of Computational Physics, 215(2):465–484, 2006.
48 Chapter 3. Parallel adaptive mesh refinement for two-phase flows The reader is referred to [10,15] for further details on the implementation of the conservative level-set method used in this work. 3.2.3 Surface tension and regularization of fluid properties Implementing surface tension in a numerical method involves two issues: the curvature κ needs to be determined and the pressure jump should be applied appropriately to the fluids. These problems are addressed in the context of the continuous surface force model (CSF) introduced by [43]. Thus, the term, σκnδΓ, is converted to a volume force as follows: σκnδΓ=σκ(φ)∇φ,(3.8) where κ(φ) and nare given by n=∇φ ||∇φ||,(3.9) κ(φ)=−∇·n.(3.10) Following the work of [10], ∇φ is computed using the least-squares method with the information of the neighbor cells around the vertices of the current cell. In addition, the fluid properties are regularized using the level-set function. Therefore, density and viscosity fields are calculated as follows: ρ=ρ1φ+ρ2(1−φ) (3.11) µ=µ1φ+µ2(1−φ). 3.2.4 Numerical methods The governing equations have been discretized using a finite-volume(FV) approach on a collocated unstructured grid arrangement according to [10], which automatically adapts to the AMR framework. Convective terms are discretized using a Total Variation Diminishing (TVD) Superbee flux limiter scheme (see [10]), to avoid numerical oscillations at the discontinuities, and minimize numerical diffusion (comparison between different convective schemes in rising bubble cases is presented in Section 3.3.1). Diffusive terms are discretized employing a central difference scheme. Gradients are computed at cell centroids using the least-squares method, and a distance-weighted linear interpolation is used to calculate the values of physical properties, gradients and interface normals at the cell faces (see [10]), unless otherwise stated. A central difference scheme is employed
3.2 Governing equations and numerical methods 49 to discretize both compressive and diffusive terms of the re-initialization Eq. 3.7. A standard fractional step projection method is used for solving the pressure-velocity coupling (see [15,45]): ρv∗−ρnvn ∆t=An+Dn+ρg+σκ∇h(φ),(3.12) v=v∗− ∆t ρ∇h(p),(3.13) where super-index n denotes the previous time step, A= −∇h· ( ρvv ), and D= ∇h· ( µ (( ∇hv ) + ( ∇hv ) T )) are explicitly evaluated, ( ∇hv ) T is calculated by a vertex-node based least-squares method (see [10]). Combining the incompressible constraint with Eq. 3.13, a Poisson equation for the pressure field is obtained, which is solved by means of a preconditioned conjugated gradient method: ∇h·µ1 ρ∇h(p)¶=1 ∆t∇h·¡v∗¢,e∂Ω·∇hp|∂Ω=0.(3.14) In order to fulfill the incompressible constraint (Eq. 3.2), and to avoid pressure-velocity decoupling when the pressure projection is made on collocated meshes (see [46]), a cell face velocity vfis defined at each control volume. Namely in discretized form: vf=X q∈{P,F} 1 2µvq+ ∆t ρ(φq)(∇hp)q¶− ∆t ρf (∇hp)f,(3.15) where P and F are denoting the adjacent cell nodes to the face f . The reader is referred to Appendix B of our previous work (see. [15]) for additional technical details on the origin of Eq. 3.15. The time increment ∆t , which is limited by the CFL conditions and the stability condition for the capillary force (see [43]), is given by: ∆t=C∆tminÃh ||v||,ρh2 µ,µh ||g||¶1/2 ,h3/2 ³ρ1+ρ2 4πσ ´1/2!,(3.16) where C∆t= 0 . 1 for the current method and h= ( Vp ) 1/3 is defined as the characteristic size of the control volume P . Finally, a TVD Runge-Kutta method ( [47]) is used for time integration of advection Eq. 3.6 and re-initialization Eq. 3.7. The time step for re-initialization Eq. 3.7 is restricted by its viscous term as follows ∆τ=Cτmin (( h2 )/ ε ), where Cτ is taken to be ∼ 0 . 05. For the present simulations, one re-initialization step is
50 Chapter 3. Parallel adaptive mesh refinement for two-phase flows enough to achieve the steady state of Eq. 3.7. The numerical algorithms explained in this work are implemented in a parallel C++/MPI code called TermoFluids (see [48]). The code has been executed on the supercomputer MareNostrum IV using up to 144 cores for 3D simulations of wobbling bubbles. Furthermore, the numerical methods used in this work have been extensively validated with experiments and numerical results from the literature, including 2D dam-break ( [10]), 2D and 3D rising bubbles ( [10,14,49]), bubbly flows ( [13,50]), droplet deformation in a shear flow ( [49]), droplet collision against a fluid-fluid interface and binary droplet collision with bouncing outcome ( [13]), thermocapillary-driven motion of deformable fluid particles ( [15]), Taylor bubbles ( [51]), and atomization of a liquid-gas jet ( [52]). Therefore, this research can be considered as a further step in the understanding of the physics of rising bubbles with path instability at high Reynolds numbers, with the aid of a CLS method introduced by [10] and adaptive mesh refinement method given by Chapter 2. 3.2.5 Adaptive mesh refinement The use of Adaptive Mesh Refinement algorithms for the solution of multiphase problems has been presented by various authors ( [28,40,53 – 55]), which is becoming an effective tool for computational demanding problems. In this work, the Conservative Level Set method (see [10]) for tracking the interface in a continuous medium and adaptive mesh refinement to ensure a good mesh resolution in the interface profile as well as in the near wake where the vortices appear for most of the rising bubble problems are used. The adaptive mesh refinement employs an octree decomposition to be able to do the refinement and coarsening process in a proper way. Moreover, a 1:2 relation between the different refinement levels is kept (see Fig. 3.1). The reader is referred to Chapter 2for further details on the adaptive mesh refinement algorithm applied to this chapter. Furthermore, our hexahedral AMR algorithm has been validated with numerical results from the literature, including turbulent flows around bluff bodies [56–58] and two-phase flows [52,59,60]. The AMR is included in the global algorithm developed for the CLS method (see [10]), and the AMR loop is reinitialized when the centroid of the bubble has moved a distance equal to the minimum grid size in the computational domain Ω . The global algorithm for the coupled AMR-CLS consists of the following steps: 1. Calculate the minimum grid size hmin in Ω.
3.2 Governing equations and numerical methods 51 2. Calculate the initial position of the bubble centroid bco. 3. Calculate ∆tby Eq. 3.16. 4. Solve level-set advection Eq. 3.6. 5. Solve re-initialization Eq. 3.7 for steady state. 6. Physical properties (ρ,µ) are updated according to Section 3.2.3 7. Calculate vand pby the fractional-step method: (a) Calculate the predicted velocity by Eq. 3.12. (b) Solve Eq. 3.14 for pressure. (c) Calculate the corrected velocity by Eq. 3.13. 8. Calculate vfby Eq. 3.15. 9. Calculate the actual position of the bubble centroid bc. 10. if (||bc−bco||<hmin) Repeat steps 3-8. else Re-mesh and repeat steps 1-8 until the desired time-level is reached. The Re-mesh step from the CLS-AMR algorithm follows the next criteria for the rising bubbles in quiescent liquid: 1.- Interface capturing function. The level-set function φ is used to identify the interface between fluids, and locally refine the mesh when 0 +²<φ< 1 −² , where ²= 1 e− 4. Moreover, to avoid the refinement process to be often repeated, up to three layers of neighboring cells adjunct to the interface profile will also be refined. This is done to give enough spatial displacement for the interface to move in any direction ensuring a good mesh resolution. Fig. 3.1 is an example of a level-set function and its neighboring cells with a grid spacing of four levels of refinement. 2.- 3D Box. The near wake of the bubble is essential for the correct development of the vortical structures which will appear at the lower side of the rising bubbles. To ensure a correct physical solution, a box around the bubble will be refined depending on the bubble diameter. This is described in the numerical experiments section. 3.- Vorticity function. This is used to capture the vortical structures that appear in the near wake of the rising bubble. The vorticity field is calculated following the next equation, ω=∇×v.(3.17)
52 Chapter 3. Parallel adaptive mesh refinement for two-phase flows Figure 3.1: Illustration of the refinement procedure for a level-set function φ , where four levels of refinement have been applied. The vorticity values which are positive identify clockwise rotating vortices, and the negative values are related to anti-clockwise rotation. With the vorticity magnitude field ||ω|| , the cells to be refined as the ones with vorticity values over the 10% of the maximum value for the entire field were established, to capture the primary vortical structures. Furthermore, three layers of neighbors cells are also refined to ensure enough grid resolution for the vortical structures. 3.3 Numerical experiments In this section, numerical tests for verification and validation are described, and new numerical experiments related to wobbling bubbles will be analyzed. According to [61] and [62], the dimensionless numbers controlling the rising bubble in a quiescent liquid are the Eötvös number ( Eo ), Reynolds number ( Re ), Morton number ( M ) and the ratios of physical properties (density ratio ηρand viscosity ratio ηµ), defined as follows Eo =gd2∆ρ σ,M=gµ4 1∆ρ ρ2 1σ3,Re =ρ1UTd µ1 ,ηρ=ρ1 ρ2 ,ηµ=µ1 µ2 ,(3.18) where the subindex 1 refers to the continuous fluid phase, the subindex 2 refers to the lighter fluid in the bubble, d refers to the bubble diameter and ∆ρ=ρ1−ρ2 specifies the density difference between the fluid phases. The terminal velocity of the bubble is
3.3 Numerical experiments 53 defined by, UT=RΩ2vyφdV RΩ2dV ,(3.19) and we also introduce the following dimensionless time, t∗=tpg/d . Furthermore, in order to get a quantitative measure of the bubble shape, the sphericity is defined as ζ=πd2 RΩ||∇φ||dV .(3.20) 3.3.1 Verification and validation A selection of numerical tests, with an increase of the grid resolution, are presented to show the accuracy of the numerical method. For the stationary drop test, the starting grid size consists of 20 control volume per diameter, and is increased up to 80 control volumes per diameter. For the experimental validation and the wobbling bubbles, the starting grid size consists of 15 control volumes per diameter, and is increased up to 60 control volumes per diameter, which is a sufficient resolution for simulations covered in this work. In addition, a comparative analysis between different interfacial capture methods with AMR for 2D and 3D gravity-driven bubbles can be found in Appendix C. Stationary drop test This numerical test consists in the solution of a spherical drop, with a diameter d , positioned in the center of a cubic domain with a length of 10 d , without the influence of gravity. The densities are equal to 10 4 , the viscosities and the surface tension equal to 1. This has also been used by [63] and by [49] for unstructured meshes. A steady solution is originated where the pressure jump can be calculated and compared to an analytical solution provided by the Laplace equation, ∆Pexact =σκexact,(3.21) where the exact curvature is given by κexact = 4/ d for a spherical drop. The exact solution is a zero velocity field, and the pressure jump at the droplet interface is given by ∆P=4σ d . Present test cases are solved on a uniform mesh where AMR is applied, as can be seen in Fig. 3.2 The error of the pressure jump is calculated by using pressure values inside ( pin )
54 Chapter 3. Parallel adaptive mesh refinement for two-phase flows (a) (b) (c) Figure 3.2: Mid-section plane for the 3D static drop test with different grid resolutions using AMR, where the pressure distribution is shown. (a) d/20, (b) d/40, (c) d/80. Table 3.1: Errors for the dimensionless velocity and pressure for different grid resolution. Here pis the order of convergence. h L1(v)E(∆P) 1/20 4.1e−08 0.020 1/40 6.8e−09 0.0029 1/80 1.4e−09 0.00041 p≈2.4 2.8 and outside (pout) of the drop, E(∆P)=|pin −pout −4σ/d| 4σ/d.(3.22) Moreover, spurious currents arise as a consequence of the imbalance between surface tension and the pressure around the drop, which can be measured following the L1 error norm: L1(v)=1 Ncells Ncells X k (vk·vk)1/2 µ σ,(3.23) which is computed on the whole spatial domain. In Table 3.1, the numerical error for the pressure jump and the spurious velocities are shown and compared when the grid resolution is increased. The spurious current and pressure jump errors diminish with an order of convergence of second order. Moreover, the spurious current magnitude tends to a steady state as time advances (See Fig. 3.3). The aforementioned results demonstrate the accuracy of the surface tension model.
3.3 Numerical experiments 55 0 5x10-9 1x10-8 1.5x10-8 2x10-8 2.5x10-8 3x10-8 3.5x10-8 4x10-8 4.5x10-8 0 500 1000 1500 2000 2500 3000 3500 L1 t*=tg1/2d-1/2 d/20 d/40 d/80 Figure 3.3: Time evolution of the error for the dimensionless velocity, Eq. 3.23, on different grid resolutions. Grid convergence for ellipsoidal and wobbling bubbles In this section, the methodology is validated with the rising bubble of ellipsoidal and wobbling bubbles in a quiescent liquid. The dimensions of the rectangular domain for the ellipsoidal test case are the following: Ω= [0 , 8 d ] × [0 , 16 d ] × [0 , 8 d ], where the initial bubble of diameter d= 0 . 25 is located at ( x,y,z ) = (0 ,d, 0). Moreover, the boundary conditions in the top/bottom walls are no-slip, whereas the Neumann condition is applied on the lateral walls and the initial mesh is around 54k control volumes. For the wobbling test case, a vast computational domain is required due to the chaotic and oscillatory path trajectories expected in this regime. The computational domain has a size of Ω= [0 , 16 d ] × [0 , 80 d ] × [0 , 16 d ]. The boundary and initial conditions are the same as for the ellipsoidal bubble. The initial mesh is around 1.08M control volumes. AMR was used to achieve a desired grid resolution in the interface and the near wake. To assure these conditions a 3D box was refined around the bubble with dimensions of [2 d ;2 . 75 d ;2 . 0 d ], where the 3D box centroid is relatively located at (0 . 0 ,− 0 . 375 d, 0 . 0) with respect to the bubble centroid (See Fig. 3.4). For the ellipsoidal bubble test, the dimensionless numbers are Eo = 116, M= 41 . 1, ρ1 / ρ2=µ1 / µ2= 100. In Figure 3.5, the terminal Reynolds number for the ellipsoidal test is shown for different grid resolutions. The final bubble shape is consistent with the experimental result of [62], where the bubble reached an ellipsoidal shape with a dimple formation at the rear end. These results are compared to experiments and numerical
56 Chapter 3. Parallel adaptive mesh refinement for two-phase flows Figure 3.4: AMR with an effective grid resolution of 60 control volumes per diameter at the interface, and 30 control volumes per diameter for the vortical structures and the near wake. (Left) Eo =116, M=41.1 (Right) Eo =3.6, M=2.5e−11 0 1 2 3 4 5 6 7 8 0 5 10 15 20 25 30 Re t*=tg1/2d-1/2 d/15 d/30 d/60 Figure 3.5: Grid convergence and final bubble shape for Eo = 116, M= 41 . 1. (a) d /15, (b) d /30, (c) d/60, (d) Experiment ( [62]).
3.3 Numerical experiments 57 Table 3.2: Present Re computations compared with experimental results by [62], and numerical results by [14,49]. Case Eo =116, M=41.1 Number of control volumes Re [62] 7.16 [14] 2.30e+06 6.94 [49] 2.92e+06 7.02 Present AMR-CLS (d/15) 8.00e+04 6.55 Present AMR-CLS (d/30) 1.64e+05 6.89 Present AMR-CLS (d/60) 6.60e+05 6.98 solutions from the literature using a fixed mesh (See Table 3.2). As the resolution increases up to 60 control volumes per bubble diameter, the computed Reynolds number is closer to the experiments reported by [62]. In addition, present results are consistent with CLS and VOF/LS simulations reported by [14,49] on fixed meshes. For the cases of wobbling bubbles, different grid resolutions are compared for Eo = 3 . 6, M= 2 . 5 e− 11, ρ1 / ρ2=µ1 / µ2= 100. In Figure 3.6, Reynolds number, bubble shape and vortical structures are compared with grid resolutions of d /30, d /45 and d /60. As shown, the behavior of the rising velocity becomes chaotic in this regime. Nevertheless, the global qualitative appearance of the terminal Reynolds number (see Fig. 3.6 and Table 3.3) are retained as the grid resolution is increased, although the peak velocity at earlier times slightly changes. However, to keep an adequate grid size for the numerical tests presented in this work with mid to high Reynolds number, the resolution of d /60 was chosen for the interface and d/30 for the near wake and vortical structures. 0 200 400 600 800 1000 1200 1400 1600 1800 0 10 20 30 40 50 60 70 80 Re t*=tg1/2d-1/2 d/60 d/45 d/30 Figure 3.6: Reynolds number and bubble shapes at t∗= 59 . 5 for Eo = 3 . 6, M= 2 . 5 e− 11. (a) d /30, (b) d/45, (c) d/60
64 Chapter 3. Parallel adaptive mesh refinement for two-phase flows Table 3.7: Strouhal number for the present simulations ( StP ) compared with Miyahara and Yamaka correlation (see [68])( StMY ), and numerical simulations performed by [29]( StM ), [25]( StB ), [41](StG). Case Eo M StMY StRef StP A1.0 1.0e−09 0.05 [0.09−0.108]∗∗ StM0.034∗;0.09∗∗ B3.6 1.0e−09 0.117 −0.091∗ C10.0 1.0e−09 0.233 −0.202∗ D1.0 1.0e−10 0.043 −0.044∗ E1.0 1.0e−11 0.039 −0.053∗ F3.6 2.5e−11 0.094 0.11∗StB; 0.093∗StG0.108∗ G4.0 1.0e−11 0.111 −0.114∗ H10.0 1.0e−11 0.217 −0.183∗ ∗St =f d/UT( [25,36]) ∗∗St =fp2d/g( [29]) Table 3.8: Drag coefficient for the present simulations ( CDP ) compared with [69] correlation (see Eq. 3.29)(CDT), and [70] correlation (see Eq. 3.30)(CDDi ). Case Eo M CDTCDDi CDP A1.0 1.0e−09 0.53 0.40 0.36 B3.6 1.0e−09 1.26 1.10 1.32 C10.0 1.0e−09 1.91 2.05 2.11 D1.0 1.0e−10 0.53 0.39 0.51 E1.0 1.0e−11 0.53 0.38 0.58 F3.6 2.5e−11 1.26 1.10 1.50 G4.0 1.0e−11 1.33 1.19 1.49 H10.0 1.0e−11 1.91 2.05 2.00 CD(Eo)=4Eo Eo +9.5(3.32) The CD obtained for the set of numerical cases are shown in Table 3.8 and compared with the correlations of [69] and [70]. It can be noticed that as the Eo increase or M decrease, the drag coefficient increase, as a consequence of the bubble deformations and the increase of vorticity at the lower side of the bubble. Finally in Figure 3.12b, the drag coefficient is plotted in function of the Reynolds number for M= 1 . 0 e− 11, and compared with the correlations. These numerical results shows that for low Eo , our findings are close to [69] correlation and for higher Eo the results tend to [70] correlation.
3.3 Numerical experiments 65 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 0.22 0.24 1 1.5 2 2.5 3 3.5 4 4.5 St Re·M0.26 Miyahara and Yamaka (1993) Present simulations (a) 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 2.2 500 1000 1500 2000 2500 3000 CD Re Tomiyama et al., pure(1998) Dijkhuizen et al.(2010) Present (b) Figure 3.12: (a) Present Strouhal number results compared with Miyahara and Yamaka correlation (see [68]); (b) Present drag coefficient results compared with [69] and [70] correlations for M=1.0e−11. Effect of Morton number ( M ) on the wobbling regime In this section, we show the main characteristics of the wobbling bubbles concerning M . The physical parameters, except for M , are fixed to Eo = 1 . 0 ,ηρ=ηµ= 100. The time variation of the velocity components, 3D path and sphericity evolution are shown in Figure 3.13. In the case with M= 1 e− 9, the rising velocity and sphericity tend to a constant value, which is the result of a balance between buoyancy and viscous drag. Nevertheless, when the two horizontal velocity components start to oscillate, a unstable path is depicted (Fig. 3.13a). When M diminishes, a periodicity on the velocity components appears. Moreover, the amplitude of the oscillating velocity components and the frequency are increased. For the case with M= 1 e− 10, the horizontal velocity components are aligned between them, leading to a zigzag path (see Fig. 3.13b). It is also noticeable, the increase of bubble displacement in the horizontal direction as M decrease, mainly produced by the increase of the horizontal velocity components. Sphericity is measured for this cases, where the decrease of M number makes the bubble to suffer frequently deformations. For the case with M= 1 e− 9, bubble shape remains mainly ellipsoidal, but with the decrease of M the sphericity starts to oscillate. It is shown, the bubble reaches opposites states where it can be almost spherical or get a flat shape. These states are dictated by the oscillation of the inertial and surface tension forces, where high inertial forces produce a flat shape, and high surface tension forces shows a spherical shape (see Fig. 3.13). Isosurfaces of the vorticity magnitude are presented with fixed Eötvös number and different Morton number in Fig. 3.14. As the Morton number decreases, the
66 Chapter 3. Parallel adaptive mesh refinement for two-phase flows -0.5 0 0.5 1 1.5 2 0 5 10 15 20 25 30 35 40 Velocity t*=tg1/2d-1/2 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1 0 5 10 15 20 25 30 35 40 A B C D Sphericity t*=tg1/2d-1/2 -8 0 8-8 0 8 0 40 80 y/d A B C D z/d x/d y/d C A D B (a) -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 0 5 10 15 20 25 30 35 40 45 Velocity t*=tg1/2d-1/2 0.86 0.88 0.9 0.92 0.94 0.96 0.98 1 1.02 0 5 10 15 20 25 30 35 40 45 AB C D Sphericity t*=tg1/2d-1/2 -8 0 8-8 0 8 0 40 80 y/d A B C D z/d x/d y/d C A D B (b) -1 -0.5 0 0.5 1 1.5 2 0 5 10 15 20 25 30 35 40 45 50 Velocity t*=tg1/2d-1/2 0.82 0.84 0.86 0.88 0.9 0.92 0.94 0.96 0.98 1 1.02 0 5 10 15 20 25 30 35 40 45 50 A B C D Sphericity t*=tg1/2d-1/2 -8 0 8-8 0 8 0 40 80 y/d AB C D z/d x/d y/d C A D B (c) Figure 3.13: Velocity components [ ug−1/2d−1/2 ( −·− ), vg−1/2d−1/2 ( −− ), wg−1/2d−1/2 ( − )], sphericity, 3D path and bubble shapes for (a) Eo = 1, M= 1 e− 9; (b) Eo = 1, M= 1 e− 10; (c) Eo = 1, M=1e−11.
3.3 Numerical experiments 67 (a) (b) (c) Figure 3.14: Isosurfaces of the vorticity magnitude ||ω|| ( d / g ) 1/2 = 8, colored with vertical vorticity ωy , where the red color corresponds to ωy> 0, and the blue color corresponds to ωy< 0, at different positions for (a) Eo =1, M=1e−9; (b) Eo =1, M=1e−10; (c) Eo =1, M=1e−11. hairpin vortices attached to the lower side of the bubble are getting more elongated, as a consequence of the increase of bubble deformations and vorticity generated at the base of the bubble. For the case with M= 1 e− 9, as seen in Figure 3.14a, the vorticity generated in the wake is vertically aligned with the bubble, as a pair of counter-rotating vortices. Moreover, vorticity keeps a constant sign all along the trajectory. The numerical case with M= 1 e− 10 (see Fig. 3.14b) reveals vortex rings, which are simplified structures of the head loop of the hairpin vortex. Furthermore, for case E the vorticity presents two longer counter-rotating threaded vortices which tend to wrap up around one another, dissipating the hairpin vortex head in a more efficient way (see Fig. 3.14c). The case with Eo = 1 . 0 and M= 1 e− 09 is the limit where the bubble still presents no substantial shape deformations and small path oscillations, but as the Morton number decrease, bubble shape and velocity components frequently present oscillations. Bubble shape presents widely deformations going from flat to almost spherical, which this behavior is stronger as the Morton number gets smaller. Moreover, different vortical structures appear, such as axisymmetric two-thread vortex and long wrapped hairpin
68 Chapter 3. Parallel adaptive mesh refinement for two-phase flows vortex. To sum up, as the vortex generation gets stronger, and the vortex structures are getting elongated, the horizontal bubble displacement increases as a mechanism of vorticity evacuation, which is quite noticeable when the Mdecreases. Effect of Eötvös number ( Eo ) on the wobbling regime In this section, we show the main characteristics of the wobbling bubbles with respect to Eo . The physical parameters, except for Eo , are fixed to M= 1 . 0 e− 11 ,ηρ=ηµ= 100. The time variation of the velocity components, 3D path and sphericity evolution are shown in Figure 3.15. These cases have been selected with a small Morton number, where all of them present path instabilities. The bubble shape, velocities components, and path start to oscillate leading to a zigzag or spiraling movement. When Eo is increased, the amplitude of the velocity components decrease and its frequency increase. This behavior relates to the shrinking of the bubble displacement in the horizontal plane, generated by the bubble deformations and chaotic vortical structures. Bubble shape measured by sphericity is shown in Fig. 3.15. As Eo decreases, the bubble shape oscillates with higher frequency and is less likely to reach a spherical shape during the oscillation, as it could get it at Eo = 1. In the case with highest Eötvös number, the bubble deformations are considerably noticeable and present local bulges (see Fig. 3.15c). These bulges are related to the chaotic creation of vortical structures appearing near the bubble. In Fig. 3.16, illustrations of vortical structures are shown for each one of the studied cases. At small Eo , the main vortical structure is the hairpin vortex, where the legs are attached to the lower surface of the bubble, and in the meantime, the head of old hairpin vortices are being evacuated downstream (see Fig. 3.16a). As Eo increases, the bubble shape deforms frequently, the vorticity generation gets stronger, and the vortex structures are smaller (see Fig. 3.16c). For these cases, the bubble deformation plays an important role in the vorticity evacuation. Here, it is noticeable that vorticity generation increases, and the vortical structures changes from the elongated hairpin vortex, to small vortical structures. Moreover, the bubble presents a decrease in the horizontal displacement as the Eo increases (see Fig. 3.15). As a consequence of the vorticity generation at higher Reynolds, the bubble reduces its horizontal displacement, increase the bubble deformation by the presence of bulges and shortens the vortical structures as a mechanism of vorticity evacuation.
3.3 Numerical experiments 69 -1 -0.5 0 0.5 1 1.5 2 0 5 10 15 20 25 30 35 40 45 50 Velocity t*=tg1/2d-1/2 0.82 0.84 0.86 0.88 0.9 0.92 0.94 0.96 0.98 1 1.02 0 5 10 15 20 25 30 35 40 45 50 A B C D Sphericity t*=tg1/2d-1/2 -8 0 8-8 0 8 0 40 80 y/d AB C D z/d x/d y/d C A D B (a) -1 -0.5 0 0.5 1 1.5 0 10 20 30 40 50 60 70 80 Velocity t*=tg1/2d-1/2 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 1.05 0 10 20 30 40 50 60 70 80 A B C D Sphericity t*=tg1/2d-1/2 -8 0 8-8 0 8 0 40 80 y/d A B C D z/d x/d y/d C A D B (b) -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 1.2 0 10 20 30 40 50 60 70 80 90 100 Velocity t*=tg1/2d-1/2 0.7 0.75 0.8 0.85 0.9 0.95 1 1.05 0 10 20 30 40 50 60 70 80 90 100 A B C D Sphericity t*=tg1/2d-1/2 -8 0 8-8 0 8 0 40 80 y/d A B C D z/d x/d y/d C A D B (c) Figure 3.15: Velocity components [ ug−1/2d−1/2 ( −·− ), vg−1/2d−1/2 ( −− ), wg−1/2d−1/2 ( − )], sphericity, 3D path and bubble shapes for (a) Eo = 1, M= 1 e− 11; (b) Eo = 4, M= 1 e− 11; (c) Eo = 10, M=1e−11.
70 Chapter 3. Parallel adaptive mesh refinement for two-phase flows (a) (b) (c) Figure 3.16: Isosurfaces of the vorticity magnitude ||ω|| ( d / g ) 1/2 = 8, colored with vertical vorticity ωy , where the red color corresponds to ωy> 0, and the blue color corresponds to ωy< 0, at different positions for (a) Eo =1, M=1e−11; (b) Eo =4, M=1e−11; (c) Eo =10, M=1e−11. 3.4 Conclusions DNS of rising bubbles with path instability at high Reynolds number has been presented. The cases were selected at Morton number, O (10 −11 ) up to O (10 −9 ), and the Eötvös number was varied to observe the main differences in terminal velocities, bubble shape, vortical structures and oscillations paths. The methodology consisted of a Conservative Level-Set method and Adaptive Mesh Refinement within a finite volume framework, which allowed to reproduce the main features of three-dimensional two-phase flows, combining an accurate representation of the interface, good mass conservation and a reduction of the computational effort. Moreover, the numerical methods have been verified and validated with previous empirical and numerical results from the literature, which include spurious currents in the static drop, and dynamic cases. In the wobbling regime, terminal Reynolds number was compared with experimental and numerics references showing fair agreement for Reynolds number Re ∼O (10 2 ) and Re ∼O (10 3 ). The drag coefficient and the oscillation paths frequency were examined and compared to experimental correlation and some numerics. The results were appreciably good for most of the cases, where a vast domain is required to be able to capture the main global quantitative variables for all the cases. The effect of the dimensionless numbers was reported. When Eo = 1, and 1 e− 11 ≤
References 71 M≤ 1 e− 09, two filaments of counter-rotating vortex were found. Moreover, with the decrease of M those filaments are getting elongated, and hairpin vortex structures were observed. Under these conditions, the mechanism of vorticity evacuation was to increase the horizontal bubble displacement according to the vorticity generation. For the cases, where M= 1 e− 11 and 1 ≤Eo ≤ 10, vortex structures transformed from hairpin vortex to small vortical structures. At higher Eo the bubble shape presented bulges and large deformations. On these cases, as the Eo was increased, the vorticity evacuation leads to increase the bubble deformation with the presence of bulges, making the vortical structures to be smaller, and reducing the horizontal bubble displacement. References [1] P. G. Saffman. On the rise of small air bubbles in water. Journal of Fluid Mechanics, 1:249–275, 1956. [2] A. Prosperetti, Ohl C., Tijink A., Mougin G., and Magnaudet J. Leonardo ´ s paradox. appendix to a. prosperetti, c. d. ohl, a. tijink. Journal of Fluid Mechanics, 482:286– 289, 2003. [3] A. Prosperetti. Bubbles. Physics of Fluids, 16(6):1852–1865, 2004. [4] P.C. Duineveld. Rise velocity and shape of bubbles in pure water at high reynolds number. Journal of Fluid Mechanics, 292:325–332, 1995. [5] S. Unverdi and G. Tryggvason. A front-tracking method for viscous, incompressible, multifluid flows. Journal of Computational Physics, 100:25–37, 1992. [6] G. Tryggvason, B. Bunner, A. Esmaeeli, D. Juric, N. Al-Rawahi, W. Tauber, J. Han, S. Nas, and Y-J. Jan. A front-tracking method for the computations of multiphase flow. Journal of Computational Physics, 169:708–759, 2001. [7] S. Osher and J.A. Sethian. Fronts propagating with curvature-dependent speed: Algorithms based on hamilton-jacobi formulations. Journal of Computational Physics, 79:175–210, 1988. [8] M. Sussman, P. Smereka, and S. Osher. A level set approach for computing solutions to incompressible two-phase flow. Journal of Computational Physics, 144:146–159, 1994.
72 Chapter 3. Parallel adaptive mesh refinement for two-phase flows [9] E. Olsson and G. Kreiss. A conservative level set method for two phase flow. Journal of Computational Physics, 210:225–246, 2005. [10] N. Balcázar, L. Jofre, O. Lehmkhul, J. Castro, and J. Rigola. A finite-volume/levelset method for simulating two-phase flows on unstructured grids. International Journal of Multiphase Flow, 64:55–72, 2014. [11] C. Hirt and B. Nichols. Volume of fluid (vof) method for the dynamics of free boundary. Journal of Computational Physics, 39:201–225, 1981. [12] M. Van Sint Annaland, N.G. Deen, and J.A.M. Kuipers. Numerical simulation of gas bubbles behaviour using a three-dimensional volume-of-fluid method. Chemical Engineering Science, 60:2999–3011, 2005. [13] N. Balcázar, O. Lemhkuhl, J. Rigola, and A. Oliva. A multiple marker level-set method for simulation of deformable fluid particles. International Journal of Multiphase Flow, 74:125–142, 2015. [14] N. Balcázar, O. Lemhkuhl, L. Jofre, and A. Oliva. Level-set simulations of buoyancydriven motion of single and multiple bubbles. International Journal of Heat and Fluid Flow, 56:91–107, 2015. [15] N. Balcázar, J. Rigola, J. Castro, and A. Oliva. A level-set model for thermocapillary motion of deformable fluid particles. International Journal of Heat and Fluid Flow, 62, Part B:324–343, 2016. [16] J. Magnaudet and I. Eames. The motion of high-reynolds-number bubbles in inhomogeneous flows. Annual Review of Fluid Mechanics, 32(1):659–708, 2000. [17] J. Tchoufag, J. Magnaudet, and D. Fabre. Linear stability and sensitivity of the flow past a fixed oblate spheroidal bubble. Physics of Fluids, 25(5):054108, 2013. [18] J. Magnaudet and G. Mougin. Wake instability of a fixed spheroidal bubble. Journal of Fluid Mechanics, 572:311–337, 2007. [19] P. Ern, F. Risso, D. Fabre, and J. Magnaudet. Wake-induced oscillatory paths of bodies freely rising or falling in fluids. Annual Review of Fluid Mechanics, 44:97–121, 2012. [20] R. Zenit and J. Magnaudet. Path instability of rising spheroidal air bubbles: A shape-controlled process. Physics of Fluids, 20:061702, 2008.
References 73 [21] A.W.G. De Vries, A. Biesheuvel, and L. Van Wijngaarden. Notes on the path and wake of a gas bubble rising in pure water. International Journal of Multiphase Flow, 28:1823–1835, 2002. [22] K. Ellingsen and F. Risso. On the rise of an ellipsoidal bubble in water: oscillatory paths and liquid-induced velocity. Journal of Fluid Mechanics, 440:235–268, 2001. [23] K. Lunde and R.J. Perkins. Observations on wakes behind spheroidal bubbles and particles. ASMEFED Summer Meeting, 778(Paper No. FEDSM97-3530), 1995. [24] C.H.J. Veldhuis, A. Biesheuvel, and L. Van Wijngaarden. Shape oscillations on bubbles rising in clean and in tap water. Physics of Fluids, 20(4):040705, 2008. [25] C. Brücker. Structure and dynamics of the wake of bubbles and its relevance for bubble interaction. Physics of Fluids, 11, 1999. [26] A. Esmaeeli, E. Ervin, and G. Tryggvason. Numerical simulations of rising bubbles. In: Blake J.R., Boulton-Stone J.M., Thomas N.H. (eds) Bubble Dynamics and Interface Phenomena. Fluid Mechanics and Its Applications, 23, 1994. [27] A. Smolianski, H. Haario, and P. Luukka. Vortex shedding behind a rising bubble and two-bubble coalescence: A numerical approach. Applied Mathematical Modelling, 29(7):615–632, 2005. [28] J.S. Hua, P. Lin, and J.F. Stene. Numerical simulation of gas bubbles rising in viscous liquids at high reynolds number. Moving Interface Problems and Applications in Fluid Dynamics, Contemporary Mathematics, 466:17–34, 2008. [29] G. Mougin and J. Magnaudet. Path instability of a rising bubble. Physical Review Letters, 88(1), 2002. [30] G. Mougin and J. Magnaudet. Wake-induced forces and torques on a zigzagging/spiralling bubble. Journal of Fluid Mechanics, 567:185–194, 2006. [31] J.C. Cano-Lozano, C. Martínez-Bazán, J. Magnaudet, and Tchoufag J. Paths and wakes of deformable nearly spheroidal rising bubbles close to the transition to path instability. Physical Review Fluids, 1:053604, 2016. [32] J.C. Cano-Lozano, Bohorquez P., and C. Martínez-Bazán. Wake instability of a fixed axisymmetric bubble of realistic shape. International Journal of Multiphase Flow, 51:11–21, 2013.
80 Chapter 4. Tetrahedral adaptive mesh refinement for two-phase flows 4.1 Introduction Applications in the nuclear, chemical and nano industry involving coiled flow tubes or micro-devices lead to the challenge of designing systems of two-phase flows where the systems present complex geometries. A good strategy to solve these problems is the use of numerical algorithms for unstructured meshes, which the governing equations of two-phase flows can be accurately solved in complex computational domains. Therefore, the primary purpose of this work is the development of an unstructured adaptive mesh refinement algorithm for two-phase flows in complex domains. Direct numerical simulation (DNS) of multiphase systems has become a valuable research tool for the study of bubbles and droplets, where the interface capturing is a relevant point. Regarding interface capturing, several methods can be applied, i.e. Front Tracking (FT) method ( [1,2]), the Volume Of Fluid (VOF) method ( [3,4]) and Level Set (LS) method ( [5 – 8]). In FT methods ( [1,2]), the interface is placed in a Lagrangian form over a stationary Eulerian grid. This method is accurate but rather complex to implement when topology varies. The VOF methods ( [3,4]) use a color function to distinguish the interface, corresponding to the volume fraction within each cell. As a consequence, the VOF function needs to be advected and reconstructed by geometric techniques. Its main advantage is to accurately advect the interface retaining a sharp interface to conserve the mass. However, presents difficulties to compute accurate curvatures from the color function, because of the step discontinuity. In LS methods ( [5,6]), the interface is defined as a zero-contour of a smooth signed distance function. With this approach, interface curvatures and normals can be accurately evaluated, although mass is not always conserved. Mass conservation issue can be circumvented in the context of Conservative Level-Set (CLS) methods ( [7]), where a regularized indicator function is employed instead of the signed distance function. Recently, a finite-volume CLS method has been introduced by ( [8]) for two-phase flows with surface tension on unstructured grids. Further advantages of the CLS method include an accurate computation of surface tension, numerical stability, and efficient parallelization as demonstrated in our previous works ( [8–11]). A shortcoming on this topic is the extensive use of computational resources for two-phase flows on unstructured grids, where most of the grid elements should be near the interface between phases and the vortical structures in its surroundings. This issue can be solved with the use of Adaptive Mesh Refinement (AMR), initially introduced by [12 – 14], where enough grid resolution can be achieved following a refinement/coarsening criteria. Several methods have been developed concerning the AMR for triangular and
4.2 Governing equations and numerical methods 81 tetrahedral meshes using bisection, generation of an unstructured mesh and regular refinement, where an overview of the advances on this topic during the recent years can be found in [15]. One concern around these methods is the resulting non-conforming meshes which have been solved with algorithms to ensure a conforming mesh. Another issue is the mesh quality resulting from the refinement methods, which is of importance due to poor quality elements can produce numerical errors in the solution procedure ( [16]). A solution to this problem is the use of specific geometric criteria on the selection of the refinement mechanism that will lead to a quality change bounded to certain limits ( [17]). On the context of using AMR for tetrahedral meshes for multiphase and turbulent problems, many authors have developed some methods that allow achieving success in the applications mentioned above ( [18–21]). The main limitations on this topic are the achievement of accurate and non-expensive 3D simulations, the application of this methodology to unsteady problems, the diminishing of the mesh quality and the use of conforming meshes. In this work, we want to introduce an AMR method for tetrahedral meshes on an unstructured CFD code based on collocated finite volume discretization for 3D problems. This approach allows the use of regular refinement and non-conformed meshes. Moreover, a process to ensure an optimal tetrahedral quality, during the refinement step, will be followed. Finally, this method will be tested in the solution of two-phase flows using a conservative level set method on regular and complex domains. The chapter is organized as follows. The mathematical formulation and the numerical method used are described in Section 4.2. The Adaptive Mesh Refinement algorithm for tetrahedral meshes is described in Section 4.3. Validations with the simulation of a gravity-driven bubble on complex domains are discussed in Section 4.4. Section 4.5 summarizes the numerical method and the results outlined in the chapter. 4.2 Governing equations and numerical methods 4.2.1 Incompressible two-phase flow Mass conservation and momentum of two immiscible incompressible and Newtonian fluids are given by the Navier-Stokes equations defined by a single fluid in the domain Ω , which includes a source term for the surface tension force at the interface Γ (see [8,22–24]): ∂ ∂t(ρv)+∇·(ρvv)=−∇p+∇·µ³∇v+(∇v)T´+ρg+σκnδΓ,(4.1)
82 Chapter 4. Tetrahedral adaptive mesh refinement for two-phase flows ∇·v=0,(4.2) where ρ and µ are the density and dynamic viscosity of the fluids, g is the gravity acceleration, vis the velocity field, pis the pressure, the super-index Trepresents the transpose operator, δΓ is a Dirac delta function at the interface Γ , σ is the surface tension coefficient, κ is the curvature of the interface, and n denotes the normal unit vector on the interface. Physical parameters change discontinuously across the interface: ρ=ρ1H1+ρ2(1−H1) (4.3) µ=µ1H1+µ2(1−H1), with ρ1 , ρ2 and µ1 , µ2 being the densities and viscosities of the first and second fluids, respectively. Whereas, H1 is the Heaviside step function that is one at fluid 1, and zero elsewhere. At discretized level, physical properties are smoothed according to the CLS method for unstructured meshes (see [8]). 4.2.2 Conservative level set equations The conservative level-set method given by [8] for interface capturing on unstructured meshes, is applied in this work. While the standard level-set method ( [6]) uses a signed distance function d(x, t) to represent the interface, the CLS method employs a regularized indicator function, φ, as follows: φ(x,t)=1 2µtanhµd(x,t) 2ε¶+1¶,(4.4) where ε= 0 . 5 h0.9 is a parameter which sets the thickness of the profile, and h is the grid size. According to this profile, the interface Γis defined by the iso-surface φ=0.5: Γ={x|φ(x,t)=0.5}.(4.5) Since the level-set function is advected by the fluid velocity field, the following interface transport equation can be established: ∂φ ∂t+∇·φv=0.(4.6)
4.2 Governing equations and numerical methods 83 The level-set function must be reinitialized to keep constant the profile and thickness of the interface, following the next equation: ∂φ ∂τ +∇·φ(1−φ)n=∇·ε∇φ.(4.7) This equation advances in pseudo-time τ , and consists of a compressive term, ∇·φ (1 −φ ) n , which compress the level-set function onto the interface along the normal vector n , and a diffusion term ∇·ε∇φwhich keeps the profile with a characteristic thickness ε. The reader is referred to [8,11] for further details on the implementation of the conservative level-set method used in this work. 4.2.3 Surface tension and regularization of fluid properties Implementing surface tension in a numerical method involves two issues: the curvature κ needs to be determined and the pressure jump should be applied appropriately to the fluids. These problems are addressed in the context of the continuous surface force model (CSF) introduced by [23]. Thus, the term, σκnδΓ, is converted to a volume force as follows: σκnδΓ=σκ(φ)∇φ,(4.8) where κ(φ) and nare given by n=∇φ ||∇φ||,(4.9) κ(φ)=−∇·n.(4.10) Following the work of [8], ∇φ is computed using the least-squares method with the information of the neighbor cells around the vertices of the current cell. In addition, the fluid properties are regularized using the level-set function. Therefore, density and viscosity fields are calculated as follows: ρ=ρ1φ+ρ2(1−φ) (4.11) µ=µ1φ+µ2(1−φ). 4.2.4 Numerical methods The governing equations have been discretized using a finite-volume(FV) approach on a collocated unstructured grid arrangement according to [8], which automatically
84 Chapter 4. Tetrahedral adaptive mesh refinement for two-phase flows adapts to the AMR framework. Convective terms are discretized using a Total Variation Diminishing (TVD) Superbee flux limiter scheme (see [8]), to avoid numerical oscillations at the discontinuities, and minimize numerical diffusion (comparison between different convective schemes in rising bubble cases is presented in Section 4.4.1). Diffusive terms are discretized employing a central difference scheme. Gradients are computed at cell centroids using the least-squares method, and a distance-weighted linear interpolation is used to calculate the values of physical properties, gradients and interface normals at the cell faces (see [8]), unless otherwise stated. A central difference scheme is employed to discretize both compressive and diffusive terms of the re-initialization Eq. 4.7. A standard fractional step projection method is used for solving the pressure-velocity coupling (see [11,25]): ρv∗−ρnvn ∆t=An+Dn+ρg+σκ∇h(φ),(4.12) v=v∗− ∆t ρ∇h(p),(4.13) where super-index n denotes the previous time step, A= −∇h· ( ρvv ), and D= ∇h· ( µ (( ∇hv ) + ( ∇hv ) T )) are explicitly evaluated, ( ∇hv ) T is calculated by a vertex-node based least-squares method (see [8]). Combining the incompressible constraint with Eq. 4.13, a Poisson equation for the pressure field is obtained, which is solved by means of a preconditioned conjugated gradient method: ∇h·µ1 ρ∇h(p)¶=1 ∆t∇h·¡v∗¢,e∂Ω·∇hp|∂Ω=0.(4.14) In order to fulfill the incompressible constraint (Eq. 4.2), and to avoid pressure-velocity decoupling when the pressure projection is made on collocated meshes (see [26]), a cell face velocity vfis defined at each control volume. Namely in discretized form: vf=X q∈{P,F} 1 2µvq+ ∆t ρ(φq)(∇hp)q¶− ∆t ρf (∇hp)f,(4.15) where P and F are denoting the adjacent cell nodes to the face f . The reader is referred to the Appendix section of our previous work (see. [11]) for additional technical details on the origin of Eq. 4.15. The time increment ∆t , which is limited by the CFL conditions
4.3 Tetrahedral adaptive mesh refinement algorithm 85 and the stability condition for the capillary force (see [23]), is given by: ∆t=C∆tminÃh ||v||,ρh2 µ,µh ||g||¶1/2 ,h3/2 ³ρ1+ρ2 4πσ ´1/2!,(4.16) where C∆t= 0 . 1 for the current method and h= ( Vp ) 1/3 is defined as the characteristic size of the control volume P . Finally, a TVD Runge-Kutta method ( [27]) is used for time integration of advection Eq. 4.6 and re-initialization Eq. 4.7. The time step for re-initialization Eq. 4.7 is restricted by its viscous term as follows ∆τ=Cτmin (( h2 )/ ε ), where Cτ is taken to be ∼ 0 . 05. For the present simulations, one re-initialization step is enough to achieve the steady state of Eq. 4.7. The numerical algorithms explained in this work are implemented in a parallel C++/MPI code called TermoFluids (see [28]). Furthermore, the numerical methods used in this work have been extensively validated with experiments and numerical results from the literature, including 2D dam-break ( [8]), 2D and 3D rising bubbles ( [8,10,29]), bubbly flows ( [9,30]), droplet deformation in a shear flow ( [29]), droplet collision against a fluid-fluid interface and binary droplet collision with bouncing outcome ( [9]), thermocapillary-driven motion of deformable fluid particles ( [11]), Taylor bubbles ( [31]), and atomization of a liquid-gas jet ( [32]). 4.3 Tetrahedral adaptive mesh refinement algorithm The present computational approach uses an adaptive mesh refinement algorithm based on an octree data structure and regular refinement for 3D tetrahedral meshes. This method generates a unit mesh according to a prescribed physics-based criterion. The newly adapted mesh is obtained from an input mesh through some geometrical manipulations: operations of refinement and coarsening until a maximum level of refinement is achieved. This methodology is a further step to extend our previous work on the development of AMR algorithms for hexahedral meshes (Chapter 2) to tetrahedral meshes. Furthermore, our hexahedral AMR algorithm has been validated with numerical results from the literature, including turbulent flows around bluff bodies [33–35] and two-phase flows [32,36,37]. The AMR is included in the global algorithm developed for the CLS method (see [8]), and the AMR loop is reinitialized when the centroid of the bubble has moved a distance equal to the minimum grid size in the computational domain Ω . The global algorithm for the coupled AMR-CLS consists of the following steps:
86 Chapter 4. Tetrahedral adaptive mesh refinement for two-phase flows 1. Calculate the minimum grid size hmin in Ω. 2. Calculate the initial position of the bubble centroid bco. 3. Calculate ∆tby Eq. 4.16. 4. Solve level-set advection Eq. 4.6. 5. Solve re-initialization Eq. 4.7 for steady state. 6. Physical properties (ρ,µ) are updated according to Section 4.2.3 7. Calculate vand pby the fractional-step method: (a) Calculate the predicted velocity by Eq. 4.12. (b) Solve Eq. 4.14 for pressure. (c) Calculate the corrected velocity by Eq. 4.13. 8. Calculate vfby Eq. 4.15. 9. Calculate the actual position of the bubble centroid bc. 10. if (||bc−bco||<hmin) Repeat steps 3-8. else Re-mesh and repeat steps 1-8 until the desired time-level is reached. The Re-mesh step follows the next steps: • Physics-based criterion computation. The level-set function φ is used to identify the interface between fluids, and locally refine the mesh when 0 +²<φ< 1 −² , where ²= 1 e− 4. Moreover, to avoid the refinement process to be often repeated, up to three layers of neighboring cells adjunct to the interface profile will also be refined. This is done to give enough spatial displacement for the interface to move in any direction ensuring a good mesh resolution. Vorticity function is used to capture the vortical structures that appear in the near wake of the rising bubble. The vorticity field is calculated following the next equation, ω=∇×v.(4.17) The vorticity values which are positive identify clockwise rotating vortices, and the negative values are related to anti-clockwise rotation. With the vorticity magnitude field ||ω|| , the cells to be refined are the ones with vorticity values over
4.3 Tetrahedral adaptive mesh refinement algorithm 87 V1 V2 V3 V4 V12 V24 V13 V34 V14 V23 V1 V2 V3 V4 Figure 4.1: Illustration of the regular refinement of a tetrahedron the 10% of the maximum value for the entire field to capture the primary vortical structures. • Generation of adapted meshes. At each Re-mesh step, the current mesh and the corresponding physical criterion is processed to create the newly mesh. The refinement step is based on an 8-subdivision procedure for tetrahedron elements (See Fig. 4.1). The coarse mesh is refined to the level of resolution needed for the simulation. Moreover, a geometrical criterion is taken into account at the moment of the subdivision, diminishing the drop on the quality metric from the original cell to its children cells. In Appendix B, can be found a mesh multiplication algorithm based on the 8-subdivision procedure of different mesh elements and its application to CFD simulations The parallel algorithm for the subdivision procedure of a coarse partitioned mesh follows the next steps, where each one of them are executed independently on every grid subdomain with fixed interfaces: 1. Read mesh to be refined 2. Create a new mesh object and insert the vertex needed from the coarse mesh. 3. New vertex will be created in the edges of the elements. Thus, an edge data structure is used to create new vertex without duplicate them on the subdomain boundaries. 4. Unique global indexes are assigned according to the old indexes from the parent element to be subdivided. 5. Create new faces and cells according to a criterion to preserve the quality of the coarse mesh.
88 Chapter 4. Tetrahedral adaptive mesh refinement for two-phase flows 6. Parallel creation of an HDF5 data file with new mesh. For step 3 and 4, cells elements can be created uniquely, without duplication on each parallel subdomain, but faces and vertex need special treatment. For the faces that are shared between two parallel subdomains, the global identification number is just assigned by the subdomain with the lowest rank and copied to the highest rank. In the case of the vertex elements, that are shared among many ranks, a master-slave procedure is followed. As indicated in Fig. 4.2, the edge data structure is sent by each slave-rank to the master-rank. Here, the master-rank compares the edge information from each slave-rank to avoid duplication of new mesh elements and establishes a unique global index for the new vertex. Then, the proper information about indexes is sent back to the slaves-ranks to complete the new mesh. The quality of the refined mesh is important to get good numerical approximations and results. On the subdivision of tetrahedron cells on step 5, a criterion is followed to ensure that the quality of the new tetrahedron will have similar quality as the parent cell. This criterion consists of the inner edge of a tetrahedral has to connect its longest edges to generate eight tetrahedrons that will be similar to the original tetrahedron ( [17]). This can be shown in the Figure 4.1, where the edge V23V14 was the one chosen between the possible edges V23V14 , V13V24 and V12V34 , according to the criterion. Moreover, the new mesh is partitioned using ParMETIS library ( [38]), to ensure a good load balance for its use on parallel computing simulations. (See Fig. 4.3). • Solution interpolation. Between time intervals, the solution has to be transferred from one mesh to the newly. For now, we use a hierarchical cell evaluation mechanism: given any cell in the domain, it provides the value at this point and its hierarchical position on the octree data structure. Then, an average process is performed for the coarsening, and a pass value is done for the refinement process in the computational space. The numerical algorithms explained in this work have been implemented in the framework of a parallel C++/MPI code called TermoFluids [28]. The code has been executed on the supercomputer MareNostrum IV using up to 144 cores for 3D simulations of gravity-driven bubbles. Moreover, the parallel performance for the steps explained in
4.4 Numerical experiments 89 LR HR LR HR V0 V1 V?=V3 ( ) V0 V1 ( ) V0 V1 LRHR MR LRHR MR V?=V3V?=V3 V0 V1V1 V0 V3 V? Figure 4.2: Illustration of global Id assignment for a new vertex, shared between processors. LR=Lowest rank; HR=Highest rank; MR=Master rank the generation of the adapted meshes has been executed up to 384 CPU-cores showing a good strong speed up for the AMR of a tetrahedral mesh where the size to be refined was one million tetrahedron cells. This test has been performed in the supercomputer MareNostrum IV. In Figure 4.4, is shown the strong speedup for the generation mesh algorithm, where up to 192 CPU-cores it reaches an efficiency close to 90% 4.4 Numerical experiments In this section, numerical tests for validation are described, and new numerical experiments related to gravity-driven bubbles in regular and complex domains will be analyzed. According to [39] and [40], the dimensionless numbers controlling the rising
96 Chapter 4. Tetrahedral adaptive mesh refinement for two-phase flows Table 4.5: Dimensionless numbers for the presented test. Eo logM ρ1/ρ2µ1/µ2 3.00 −6.0 100 100 the top/bottom walls are Neumann conditions, whereas the no-slip condition is applied on the lateral walls. The initial mesh is around 27k control volumes and AMR was used to achieve the desired grid resolution ( h=d /60) in the interface, nearby the walls and in the near wake (See Fig. 4.9). The final number of control volumes is presented in Table 4.6. Figure 4.9: (Left) AMR for the test case Eo = 3 . 0, logM =− 6 . 0, with an effective grid resolution of 60 control volumes per diameter at the interface. (Right) Vorticity field for Eo = 3 . 0, logM =− 6 . 0. Figure 4.10 shows the time evolution for the Reynolds number. The observed Re is lower compared to the experimental Reynolds for an infinite domain, due to the increase of the drag force when the bubble is very close to the walls. Moreover, the bubble shape reaches a consistent ellipsoidal shape and its motion is aligned with the symmetry axis of the computational domain. The computed Reynolds number is compared to experiments, for infinite domain, reported by [40] and numerical results in a confined domain presented by [30](See Table 4.6). The scale factor relation SF , suggested by [39], is a correlation given for the influence of the wall on the single bubble rise velocity. For this case, with d / Dcyl = 0 . 5, it is defined
4.4 Numerical experiments 97 A A B B C C 0 10 20 30 40 50 60 70 0 1 2 3 4 5 6 Re t*=tg1/2d-1/2 Figure 4.10: Terminal Reynolds number and final shape for Eo =3.0, logM =−6.0. Table 4.6: Present Re computations compared with experimental results (infinite domain) by [40], and numerical results by [30]. Case Eo =3.0, logM =−6 Number of control volumes Re [40] Infinite domain 85 [30] 9.00e+05 57 Present AMR-CLS (h=d/60) 1.60e+06 56 by SF =UT/UT∞=[1 −(d/Dcyl)2]3/2.(4.22) According to Eq. 4.22, SF = 0 . 65, and for the present numerical results, SFnum = 0.66, which agrees well up with the correlation given by [39]. In Figure 4.9, the vorticity field is shown and presents the formation of a double vortex at the bottom of the bubble with the opposite direction. Moreover, the presence of counter-rotating vortices at the walls, which increases the total drag, are shown. This phenomenon leads to achieve terminal conditions within a short distance of the bubble release.
98 Chapter 4. Tetrahedral adaptive mesh refinement for two-phase flows These various tests serve to validate our numerical methodology. 4.4.3 Three-dimensional buoyant bubble in a complex pipe In the earlier section, the methodology was validated with the rising of a bubble in a vertical pipe, where the bubble velocity decreases due to the wall and the bubble deformed into an ellipsoidal shape. In this section, we investigate the rising of a bubble in a complex pipe and the effect of the wall on the rising motion. The dimensionless numbers selected are the same to the case in section 4.4.1, and are depicted in Table 4.7. Table 4.7: Dimensionless numbers for the presented test. Eo M ρ1/ρ2µ1/µ2 4.88 1.25e−05 100 100 The dimensions of the domain are shown in the figure 4.11, where the initial bubble of diameter d= 0 . 25 is located at ( x,y,z ) = (0 ,d, 0). Moreover, the boundary conditions in the lateral walls are no-slip, whereas the Neumann condition is applied to the top/bottom walls. The initial mesh is around 80k control volumes, and AMR was used to achieve the desired grid resolution ( h=d /60) in the interface and the near wake at different time moments (See Fig. 4.11). The final number of control volumes was around 2.2M. Figure 4.12 shows the terminal Reynolds number as the bubble travel through the pipe. The bubble rises because of buoyancy, where a pair of counter-rotating vortices appear at the bottom, making a cunning of the lower surface. With this deformation, the surface tension force and the viscous drag are increased, making the bubble to decelerate until reach an equilibrium. However, as the pipe presents a deviation, the bubble reaches the wall, which increments the drag force and the bubble drastically decrease its velocity and changes its shape to more spherical due to the increase of surface tension force provoked by the formation of different vortex near the wall (see Figs. 4.13 and 4.12). Along the wall, the velocity and shape keep stable, where a vortex in the contact point between the bubble and the wall prevents its attachment. Later on, when the bubble gets into a rectilinear section of the pipe, it is velocity increase until it reaches an equilibrium, similar to the first section of the pipe.
4.5 Conclusions 99 Figure 4.11: (Left) Configuration and dimensions of the computational domain. (Right) 3D AMR grid for the test case Eo = 4 . 88, M= 1 . 25 e− 05, with an minimum grid resolution of 60 control volumes per diameter at the interface. 4.5 Conclusions In this chapter, we describe an adaptive mesh refinement algorithm for two-phase flows, when using tetrahedral meshes and complex computational domains. The methodology consisted of a Conservative Level-Set method and Adaptive Mesh Refinement within a finite volume framework, which allows reproducing the main features of threedimensional two-phase flows, combining an accurate representation of the interface, proper mass conservation and a reduction of the computational effort. The AMR follows a regular refinement division of the tetrahedron element, taking into account a geometrical criterion to preserve the mesh quality. Numerical tests involving gravity-driven bubbles in regular and complex domains are used to evaluate the efficacy of the method reported. For the case of the gravitydriven bubble in an infinite domain, the terminal Reynolds number and the aspect ratio compare well with the results of experimental reference. Besides, the use of different convective schemes shows similar results for this case. In simulations of the gravitydriven bubble in a pipe, the terminal Reynolds number agrees well with the numerical reference using a fixed grid. Moreover, the scale factor, for cases with wall influence, shows good agreement with the correlation reference. For the test of the gravity-driven
100 Chapter 4. Tetrahedral adaptive mesh refinement for two-phase flows 0 10 20 30 40 50 60 70 0 5 10 15 20 Re t*=tg1/2d-1/2 A A B B C C Figure 4.12: Terminal Reynolds number for Eo =4.88, M=1.25e−05. in a complex domain, terminal Reynolds number, final shape, and flow field are shown. Where the wall effect produces a decrease in the velocity, increasing surface tension and drag forces which makes the bubble to be more spherical. The tests presented indicate that the numerical methods described are quite useful for the direct numerical simulation of two-phase flows in complex domains. References [1] S. Unverdi and G. Tryggvason. A front-tracking method for viscous, incompressible, multifluid flows. Journal of Computational Physics, 100:25–37, 1992. [2] G. Tryggvason, B. Bunner, A. Esmaeeli, D. Juric, N. Al-Rawahi, W. Tauber, J. Han, S. Nas, and Y-J. Jan. A front-tracking method for the computations of multiphase flow. Journal of Computational Physics, 169:708–759, 2001. [3] C. Hirt and B. Nichols. Volume of fluid (vof) method for the dynamics of free boundary. Journal of Computational Physics, 39:201–225, 1981.
References 101 Figure 4.13: Vorticity field for Eo =4.88, M=1.25e−05 at different bubble positions. [4] M. Van Sint Annaland, N.G. Deen, and J.A.M. Kuipers. Numerical simulation of gas bubbles behaviour using a three-dimensional volume-of-fluid method. Chemical Engineering Science, 60:2999–3011, 2005. [5] S. Osher and J.A. Sethian. Fronts propagating with curvature-dependent speed: Algorithms based on hamilton-jacobi formulations. Journal of Computational Physics, 79:175–210, 1988. [6] M. Sussman, P. Smereka, and S. Osher. A level set approach for computing solutions to incompressible two-phase flow. Journal of Computational Physics, 144:146–159, 1994. [7] E. Olsson and G. Kreiss. A conservative level set method for two phase flow. Journal of Computational Physics, 210:225–246, 2005. [8] N. Balcázar, L. Jofre, O. Lehmkhul, J. Castro, and J. Rigola. A finite-volume/levelset method for simulating two-phase flows on unstructured grids. International Journal of Multiphase Flow, 64:55–72, 2014. [9] N. Balcázar, O. Lemhkuhl, J. Rigola, and A. Oliva. A multiple marker level-set method for simulation of deformable fluid particles. International Journal of Multiphase Flow, 74:125–142, 2015.
102 Chapter 4. Tetrahedral adaptive mesh refinement for two-phase flows [10] N. Balcázar, O. Lemhkuhl, L. Jofre, and A. Oliva. Level-set simulations of buoyancydriven motion of single and multiple bubbles. International Journal of Heat and Fluid Flow, 56:91–107, 2015. [11] N. Balcázar, J. Rigola, J. Castro, and A. Oliva. A level-set model for thermocapillary motion of deformable fluid particles. International Journal of Heat and Fluid Flow, 62, Part B:324–343, 2016. [12] M.J. Berger. Adaptive mesh refinement for hyperbolic partial differential equations. Journal of Computational Physics, 53(3):484–512, 1984. [13] M.J. Berger and R.J. LeVeque. An adaptive cartesian mesh algorithm for the euler equations in arbitrary geometries. 9th Computational Fluid Dynamics Conference, AIAA, 1989. [14] K.G. Powell, P. L. Roe, and J. Quirk. Adaptive-mesh algorithms for computational fluid dynamics. In M. Y. Hussaini, A. Kumar, and M. D. Salas, editors, Algorithmic Trends in Computational Fluid Dynamics, 53:303–337, 1993. [15] Park M., Krakos J., Michal T., Loseille A., and Alonso J. Unstructured grid adaptation: status, potential impacts, and recommended investments toward cfd vision 2030. 2016. [16] J. Shewchuk. What is a good linear finite element? - interpolation, conditioning, anisotropy, and quality measures. Proceedings of the 11th International Meshing Roundtable, 73, 2002. [17] A. Liu and B. Joe. Quality local refinement of tetrahedral meshes based on 8- subtetrahedron subdivision. Mathematics of Computation, 65(215):1183–1200, 1996. [18] Zheng X., Lowengrub J., Anderson A., and Cristini V. Adaptive unstructured volume remeshing – ii: Application to two- and three-dimensional level-set simulations of multiphase flow. Journal of Computational Physics, 208(2):626–650, 2005. [19] Anderson A., Zheng X., and Cristini V. Adaptive unstructured volume remeshing – i: The method. Journal of Computational Physics, 208(2):616–625, 2005.
References 103 [20] Hoffman J., Jansson J., Vilela de Abreu R., Degirmenci N.C., Jansson N., Muller K., Nazarov M., and Spuhler J.H. Unicorn: Parallel adaptive finite element simulation of turbulent flow and fluid–structure interaction for deforming domains and complex geometry. Computers & Fluids, 80:310–319, 2013. [21] Rossi R., Cotela J., Lafontaine N.M., Dadvand P., and Idelsohn S.R. Parallel adaptive mesh refinement for incompressible flow problems. Computers & Fluids, 80:342–355, 2013. [22] C.S. Peskin. Numerical analysis of blood flow in the heart. Journal of Computational Physics, 25:220–252, 1977. [23] J.U. Brackbill, D.B. Kothe, and C. Zemach. A continuum method for modeling surface tension. Journal of Computational Physics, 100:335–354, 1992. [24] Y.C. Chang, T.Y. Hou, B. Merriman, and S. Osher. A level-set formulation of eulerian interface capturing methods for incompressible two-phase flows. Journal of Computational Physics, 124:462–488, 1996. [25] A.J. Chorin. Numerical solution of the navier-stokes equations. Mathematics of Computation, 22:745–762, 1968. [26] C.M. Rhie and W.L. Chow. Numerical study of the turbulent flow past an airfoil with trailing edge separation. AIAA, 21:1525–1532, 1983. [27] S. Gottlieb and C.W. Shu. Total variation dimishing runge-kutta schemes. Mathematics of Computations, 67:73–85, 1998. [28] Termo Fluids S.L. . http://www.termofluids.com/. [29] N. Balcázar, O. Lemhkuhl, L. Jofre, J. Rigola, and A. Oliva. A coupled volume-of- fluid/level-set method for simulation of two-phase flows on unstructured meshes. Computers & Fluids, 124:12–29, 2016. [30] N. Balcázar, J. Castro, J. Rigola, and A. Oliva. Dns of the wall effect on the motion of bubble swarms. Procedia Computer Science, 108C:2008–2017, 2017. [31] E. Gutiérrez, N. Balcázar, E. Bartrons, and J. Rigola. Numerical study of taylor bubbles rising in a stagnant liquid using a level-set/moving-mesh method. Chemical Engineering Science, 164:158–177, 2017.
104 Chapter 4. Tetrahedral adaptive mesh refinement for two-phase flows [32] E. Schillaci, L. Jofre, N. Balcázar, O. Antepara, and A. Oliva. A low-dissipation convection scheme for the stable discretization of turbulent interfacial flow. Computers & Fluids, 153:102–117, 2017. [33] O. Antepara, O. Lehmkhul, R. Borrell, J. Chiva, and A. Oliva. Parallel adaptive mesh refinement for large-eddy simulations of turbulent flows. Comuters & Fluids, 110:48–61, 2015. [34] O. Antepara, R. Borrell, O. Lehmkuhl, I. Rodríguez, and A. Oliva. Parallel adaptive mesh refinement of turbulent flow around simplified car model using an immerse boundary method. 11th World Congress on Computational Mechanics, WCCM 2014, 5th European Conference on Computational Mechanics, ECCM 2014 and 6th European Conference on Computational Fluid Dynamics, ECFD 2014, pages 2603–2611, 2014. [35] F. Favre, O. Antepara, O. Lehmkuhl, R. Borrell, and A. Oliva. On the fast transient spoiler deployment in a naca0012 profile using les techniques combined with amr and imb methods. 11th World Congress on Computational Mechanics, WCCM 2014, 5th European Conference on Computational Mechanics, ECCM 2014 and 6th European Conference on Computational Fluid Dynamics, ECFD 2014, pages 5392–5401, 2014. [36] E. Schillaci, O. Antepara, N. Balcázar, J.R. Serrano, and A. Oliva. A numerical study of liquid atomization regimes by means of conservative level-set simulations. Computers & Fluids, 179:137–149, 2019. [37] O. Antepara, N. Balcazar, and A. Oliva. A comparative study of interface capturing methods with amr for incompressible two-phase flows. Proceedings of the 7th International Conference on Coupled Problems in Science and Engineering, COUPLED PROBLEMS 2017, 2017-January:981–992, 2017. [38] G. Karypis, K. Schloegel, and V. Kumar. Parmetis, parallel graph partitioning and sparse matrix ordering library. 1998. [39] R. Clift, J.R. Grace, and E. Weber. Bubbles, drops and particles. 1978. [40] D. Bhaga and M.E. Weber. Bubbles in viscous liquids: shapes, wakes and velocities. Journal of Fluid Mechanics, 105:61–85, 1981.
References 105 [41] S. Aoyama, S. Hayashi, A. Hosokawa, and A. Tomiyama. Shapes of ellipsoidal bubbles in infinite stagnant liquids. International Journal of Multiphase Flow, 79:23–30, 2016. [42] P.K. Sweby. High resolution using flux limiters for hyperbolic conservation laws. SIAM Journal on Numerical Analysis, 21:995–1011, 1984.
112 Chapter 5. Conclusions and future work
Appendix A Parallel adaptive mesh refinement of turbulent flow around simplified car model using an immerse boundary method Main contents of this appendix have been published in: O. Antepara, R. Borrell, O. Lehmkuhl, I. Rodríguez and A. Oliva. Parallel adaptive mesh refinement of turbulent flow around simplified car model using an immerse boundary method. Proceedings of the Joint WCCM - ECCM – ECFD 2014 Congress, 6th. European Conference on Computational Fluid Dynamics (ECCOMAS ECFD VI), Spain. 2014. In the present appendix, a parallel adaptive mesh refinement (AMR) strategy for large-eddy simulations (LES) is proposed and tested for a fully 3D geometry. The underlying discretization of the Navier-Stokes equations is based on a finite-volume symmetry-preserving formulation, with the aim of preserving the symmetry properties of the continuous differential operators to ensure stability and conservation of kineticenergy balance. The proposed AMR scheme applies a cell-based refinement technique, with a physics-based refinement criteria based on the variational multi-scale(VMS) decomposition theory and an equalized histogram of the vorticity field. This strategy has been tested in other turbulent problems around bluff bodies in 2D and 3D. To carry out the simulation of turbulent flow around complex geometries with AMR, an immerse boundary method is implemented based on a finite volume approach. Finally, 113
114 Appendix A. Parallel adaptive mesh refinement of turbulent flow around simplified car model using an immerse boundary method the robustness and accuracy of our methodology is shown on the numerical simulation of the turbulent flow over an Ahmed car at Reh= 7 . 68 × 10 5 , which reproduces the basic fluid dynamics features of real cars, i.e. vortex shedding, flow reattachment and recirculation bubbles. A.1 Mathematical formulation In large-eddy simulations (LES) the spatial filtered and discretized Navier-Stokes equations are defined as Mu=0 (A.1) Ω∂u ∂t+C(u)u+νDu+ρ−1ΩGp=C(u)u−C(u)u≈−M T (A.2) where u and p represent the filtered velocity vector and pressure, respectively, ρ is the fluid density and ν is the kinematic viscosity, Ω is a diagonal matrix with the sizes of control volumes. Convective and diffusive operators in the momentum equation for the velocity field are given by C(u)= ( u·∇ ) and D=−∇2 , respectively. Gradient and divergence operators are given by G=∇ and M=∇· , respectively. The term that requires modelling is the filtered non-linear convective term. T is the SGS stress tensor, which is defined as [1], T= −2νsgsSij +(T:I)I/3 (A.3) Sij =1 2[G(u)+G∗(u)] (A.4) where Sij is the rate-of-strain tensor and G∗ is the transpose of the gradient operator. To close the formulation, a suitable expression for the subgridscale (SGS) viscosity, must be introduced. LES studies have been performed using a SGS model suitable for unstructured formulations: the wall-adapting local-eddy viscosity model within a variational multi-scale framework (VMS-WALE) [2,3]. Second-order spectro-consistent schemes on a collocated unstructured grid arrangement were adopted for the discretization of the governing equations. Discrete conservation properties are related to the symmetries of the continuous differential operators as studied in detail by Verstappen and Veldman [4]. These conservation properties are held if and only if the discrete convective operator is skew-symmetric C ( u ) =−C ( u ) ∗ , if the negative conjugate transpose of the discrete gradient operator is equal to the divergence
A.1 Mathematical formulation 115 operator M=−G∗ and if the diffusive operator is symmetric and positive-definite. For the temporal discretization of the momentum equation a two-step linear explicit scheme on a fractional-step method has been used for the convective and diffusive terms, while the pressure is solved using an implicit first-order scheme. This methodology has been extensively tested and verified with accurate results for solving the flow over bluff bodies with massive separation [5–8]. The immerse boundary method used in this work consist on the addition of a mass source/sink as well as a momentum forcing on the momentum equation, and if this equation is discretized in time, we obtain up−un dt =RHS +f(A.5) where RHS contains the convective and viscous terms and the pressure gradient. The forcing term will be a non-zero value on the inner body nodes (interior points) and on the fluid nodes that has a neighbour node inside the body or in the interface body-fluid (forcing points), but if up=V on the immersed boundary this will yield to a equation that gives the forcing value, f=V−un dt −RHS (A.6) where V in the interior points is the body velocity in that position, and for the forcing points a second order linear interpolation is used [9], to keep the global accuracy. To do this interpolation, three external neighbours nodes (no forcing points) and the nearest object node are used. Because the interpolation is held on the predictor velocities, an error appears due to the linear relation between the velocities is not kept after the projection step of the fractional-step method. To reduce this error, the idea introduced by [10] and improved on [11,12] is used. A.1.1 Adaptive mesh refinement algorithm Mesh adaptation is accomplished by coarsening and dividing a group of cells following refinement criteria based on our physical understanding of the problem. In regions where spatial resolution needs to be increased, a parent cell is refined by dividing itself eight (three dimensions) children (Fig. A.1). However, in areas that are over resolved, the refinement process can be reversed by coarsening eight children into a single parent cell. In any case, the grid adaptation is constrained such as the cell resolution changes by only a factor of two between adjacent cells.
116 Appendix A. Parallel adaptive mesh refinement of turbulent flow around simplified car model using an immerse boundary method Figure A.1: Illustration of AMR technique applied to a 3D Mesh and its corresponding octree The proposed mesh refinement scheme is based on linear interpolation; this scheme is performed by averaging the adjacent vertex coordinates of the parent cell. In addition, a tree data structure is used to keeping track of the computational cell connectivity to transmit the information between the old and new mesh, wherein the information on the tree data structure is corresponding to the level of refinement and the indexes representing each cell. The refinement criteria is based on the variational multi-scale(VMS) decomposition theory that allows the refinement of the cells where spatial resolution is needed to solve the small structures, this criteria has been tested with good results for turbulent problems around bluff bodies (Chapter 2). Moreover, an equalized histogram of the vorticity field is used, modifying the actual vorticity field into an equalized one with a linear cumulative distribution, thus the maximum and minimum values of the equalized vorticity are established between 0 and 1, and this wont requires continual tuning depending on the flow problem.
A.2 Numerical results of turbulent flow over an ahmed car at Reh=7.68×105117 A.2 Numerical results of turbulent flow over an ahmed car at Reh=7.68×105 Numerical simulations of the flow over an Ahmed car were performed at Reh= 7 . 68 × 10 5 , where the Reynolds number is based on the inlet velocity, Ure f , and the car height, h . Solutions are obtained on a computational domain of dimensions 9.1944 x 1.87 x 1.4, where the front of the body is located at a distance from the inlet of 2.1024m. The boundary condition at the inflow consist of a uniform axial velocity. At the lateral and top walls, slip boundary conditions are prescribed. A pressure-based boundary condition is applied at the outlet for the downstream. No-slip conditions at the bottom surface are considered. The use of an adaptive mesh, with four mesh levels for the interface fluid/object at the slant back and up to three mesh levels for the fluid, has allowed to cluster more control volumes around the body surface and in the near wake. Some illustrative results obtained are depicted in Figure A.2. Vorticity structures in the near wake obtained with the adaptive grid are plotted in Fig. A.2(left) and the computational grid is plotted in Fig. A.2(right). Results have been obtained based on the integration of instantaneous data over a sufficiently time period (from 10 to 30 time units), and a mesh with approximately 5M cells. Furthermore, preliminary results for the averaged streamwise velocity for the symmetry plane (y=0) at the rear end of the body are compared with the experimental data by Leinhart et al. [13] in figure A.3 and A.4. As can be seen, results obtained with a parallel adaptive mesh refinement are in good agreement with the experimental data, but some minor differences appear on the prediction of the mean flow in the final part of the slant back. In the results, the flow separates in the slant corner and forms a recirculation zone. So, minor discrepancies are obtained in the prediction of the Reynolds stresses as can be seen in Fig A.4. References [1] P. Sagaut. Large eddy simulation for incompressible flows. 2006. [2] F. Nicoud and F. Ducros. Subgrid-scale stress modeling based on the square of the velocity gradient tensor. Flow, Turbulence and Combustion, 62:183–200, 1999. [3] T.J.R. Hughes, L. Mazzei, and K.E. Jansen. Large eddy simulation and the variational multiscale method. Computing and Visualization in Science, 3:47–59, 2000.
118 Appendix A. Parallel adaptive mesh refinement of turbulent flow around simplified car model using an immerse boundary method top view side view Figure A.2: Illustration LES of turbulent flow over an Ahmed car at Reh= 7 . 68 × 10 5 (left)Vorticity structures (right) computational grid. [4] R.W.C.P. Verstappen and A.E.P. Veldman. Fourth-order dns of flow past a square cylinder: First results. Direct and Large-Eddy Simulation II ERCOFTAC Series, 5:381–384, 1997. [5] D.E. Aljure, O. Lehmkuhl, I. Rodríguez, and A. Oliva. Flow and turbulent structures around simplified car models. Computers & Fluids, 96:122–135, 2014. [6] O. Lehmkuhl, I. Rodríguez, R. Borrell, and A. Oliva. Low-frequency unsteadiness in the vortex formation region of a circular cylinder. Physics of Fluids, 25, 2013. [7] I. Rodríguez, R. Borrell, O. Lehmkuhl, C.D. Perez-Segarra, and A. Oliva. Direct numerical simulation of the flow over a sphere at re = 3700. Journal of Fluid Mechanics, 679:263–287, 2011. [8] I. Rodríguez, O. Lehmkuhl, R. Borrell, and A. Oliva. Flow dynamics in the wake of a sphere at sub-critical reynolds numbers. Computers & Fluids, 80:233–243, 2013. [9] E.A. Fadlun, R. Verzicco, P. Orlandi, and J. Mohd-Yusof. Combined immersedboundary finite-difference methods for three-dimensional complex flow simulations. Journal of Computational Physics, 161(1):35–60, 2000.
References 119 0.15 0.2 0.25 0.3 0.35 0.4 0.45 -0.25 -0.2 -0.15 -0.1 -0.05 0 0.05 U/Uref x Exp LES-PRESENT Figure A.3: Mean streamwise velocity profiles in the symmetry plane: solid line VMS-WALE model, dots experiments [13] [10] J. Kim, D. Kim, and H. Choi. An immersed-boundary finite-volume method for simulations of flow in complex geometries. Journal of Computational Physics, 171:132–150, 2001. [11] S. Kang, G. Iaccariono, and P. Moin. Accurate immersed-boundary reconstructions for viscous flow simulations. AIAA Journal, 47(7):1750–1760, 2009. [12] W.X. Huang and H. J. Sung. Improvement of mass source/sink for an immersed boundary method. International Journal for Numerical Methods in Fluids, 53:1659– 1671, 2007. [13] H. Lienhart, C. Stoots, and S. Becker. Flow and turbulent structure in the wake of a simplified car model. New Results in Numerical and Experimental Fluid Mechanics III. Notes on Numerical Fluid Mechanics (NNFM), 77, 2002.
120 Appendix A. Parallel adaptive mesh refinement of turbulent flow around simplified car model using an immerse boundary method 0.15 0.2 0.25 0.3 0.35 0.4 0.45 -0.25 -0.2 -0.15 -0.1 -0.05 0 0.05 Urms/Uref x Exp LES-PRESENT Figure A.4: Root mean square of the streamwise velocity fluctuations profiles in the symmetry plane: solid line VMS-WALE model, dots experiments [13]
Appendix B Parallel mesh multiplication and adaptation technique for turbulent flow simulation using unstructured meshes In this appendix, we report the development of a parallel mesh multiplication code to subdivide a base mesh (containing tetrahedral, pyramids, prisms or hexahedral) into a finer mesh without user intervention, taking care of the quality of refined meshes generated by the algorithm. First, a coarse mesh is generated with an unstructured mesh generator and subdivided to the level of resolution needed for the simulation. On the refinement process of tetrahedral elements, geometrical properties are taking into account in order to preserve the shape quality of the subdivided elements. Then, the mesh is conformed on the solid surfaces to the original geometry, since linear subdivision ignores surface curvatures, and interior points of the mesh are adapted using Radial Basis functions, due to the surface correction. Moreover, a smoothing algorithm for tetrahedral mesh is applied to improve the mesh quality according to element geometry metric or based in minimize numerical errors in the CFD solution computed with unstructured meshes. Finally, the applicability of this method is shown on the numerical simulation of the turbulent flow over an Ahmed car at Reh= 7 . 68 × 10 5 . 121
128 Appendix B. Parallel mesh multiplication and adaptation technique for turbulent flow simulation using unstructured meshes 1996. [2] 3D Systems Inc. Stereolithography interface specification. June 1988. [3] O. Estruch, O. Lehmkuhl, R. Borrell, C.D. Perez-Segarra, and A. Oliva. A parallel radial basis function interpolation method for unstructured dynamic meshes. Computers & Fluids, 80:44–54, 2013. [4] L. Freitag and C. Ollivier-Gooch. Tetrahedral mesh improvement using swapping and smoothing. International Journal for Numerical Methods in Engineering, 40(21):3979–4002, 1997. [5] C. Geuzaine and J. Remacle. Gmsh: a three-dimensional finite element mesh generator with built-in pre- and post-processing facilities. International Journal for Numerical Methods in Engineering, 79:1309–1331, 2009. [6] B. Klingner and J. Shewchuk. Aggressive tetrahedral mesh improvement. Proceedings of the 17th International Meshing Roundtable, pages 3–23, 2008. [7] M. Wicke, D. Ritchie, B.M. Klingner, S. Burke, J.R. Shewchuk, and J.F. O’Brien. Dynamic local remeshing for elastoplastic simulation. ACM Transactions on Graphics, 29(4):1–11, 2010. [8] R. Verstappen. When does eddy viscosity damp subfilter scales sufficiently? In: Quality and Reliability of Large-Eddy Simulations II, 16:421–430, 2011. [9] H. Lienhart, C. Stoots, and S. Becker. Flow and turbulent structure in the wake of a simplified car model. New Results in Numerical and Experimental Fluid Mechanics III. Notes on Numerical Fluid Mechanics (NNFM), 77, 2002. [10] S.R. Ahmed, G. Ramm, and G. Faltin. Some salient features of the time averaged ground vehicle wake. SAE Transactions, 93:473–503, 1984.
Appendix C A comparative study of interface capturing methods with AMR for incompressible two-phase flows Main contents of this appendix have been published in: O. Antepara, N. Balcázar and A. Oliva. A comparative study of interface capturing methods with AMR for incompressible two-phase flows. Proceedings of the 7th International Conference on Computational Methods for Coupled Problems in Science and Engineering, Greece. 2017. This appendix presents a comparative study of interface capturing methods with adaptive mesh refinement for Direct Numerical Simulation (DNS) of incompressible two-phase flows. The numerical algorithms for fluid motion and interface capturing methods have been previously introduced in the context of the finite-volume approach for both mass conservative level-set methodology and coupled volume-of-fluid/level-set method for unstructured/structured fixed meshes. The Adaptive Mesh Refinement (AMR) method introduced in consist on a cell-based refinement technique to minimize the number of computational cells and provide the spatial resolution required for the interface capturing methods. The present AMR framework adapts the mesh according to a physics-based refinement criteria defined by the movement of the interface between the fluid-phases. Numerical experiments are presented to evaluate the methods described in this work. This includes a study of the hydrodynamics of single bubbles rising in a quiescent viscous liquid, including its shape, terminal velocity, and wake patterns. These results are validated against experimental and numerical data well established 129
130 Appendix C. A comparative study of interface capturing methods with AMR for incompressible two-phase flows in the scientific literature, as well as a comparison of the different approaches used. C.1 Mathematical model and numerical methods C.1.1 Incompressible two-phase flow The momentum and mass conservation of two immiscible incompressible and Newtonian fluids are described by the Navier-Stokes equations defined a single fluid in Ω , with a singular source term for the surface tension force at the interface Γ[1–5]: ∂ ∂t(ρv)+∇·(ρvv)=−∇p+∇·µ³∇v+(∇v)T´+ρg+σκnδΓ(C.1) ∇·v=0 (C.2) where ρ and µ are the density and dynamic viscosity of the fluids, g is the gravity acceleration, pis the pressure, vis the velocity field, the super-index Trepresents the transpose operator, δΓ is a Dirac delta function at the interface Γ , σ is the surface tension coefficient, κ is the curvature of the interface and n denotes the unit normal vector on the interface. Physical parameters change discontinuously across the interface: ρ=ρ1H1+ρ2(1−H1)µ=µ1H1+µ2(1−H1) (C.3) with ρ1 , ρ2 and µ1 , µ2 being the densities and viscosities of the first and second fluids, respectively, whereas H1 is the Heaviside step function that is one at fluid 1 and zero elsewhere [1,2]. C.1.2 Conservative level set equations In the context of conservative level set (CLS) method [1,2,6], a regularized indicator function, φ , is employed as follows φ ( x,t ) = 0 . 5 (tanh(d(x,t)/2ε)+1) , where d is a signed distance funtion, ε= 0 . 5 h0.9 is a tunable parameter that sets the thickness of the profile, h is the grid size [1,2]. With this profile the interface Γ is defined by the location of the φ= 0 . 5 iso-surface [1,6], Γ={x|φ ( x,t ) = 0 . 5 } . Since the level set function is avected by an incompressible velocity field, the following interface transport equation can be written in conservative form: ∂φ ∂t+∇·φv=0 (C.4)
C.2 Numerical experiments 131 The level set function must be reinitialized to keep the profile and thickness of the interface constant following the next equation [1,6] ∂φ ∂τ +∇·φ(1−φ)n=∇·ε∇φ(C.5) The reader is referred to [1] for further details on the CLS method on unstructured meshes applied to this work. C.1.3 Coupled volume-of-fluid/level-set method In the volume-of-fluid method [7], an indicator function f is used to track the interface, f(x,t)=(1 if x∈Ω1 0 if x∈Ω2 (C.6) with Ω1 and Ω2 the sub-domains occupied by the fluid 1 and 2 respectively. Discretely, the information stored at the cell ΩP is the volume-averaged indicator function, namely the volume fraction fP=RΩPf ( x,t ) dV / RΩPdV , where V is the volume of the cell ΩP . The advection equation for fis given by: ∂f ∂t+v·∇f=0 (C.7) where v is the fluid velocity. The reader is referred to [8] for further details of the VOF-PLIC method used in the present work. The main idea in the coupled VOF/LS methods [9,10] is to take the advantages of both approaches (VOF and LS). In the present formulation, the mass losses are reduced through the application of a VOFPLIC method, while a fine representation of the interface curvature is preserved by utilizing the level set method. From the geometrical data of the interface given by the VOF-PLIC method, a signed distance function is reconstructed following a geometric algorithm [11]. Then, the signed distance function is used to compute surface tension forces. The reader is referred to [11] for further details on the VOF/LS method utilized in the present work. C.2 Numerical experiments Test cases are presented to validate the present numerical methods in the context of single buoyancy driven motion bubbles. In the next sections, the verification and
132 Appendix C. A comparative study of interface capturing methods with AMR for incompressible two-phase flows validation of the proposed AMR algorithm with CLS and VOF/LS are shown, in the context of 2D and 3D single bubbles. The dimensionless numbers controlling the rising of a quiescent bubble flows are the Eötvös number ( Eo ), Reynolds number ( Re ), Morton number ( M ) and the ratios of physical properties (density ratio ηρ and viscosity ratio ηµ) defined as following Eo =gd2∆ρ σM=gµ4 1∆ρ ρ2 1σ3Re =ρ1UTd µ1 ηρ=ρ1 ρ2 ηµ=µ1 µ2 (C.8) where the subindex 1 refers to the continuous fluid phase, the subindex 2 refers to the lighter fluid in the bubble, the subindex d refers to the dispersed phase. UT=RΩ2vyφdV / RΩ2dV is the terminal velocity of the bubble, ∆ρ=ρ1−ρ2 specifies the density difference between the fluid phases. Furthermore, in order to get a quantitative measure of bubble shape, the sphericity is defined as ζ=πd2/RΩ||∇f||dV. C.2.1 Two-dimensional rising bubble Solutions are obtained on a computational domain of [- db , db ];[0,4 db ], where the initial cylindrical bubble of diameter db= 5 . 0 is located at x=0, y= db (See Fig. C.1). The boundary conditions at the top and bottom are non-slip conditions, and on the vertical walls, a free-slip boundary condition is applied. The fluid parameters are: Eo = 10, Re = 35, ρ1 / ρ2= 10, µ1 / µ2= 10, where the subscript 1 is used for the continuous fluid phase, Ω1, while the subscript 2 is assigned to the lighter fluid in the bubble, Ω2. Figure C.1: Illustration of the computational domain (left)Bubble initial position (right)computational base grid-number of control volumes 7k. Present simulations are performed using AMR to ensure grid resolution on the interface between fluids. Following the numerical studies carried out by [1], a minimum grid size was fixed on the interface with three levels of refinement for VOF/LS( hmin =
C.2 Numerical experiments 133 db /240) and three/four levels of refinement for CLS( hmin =db /240 and hmin =db /480), to maximize the resolution of the bubble and reduce the overall number of control volumes for this case(total number of control volumes for three levels of refinement 9.3k aprox. and for four levels of refinement 37k aprox.). More refinement was achieved for CLS method because the interface is more wide compared to VOF/LS that has an interface thickness of one cell. The predicted bubble shapes on different times, defined as t∗=tg1/2d−1/2, with its AMR mesh are shown in Fig. C.2. CLS V OF/LS Figure C.2: Example of a two dimensional rising bubble with CLS and VOF/LS at t∗= 4 . 20. Bubble shape with its computational grid. For the sake of comparison, the benchmark quantities are defined as follows: vc=RΩ2v·eydV RΩ2dV ,yc=RΩ2x·eydV RΩ2dV ,ζ=πd2 b RΩ||∇f(x,t)||dV .(C.9) where vc is the rise velocity, ey is a unit vector parallel to the y−axis , yc is the bubble centroid, ζ is the bubble circularity which takes the value 1 for a perfect circular bubble and values less than unity as the bubble is deformed. Fig. C.3 shows the position of the bubble, terminal Reynolds number, and circularity as a function of time. Our results compare well with the data published by [12,13]. Both approaches show a correct representation of the dimple ellipsoidal bubble. Where the bubble being initially circular has a horizontal change, then the interfacial curvature gets smaller and, finally, tends to a certain limit value. This bubble deformation develops a slight dimple at the bottom but, at later times, eventually reaches a more
134 Appendix C. A comparative study of interface capturing methods with AMR for incompressible two-phase flows 0 2 4 6 8 10 12 14 0 0.5 1 1.5 2 2.5 3 3.5 4 Re t*=tg1/2d-1/2 HYSING et. al. (2009) AMR-VOF/LS AMR-CLS-Lvl3 AMR-CLS-Lvl4 0.8 0.85 0.9 0.95 1 1.05 1.1 0 0.5 1 1.5 2 2.5 3 3.5 4 Circularity t*=tg1/2d-1/2 HYSING et. al. (2009) AMR-VOF/LS-Lvl3 AMR-CLS-Lvl3 AMR-CLS-Lvl4 1 1.2 1.4 1.6 1.8 2 2.2 2.4 0 0.5 1 1.5 2 2.5 3 3.5 4 Centroid: Yc*=ycd-1 t*=tg1/2d-1/2 HYSING et. al. (2009) AMR-VOF/LS-Lvl3 AMR-CLS-Lvl3 AMR-CLS-Lvl4 Figure C.3: Two dimensional rising bubble results compared against [12]. (left top)Rise velocity (right top)Circularity (bottom)Bubble centroid stable ellipsoidal shape. C.2.2 Three-dimensional buoyant bubbles While the dynamics of a 2D single bubble is important for understanding the physical process of a rising bubble according to the dimensionless numbers, yet more useful information can be extracted from the analysis of a fully 3D single bubble. Experimental studies and correlations are usually invoked for the estimation of some macroscopic characteristics of the rising bubble. Rising bubble in ellipsoidal shape regime in an initially quiescent liquid is explored. The computational domain are [0,8 db ];[0,16 db ];[0,8 db ], where the initial bubble of diameter db= 2 . 5 is located at x=0, y=3 db as it is shown in Fig. C.4. The fluid parameters are: Eo = 116, Mo = 41 . 1, ρ1 / ρ2= 100, µ1 / µ2= 100, No-slip boundary condition is used at the top/bottom boundaries, and free-slip boundary condition is used at the lateral side of the domain. The mesh configurations follow an AMR strategy for 3D hexahedral elements. Following the numerical studies presented by [11], a minimum grid size was fixed on the interface ( hmin =db /64), to maximize the resolution of the bubble and reduce the overall number of control volumes for this case (total number of control volumes 825k aprox.).
C.2 Numerical experiments 135 Figure C.4: Illustration of the computational domain (left)Bubble initial position (right)computational base grid-number of control volumes 524k. CLS V OF/LS Figure C.5: Example of a three dimensional rising bubble with CLS and VOF/LS at t∗= 6 . 2. Bubble shape with its computational grid. A sequence of shapes for different times is presented in Fig. C.5. Bubble start to rise due to buoyancy and starts to stretch tending to form a dimple at the bottom. This is produced due to the bubble tries to achieve a skirted shape but, finally reaches a dimple ellipsoidal shape, where it remains. The numerical prediction for terminal Reynolds number is compared with the numerical results reported by [11,14] (See Table 1). A close agreement between CLS and VOF/LS results are obtained. Furthermore, CLS shows better mass conservation compared to VOF/LS (See Fig. C.6). Here, the instantaneous mass is evaluated and compared with the initial mass, then the mass conservation error is calculated by Mr =[M(t)−M(0)]/M(0) with M(t)=RΩf dV .
136 Appendix C. A comparative study of interface capturing methods with AMR for incompressible two-phase flows 0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 Re t*=tg1/2d-1/2 AMR-CLS AMR-VOF/LS 0 0.2 0.4 0.6 0.8 1 0 1 2 3 4 5 Sphericity t*=tg1/2d-1/2 AMR-CLS AMR-VOF/LS 10-14 10-12 10-10 10-8 10-6 10-4 0 1 2 3 4 5 Mr t*=tg1/2d-1/2 AMR-CLS AMR-VOF/LS Figure C.6: Three dimensional rising bubble results. (left top)Rise velocity (right top)Sphericity (bottom)Mass conservation error Table C.1: Present Re computations compared against experimental results from [15] and numerical results from [11,14]. [15] [14] [11] Present AMR-CLS Present AMR-VOF/LS Number of cells 2.30E6 2.92E6 8.25E5 7.75E5 Re 7.16 6.94 7.02 6.79 6.76 References [1] N. Balcázar, L. Jofre, O. Lehmkhul, J. Castro, and J. Rigola. A finite-volume/levelset method for simulating two-phase flows on unstructured grids. International Journal of Multiphase Flow, 64:55–72, 2014. [2] N. Balcázar, J. Rigola, J. Castro, and A. Oliva. A level-set model for thermocapillary motion of deformable fluid particles. International Journal of Heat and Fluid Flow, 62, Part B:324–343, 2016. [3] C.S. Peskin. Numerical analysis of blood flow in the heart. Journal of Computational Physics, 25:220–252, 1977.
References 137 [4] J.U. Brackbill, D.B. Kothe, and C. Zemach. A continuum method for modeling surface tension. Journal of Computational Physics, 100:335–354, 1992. [5] Y.C. Chang, T.Y. Hou, B. Merriman, and S. Osher. A level-set formulation of eulerian interface capturing methods for incompressible two-phase flows. Journal of Computational Physics, 124:462–488, 1996. [6] E. Olsson and G. Kreiss. A conservative level set method for two phase flow. Journal of Computational Physics, 210:225–246, 2005. [7] C. Hirt and B. Nichols. Volume of fluid (vof) method for the dynamics of free boundary. Journal of Computational Physics, 39:201–225, 1981. [8] L. Jofre, O. Lehmkuhl, J. Castro, and A. Oliva. A 3-d volume-of-fluid advection method based on cell-vertex velocities. Computers & Fluids, 94:14–29, 2014. [9] M. Sussman and E.G. Puckett. A coupled level set and volume-of-fluid method for computing 3d and axisymmetric incompressible two-phase flows. Journal of Computational Physics, 162:301–337, 2000. [10] D.L. Sun and W.Q. Tao. A coupled volume-of-fluid and level-set (voset) method for computing incompressible two-phase flows. International Journal of Heat and Mass Transfer, 53:645–655, 2010. [11] N. Balcázar, O. Lemhkuhl, L. Jofre, J. Rigola, and A. Oliva. A coupled volume-of- fluid/level-set method for simulation of two-phase flows on unstructured meshes. Computers & Fluids, 124:12–29, 2016. [12] S. Hysing, S. Turet, D. Kuzmin, N. Parolini, E. Burman, S. Ganesan, and L. Tobiska. Quantitative benchmark computations of two-dimensional bubble dynamics. International Journal for Numerical Methods in Fluids, 60:1259–1288, 2009. [13] S. Hysing. Mixed element fem level set method for numerical simulation of immiscible fluids. Journal of Computational Physics, 231:2449–2465, 2012. [14] N. Balcázar, O. Lemhkuhl, L. Jofre, and A. Oliva. Level-set simulations of buoyancydriven motion of single and multiple bubbles. International Journal of Heat and Fluid Flow, 56:91–107, 2015. [15] D. Bhaga and M.E. Weber. Bubbles in viscous liquids: shapes, wakes and velocities. Journal of Fluid Mechanics, 105:61–85, 1981.