gVOF: An open-source package for unsplit geometric volume of fluid methods on arbitrary grids
간접 관련 수소연료전지 · (7) MEA(막전극접합체) (5) 연료전지용 수분제어장치(가습기)(6) PEM(고분자전해질막)
기본 정보
- 저자
- DOI
- 10.1016/j.cpc.2022.108400
- 저널
- Computer Physics Communications
- 발행년도
- 2022
- 발행기관
- Elsevier BV
- 피인용수
- 17
- 라이선스
- cc-by-nc-nd
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.1016/j.cpc.2022.108400
- 토픽
- Surface Modification and Superhydrophobicity
- OpenAlex ID
- W3209746714
평가 내용
- 관련도
- 간접 관련
- 사업분야
- 수소연료전지 · (7) MEA(막전극접합체)
- 부 분야
- (5) 연료전지용 수분제어장치(가습기), (6) PEM(고분자전해질막)
- R&D 측면
- 분석·모델링
- 확신도
- 0.60
- 근거 용어
- computational fluid dynamics, volume of fluid method, two-phase flow, interface reconstruction, advection
- 판단 근거
- 이 논문은 복잡한 유체 흐름과 계면(interface)을 시뮬레이션하기 위한 수치 해석 알고리즘(VOF)에 관한 연구입니다. 직접적인 소재 연구는 아니나, 수소연료전지(PEMFC) 내의 수분 제어 및 가습 공정(5, 6, 7)에서 발생하는 다상 유동(two-phase flow) 및 액적 거동을 모델링하는 데 활용될 수 있습니다.
- R&D 활용 포인트
- 수소연료전지(PEMFC)의 가습기 내 수분 거동이나 MEA 내의 물 관리(water management) 시뮬레이션 정밀도를 높이기 위한 수치 해석 모델링 기법으로 응용 가능합니다.
- 평가 입력
- 본문 136,686자 중 30,032자 발췌
초록
본문 136,686자
본문 펼치기
섹션 본문 110문단 · 70,828자
(제목 없음)
1The goal of this work is to facilitate and extend the use of advanced unsplit geometric VOF methods in new or existing computational fluid dynamics codes.Program summaryProgram Title: gVOF Licensing provisions: GPLv3 Programming language: FORTRAN and C, with C interfaces Nature of problem: The software package includes efficient and accurate routines for volume of fluid initialization, reconstruction of interfaces and fluid advection on arbitrary grids, either structured or unstructured with convex or non-convex cells, which are used to implement advanced unsplit geometric VOF methods. In particular, the package includes a fluid volume fraction initialization method, six PLIC reconstruction methods and three multidimensional unsplit advection methods. Routines to visualize interfaces and compute reconstruction errors; test programs to assess the accuracy, computational efficiency, and volume conservation of the implemented methods for the reconstruction and advection of complex interfaces on arbitrary grids; and a user manual have also been included in the supplied package (temporal link to download the software: https://data.mendeley.com/ datasets/k6556xngbp/draft?a=1ee7cb83-8c31-453a-a17f-488cbe7d3685). Solution method: Basically, the implemented methods, which can be used on grids with polyhedral cells of arbitrary geometry, have the following general characteristics. The implemented fluid volume fraction initialization and reconstruction error computation methods are based on the refinement procedure proposed in [1, 2]. The implemented interface reconstruction methods are the following: a leastsquares gradient interface reconstruction (LSGIR) method; improved versions of the local (LLCIR), extended (ELCIR) and conservative (CLCIR) isosurface-based interface reconstruction methods proposed in [3]; an extension to 3D of the iterative Swartz interface reconstruction (SWIR) method proposed in [4]; and a version of the least-squares fit interface reconstruction (LSFIR) method proposed in [5, 6]. The three implemented advection methods are the following: an extension to 3D arbitrary grids of the edge-matched flux polygon advection (EMFPA) method proposed in [7]; a new version of the face-matched flux polyhedron ad-
Abstract
2The gVOF package includes a complete and self-contained set of routines for volume of fluid initialization, interface reconstruction and fluid advection, which are used to implement several accurate and efficient geometric volume of fluid (VOF) methods on arbitrary grids, either structured or unstructured with convex or non-convex cells, based on multidimensional unsplit advection and piecewise linear interface calculation (PLIC) schemes. The package uses the non-convex analytical and geometrical tools developed by López The operations required during the advection step of unsplit geometric VOF methods in general involve handling of high-complex non-convex flux polyhedra, even with self-intersecting faces, which are robustly and efficiently treated in this work without the need of costly techniques based on convex decomposition. Results for the accuracy, computational efficiency, and volume (local and global) conservation properties of different combinations of the implemented advection and reconstruction methods are presented for several numerical tests on structured and unstructured grids. An extensive comparison with results obtained by other authors using advanced geometric VOF methods shows the outstanding performance of the gVOF package in terms of efficiency and accuracy. To demonstrate the performance of the package in solving complex two-phase flow problems, the implemented methods are combined with an existing in-house code to simulate the impact of a water drop on a free surface. The package can be used in FORTRAN or C languages and will be publicly available for download. The OpenMP application programming interface is also used to improve computational efficiency. vection (FMFPA) method proposed in [8]; and the non-matched flux polyhedron advection (NMFPA) method, which can be considered as an extension to 3D arbitrary grids of the unsplit advection method proposed in [9]. The supplied software package uses the VOFTools [10] and isoap [11] libraries. All the implemented methods can be combined by the user to solve different tests on arbitrary grids. The implemented routines can be used in FORTRAN or C. The OpenMP application programming interface is used to improve the computational efficiency.
Introduction
3There are many methods for interface capturing. Among them (see, for example, Reference [1] for a complete review), the volume of fluid (VOF) method is one of the most popular. This method uses an auxiliary function, referred to in this work as f , to implicitly capture the interface. Mass conservation is among its main advantages and the recent improvements in the computation of geometric characteristics such as interface curvature (e.g., [2][3][4][5][6][7][8][9][10]) or orientation (e.g., [9,[11][12][13][14][15][16][17]) make this method even more competitive compared to others. The VOF methods could be classified in two main groups: (1) algebraic and (2) geometric methods. In algebraic type VOF methods, the auxiliary function f is usually represented algebraically by a polynomial or trigonometric function while in geometric type VOF methods, a discretized version of f is represented geometrically by the region delimited by the considered cell and the interface, which is generally defined by a line in two dimensions (2D) or a plane in three dimensions (3D). The geometric VOF methods, although they require a relatively high complex implementation, are more accurate in the computation of fluxes through cell faces and may be more computational efficient since only the closest cells to the interface are involved in the computation (algebraic VOF methods involve larger grid cell stencils). However, probably due to the above geometric implementation complexity, algebraic VOF methods are still widely used in many commercial and non-commercial codes (for example STAR-CCM+ or AN-SYS Fluent, among others). A recent review of interface-capturing methods for two-phase flows [18] concludes that geometric VOF methods are among the most promising interface-capturing methods for future investment. An overview of different geometric VOF methods, mainly focused on unstructured grids and three dimensions, is recently presented in [19].
4Geometric VOF methods basically consist of two steps: interface reconstruction and fluid advection. At each time interval, these two steps can be computed in only one stage using unsplit schemes or in multiple stages using split schemes that perform one dimensional advection for each spatial dimension (2 stages in 2D or 3 stages in 3D). The most advanced geometric VOF methods used today generally involve unsplit schemes with PLIC (piecewise-linear interface calculation) reconstruction, although competitive geometric VOF methods based on split schemes can also be found, e.g., in [14,20,21]. PLIC reconstruction is being used since the first implemented geometric VOF method [22] and prevails over the less accurate piecewiseconstant SLIC (simple line interface calculation) reconstruction [23]. Unsplit schemes, although they require higher complex geometric operations than split schemes, especially in 3D, are computationally efficient because only one interface reconstruction per time interval is required and have the potential to be readily implemented on unstructured grids. This work is focused on these schemes.
5Among others, Kothe et al. [24], Rider and Kothe [25], Harvie and Fletcher [26,27], López et al. [15,16] and Pilliod and Puckett [12], for 2D, and Rider and Kothe [25], Miller and Colella [28], Liovic et al. [13], Hernández et al. [29], López et al. [17], and more recently Owkes and Desjardins [30] or Marić et al. [31] for 3D, developed geometric-unsplit VOF methods, but only results on structured square or cubic grids were provided. Some of the first results on 2D unstructured grids can be found, for example, in the works by Mosso et al. [32,33]. Successful implementations of unsplit geometric VOF methods coupled with a level set method were also developed by Ningegowda and Premachandran [34] and Cao et al. [35] on 2D structured and unstructured grids, respectively. Due to the highly complex geometric operations involved in these methods, very scarce results can be found in the literature on 3D grids with non-cubic cells. Thanks to the appearance of the VOFTools routines, which have also been used by many of the authors referenced in this section, the first results on grids with non-cubic cells were obtained by López and Hernández [36]. Later, Ivey and Moin [37] and Jofre et al. [38] imple-mented methods that use, like in the edge-matched flux polygon advection (EMFPA) method proposed by López et al. [15] and following the suggestion made by Hernández et al. [29], the velocities in cell vertices to construct flux regions in cell faces on 3D unstructured grids, minimizing overlaps between them and reducing bounding errors in the fluid volume fraction distribution. Very recently, Ngo et al. [39] developed a similar geometric-unsplit VOF method coupled with a level set method and provided results on unstructured triangular and tetrahedral grids. Ivey and Moin [40] proposed the non-intersecting flux polyhedron advection (NIFPA) method that uses an iterative procedure to satisfy conservation and boundedness of the liquid volume fraction irrespective of the underlying flux polyhedron geometry on structured and unstructured grids. A recent advanced geometric VOF method based on isosurface constructions for general grids with arbitrary polyhedral cells was proposed by Roenby et al. [41] and improved later in [42] by using reconstructed distances to PLIC interfaces.
6The main objective of this work is to implement a publicly available software which includes several accurate and efficient PLIC reconstruction and unsplit advection methods with the purpose to spread their use to simulate complex interface dynamics in arbitrary grids, with convex or non-convex cells. In particular, the following seven methods, described in Section 2, are implemented:
7(i) Six PLIC-based reconstruction methods:
8• an interface reconstruction method based on a least-squares gradient technique proposed by Barth and Frederickson [43] (Section 2.1.1),
9• three new versions of the isosurface based interface reconstruction methods proposed by López et al. [17] (Section 2.1.2),
10• a 3D version of the iterative Swartz [44] interface reconstruction method (Section 2.1.3), and
11• a 3D version of the least-squares fit interface reconstruction methods of Scardovelli and Zaleski [11] and Aulisa et al. [14].
12(ii) Three unsplit advection methods:
13• an extension to 3D arbitrary grids of the edge-matched flux polygon advection, also referred to hereafter as EMFPA (edge-matched flux polyhedron advection), method proposed by López et al. [15] (Section 2.2.1),
14• a new version of the face-matched flux polyhedron advection (FMFPA) method proposed by Hernández et al. [29] (Section 2.2.2), and
15• an extension to 3D arbitrary grids of the unsplit advection method proposed by [25], which will be referred to as non-matched flux polyhedron advection (NMFPA) method (Section 2.2.3).
16Also, a fluid volume fraction initialization method based on the refinement procedure proposed in [7,45] and routines for interface visualization are implemented. A brief description of the routines included in the gVOF package is presented in Section 3 and further details can be found in the user manual included in the supplied software. In Section 4, an analysis of accuracy, computational efficiency, and volume conservation properties of different combinations of the implemented advection and reconstruction methods is carried out for several numerical tests using structured and unstructured grids with convex and non-convex polyhedral cells. Also, an exhaustive comparison with results obtained with previous advanced geometric-unsplit VOF methods is included. The implemented package has been combined with an existing code developed by our group [7,16,29,46,47] to simulate complex phenomena involved in the impact of a water drop onto a free surface, and its results are presented in Section 5. Finally, the parallel performance of the gVOF package is assessed in Section 6. To avoid doing an excessively long work, the detailed analysis of the high number of parameters involved in the implemented algorithms will be published elsewhere.
Problem statement
17The gVOF package solves the time-evolution equation
18where the function f is equal to 1 in the fluid and 0 otherwise, and u is the velocity field. This equation is integrated over a time interval from t n to t n+1 and a given cell, Ω, of volume V Ω , to obtain, at each time step,
19where F is a discretized version of the function f , whose value in each cell of the computational grid is the fraction of the cell occupied by the fluid.
20F will be denoted hereafter as fluid volume fraction. As suggested by Rider and Kothe [25], the application of the last term in Eq. (2), even for incompressible flows, can help to improve the local and global volume conservation. Note that this term must be null if the velocity vector field u is discretely solenoidal. The first integral in Eq. (2) represents the net volume of fluid advected out of the cell. This volume is computed geometrically using an unsplit advection method, for which the fluid interface must be previously reconstructed using a PLIC method. Both reconstruction and advection represent the most complex and time-consuming steps in any advanced geometric VOF code. Below, the methods implemented in the gVOF package for these two steps are briefly described.
Interface reconstruction
21Based on the value of F , the grid cells are classified in two types:
22where is a small value close to zero (in the order of 10 −10 ). For all the uniform cells, the volume fraction is cut off before reconstructing as
23For each interfacial cell, the interface is represented by a planar interface defined as n · x + C = 0,
24where the unit vector n normal to the interface and pointing into the fluid is firstly determined from any of the methods amenable to arbitrary grids described below, and then, the constant C is computed so that the interface splits the cell Ω of volume V Ω into two sub-cells of volumes F V Ω and (1 − F )V Ω . In this work, the CIBRAVE (coupled interpolation-bracketed analytical volume enforcement) method of López et al. [48] is generally used to compute C, except when using grids with rectangular parallelepiped cells, for which the efficient analytical method of Scardovelli and Zaleski [49] is used. The implementation of these two volume conservation enforcement methods is included in the VOFTools package [50][51][52].
25This work implements into the gVOF package: a weighted least-squares gradient technique (Section 2.1.1), also known as Youngs' method, which shows very good performance in terms of efficiency and accuracy in regions where the grid resolution is not enough; three methods based on isosurface extractions (Section 2.1.2), which generally show superior accuracy in regions with enough grid resolution; and two interface reconstruction methods which can be applied iteratively (Sections 2.1.3 and 2.1.4).
Least-squares gradient interface reconstruction, LSGIR
26The unit vector normal to the interface, n, is obtained for every interfacial cell from the gradient of the fluid volume fraction distribution ∇F as
27using a weighted least-squares technique [43], amenable to any grid. This technique, which can be considered as an extension of the Youngs' finite difference approximations for ∇F [53] to arbitrary grids [24,25], has been implemented as follows.
28A stencil involving neighbor cells of every interfacial cell is considered, in which each neighbor cell k, with geometric centers given by x k ≡ (x k , y k , z k ), shares at least one vertex with the interfacial cell, with geometric center given by x ≡ (x, y, z). Then, the sum n k=1 F k − F k 2 , over all the n neighbor cells, of the quadratic differences between the Taylor series expanded F k and F k values, is minimized using a weighted least-squares fit that yields the following equation for the volume fraction gradient:
29where
30and the weight
31is used to soften the influence of remote stencil points on the results of the least squares approximation. A detailed analysis of the effect of the β parameter on the accuracy of the LSGIR method will be published elsewhere.
Isosurface based interface reconstruction
32The vector n is obtained with the aid of the isosurface extracted from the volume fraction distribution interpolated at cell vertices, F * . For every interfacial cell whose maximum and minimum interpolated F * values satisfy the condition
33the isosurface corresponding to the isovalue 0.5 is constructed using the procedure proposed by López et al. [54] (see the example of Fig. 1). The interfacial cells that do not satisfy the condition of Eq. (10) or produce more than one isosurface, situations that frequently occur in regions of low grid resolutions, are reconstructed using the LSGIR method, which, as mentioned, performs well in such cases.
34Below, three different variants of the interface reconstruction based on isosurface extraction will be briefly described. Considerations for the domain boundaries can be found in [17] and further details will be published elsewhere. Local level contour-based interface reconstruction, LLCIR. The extracted isosurface, which generally is non-planar, is triangulated using its geometric center, which is obtained by simple averaging the position vectors of the isosurface vertices, as it is sketched in the example of Fig. 2, and the interface unit vector n in the considered interfacial cell is obtained from a weighted average of the unit vector normals to the isosurface triangles (see the example in Fig. 3). Different weighted parameters, based on angles, edge lengths or areas of the isosurface triangles, are considered in the implemented package and a detailed analysis of the performance of each one will be carried out elsewhere. Extended level contour-based interface reconstruction, ELCIR. The vector n is obtained from an extended triangulated isosurface involving adjacent cells. The extension to adjacent cells is made by connecting the geometric centers of the set of vertices of the extracted isosurfaces, as sketched in the example of Fig. 4(a), resulting in a new triangulated surface (see the extended triangulated surface in the example of Fig. 4(b)) from which n is finally obtained by averaging as mentioned above (Fig. 3). If the extended triangulated surface yields an orientation that differs by more than 1.2 rad with respect to that provided by the LLCIR method, the vector n is obtained from the previous local triangulated isosurface.
35Conservative level contour-based interface reconstruction, CLCIR. After applying the ELCIR method and the volume conservation procedure on each interfacial cell to obtain the position of the PLIC interface ( Fig. 5 shows the reconstructed PLIC interface that encloses the fluid volume corresponding to the value of F in the cell), the vertices of the extended triangulated surface are translated to the geometric centers of the set of vertices of the corresponding PLIC interfaces (see the example in Fig. 6(a)), resulting in a conservative extended triangulated surface ( Fig. 6(b)) from which n is again obtained by averaging. A filter like that used in the above section for orientation differences higher than 1.2 rad is also applied here.
Swartz interface reconstruction, SWIR
36The unit normal vector n is obtained using a procedure based on the iterative second-order interface reconstruction method of Swartz [44], which uses the fact that for a pair of certain neighbor interfacial cells there exists a"common orientation" that can be obtained from the fluid volume fractions in the two cells. Neighbor cells are those sharing at least one vertex. For a given interfacial cell, n is computed by averaging its common orientations with some of the neighbor interfacial cells, as described below. The method implemented in this work is similar, although with some considerations, to the variants described by Dyadechko and Shashkov [55] and Garimella et al. [56], which are somewhat different from the previous description given by Mosso et al. [32].
37For a given interfacial cell, two types of iterations (inner and outer) are performed as follows. The inner iteration is applied over every valid neighbor interfacial cell until the common orientation reaches a prescribed tolerance, while the outer iteration involves all its valid neighbor interfacial cells as follows. Inner iteration. A pair of neighbor interfacial cells are valid to perform the inner iteration if their interface orientations obtained in the previous outer iteration differ by less than 45 • . Every valid pair must be iterated over as follows until the difference of the common orientation is below 10 −6 rad.
381. Connect the geometric centers of the set of vertices of the paired PLIC interfaces. 2. Compute the perpendicular to the common segment joining the geometric centers. 3. Use this perpendicular to estimate the common orientation and locate the PLIC interfaces to conserve the associated fluid volume fractions.
39Outer iteration. The interface orientation computed in the previous outer iteration is updated by the new orientation if it differs by less than 30 • /I out , where I out is the number of repetitions performed in the outer iteration, and the PLIC interface is located to match the corresponding fluid volume fraction. It should be mentioned that the update of an interface orientation is made only after the new orientation is computed over all the interfacial cells. The outer iteration is repeated until the angle between the previous (I out − 1) and current (I out ) computed interface orientation reaches a value lower than a prescribed tolerance or a maximum n out of repetitions (the prescribed tolerance and the maximum number of repetitions of the outer iteration can be set by the gVOF user). The previous interface orientation values for the first outer iteration (I out = 1) are obtained using the LSGIR method from Section 2.1.1.
Least squares fit interface reconstruction, LSFIR
40The unit normal vector n is obtained using a version applied to arbitrary polyhedral grids of the least-squares fit interface reconstruction methods presented by Scardovelli and Zaleski [11] and Aulisa et al. [14].
41The interface is first reconstructed using the LSGIR method of Section 2.1.1 and the geometric center of the set of vertices of every reconstructed PLIC interface is computed. Using the centroid of the polygonal PLIC interface, like in [14], instead of the above geometric center provides similar results at the cost of a higher CPU time. The interface orientation of a given interfacial cell is updated from the orientation of the plane passing through its PLIC geometric center x that minimizes the distances δ k to every PLIC geometric center x k of neighbor interfacial cell k. The solution is obtained using a least-squares procedure that minimizes the functional H defined by
42where n valid is the total number of valid neighbor interfacial cells and the weight w k = 1/|x k − x| 2.5 (the exponent 2.5 is roughly obtained by trialand-error analysis). A neighbor interfacial cell is valid if it satisfies the same condition imposed for the inner iteration in the SWIR method. The LSFIR method can be applied using the outer iteration described in Section 2.1.3.
Fluid advected through cell faces
43The following procedure is applied to determine the net volume of fluid advected out of the cell (first integral in Eq. (2)). On each polygonal cell face j of I vertices, the flux region of volume
44where n j is the unit vector normal to it pointing out of the cell, u
45is the velocity vector at its center and intermediate time t n+ 1 2 = 1 2 (t n + t n+1 ), and A j is its area, is delimited by I + 2 flux region faces (see the example of Fig. 7 corresponding to a quadrilateral cell face (shaded region)), one of which is planar and coincides with the considered cell face (first flux region face) and the other I + 1 flux region faces may be non-planar, self-intersected and have curved edges: I faces that have a common edge with the first flux region face (each one of these faces can be considered as the streak surfaces emanating from the corresponding common edge) and the last one is opposite to the first one. To make this complex flux region computationally affordable, its edges and faces will be approximated by straight lines and planar surfaces, respectively. Hereafter this discrete flux region will be denoted as flux polyhedron Ω p j and may be non-convex and even have self-intersecting faces. Three different schemes, the edge and face matched flux polyhedron advection schemes described respectively in Sections 2.2.1 and 2.2.2, and the non-matched flux polyhedron advection scheme described in Section 2.2.3, are used to construct the flux polyhedron Ω p j . Hereafter, the unsplit advection procedure implemented in 3D in combination with the construction of edge-matched, face-matched, or non-matched flux polyhedra will be referred to as EMFPA, FMFPA or NMFPA methods, respectively. The volume of fluid V F j advected through the cell face j, which is taken to be positive when the fluid leaves the cell and negative otherwise, will depend on the shapes of Ω p j and the fluid regions determined by the reconstructed PLIC interfaces in cells intersected by Ω p j . Note that donating regions from several cells need to be considered. This is the most expensive task, in which recursive intersections between half-spaces and the generally non-convex Ω p j are required to compute V F j (the resulting truncated fluid regions are highlighted with red dashed lines in the 2D example of Fig. 8). The use of the non-convex tools proposed in [45] allows to perform these recursive intersections efficiently without the need to additionally decompose Ω p j , which will have a very positive impact on the computational efficiency of the whole advection scheme. The details of the procedure used to perform the recursive intersection operations will be published elsewhere.
Streak line
46Finally, the new volume of fluid fraction at t n+1 is obtained from Eq. (2) as where
47is the total net flux volume in the cell (second integral in Eq. (2)), and
48is the total net volume of fluid that leaves (or enters) the cell (first integral in Eq. (2)), and the summations extend over all the faces of the considered grid cell.
49The gVOF package does not use additional algorithms to redistribute the very small liquid volumes which are out of the limits given by the volume fraction. Instead, the updated F n+1 value is finally adjusted by simply mak-
Edge-matched flux polyhedron
50The procedure used to construct an edge-matched flux polyhedron is analogous to that of the 2D version proposed by López et al. [15], in which the flux polygons on cell edges that have a vertex in common are constructed by having an edge with a common orientation, thus avoiding over/underlaps between flux polygons, provided that the time interval is low enough. In 3D, the proposed procedure also avoids over/underlaps between flux polyhedra on cell faces with a common vertex. The flux region corresponding to a given cell face of I vertices is delimited by a polyhedron Ω p j with 5I + 1 faces and 3I + 1 vertices as described below (see the example of Fig. 9).
51The first face of Ω p j is matched to the considered cell face. It will be assumed that all the computational cells are composed by planar faces. Each vertex i (white circles in Fig. 9) of the first face is transported back in time along its streak line by solving
52The following approximation is used in this work to integrate Eq. (17) from where x I+i is the position vector of the transported face vertex i at time t n (gray circles in Fig. 9). All the results presented in this work were obtained with u
53. Each edge of the first face and the approximated streak lines corresponding to the back-traced of its vertices delimit a flux face which is generally non planar. The next step is to replace this generally non-planar face by four triangles using its geometric center obtained by simple averaging of vertex positions (white square in Fig. 9), as shown in the sketch of Fig. 9.
54The remaining flux region face is delimited by the I back-traced vertices, producing a generally non planar face which is also triangulated to obtain a surface of I triangles. Instead of directly using the geometric center of the I back-traced vertices in the triangulation, which would produce a flux region without the required volume, this geometric center is translated in the direction normal to the face (volume adjustment line indicated in Fig. 9) so that the volume of the flux polyhedron coincides with V d j (the final point is depicted with a rhombus symbol in Fig. 9). This approach is like that used in [30].
Face-matched flux polyhedron
55A face-matched flux polyhedron Ω p j is constructed using a new version of the procedure proposed in [29]. This new procedure produces flux polyhedra defined by 2I + 1 faces and vertices (see the example of Fig. 10), which obviously is computationally less expensive compared to the flux polyhedra produced by the EMFPA method (this can be clearly seen by comparing the examples in Figs. 9 and 10). Following the work in [29], the basic idea is to ensure that the flux polyhedra constructed on cell faces with a common edge have a face with a common orientation. The details of this face-matched flux polyhedron construction are given below.
56As in Section 2.2.1, the first face of Ω p j coincides with the considered cell face. Each face of Ω p j that has a common edge with the first face is made parallel to the velocity vector at the center of the common edge (white circles in Fig. 10). The vertices of the remaining face of the flux region (gray circles in Fig. 10), which are initially obtained by back tracing along the lines of intersection of the planes that contain the faces contiguous to the cell face, determine a generally non-planar flux region face which is adjusted by triangulation using the same volume conservation enforcement mentioned in the above section. This approach is found to be more robust than that used by Hernández et al. [29] to impose the volume constraint of Ω p j , although also slightly more complex geometrically (in [29], Ω p j is defined by only I + 2 faces and 2I vertices). As it was mentioned, the FMFPA method, either the original or the new version, avoids over/underlaps between flux polyhedra constructed on cell faces with a common edge, although over/underlaps may still occur between flux polyhedra constructed on cell faces with only a common vertex.
Non-matched flux polyhedron
57A non-matched flux polyhedron Ω p j is constructed using solely the velocity vector defined at the center of face j. The procedure described below, which could be considered as an extension to 3D arbitrary grids of the procedure described by Rider and Kothe [25], produces a flux polyhedron defined by I + 2 faces and 2I vertices (see the example of Fig. 11), which further reduces the geometric complexity of the methods described in Sections 2.2.2 and 2.2.1. Liovic et al. [13] developed a similar procedure which was applied to cubic grids. Note that with this procedure the absence of over/underlaps between flux polyhedra constructed on cell faces with some vertex (just one or both) in common is not warranted.
58As in Sections 2.2.1 and 2.2.2, the first face of Ω p j is made coincident with the considered cell face. Each vertex of the first face is transported back in time from an expression like that of Eq. (18), but using a unique velocity vector (the face center velocity vector) for all the other face vertices. Because of this, (1) each edge of the first face and the approximated streak lines corresponding to the back-traced of its vertices delimit a flux face which is planar, (2) the I back-traced vertices also delimit a planar flux region face, and (3) the resulting volume of the flux polyhedron must coincide with the volume V d j . Therefore, the triangulation of non-planar faces and the additional step used in the EMFPA and FMFPA methods to impose the volume constraint given by V Ω p j = V d j are not required.
Description of the routines
59Below, the main routines implemented to solve Eq. (1) are presented (a brief description of each one is summarized in Table 1). It must be mentioned that gVOF requires the VOFTools v5 [45,52] and isoap [54,57] external libraries. For the sake of brevity, the calling convection and the list of input and output parameters for each routine described hereafter, as well as others auxiliary routines not mentioned here, are left to be provided in the user manual included in the supplied software package.
Grid construction
60The defgrid routine has been implemented to construct the computational grid. The grid is defined by a structure like that used by other codes, such as OpenFOAM [58]. The computational domain is divided into discrete non-overlapping polyhedral cells to form the grid. Each polyhedral cell is defined by a set of nodes and is bounded by planar polygonal faces. These faces may be internal or belong to a grid boundary. An internal face is shared by two cells, which are referred to in the example of Fig. 12 as owner and neighbor cells, while a face located in the domain boundary belongs to only one cell. The nodes of each face are arranged sequentially so that the vector joining two consecutive nodes leaves the face to the left (counterclockwise order) when viewed from outside the owner cell (see the node order illustrated in the example of Fig. 12).
61The neigbcell routine has been implemented to obtain the list of cells that share at least one node with a given cell and the compgrid routine has been implemented to compute different geometric parameters related with Table 1: Brief description of the main routines included in the gVOF package.
Name
62Description defgrid constructs the grid neigbcell obtains the list of cells that share at least one node with a given cell compgrid computes different geometric parameters related with the cells and faces of the grid printgrid writes the geometry of the grid to a file in VTK format initfgrid initializes the fluid volume fraction in the grid cells taggrid
63interpolates the fluid volume fraction to the grid nodes and tags the nodes, faces and cells of the grid clcir reconstructs the PLIC interfaces using the isosurface-based CLCIR method elcir reconstructs the PLIC interfaces using the isosurface-based ELCIR method llcir reconstructs the PLIC interfaces using the isosurface-based LLCIR method lsgir reconstructs the PLIC interfaces using the gradient of the fluid volume fraction distribution swir reconstructs the PLIC interfaces using the iterative SWIR method lsfir reconstructs the PLIC interfaces using the LSFIR method recerr computes the interface reconstruction errors printplic writes the PLIC interfaces to a file in VTK format printvoxel remeshes the main grid onto a Cartesian grid (voxel grid) preserving the fluid volume and writes the computed fluid volume fraction at the voxel grid nodes to a file in VTK format faceflux computes the volume of fluid advected during a time interval through the grid faces emfp constructs a flux polyhedron using the EMFPA method fmfp constructs a flux polyhedron using the FMFPA method nmfp constructs a flux polyhedron using the NMFPA method vofadv advances the volume fraction distribution to the next time step the cells and faces of the computational grid, such as sizes, areas, volumes, geometric centers, or orientations, among others.
64The printgrid routine has been implemented to write the geometry of the constructed grid to a file in VTK (visualization toolkit [59]) format which can be visualized by using, for example, the ParaView program [60]. As an example, Fig. 13 shows four different types of grids included in the supplied software with around 20 3 cells in a unit domain.
Fluid volume fraction initialization
65The initfgrid routine has been implemented to initialize the fluid volume in the grid cells using an accurate refinement procedure [7,45,52], which allows to obtain the volume fraction of the fluid contained in a convex or non-convex polyhedral cell. The shape of the fluid interface is defined by implicit external functions. The degree of refinement (given by the number of divisions along each coordinate axis of the Cartesian cell superimposed to a given cell in which the fluid volume fraction is computed) can be increased by the users to improve the accuracy of the initialization. Detailed assessments of the accuracy of this initialization procedure can be found in [7,45,48].
Grid tagging
66The nodes, faces and cells of the grid are tagged as described below to improve the computational efficiency of the implemented interface reconstruction and fluid advection algorithms (note that these algorithms only need to be applied in a region close to the interface). The taggrid routine first computes the volume of fluid fraction at every grid node (F * ) using an inverse distance weighting interpolation from the volume fractions in the cells that share it. To illustrate the tagging procedure used in gVOF, the 2D example of Fig. 14 is used for clarity, although the package works on 3D. As it will be seen in Section 4.2.4, the users can simulate 2D (see the example in Fig. 15(a)) or axisymmetric ( Fig. 15(b)) problems by using 3D grids with only one cell along one of the coordinates directions (circumferential direction for axisymmetric cases). The tags are assigned to nodes, faces and cells as, respectively,
67Provided that the CFL number is limited by a maximum value equal to 1, the following considerations about the above face tagging can be made. If a face is tagged with −1, the volumetric flux of fluid must be zero, and therefore, no geometric operation will be carried out to compute the flux of fluid. Note that any flux polyhedron constructed on a face tagged with −1 ( symbols in Fig. 14) will be far enough away from the fluid region. If a face is tagged with 1, the volumetric flux of fluid is approximately obtained in the gVOF package without geometrical operations from the fluid velocity defined at the considered face. Note that any flux polyhedron constructed on a face tagged with 1 ( symbols in Fig. 14) will be completely inside the fluid region. Otherwise, a flux polyhedron must be constructed using the EMFPA or FMFPA method (Sections 2.2.1 or 2.2.2, respectively) at the considered face and a series of recursive truncation operations are needed to obtain the corresponding volumetric flux of fluid. Also note that only the cells tagged with 0 are interfacial (thick lines in Fig. 14) and any of the interface reconstruction routines described in the next section must be applied to all of them to obtain the corresponding PLIC interfaces.
Interface reconstruction
68The lsgir, llcir, elcir, clcir, swir and lsfir routines have been implemented to reconstruct the PLIC interfaces using, respectively, the leastsquares gradient interface reconstruction of Section 2.1.1, the three isosurface based interface reconstruction of Section 2.1.2, the iterative Swartz interface reconstruction of Section 2.1.3 and the least squares fit interface reconstruction of Section 2.1.4.
69The recerr routine has been implemented to compute the errors of the PLIC reconstruction of an interface given by an implicitly defined function. The reconstruction error is defined within a given cell as the volume enclosed by the true interface and the PLIC interface (shaded region in the 2D example in Fig. 16). To compute this volume, a procedure like that used in the initfgrid routine to compute the initial fluid volume in a cell is used. Additionally, this routine returns the fluid volume initialization error which is computed as the relative absolute difference between the exact volume of the fluid body and total initialized fluid volume.
70To visualize the reconstructed interface, the following two routines have also been implemented. The printplic routine writes the reconstructed PLIC interface into a VTK-format file. Due to the discontinuities of the PLIC reconstructed in adjacent cells, this interface representation may be unpleasant for visualization purposes. To get a smoother visualization, the printvoxel routine remeshes the main grid onto a Cartesian grid (voxel grid) where a new volume fraction distribution is computed by truncation from the PLIC interface reconstructed on the main grid to exactly preserve the total fluid volume, and writes the computed fluid volume fraction at the voxel grid nodes to a VTK-format file, which can be visualized using programs like ParaView [60] (see the comparison in Fig. 17 between the spherical interface resulting from PLIC using the printplic routine (left picture) and from voxelization using the printvoxel routine (right picture) in a non-convex irregular polyhedral grid). The details and assessment of the voxelization procedure implemented in this routine will be published elsewhere. It must be mentioned that the isovtkgrid routine, which is part of the isoap library [54,57], is also used in this work to write isosurfaces extracted on arbitrary PLIC Voxelization Figure 17: Comparison between the spherical interface resulting from PLIC using the printplic routine (left picture) and voxelization using the printvoxel routine (right picture) in a non-convex irregular polyhedral grid. grids.
Fluid advection
71The faceflux routine has been implemented to compute the volume of fluid advected during a time interval through the grid faces using the EMFPA (Section 2.2.1), FMFPA (Section 2.2.2) or NMFPA (Section 2.2.3) method by calling, respectively, the emfp, fmfp or nmfp subroutine also included in the gVOF package. This routine also returns the volumes of the flux polyhedra constructed at the grid faces.
72The vofadv routine has been implemented to advance the volume fraction distribution to the next time step by solving the Eq. (13) using the volumetric fluxes computed from the above routines.
Test programs and performance analysis
73Two test programs are included in the supplied software package to assess the performance of the implemented algorithms to solve different static (Section 4.1) and dynamic (Section 4.2) problems with prescribed velocity fields using arbitrary grids. The following grids with convex and non-convex cells are considered (further details of the generation of grids used in this work can be found in [54] and some of these non-uniform grids are also included in the supplied software package):
74• Uniform grids of rectangular parallelepiped cells.
75• Unstructured grids with tetrahedral cells obtained using the program TetGen [62].
76• Structured grids with non-convex cells obtained by distorting cubic cells. Each of the eight corner vertices of every initial uniform cubic cell of size h is randomly moved to the surface of a sphere with radius 0.25h and centered in the corresponding initial vertex position. The faces of the distorted cell, which are generally non-planar, are triangulated by joining its center with two consecutive vertices of each face, which results in a non-convex polyhedron of 14 vertices and 24 triangular faces.
77• Unstructured grids with non-convex irregular polyhedral cells obtained with the aid of TetGen [62] and two OpenFOAM's programs [58] (tetgenToFoam and polyDualMesh). The faces of the cells generated in this way are generally non-planar and must be triangulated, as for the distorted cubic grids, by joining its center with two consecutive vertices of each face.
78• Unstructured grids of different types available at [63] which were used to compare our results with those presented in [41].
79The grid size N is obtained as
80where N CELL is the number of grid cells in an equivalent unit domain (note that for the cases presented below with a domain different to a unit one, N CELL will not coincide with the true number of grid cells N CELL ) and D is the dimensions number of the problem (2 and 3 for 2D and 3D problems, respectively). Note that in this work the 2D simulations are performed using 3D grids with only one cell along one of the coordinate directions. In this and the next sections, the CPU-times were estimated using the gfortran compiler with the -O3 optimization and the OpenMP application programming interface [61] on an iMac Pro 2017 with an 18-core Intel Xeon W 2.3GHz CPU. The parallel performance of the gVOF package is assessed in Section 6. For the LSGIR method of Section 2.1.1, a value β = 1.5 in the weight of Eq. (9) was used, which provides good results, especially for the cubic grids. For the isosurface based interface reconstruction methods of Section 2.1.2, the weight factor introduced by Max [64] was used for cubic grids, the weight factor given by the angle α of each triangular face of the constructed isosurface (see the sketch of Fig. 3) if α ≤ π/2 or π −α otherwise, was used for the tetrahedral and distorted cubic grids and the weight factor, also introduced by Max [64], given by the area of each triangular facet was used for the non-convex irregular polyhedral grids. For the SWIR method of Section 2.1.3 and the LSFIR method of Section 2.1.4, a tolerance of 10 −3 rad and n out = 4 for the outer iteration are used (different values of the tolerance and maximum number of repetitions of the outer iteration can be set by the gVOF). A detailed analysis of the different weightings and iteration parameters available in the gVOF package will be published elsewhere. A volume fraction tolerance of 10 −12 is used for all the results, except for the 2D deformation test of Section 4.2.4 and a particular case mentioned later, for which = 10 −10 is used. Ten divisions along each coordinate direction are used to initialize the fluid volume fraction and compute the reconstruction error on each interfacial cell.
Static test cases
81Algorithm 1 Interface reconstruction test 1: Define the test case and allocate arrays for grid construction 2: Call defgrid and allocate arrays for reconstruction and assessment 3: Call printgrid 4: Call neigbcell 5: Call compgrid 6: Call initfgrid 7: Call taggrid 8: Call clcir, elcir, llcir, lsgir, swir or lsfir to reconstruct the interface 9: Call printplic, isovtkgrid or printvoxel to print the interface shape 10: Call recerr to obtain the reconstruction error E L 1 rec
11: Deallocate arrays
82The test program used to assess the performance of the different interface reconstruction methods implemented in the gVOF package is briefly presented in Algorithm 1. Two static interface reconstruction test cases are considered: For the grids with cubic, non-convex distorted cubic and tetrahedral cells, the CLCIR, SWIR and LSFIR methods are the most accurate providing similar accuracy with second-order convergence. However, the iterative SWIR method is clearly less computationally efficient being, on average, 20 and 100 times more time consuming than the CLCIR and LSGIR methods, respectively. Note that the computational efficiency of the CLCIR and LSFIR Figure 19: Same results as in Fig. 18, but for the toroidal fluid body.
83methods is relatively similar. For the grids with non-convex irregular polyhedral cells, the LSFIR method is the most accurate exhibiting second-order convergence. The LSGIR method is the least time consuming, showing very good performance at low grid resolutions. As an example, Figs. 20 and 21 show the reconstructed PLIC interfaces for the spherical and toroidal fluid bodies using the CLCIR method and different grids with N = 40.
Dynamic test cases with prescribed velocity field
84Algorithm 2 presents the test program used for the assessment of the coupling between the different interface reconstruction and advection methods implemented in the gVOF package to solve dynamic problems. Extensive comparisons with some results available in the literature and obtained using other advanced geometric VOF methods are included in this section. Others results, which can also be found in the literature, are left out of this comparison for several reasons, among which, apart from brevity, are: the use of unstructured grids which are not provided and cannot be easily reproduced to be able to compare or the lack of information about parameters required for a rigorous comparison.
85The time step ∆t used to solve Eq. (1) is determined at each instant t from the following expression (20) where CFL is the Courant-Friedrich-Levy number, u j , v j and w j are the components of the velocity vectors at the centers of every grid face j, N FACE is the number of faces in the grid, and h x i , h y i and h z i are the sizes along the corresponding coordinate axis of the minimum-size rectangular parallelepiped that encloses every cell i. Other strategies can be found in the literature to fix the time step from the CFL number. For example, Roenby et al. [41], and Scheufler and Roenby [42], adjusted the time step by using a CFL number that only concerns cells near the interface, or Ivey and Moin [40] fixed the time step by choosing a sufficiently low CFL number to maintain the bounding volume errors close to the machine precision. Some authors are not very clear on this respect, therefore the comparisons should be seen with certain reservations given the great influence of the chosen time step on the final accuracy. Algorithm 2 Fluid advection test 1: Define the test case and allocate arrays for grid construction 2: Call defgrid and allocate arrays for reconstruction, advection, and assessment 3: Call printgrid 4: Call neigbcell 5: Call compgrid 6: Call initfgrid 7: Call taggrid 8: Call clcir, elcir, llcir, lsgir, swir or lsfir and print the interface 9: t 0 = 0 and t = 0 10: Set the velocity field at the initial instant t 0 11: Set the initial time step ∆t 12: while t + ∆t < t end do 13: t 0 = t and t = t 0 + ∆t 14: Set the velocity field at the instant 1 2 (t 0 + t)
15:
86Call faceflux
16:
87Call vofadv 17:
88Call taggrid
18:
89Call clcir, elcir, llcir, lsgir, swir or lsfir and print, if required, the interface 19: Set the time step ∆t 20: end while 21: Errors computation 22: Deallocate arrays To quantify the accuracy of the interface shape, the following error norm, used for example by López et al. [15], López et al. [17] or Owkes and Desjardins [30], among others, is considered:
90where F e i (t) and F i (t) are, respectively, the exact and computed fluid volume fraction of cell i at instant t. Other authors, such as Roenby et al. [41], used the same error norm but relative to the exact total fluid volume:
91To quantify the change in the total fluid volume, the following error norm is used
92To quantify the unboundedness of the volume of fluid fractions (values lower and higher than 0.0 and 1.0, respectively), the error norm used by Owkes and Desjardins [30] is also considered in this work
93The corresponding maximum and average values produced during the simulation are obtained, respectively, as
94where N STEP is the number of time steps required to complete the numerical test. It must be emphasized that unlike other VOF methods referenced to compare, the gVOF package, as mentioned, does not use special algorithms to redistribute the very small liquid volumes out of the bounds 0 and 1 for the volume fraction F . Results for the total execution time t cpu = t rec + t adv , where t rec and t adv are the total CPU times consumed by the reconstruction and advection steps, respectively, and its average value per time step t cpu are also presented below.
95All the results presented in this section were obtained using the exact velocity field at both the face centers and cell vertices. It has been checked that when the velocities at the cell vertices are interpolated from the prescribed velocities at the face centers using a simple average, the accuracy values of the interface shape estimated using any of the error norms considered in this work are very close to those presented below. For the complex 3D deformation test of Section 4.2.3, the observed variations in the estimated accuracy by using prescribed or interpolated velocities at the cell vertices are in the order of only 1%, being negligible for the finest grids.
Translation test
96This test is used to compare with the results obtained by Roenby et al. [41] using unstructured grids available in [63]. A sphere of fluid with radius 0.25, which is initially centered at (0.5, 0.5, 0.5) in a domain [0, 1] × [0, 1] × [0, 5], is translated by a velocity field given by (0, 0, 1) from time 0 to t end = 4. Table 2 compares the E L 1 shape * (t = 4) error values obtained using gVOF, combining the FMFPA method with the CLCIR, SWIR and LSFIR methods, and those obtained using two VOF methods: the algebraic VOF MULES (multidimensional universal limiter with explicit solution) [65] and the geometric VOF isoAdvector [41], both implemented in the OpenFOAM software [58]. All these results correspond to CFL = 0.5. Note that for this test, the final shape errors are reduced on average by 35% compared to the results obtained using the isoAdvector method and 97% compared to the MULES method, which represents a significant improvement in accuracy. The computational efficiency of the FMFPA and CLCIR methods, which produce errors like those obtained using the SWIR method but with lower consumed CPU times, can also be observed in the results presented in the table. It must be considered that the execution times reported in [41] were obtained using a processor different to that used in this work and, therefore, those results should be viewed as a qualitative reference rather than for direct comparison. It must be mentioned that the EMFPA and NMFPA methods give almost identical results (not reported in the table) in terms of shape Table 2: Results for the translation test using tetrahedral grids and CFL = 0.5. Comparison with results from [41]. The CPU times reported in [41] were obtained using a single core of an Intel Xeon 3.1 GHz CPU (E5-2687W). accuracy since the advection errors for this test are negligible using any of the implemented advection methods. For this test, however, the EMFPA and NMFPA methods consumes CPU-times around a 20% higher and only 1% lower, respectively, than that consumed by the FMFPA method. The errors reported in Table 2 are due to the reconstruction step and to the roundoff errors of the geometric operations involved during the simulation. A more detailed analysis on this subject will be carried out elsewhere. Fig. 22 shows the PLIC interface at t = 0 (top picture) and t = t end (bottom picture) obtained using the tetrahedral grid with N = 41. The grid is clipped and made partially transparent to better see the reconstructed PLIC interfaces. A visual comparison with the isoAdvector and MULES methods is presented in Fig. 23, where results for the isosurfaces, corresponding to the 0.5 isovalue of the fluid volume fraction, extracted at the end of the translation test (t = t end ) can be seen. It can be observed that the extracted isosurfaces obtained using the FMFPA and CLCIR methods are better adjusted to the exact surfaces represented in transparent red color than those of the isoAdvector method (the differences with the exact solution can be clearly appreciated by observing colors change and specially the gap between the extracted isosurface and the exact sphere on the left of each picture) and considerably much better than those of the MULES method, which produces a highly distorted fluid body even for this simple translation test.
Rotation test
97In this test, a sphere of fluid with radius 0.15, which is initially centered at (0.5,0.75,0.5), is rotated to complete a revolution at t end = 2π around an axis parallel to the z-axis and centered in a domain [0, 1] × [0, 1] × [0, 1]. The results obtained with gVOF (the FMFPA method combined with the CLCIR, SWIR and LSFIR methods and the NMFPA method combined with the CLCIR method) are compared in Table 3 with those obtained by Jofre et al. [38], using an advection method similar to the EMFPA method and the second-order LVIRA [66] reconstruction method, and Scheufler and Roenby [42], using a new version of the isoAdvector method (isoAdvector-plicRDF) which is improved by a distance function reconstructed from PLIC interfaces. All these results were obtained using CFL = 1. As in the above test, the EMFPA method produces an accuracy almost indentical to that of FMFPA method but with higher time consumptions. Note that the final shape errors are reduced around 50% with respect to those of isoAdvector-plicRDF and around 30% with respect to those obtained by Jofre et al. [38], which (0, 0, 1)
98Velocity field t = t end Figure 22: Results for the translation case obtained using the FMFPA and CLCIR methods, the tetrahedral grid with N = 41 and CFL = 0.5. The grid is clipped and made partially transparent to better see the PLIC interfaces reconstructed at t = 0 (top picture) and t = t end (bottom picture). [42] and [38]. The execution times t cpu reported in [42] were obtained using four cores of a dual Intel Xeon 2687W v2 processor.
99represents a significant accuracy improvement. Results for the computational efficiency and volume conservation are also included in the table. The FMFPA method produces out of bounds volume errors close to the machine precision and shows a very good computational efficiency (the advantage of the CLCIR and LSFIR methods in this respect is clearly seen in the table). It is also noteworthy that the NMFPA method is less accurate than the FMFPA method and not strictly conservative due to the over/underlaps between flux polyhedra. u(x, y, z, t) =2 sin 2 (πx) sin(2πy) sin(2πz) cos(πt/t end ), v(x, y, z, t) = − sin(2πx) sin 2 (πy) sin(2πz) cos(πt/t end ), w(x, y, z, t) = − sin(2πx) sin(2πy) sin 2 (πz) cos(πt/t end ),
3D deformation test
100for t end = 3. This test produces a high deformation requiring a very fine grid to correctly solve the thinnest fluid structures.
101A comparison with the results obtained using the isoAdvector method [41] is presented in Table 4 for cubic grids and in Table 5 for a tetrahedral grid (when using this grid and the NMFPA methods, has been increased to 10 −10 to attenuate the effect of the over/underlaps). From the above results, it is evident the advantage in accuracy of the gVOF algorithms (on average, a reduction of around 60% in the shape errors is observed in Table 4). This improvement can be visually observed from results like those shown in Fig. 24. When using cubic grids, the FMFPA results are slightly more accurate than the NMFPA results and almost identical to the EMFPA results. The EMFPA method increases the consumed CPU-time in around 20% and 30% compared to the FMFPA and NMFPA methods, respectively. When using the tetrahedral grid, the EMFPA method is slightly more accurate but with an increment of around 45% and 70% in the consumed CPU time compared to the FMFPA and NMFPA methods, respectively. Although the shape error value for the case with the tetrahedral grid of Table 4 and the isoAdvector method is not available, a volume variation of 0.63% and a CPU time of around 3 days at the end of the test were reported in [41] using a single core of an Intel Xeon 3.10GHz CPU (E5-2687W). The very good Table 4: Results for the 3D deformation test using cubic grids and CFL = 0.5. Comparison with results from [41], where the execution times t cpu were obtained using a single core of an Intel Xeon 3.1 GHz CPU (E5-2687W). Table 5: Same results as in Table 4, but using the tetrahedral grid with N = 317 from [63]. performance and computational efficiency of gVOF, especially when using the CLCIR or LSFIR methods, is clearly observed in the tables. Now, a comparison with the isoAdvector-plicRDF method [42] and many of the most advanced geometric-unsplit VOF methods recently published is presented in Tables 6 and 7 (the last three combined EMFPA-like advection methods with second-order reconstruction methods).
102On average, all the methods included in the table show second-order convergence and gVOF provides the lowest shape errors. Although SWIR and LSFIR are the most accurate methods for N ≤ 128, the CLCIR method provides acceptable shape errors with a very good computational efficiency and higher accuracy when the grid resolution is sufficiently high to correctly solve the thinnest fluid structures at the maximum fluid body deformation time. In [31], where an unsplit advection EMFPA-like advection method is combined with a modified version of the Swartz reconstruction method proposed by Dyadechko and Shashkov [55], zero bounding errors are reported, which is somewhat surprising given the high geometric complexity of the unsplit advection method. The results obtained by Owkes and Desjardins [30] and Jofre et al. [38], who also use EMFPA-like advection methods and, respectively, the second-order ELVIRA and LVIRA reconstruction methods [41] using the isoAdvector method. Table 6: Results for the 3D deformation test using cubic grids and CFL = 0.5. Comparison with results from (the resources used to execute the tests is included in parenthesis) [42] (4 cores of a dual Intel Xeon 2687W v2). Table 6. Comparison with results from [40] (no execution time reported; the results were obtained with CFL sufficiently low to get E L1 vol (8) < 10 −12 ), [30] (4 cores of a dual Intel Xeon X5670), [38] (no execution time reported) and [31] (4 cores of an Intel Xeon E5-2680 v3). [12], are relatively similar and on average their shape errors are around 90% higher than those of gVOF. A visual comparison with the results obtained with the isoAdvector-plicRDF method, which shows an accuracy close to that of Owkes and Desjardins [30] and Jofre et al. [38], can also be seen on Fig. 25, where the improvement achieved using gVOF is clearly seen. Note that SWIR method better preserves the integrity of the thin fluid structures (the LSFIR method has a similar behavior in this respect). The NIFPA-1 method proposed by Ivey and Moin [40] combined with the embedded height-function method proposed also by Ivey and Moin [9] provides accuracies comparable to those of other advanced geometric unsplit VOF methods. Although, as it was mentioned, the results of t cpu included in the table should only be considered as a qualitative reference, one of the reasons for the clear advantage of gVOF with respect to others in terms of computational efficiency, is the use of the non-convex version of VOFTools [45,52], which avoids the use of costly techniques to decompose the generally non-convex flux polyhedra into convex sub-polyhedra. Fig. 26 shows the PLIC interfaces for the 3D deformation test at different instants obtained using gVOF (EMFPA and CLCIR), CFL = 0.5 and different grids of N = 160 with convex and non-convex cells, where the capacity of gVOF to solve tests of high interface deformation on 3D arbitrary grids can be clearly seen.
2D deformation test
103In this test introduced by Bell et al. [68], a cylinder of fluid with radius 0.15, symmetry axis parallel to the y-axis and initially centered at (0.5,0,0.75) in a domain [0, 1] × [0, 1] × [0, 1], is deformed in the following velocity field:
104u(x, y, z, t) = − 2 sin 2 (πx) sin(πz) cos(πz) cos(πt/t end ), v(x, y, z, t) =0, w(x, y, z, t) =2 sin 2 (πz) sin(πx) cos(πx) cos(πt/t end ),
105for t end = 8. Note that this 2D deformation test is simulated in this work using 3D grids with a single cell along the y-axis. These quasi-2D grids will be denoted hereafter as square or triangular grids. Table 8 compares the E L 1 shape * error values at t = 8 obtained using gVOF (combining the FMFPA method with the CLCIR, SWIR and LSFIR methods) and CFL = 0.5 with those obtained using the isoAdvector and MULES methods [41] on square and unstructured grids available in [63] (the results corresponding to the MULES method were obtained using CFL = 0.1). A substantial reduction of the error values, being on average around a 60% with respect to the isoAdvector method and higher than 90% with respect to the MULES method, has been achieved by the gVOF code. The corresponding PLIC interfaces obtained with gVOF (FMFPA and CLCIR) at t = 4 (dark blue color) and t = 8 (red color) can be seen in Fig. 27 (the exact fluid region at t = 8 is depicted in light blue color). Note that for 2D problems, the EMFPA and FMFPA methods produce equivalent flux polyhedron shapes, although, as mentioned, the EMFPA method uses more faces and vertices for each flux polyhedron to construct the flux region, affecting this, obvioulsy, to the computational efficiency. As expected, the results obtained using the NMFPA method, which are omitted in this test for brevity, are less accurate than those obtained using the EMFPA or FMFPA method. Table 9 compares the E L 1 shape (8) error values obtained using gVOF (combining now the EMFPA method with the CLCIR and SWIR methods) with those obtained using several of the most advanced geometric VOF methods developed to date. The shape error reduction achieved by gVOF for this test of high deformation is around 60% and 50% compared to the methods implemented by Owkes and Desjardins [30] and Marić et al. [31], respectively, and around 80% and 70% compared to the isoAdvector-plicRDF method of Scheufler and Roenby [42] and NIFPA-1 method of Ivey and Moin [40], respectively, which represents a remarkable achievement.
Coupling gVOF with an in-house CFD code
106To show the performance of gVOF coupled with an in-house code that solves the flow conservation equations (previous results obtained with this code coupled with VOF and level-set methods can be found in [7,16,29,46]), the impact of a water drop onto a free surface is solved. The code solves the conservation equations on both sides of the interface using a projection method. The projection step incorporates a continuous surface tension model based on the balanced-force algorithm proposed by François et al. [69], in which the interface curvature is computed using the height function technique that incorporates the improvements proposed in [7] and [8]. The pressure Poisson equation resulting from the projection step, which is the most expensive part of the code, is solved using a preconditioned Krylov solver with the help of LIS (library of iterative solvers) [70]. A CFL number of 0.2 was used to determine the time step as
107where ρ l and ρ g and the densities of the liquid and gas phases, respectively, σ is the surface tension coefficient, h is the cell size and u max is the maximum absolute value of the velocity components at each instant. A water drop of diameter D = 2.9 mm impacting a deep water pool with velocity U = 2.5 m s −1 is considered. The Froude and Weber numbers are F r = 220 and W e = 248, respectively. Due to the symmetry of the problem, only one quarter of the physical domain was considered. The computational domain used was 8D × 3.5D × 3.5D. The pool depth was 4.5D, the water drop was initially located at a height equal to 6.0D and the domain was dis-cretized on a grid of 175 × 70 × 70 cells. To reach the desired impact velocity, a fictitious gravitational force was used to accelerate the drop. Fig. 28 shows results for the 0.5-isosurfaces obtained using the EMFPA and CLCIR methods at different instants after the drop had made contact with the pool surface (right pictures). A relatively good degree of agreement can be observed with the visualization results obtained experimentally in [29] (left pictures; note that the images of the interface are magnified when observed through water). A quantitative comparison can be seen in Fig. 29, where numerical and experimental results of the evolution of the free-surface depth at the symmetry axis, D c , are compared. A reasonable agreement can be observed for the cavity depth evolution during growth and collapse processes. Note that the numerical predictions obtained using the EMFPA and FMFPA methods are very closed for this drop impact test. On average, the CPU time consumed by the advection and reconstruction schemes represent around 20% of the total. In all simulations, the net change in total volume at the end of the test was lower than 4 × 10 −6 %.
Parallel performance
108To assess the parallel performance of the gVOF package, the 3D deformation test of Section 4.2.3 was executed using an increasing number of threads. The same conditions as in Table 6 but using the EMFPA and CLCIR methods, and a cubic grid with N = 256 are considered for this analysis. The top picture in Fig. 30 shows the CPU times of the interface reconstruction and fluid advection as a function of the number of threads used during the execution of the test case. The corresponding execution speedup is also shown in Fig. 30 (bottom picture). Note that fluid advection spends around twenty times the CPU time consumed by the interface reconstruction when using a single thread, while this difference tends to reduce to around ten when the number of threads increases.
Conclusions
109The gVOF package, which is provided as open source, includes routines for the implementation of advanced geometric VOF methods on arbitrary grids that achieve accuracies and computational efficiencies which are cutting edge. The package uses the VOFTools and isoap libraries to implement a VOF initialization method and several PLIC interface reconstruction and Figure 28: Water drop impact test. Comparison between the experimental results for the interface shape [29] (left pictures) and numerical predictions for the 0.5-isosurfaces obtained using the EMFPA and CLCIR methods (right pictures) at different instants after the drop had made contact with the pool surface. [29] for the evolution of the free-surface depth at the symmetry axis, D c , . unsplit advection methods valid for arbitrary grids with convex or non-convex cells. The routines are written in FORTRAN and can be used with C programs through interface routines included in the distributed software. To improve the computational efficiency, the OpenMP application programming interface is used. To assess the performance of the package, interface reconstruction and advection tests are also included in the supplied software. A thorough comparison with existing state-of-the-art geometric VOF methods has been carried out and has provided very favorable results. Also, the package has been incorporated into an existing in-house code to simulate the impact of a water drop on a free surface. The numerical results have been compared with experimental results, and a good agreement has been found.
110A = matrix in Eq. (7); area of the cell face b = vector in Eq. (8) C = constant that determines the position of the PLIC interface D = drop diameter D c = free-surface depth at the symmetry axis D = dimensions number (2 for 2D and 3 for 3D) E L 1 bound = average E L∞ bound (t) value during the complete simulation E L∞ bound = maximum E L∞ bound (t) value during the complete simulation E L∞ bound (t) = maximum unboundedness error of the fluid volume at a time t E L 1 rec = interface reconstruction error E L 1 shape = interface shape error E L 1 shape * = relative interface shape error E L 1 vol = fluid volume error f = auxiliary VOF function
참고문헌 59건
- Accurate interface normal and curvature estimates on three-dimensional unstructured non-convex polyhedral meshes Journal of Computational Physics · Elsevier BV · 2015 10.1016/j.jcp.2015.07.055
- The Paraview Guide 2008
- Interface Reconstruction in Multi-fluid, Multi-phase Flow Simulations Springer eBooks · Springer Nature · 2006 10.1007/3-540-29090-7_2
- A Parallel, Volume-Tracking Algorithm for Unstructured Meshes Elsevier eBooks · Elsevier BV · 1997 10.1016/b978-044482327-4/50113-3
- A second-order projection method for the incompressible navier-stokes equations Journal of Computational Physics · Elsevier BV · 1989 10.1016/0021-9991(89)90151-4
- A computational framework for conservative, three-dimensional, unsplit, geometric transport with application to the volume-of-fluid (VOF) method Journal of Computational Physics · Elsevier BV · 2014 10.1016/j.jcp.2014.04.022
- A volume of fluid method based on multidimensional advection and spline interface reconstruction Journal of Computational Physics · Elsevier BV · 2003 10.1016/j.jcp.2003.10.030
- On reducing interface curvature computation errors in the height function technique Journal of Computational Physics · Elsevier BV · 2010 10.1016/j.jcp.2010.03.032
- Evaluating the performance of the two-phase flow solver interFoam Computational Science & Discovery · IOP Publishing · 2012 10.1088/1749-4699/5/1/014016
- An improved PLIC-VOF method for tracking thin fluid structures in incompressible two-phase flows Journal of Computational Physics · Elsevier BV · 2005 10.1016/j.jcp.2005.01.031
- Higher order solution of the Euler equations on unstructured grids using quadratic reconstruction 29th Aerospace Sciences Meeting · 1990 10.2514/6.1990-13
- Interface reconstruction with least-squares fit and split advection in three-dimensional Cartesian geometry Journal of Computational Physics · Elsevier BV · 2007 10.1016/j.jcp.2007.03.015
- Volume tracking of interfaces having surface tension in two and three dimensions 38th Aerospace Sciences Meeting and Exhibit · 1996 10.2514/6.1996-859
- Estimating curvature from volume fractions Computers & Structures · Elsevier BV · 2005 10.1016/j.compstruc.2004.08.017
- Analytical Relations Connecting Linear Interfaces and Volume Fractions in Rectangular Grids Journal of Computational Physics · Elsevier BV · 2000 10.1006/jcph.2000.6567
- A New Volume of Fluid Advection Algorithm: The Stream Scheme Journal of Computational Physics · Elsevier BV · 2000 10.1006/jcph.2000.6510
- Weights for Computing Vertex Normals from Facet Normals Journal of Graphics Tools · Taylor & Francis · 1999 10.1080/10867651.1999.10487501
- A geometrical area-preserving Volume-of-Fluid advection method Journal of Computational Physics · Elsevier BV · 2003 10.1016/j.jcp.2003.07.003
- OpenMP: an industry standard API for shared-memory programming IEEE Computational Science and Engineering · IEEE Computer Society · 1998 10.1109/99.660313
- Height functions for applying contact angles to 2D VOF simulations International Journal for Numerical Methods in Fluids · Wiley · 2007 10.1002/fld.1651
- Reconstructing Volume Tracking Journal of Computational Physics · Elsevier BV · 1998 10.1006/jcph.1998.5906
- On the reinitialization procedure in a narrow-band locally refined level set method for interfacial flows International Journal for Numerical Methods in Engineering · Wiley · 2005 10.1002/nme.1324
- Volume of fluid (VOF) method for the dynamics of free boundaries Journal of Computational Physics · Elsevier BV · 1981 10.1016/0021-9991(81)90145-5
- A balanced-force algorithm for continuous and sharp interfacial surface tension models within a volume tracking framework Journal of Computational Physics · Elsevier BV · 2005 10.1016/j.jcp.2005.08.004
- An improved height function technique for computing interface curvature from volume fractions Computer Methods in Applied Mechanics and Engineering · Elsevier BV · 2009 10.1016/j.cma.2009.03.007
- A 3-D Volume-of-Fluid advection method based on cell-vertex velocities for unstructured meshes Computers & Fluids · Elsevier BV · 2014 10.1016/j.compfluid.2014.02.001
- Second-order accurate volume-of-fluid algorithms for tracking material interfaces Journal of Computational Physics · Elsevier BV · 2004 10.1016/j.jcp.2003.12.023
- An accurate adaptive solver for surface-tension-driven interfacial flows Journal of Computational Physics · Elsevier BV · 2009 10.1016/j.jcp.2009.04.042
- A Coupled Level Set and Volume of Fluid method with multi-directional advection algorithms for two-phase flows with and without phase change International Journal of Heat and Mass Transfer · Elsevier BV · 2014 10.1016/j.ijheatmasstransfer.2014.08.039
- PROST: A Parabolic Reconstruction of Surface Tension for the Volume-of-Fluid Method Journal of Computational Physics · Elsevier BV · 2002 10.1006/jcph.2002.7190
- Direct numerical simulations of gas/liquid multiphase flows Fluid Dynamics Research · IOP Publishing · 2006 10.1016/j.fluiddyn.2005.08.006
- A Hybrid Particle Level Set Method for Improved Interface Capturing Journal of Computational Physics · Elsevier BV · 2002 10.1006/jcph.2002.7166
- The second-order sharpening of blurred smooth borders Mathematics of Computation · American Mathematical Society · 1989 10.1090/s0025-5718-1989-0983313-8
- Analytical and geometrical tools for 3D volume of fluid methods in general grids Journal of Computational Physics · Elsevier BV · 2008 10.1016/j.jcp.2008.03.010
- A mass-conserving volume-of-fluid method: Volume tracking and droplet surface-tension in incompressible isotropic turbulence Computers & Fluids · Elsevier BV · 2014 10.1016/j.compfluid.2013.12.018
- A Conservative Three-Dimensional Eulerian Method for Coupled Solid–Fluid Shock Capturing Journal of Computational Physics · Elsevier BV · 2002 10.1006/jcph.2002.7158
- Interface reconstruction with least‐square fit and split Eulerian–Lagrangian advection International Journal for Numerical Methods in Fluids · Wiley · 2002 10.1002/fld.431
- A new volume of fluid method in three dimensions—Part I: Multidimensional advection method with face‐matched flux polyhedra International Journal for Numerical Methods in Fluids · Wiley · 2008 10.1002/fld.1776
- A new volume of fluid advection algorithm: the defined donating region scheme International Journal for Numerical Methods in Fluids · Wiley · 2001 10.1002/1097-0363(20010130)35:2<151::aid-fld87>3.0.co;2-4
- A new volume of fluid method in three dimensions—Part II: Piecewise‐planar interface reconstruction with cubic‐Bézier fit International Journal for Numerical Methods in Fluids · Wiley · 2008 10.1002/fld.1775
- A 3D unsplit-advection volume tracking algorithm with planarity-preserving interface reconstruction Computers & Fluids · Elsevier BV · 2006 10.1016/j.compfluid.2005.09.003
- A computational method for sharp interface advection Royal Society Open Science · Royal Society · 2016 10.1098/rsos.160405
- A new volume conservation enforcement method for PLIC reconstruction in general convex grids Journal of Computational Physics · Elsevier BV · 2016 10.1016/j.jcp.2016.04.018
- Conservative and bounded volume-of-fluid advection on unstructured grids Journal of Computational Physics · Elsevier BV · 2017 10.1016/j.jcp.2017.08.054
- VOFTools <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="mml27" display="inline" overflow="scroll" altimg="si27.gif"><mml:mo>−</mml:mo></mml:math> A software package of calculation tools for volume of fluid methods using general convex grids Computer Physics Communications · Elsevier BV · 2017 10.1016/j.cpc.2017.09.032
- A coupled volume-of-fluid and level set method based on multi-dimensional advection for unstructured triangular meshes Chemical Engineering Science · Elsevier BV · 2017 10.1016/j.ces.2017.11.013
- Accurate and efficient surface reconstruction from volume fraction data on general meshes Journal of Computational Physics · Elsevier BV · 2019 10.1016/j.jcp.2019.01.009
- An enhanced un-split face-vertex flux-based VoF method Journal of Computational Physics · Elsevier BV · 2018 10.1016/j.jcp.2018.03.048
- Simulation of high density ratio interfacial flows on cell vertex/edge-based staggered octree grids with second-order discretization at irregular nodes Journal of Computational Physics · Elsevier BV · 2018 10.1016/j.jcp.2018.09.043
- Height functions for applying contact angles to 3D VOF simulations International Journal for Numerical Methods in Fluids · Wiley · 2008 10.1002/fld.1974
- Non-convex analytical and geometrical tools for volume truncation, initialization and conservation enforcement in VOF methods Journal of Computational Physics · Elsevier BV · 2019 10.1016/j.jcp.2019.04.055
- A paraboloid fitting technique for calculating curvature from piecewise-linear interface reconstructions on 3D unstructured meshes Computers & Mathematics with Applications · Elsevier BV · 2018 10.1016/j.camwa.2018.09.009
- VOFTools 3.2: Added VOF functionality to initialize the liquid volume fraction in general convex cells Computer Physics Communications · Elsevier BV · 2019 10.1016/j.cpc.2019.07.022
- VOFTools 5: An extension to non-convex geometries of calculation tools for volume of fluid methods Computer Physics Communications · Elsevier BV · 2020 10.1016/j.cpc.2020.107277
- Unstructured un-split geometrical Volume-of-Fluid methods – A review Journal of Computational Physics · Elsevier BV · 2020 10.1016/j.jcp.2020.109695
- A computational method for sharp interface advection Royal Society Open Science · Royal Society · 2016 10.1098/rsos.160405
- A coupled level set/volume of fluid method for simulation of two-phase flow on unstructured grids Journal of Mechanical Science and Technology · Springer Science+Business Media · 2021 10.1007/s12206-021-0122-2
- isoap: A software for isosurface extraction on arbitrary polyhedra 2021 10.17632/4rcf98s74c.1
- A new isosurface extraction method on arbitrary grids Journal of Computational Physics · Elsevier BV · 2021 10.1016/j.jcp.2021.110579