Research Article | Open Access
Fangfang Zhang, Hongjun Li, "Visualization of Coalescence of Multiple Small Bubbles with Closed B-Spline Curve", International Journal of Computer Games Technology, vol. 2020, Article ID 8953893, 13 pages, 2020. https://doi.org/10.1155/2020/8953893
Visualization of Coalescence of Multiple Small Bubbles with Closed B-Spline Curve
The smoothness of surface shape is one of the key issues to simulate coalescence of underwater bubbles. In this paper, B-spline closed curve is used to realize the visual simulation of multibubble coalescence. The main idea of the proposed algorithm is to construct a continuous bubble deformation which is guided by the normal direction of each control point and weighted by the distance from the point to the geometry center of the contour. The advantages of this algorithm include the smoothness of the bubble contour in the processing of deformation and the randomness of dynamic process and coalescence process. Experiment results show that the simulation algorithm works well and can be used in 3D computer games and animations.
The bubble phenomenon is a common natural phenomenon that occurs in carbonated drinks, waste water, the breath of fish in the water, etc. It is widely considered in various disciplines and industries. Here are three classical applications and literatures.
In the petrochemical industry, during oil production and transmission, artificial injection bubbles can carry heavy oil from the ground to the surface ; the secondary-metallurgical treatment of the liquid steel relies on the injection of purge gas for improving the steel cleanliness . In addition, liquid gas reactors depend on the interaction of bubbles to change the contact area of different phases .
In materials science, due to the different mechanical properties of nitrogen bubbles with different diameters on metals, the mechanical effects of nitrogen bubbles and their polymerization behavior on HCP rep-Zr alloy were studied . The stability of bubbles and the potential effects of their interactions are also studied . The interaction between bubbles in liquid affects the mass transfer performance of bubbles .
In movies and games, bubble simulation is a common material, as shown in Figure 1. It enhances the user experience in entertainment systems [5, 25, 29] and the reality visualization effect . Kakuta et al. proposed a mixed reality application for enjoying playing with soap bubbles . Jeong-Mo applied bubble research to animation and game creation based on bubble simulation . Urikovic took a complete computer simulation of a soap bubble from a dynamics perspective and discusses the animation of bubbles . Kunimatsu et al. used computer graphics to animate the phenomenon of throwing the jar into the sink, and the resulting individual bubbles move through the tank .
As we often encounter multiple bubbles or groups of bubbles in these practices, it is important to fully understand the interaction and binding of bubbles in a fluid [13, 32]. Coalescence is one key behavior of bubbles and simulated in many literatures [6–8, 14]. These literatures focus on the effects of initial bubble spacing, size and arrangement angle on the coalescence process, the changes in contour , the rise velocity and shape of bubbles in pure water , the pressure field around the bubble [7, 14], and so on.
In general, coalescence of two bubbles takes place in three main steps: bubble collision and deformation, film drainage, and film rupture . Kee and Chhabra  observed the bubble shape and coalescence behavior by using high-speed camera technology and investigate the effects of rheological properties and surface tension on bubble properties and coalescence. Li et al.  numerically simulates the interaction of bubbles online to obtain the effect of dimensionless distance on the coalescence of bubbles.
For a long time, many scholars have conducted extensive research on bubble behavior  and established a relatively sound theoretical basis. However, existing methods mainly study behaviors of one or two bubbles and pay a little attention on the smoothness of the contour of bubbles after coalescence. In the view of computer games, visual effects and the game experience in some cases are more important than physics demands . We in this paper emphasize on the smoothness of the contour and the visualization of multibubble coalescence phenomenon, which results in solving issues as follows: (i)Multibubble coalescence rules and deformation rule are built to guide the implementation of the visualization algorithm(ii)The contour in 2D and the surface in 3D of a bubble should be C1-continuous, so the smoothness of the bubble contour in the processing of deformation is kept(iii)The multibubble coalescence algorithm is developed
For visualizing the process of multibubble coalescence, the surface model, the continuous deformation, and rules of motion should be addressed in advance.
2.1. Modeling Surface of a Bubble
For the case of small size bubble, its shape can be represented by a sphere  or an ellipsoid [1, 12]. However, in most cases, the contour of a bubble is not a simple sphere or a circle, and it can be approximated by a Fourier series [10, 11] or other functions. Given the coalescence of two bubbles from any directions, methods that use -axis or -axis as symmetry axis to model contour and surface are not ideal. Given the closed B-spline shows the advantage of the design deformability and flexibility , we here use the closed B-spline method to model the contour of a bubble.
Let , , be the control points which denote a sequence of ordered data points on the bubble curve. Let denote a B-Spline curve to be determined to approximate the bubble curve. In formula (1), are the B-spline basis functions of a certain order and can be expressed as follows:
We illustrate the calculation of the contour after coalescence of two bubbles in two-dimensional (2D) case. Let a bubble be displayed by a circle or a set of contour points which are ordered and represent discrete closed curve before coalescence. When two bubbles are too closed, the coalescence occurs due to interbubble attraction, as shown in Figure 2(a). For obtaining the new contour of the bubble, we at first find the intersection points (points and , denoted by red points) of two curves with Little’s method . Then, those inner points (, , , and ) are detected with Kpalma’s method  and removed. Finally, we fit those contour points by the closed B-spline method, as shown in Figure 2(b).
For building the 3D surface of bubble, the surface can be obtained as an axis-symmetric surface of rotation. In our experiments, the perpendicular bisector of the line segment AB in Figure 2(a) is used as the axis of symmetry. Figure 3(a) shows another contour with the axis of symmetry. Figure 3(b) is the surface that generated by axis-symmetric surface of rotation using the contour points of Figure 3(a).
2.2. Continuous Deformation
After coalescence, the contour of two coalesced bubbles will continuously deform over time due to the combined effects of multiple forces, including surface tension and water pressure. Then, a method of contour deformation guided by the normal direction and weighted by the distance from the point to the geometry center of the contour is proposed. Let , , be the control points located on the contour, be the unit normal direction of , and be the Euclidean distance from to the geometry center point of the contour, as shown in Figure 4.
At first, we calculate the average distance from contour to the bubble center. There are two cases. The first case occurs when two bubbles coalesce. where and are the radii of two bubbles before coalescence. Accordingly, if the simulating is experimented in 3D space, the average distance from contour to the bubble center is calculated with the following formula.
The second case is for the deformation of one bubble that changes with time.
Then, the moving step of the control point is where is a positive number specified by user, and
The control point moves to the new position , as
When all control points move to the new positions, the contour can be updated with the closed B-spline fitting.
Note that: (1)The parameter is used to adjust the speed of deformation(2)If the contour is a circle, then , and the contour keeps the same shape. Therefore, the end shape of the contour is a circle or a sphere(3)In our experiment, the normal direction of control point is away from the center point . If , i.e., , the control point moves towards to the center point , and vice versa(4)These proposed formulas can be applied to a three-dimensional (3D) coalescence simulation
2.3. Rules of Motion
In this paper, motion features of bubbles include rising speed, small random swing, and coalescence.
In still water, the rising speed of a bubble is related to its volume , the height from the bubble to the water surface.
When both and the change of bubble shape are small, can be a linear function, which is easy to calculate and real time in computer games. So, the contour points rise according to the formula
Adding small random swing to the rising bubbles can improve the effect of coalescence and reality. In our experiment, the direction of rising of a bubble is with random disturbance. where and is specified by user.
As for coalescence of two bubbles, if the bubbles are spherical , then we can use the bubble radii and the distance between sphere centers to determine whether the two bubbles are intersected or compatible; if the contour of at least one bubble is represented by discrete points, we use with Little’s method  to determine whether the two bubbles are intersected and get the intersect points if there are.
2.4. Algorithm of Coalescence
In this subsection, we summarize the algorithm for simulating the process of multiple bubble coalescence.
Let the number of bubbles is , the coordinates of control points of the bubble be , where ; . The simulation time is represented by the number of iterates , the still rising speed is , and the random factor is .
Since the deformation of contour is guided by both the normal direction and the distance of contour point to the center of bubble, the proposed algorithm of bubble coalescence is named NDgBCA (Algorithm 1).
Algorithm 1: NDgBCA.
According to Algorithm 1, the time complexity is , because we use enumerate method to detect the coalescence between any two bubbles in Step 4.
All experiments are done on a laptop computer, with an Intel Core i7-4710MQ CPU@2.50 GHz processor and 4.0 G memory. Our algorithm is implemented in Matlab (2012 version) language. We test our algorithm (NDgBCA) with several experiments: two bubbles in the horizontal line, coalescence occurs from any direction, multiple bubble coalescence, and summary of the information of bubbles after coalescence.
3.1. Two Bubbles in the Horizontal Line
Many papers focus on the case, coalescence of two 2D bubbles in horizontal direction [11, 14]. Bubbles are generated with mathematical method. In this experiment, , the centers of two circles are (-0.5, -1.8) and (0.5, -1.8). is the final height of rising. , which means that the bubble does not move in the horizontal direction. , where is the number of simulation steps and also represents the number of iterates in simulation process. In this experiment, , and ten key frames captured from the simulation of the coalescence process are shown in Figure 5.
3.2. Coalescence from Any Direction
Only small ratio of literature studies the case about coalescence of two 2D bubbles which occurs in any direction. In our experiment, bubbles are represented by circles and generated with mathematical method. Let and , the centers of two circles are (-0.62034, -1.56054) and (0.2911, -1.9122). , . The bubble does not move in the horizontal direction. . Ten key frames () captured from the simulation of the coalescence process are shown in Figure 6.
3.3. Multiple Bubble Coalescence
The coalescence of several bubbles is simulated with two experiments: bubbles with constant rising speed or with variable speed.
For the case of constant rising speed, i.e., , we assume (1)The number of initial bubbles is 6(2)In the horizontal direction allowing the random swing, . The swing distance abides the scaled standard normal distribution (0, 1) with limited bound where abides standard normal distribution (0, 1), and is specified by user. In our experiment, . (3)The radius of each bubble abides by uniform distribution [0.30, 0.70](4)The center position () of each bubble is randomly in the rectangle
The simulation results are shown in Figure 7(a). From bottom to top, 6 bubbles coalesce and become 5 bubbles at last.
For the case of variable rising speed, i.e., , referring that the trailing bubble has the higher acceleration , we assume that the rising speed is inverse to the distance from current position () to the top () of water surface, which can be calculated with formula (14). where parameter is a positive number and specified by user. Under this assumption, the trailing bubble has a chance to be coalesced to the former bubble.
We conduct a simulation experiment using 5 initial bubbles and the assumption. The simulation results are shown in Figure 7(b). From bottom to top, 5 bubbles coalesce and become 3 bubbles at last. The coalescence of two bubbles on the left illustrates the coalescence effect of formula (14).
3.4. Visualization with 3D Surface
In order to enrich a real environment with virtual information, we can use axial symmetry technology to generate 3D surface of bubble (Figure 3) and merge these 3D bubbles into an underwater image, as shown in Figure 8. From the bottom to the top in the figure, it can be found that after coalescence, the bubble gradually develops into an ellipsoid or a sphere, which is the same as the statement in other literatures . From this example, it is obvious that our method can be used to add bubbles in some computer games and improve the visual effect.
3.5. Performance Analysis
This subsection discusses the performance of the proposed algorithm (NDgBCA). All these data are illustrated with the data from the last experiment, i.e., Figure 8.
The model complexity is represented by the number of points of a curve or the number of polygons of a mesh surface. In this experiment, the number of bubbles is 5. For each bubble, its radius is in [0.40, 0.80], and the number of points that represent the contour is 90. After axial symmetry rotation, the numbers of vertices and polygons of each 3D bubble are 1622 and 3240, respectively.
The time complexity is represented by running time of each step of the coalescence processing. In Figure 9, the blue curve is the running time in each step. The average time of each step is 0.10 seconds. The first step is to generate 5 bubble contour points, and the other steps are corresponding to the proposed algorithm that detect coalescing or not and update the contour if coalescence cost only 5% of whole time. Most of the time is spent in calculating continuous deformation and generating 3D mesh bubbles.
The orange curve is the cumulative time, and it shows a liner curve, which means that the algorithm is stable in the simulation iteration processing.
The behavior of underwater bubbles is very complex. Our method emphasizes on visual effects of bubble coalescence and pays little attention on the physical theory. As mentioned in , creating the underwater feeling is a tricky balance between reality and game experience. So, our method is particularly suited for visualizing bubble coalescence in the underwater computer games.
Although particle system gets good performance when simulating small particle motion, fire and liquid , for example, literature  uses particle system to create bubbles uniformly; some parameters of particle systems are not open and cannot be dynamically adjusted during operation. Therefore, its performance is limited. Our method is easy to use because there are only a few parameters, including initial radii and the number and locations of bubbles, which are set at the beginning of the NDgBCA. In addition, our method also shows more details of bubble coalescence process and achieves better visualization effect.
Comparing to the method of using fitting curves  to visualize the bubble coalescence process in horizontal direction, the proposed method shows an advantage of displaying the coalescence process of two bubbles in any direction. If a bubble pair coalesces in the vertical direction, the coalescence effect visualized with our method is in line with the results from the experimental investigation of bubble coalescence , as shown in Figure 10, and numerical simulation . Figure 10(a) displays their sequence of key frames acquired by a high-speed video camera and one of the bubble coalescence processes is marked by a yellow arrow . Figure 10(b) shows our simulation results. In the simulation experiment, we adopt an assumption that for two bubbles on the vertical line, the trailing bubble is accelerated to approach the leading bubble, resulting in the coalescence of the two bubbles .
(a) Image from literatures , and coalescence events are marked by yellow arrows
(b) Sequence of key frames are captured using our method
It is interesting that the phenomenon of droplets has a similar coalescing process , which means that the proposed method can be used to visualize droplet coalescence with minor modifications based on the force analysis of droplets.
In this paper, a novel algorithm (NDgBCA) is proposed for simulating the multiple bubble coalescence. In the simulating, the continuous bubble deformation process is guided by the normal direction of each control point and weighted by the distance from the geometry center of the contour. The advantages of this algorithm include two aspects. The one is that the contour surface is uniform and smooth. The other is that it can simulate the coalescence of bubbles of different sizes from any angle and direction.
The data used to support the findings of this study are included within the article.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
This work is supported by the National Natural Science Foundation of China under grant no. 51672028.
- F. I. Abbas, A. A. D. Al-Zuky, and R. S. H. Al-Taweel, “Mathematical models for movement bubble in the water based on the capture images using SONY camera,” International Journal of Application or Innovation in Engineering and Management, vol. 4, pp. 333–343, 2015.
- B. Aboulhasanzadeh and G. Tryggvason, “Effect of bubble interactions on mass transfer in bubbly flow,” International Journal of Heat and Mass Transfer, vol. 79, pp. 390–396, 2014.
- A. A. Aganin, L. A. Kosolapova, and V. G. Malakhov, “Numerical simulation of the evolution of a gas bubble in a liquid near a wall,” Mathematical Models & Computer Simulations, vol. 10, no. 1, pp. 89–98, 2018.
- U. C. Bandara and P. D. Yapa, “Bubble sizes, breakup, and coalescence in deepwater gas/oil plumes,” Journal of Hydraulic Engineering, vol. 137, no. 7, pp. 729–738, 2011.
- R. Bernhaupt, M. Pirker, and A. Desnos, “The bubble user interface: a tangible representation of information to enhance the user experience in iptv systems,” in Proceedings of the 2014 companion publication on Designing interactive systems - DIS Companion '14, pp. 85–88, New York, NY, USA, 2014.
- O. Busaryev, T. K. Dey, H. Wang, and Z. Ren, “Animating bubble interactions in a liquid foam,” ACM Transactions on Graphics, vol. 31, no. 4, pp. 1–8, 2012.
- R. Chen, H. W. Yu, L. Zhu, R. M. Patil, and T. Lee, “Spatial and temporal scaling of unequal microbubble coalescence,” AICHE Journal, vol. 63, no. 4, pp. 1441–1450, 2017.
- R. Clift, J. R. Grace, and M. E. Weber, Bubbles, Drops, and Particles, Academic Press, New York, 1978.
- G. Duan, S. Koshizuka, and B. Chen, “A contoured continuum surface force model for particle methods,” Journal of Computational Physics, vol. 298, pp. 280–304, 2015.
- P. C. Duineveld, “The rise velocity and shape of bubbles in pure water at high Reynolds number,” Journal of Fluid Mechanics, vol. 292, pp. 325–332, 1995.
- P. C. Duineveld, “Bouncing and coalescence of bubble pairs rising at high Reynolds number in pure water or aqueous surfactant solutions,” in In Fascination of Fluid Dynamics, A. Biesheuvel and G. F. Heijst, Eds., vol. 45 of Fluid Mechanics and its Applications, pp. 409–439, Springer, Dordrecht, 1998.
- K. Ellingsen and F. RISSO, “On the rise of an ellipsoidal bubble in water: oscillatory paths and liquid-induced velocity,” Journal of Fluid Mechanics, vol. 440, pp. 235–268, 2001.
- W. FAN, Y. MA, X. LI, and H. LI, “Study on the flow field around two parallel moving bubbles and interaction between bubbles rising in CMC solutions by PIV,” Chinese Journal of Chemical Engineering, vol. 17, no. 6, pp. 904–913, 2009.
- R. Han, S. Li, A. M. Zhang, and Q. X. Wang, “Modelling for three dimensional coalescence of two bubbles,” Physics of Fluids, vol. 28, no. 6, article 062104, 2016.
- J. M. Hong and C.-H. Kim, “Animation of bubbles in liquid,” Computer Graphics Forum, vol. 22, no. 3, pp. 253–262, 2003.
- D. Jain, Y. M. Lau, J. Kuipers, and N. G. Deen, “Discrete bubble modeling for a micro-structured bubble column,” Chemical Engineering Science, vol. 100, pp. 496–505, 2013.
- H. Kakuta, Y. Okuno, K. Asai, and T. Takayama, “Jellyfish party: blowing soap bubbles in mixed reality space,” in The Second IEEE and ACM International Symposium on Mixed and Augmented Reality, 2003. Proceedings, p. 358, Tokyo, Japan, Japan, 2003.
- D. de Kee and R. Chhabra, “A photographic study of shapes of bubbles and coalescence in non-Newtonian polymer solutions,” Rheologica Acta, vol. 27, no. 6, pp. 656–660, 1988.
- O. Keplinger, N. Shevchenko, and S. Eckert, “Visualization of bubble coalescence in bubble chains rising in a liquid metal,” International Journal of Multiphase Flow, vol. 105, pp. 159–169, 2018.
- N. Kim, S. Oh, and K. Park, “Giant soap bubble creation model,” Comput. Animat. Virtual Worlds, vol. 26, no. 3-4, pp. 445–455, 2015.
- K. Kpalma and M. Yang, “Polygon interior point query and applications,” in 2011 IEEE 13th International Conference on Communication Technology, pp. 814–818, Jinan, China, 2011.
- A. Kunimatsu, Y. Watanabe, H. Fujii et al., “Fast simulation and rendering techniques for fluid objects,” Computer Graphics Forum, vol. 20, no. 3, pp. 57–66, 2001.
- J. Little and T. Peucker, “A recursive procedure for finding the intersection of two digital curves,” Computer Graphics and Image Processing, vol. 10, no. 2, pp. 159–171, 1979.
- S.-M. Liu, S.-H. Li, and W.-Z. Han, “Effect of ordered helium bubbles on deformation and fracture behavior of α-Zr,” Journal of Materials Science & Technology, vol. 35, no. 7, pp. 1466–1472, 2019.
- M. Nakamura, G. Inaba, J. Tamaoki, K. Shiratori, and J. Hoshino, “Mounting and application of bubble display system: bubble cosmos,” in Proceedings of the 2006 ACM SIGCHI International Conference on Advances in Computer Entertainment Technology - ACE '06, 47 pages, Hollywood, CA, USA, 2006.
- J. J. Quinn and J. A. Finch, “On the origin of bimodal bubble size distributions in the absence of frother,” Minerals Engineering, vol. 36-38, pp. 237–241, 2012.
- D. Schroeder and H. J. Hamilton, “Desirable elements for a particle system interface,” International Journal of Computer Games Technology, vol. 2014, no. 2, Article ID 623809, 12 pages, 2014.
- S. Li, S. Xu, J. Fan, and S. Huang, “Numerical simulation of interaction between in-line two bubbles in nonnewtonian fluids,” Journal of Shenyang Aerospace University, vol. 34, pp. 63–68, 2017.
- J. Suojanen, Game development - movement underwater, M.S. thesis, Tampere University of Applied Sciences, 2013.
- S. Y. Tan, S. Ata, and E. J. Wanless, “Direct observation of individual particle armored bubble interaction, stability, and coalescence dynamics,” Journal of Physical Chemistry B, vol. 117, no. 28, pp. 8579–8588, 2013.
- R. Ďurikovič, “Animation of soap bubble dynamics, cluster formation and collision,” Computer Graphics Forum, vol. 20, no. 3, pp. 67–76, 2001.
- T. Xue, L. Qu, and B. Wu, “Matching and 3-d reconstruction of multi-bubbles based on virtual stereo vision,” IEEE Transactions on Instrumentation and Measurement, vol. 63, no. 6, pp. 1639–1647, 2014.
- K. Yanai and M. Makino, “A particle-based real-time cg rendering of carbonated water with automatic release of bubbles,” in 2015 International Conference on Cyberworlds (CW), pp. 375–378, Visby, Sweden, 2015.
- F. Zhang and H. Li, “Visualization of coalescence behavior of two bubbles with smoothness constraint,” Journal of Visualization, vol. 23, no. 3, pp. 475–490, 2020.
- W. Zhang, L. Zhao, T. Gao, and S. Cai, “Topology optimization with closed b-splines and boolean operations,” Computer Methods in Applied Mechanics and Engineering, vol. 315, pp. 652–670, 2017.
- C. Zhu, S. Li, T. Fu, and Y. Ma, “Velocity evolution for the coalescence of two in-line bubbles rising in nonnewtonian fluids,” Theoretical Foundations of Chemical Engineering, vol. 52, no. 3, pp. 459–464, 2018.
Copyright © 2020 Fangfang Zhang and Hongjun Li. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.