betaFeedback

WorksPhysics and Astronomy

Thin-Film Smoothed Particle Hydrodynamics Fluid

Abstract

We propose a particle-based method to simulate thin-film fluid that jointly facilitates aggressive surface deformation and vigorous tangential flows. We build our dynamics model from the surface tension driven Navier-Stokes equation with the dimensionality reduced using the asymptotic lubrication theory and customize a set of differential operators based on the weakly compressible Smoothed Particle Hydrodynamics (SPH) for evolving pointset surfaces. The key insight is that the compressible nature of SPH, which is unfavorable in its typical usage, is helpful in our application to co-evolve the thickness, calculate the surface tension, and enforce the fluid incompressibility on a thin film. In this way, we are able to two-way couple the surface deformation with the in-plane flows in a physically based manner. We can simulate complex vortical swirls, fingering effects due to Rayleigh-Taylor instability, capillary waves, Newton's interference fringes, and the Marangoni effect on liberally deforming surfaces by presenting both realistic visual results and numerical validations. The particle-based nature of our system also enables it to conveniently handle topology changes and codimension transitions, allowing us to marry the thin-film simulation with a wide gamut of 3D phenomena, such as pinch-off of unstable catenoids, dripping under gravity, merging of droplets, as well as bubble rupture.

Several thin-film phenomena as simulated using our proposed method

Figure 1. Several thin-film phenomena as simulated using our proposed method. Counting from left to right: (1) surface flow on an oscillating soap bubble, (2) pinched-off droplets between two circular rims pulling away from one another, (3) a soap bubble bursting into tiny droplets and filaments after being poked from the right, (4) the vibrant, opal-like color pattern caused by Rayleigh-Taylor instability on a large-deforming, wet thin-film surface.

CCS Concepts: • Computing methodologies → Modeling and simulation.

Additional Key Words and Phrases: sph method, thin-film dynamics, surface tension flow, point-based surface

ACM Reference Format: Mengdi Wang, Yitong Deng, Xiangxin Kong, Aditya H. Prasad, Shiying Xiong, and Bo Zhu. 2021. Thin-Film Smoothed Particle Hydrodynamics Fluid. ACM Trans. Graph. 40, 4, Article 110 (August 2021), 16 pages. https://doi.org/10.1145/3450626.3459864

Introduction

Thin films are fascinating fluid phenomena on two levels. On the macroscopic scale, their surface-tension-driven dynamics morph them into elegant, minimal-surface geometries such as catenoids in an energy-optimized manner, which are captivating feats both artistically and mathematically. When coupled with external forces of air pressure, wind, or gravity, these tendencies create the unique bounciness we see in soap bubbles that is satisfying to watch. On the microscopic scale, thin films carry vibrant and delicate color patterns that arise from the interference of light bouncing between the varying film thicknesses, while the turbulent flows precipitate the surface to constantly evolve and contort, thereby creating a smoothly flowing color palette as rich as that of oil paint.

Research in computer graphics has not ceased to strive and capture the beauty that thin films bring about. Seminal previous works [24, 37, 43, 68] (Zheng et al. 2009; Zhu et al. 2014) devise methods to obtain visually appealing simulations of surface tension driven thin-film phenomena, focusing on the metamorphosis of thin-film surfaces. On the other end, many works [7, 9, 30, 34, 76, 79] push towards the simulation of the surface tension-driven thickness evolution on the deformed surface, which, when combined with the optical insight in thin-film interference [13, 29, 39, 72] (Iwasaki et al. 2004) can be used to recreate the distinct beauty of iridescent bubbles. Recently, Ishida et al. [ [36] highlight the importance of integrating the two aspects in achieving enhanced richness and plausibility; and proposes a successful method to jointly simulate surface deformation and thickness evolution. Nevertheless, the endeavor is far from being a closed case, and it yet calls for the realization of surface flow with more liveliness and sophistication, surface deformation with higher frequency details, and the integration with more 3D surface tension phenomena, which together bring a significant challenge for a simulation’s robustness, efficiency, and versatility.

In this paper, we attempt to tackle this challenge with a particle-based method. We represent the thin film with a set of codimension-1 particles and devise a set of differential operators based on the Smoothed Particle Hydrodynamics on the evolving surface. In the full 3D simulation, the inevitable compressibility of SPH causes volume loss that results in visual implausibilities. However, because our simulation is principally performed on a codimension-1 surface, the in-plane compression can be compensated by an expansion in its codimension-direction, which grants each particle a varying thickness that together outlines a curved surface in the three-dimension space. The surface such prescribed allows for the computation of surface-tension-related forces that the codimension-1 SPH particles will carry out. In this way, a simulation cycle is completed with the SPH playing a dual role: both as the initiator who forms the curved surface with the compressible nature and the executor who carries out the dynamics resulting from such a curved surface. Using this design, we can simulate thin-film-specific behaviors while inheriting the SPH’s virtue of simplicity, adding little additional cost. With the incorporation of a physically-based surface tension model derived from the lubrication assumption, our simulation algorithm effectively reproduces a wide range of phenomena such as the Newton interference patterns, the Marangoni effect, capillary waves, and the Rayleigh-Taylor Instability.

Our particle-based, codimensional simulation method for thin-film surfaces bridges the mature research literature of SPH with the point-set surface representation, a promising avenue that is not yet thoroughly studied. Compared to mesh-based paradigms [24, 36, 37] (Zhu et al. 2014), our particle-based system is flexible for dealing with the topology changes and codimension transitions, which are particularly pertinent to this application, since thin films are delicate constructions that are marked for their tendency to disintegrate, yielding some of the most exciting spectacles such as the pinching-off of the film surface into countless filaments and droplets. To this end, our method conveniently implements particle sharing with an auxiliary, standard 3D SPH solver following previous works [56] (Akinci et al. 2013). Our particles can be directly copied from codimension-1 to codimension-0 and vise versa without any extra processing, enabling the realization of a variety of thin-film phenomena with 3D components.

In summary, our contribution includes:

  • A thin-film SPH simulation framework that jointly simulates large and high-frequency surface deformation and lively in-surface flows

  • A meshless simulation framework with a set of SPH-based differential operators to discretize the thin-film physics on a curved, point surface

  • The leverage of the SPH compressibility to couple the in-surface thickness evolution and the surface metamorphosis via physically-based surface tension

  • A versatile particle surface representation method that conveniently handles topology and codimension 0-1 transition to integrate surface and volumetric SPH simulation.

Related works

Mesh-Based Dynamic Thin-Film. To precisely capture the dynamic flow and irregular geometry of a thin film, a myriad of previous work adopts the idea of representing a thin film using a triangle mesh. With the thickness of a thin film coupled into the fluid simulation, modifications can be applied to the projection method of incompressible fluid simulation to fit the requirement of simulating flow dynamics on thin films [36] (Zhu et al. 2014). The vortex sheet model, which uses circulation as a primary variable, is also a feasible option [24]. Another branch of work [37] focuses on the surface area-minimizing effect of surface tension. Apart from fluid simulation based on Navier-Stokes equations, the continuum-based model can also be used for simulating highly-viscous fluid [11, 17], where surface tension is modeled as an area-minimizing term within the energy-optimization elastic model. These works not only propose some computational algorithms but also studied the physical model of dynamical thin films, thus set up a remarkable baseline for this topic. However, they have to carefully trade-off between the ability to drastically change the topology of thin-film and solve non-trivial tangential flow on it.

Mesh-Based Static Thin-Film. When constraining the thin film to a fixed shape, the complexity and challenges emerging from an arbitrary-shaped triangle mesh can be alleviated. When the fixed shape is a sphere, special treatments are required to perform discretization in spherical coordinates to solve the Navier-Stokes equations [18, 30], or governing equations coupled with the evolution of thin-film thickness and surface tension [34]. Beyond bubble, Azencot et al. [ [8] further explores the flow dynamics of a thin layer of fluid sticking to an arbitrarily shaped object. These works show drastic flow convection on the surface of a fixed geometry. We seek to liberate the fixed-surface restriction with our particle method.

Level-Set Bubble and Foam. Triangle mesh is not the only data structure for solving thin-film dynamics. When taking the air within bubbles into consideration, the whole physical system can be easily viewed as a two-phase fluid system. In this case, the level set on grids is a widely adopted tool. It can be used to model surface tension in different fluids such as ferrofluids [59]. The multiphase fluid system, where bubbles are surrounded by large bulks of water, i.e., foams [1, 3, 31, 41, 61], can also be conveniently simulated. Further, with a relatively symmetric treatment to fluid and water, simulate both foams and water drops [32], or standalone bubbles in the air [Zheng et al. 2009] after taking delicate care respecting to the thin of soap film. Unfortunately, level-set immediately means that large bulks of water and air away from the interface have to be included in the computation, limiting the algorithm’s complexity and performance.

SPH Methods. It can be seen that all Eulerian methods will face the dilemma between surficial flow and topology changes. Therefore, we turn to the Lagrangian formalism, where the fluid within a thin film is represented by particles. The most popular particle-based fluid simulation method, Smoothed Particle Hydrodynamics (SPH) [19, 26, 46, 50, 52, 53, 55, 75], where discretization formulation based on radial smoothing kernels is used to approximate differential operators. The simplicity and high parallelizability make SPH useful for interactive fluid simulation [56], and can readily operate in conjunction with other fluid simulation algorithms [10, 22, 35]. It can also be extended to different applications such as simulating multiphase flow, computing magnetohydrodynamics, and blue noise sampling [40, 65, 77]. Recently, SPH has been used for snow [27], elastic solids [62], ferrofluids [33] and viscous fluids [16, 63]. On different geometries, simulation algorithms based on SPH are also developed [60, 78]. The SPH method can also be coupled with a grid-based simulation [51] or rigid-body simulation [28]. As a particle-based method, the treatment of multi-phases, including thin films and foams [Yang et al. 2017a,b], is straightforward in SPH. Some works modeled surface tension with [2, 12] (Yang et al. 2016). The work of Ando and Tsuruno [2011] captures and preserves thin fluid films with particles. However, the main body of the algorithm is grid-based, and surface tension is not shown in the physical model.

Point-Based Thin Film. The modeling of thin-film needs geometry information, which can be implicitly given by the shape of the point cloud. A shallow water simulation facilitated by a particle-based height field [73] inspired us to represent the film thickness similarly. On this basis, we still need some geometrical operators on the surface. Laplacian operator can be generalized to codimension manifolds [70] and discretized in an SPH way [64]. Closest point method [20, 66] provides a way to approximate functions on the Cartesian space defined on manifolds, and it thus can be used to solve PDEs on the surface, which includes the governing equations of surface flow [5, 6, 44] (Morgenroth et al. 2020). Other

SymbolMeaning
SCS_Ccenter surface of soap film
SI+S_I^{+}upper interface of soap film
SI−S_I^{-}lower interface of soap film
hhdistance between interfaces and center surface
ρ\rhodensity of fluid in soap film
ξ1,ξ2,z\xi^{1}, \xi^{2}, zlocal coordinate variables
e1,e2,n\mathbf{e}_1, \mathbf{e}_2, \mathbf{n}basis vectors of local frame
u\mathbf{u}velocity of fluid
γ\gammasurface tension coefficient
Γ\Gammasurfactant concentration
u,vu, vtangential components of velocities on soap film
wwnormal component of velocities on soap film
κc\kappa_cthe curvature of center surface
κh\kappa_hthe local curvature of interfaces
αc\alpha_cdiffusion coefficient of surfactant
αh,αk,αd\alpha_h, \alpha_k, \alpha_dpressure coefficients

Table 1. A list of symbols used in our thin-film SPH model

methods are also available, including graph Laplacian [14], local triangular mesh [15, 47] and moving least squares [48, 49, 58] (Sayre 2014). The last one is used by Wang et al. [2020] to solve surface tension flows, and is also adopted by our framework.

Method Overview

Overall, our thin-film SPH method is an enhanced version of a conventional SPH solver with geometric information. We represent the thin film by a set of codimension-1 (surface) particles with local coordinates carried by each of them. The thickness of the film is concurrently estimated both by a surface convolution method resembling the computation of density in classic SPH, and also by equations derived from the mass-conservation law. This point-cloud representation not only allows a Lagrangian in-surface flow simulation but also gives us the exact shape of the manifold thin film. Simulating the thin-film deformation then becomes possible as we can compute the mean curvature of the particle-surface using our codimension-1 differential operators. Finally, our particle-based data structure provides a way to naturally transit a codimension-1 thin film into a codimension-0 fluid bulk, with the latter handled by a traditional SPH fluid solver. In the following sections, we will provide details of this algorithm.

Thin-Film Geometry

We assume that a soap film is a three-layered, volumetric structure whose characteristic thickness is far less than its characteristic length. As shown in Figure 2, we denote the upper and lower interfaces as SI±S_I^{\pm}, and central surface SCS_C. We build a surface coordinate system (e1,e2)(\mathbf{e}_1,\mathbf{e}_2) near point OO on the central surface SCS_C, with a corresponding normal vector n\mathbf{n}, making the coordinates (ξ1,ξ2,z)(\xi^1,\xi^2,z) near point OO. Since we assume that the interfaces SI±S_I^{\pm} are symmetric about the central surface, we take the heights of the upper(yellow) and lower(red) surfaces in the local coordinate system as z=±h(ξ1,ξ2)z=\pm h(\xi^1,\xi^2) respectively. Thus the thickness of the thin film is 2h2h.

Schematic diagram of the soap film’s internal structure

Figure 2. The schematic diagram of the soap film’s internal structure. Central surface SCS_C is enveloped by two interfaces SI±S_I^{\pm}. For point OO on SCS_C, the coordinate system is established with normal axis n\mathbf{n} and tangential axes (e1,e2)(\mathbf{e}_1,\mathbf{e}_2). The thickness of film is 2h2h along n\mathbf{n}.

For a codimension-1 surface SCS_C, we follow the work of Wang et al. [ [80] to define the gradient of a scalar field ss, the divergence of a velocity field v=v1e1+v2e2\mathbf{v}=v^1\mathbf{e}_1+v^2\mathbf{e}_2 and the Laplacian of a scalar field ss as

∇ss=∑k=12∑l=12gkl∂s∂ξlek,∇s⋅v=1g∑k=12∂∂ξk(gvk),∇s2s=1g∑k=12∑l=12∂∂ξk(ggkl∂s∂ξl).(1)\begin{aligned} \nabla_s s &= \sum_{k=1}^{2}\sum_{l=1}^{2}g^{kl}\frac{\partial s}{\partial\xi^l}\mathbf{e}_k,\\ \nabla_s\cdot\mathbf{v} &= \frac{1}{\sqrt{g}}\sum_{k=1}^{2}\frac{\partial}{\partial\xi^k}\left(\sqrt{g}v^k\right),\\ \nabla_s^2s &= \frac{1}{\sqrt{g}}\sum_{k=1}^{2}\sum_{l=1}^{2}\frac{\partial}{\partial\xi^k}\left(\sqrt{g}g^{kl}\frac{\partial s}{\partial\xi^l}\right). \tag*{(1)} \end{aligned}

where

gkl=∂x∂ξk⋅∂x∂ξl(2)g^{kl}=\frac{\partial\mathbf{x}}{\partial\xi^k}\cdot\frac{\partial\mathbf{x}}{\partial\xi^l} \tag*{(2)}

is the metric tensor on SCS_C, x\mathbf{x} is the 3D Euclidean coordinates, and g=det⁡(gij)g=\det(g_{ij}).

For a soap film, the scale of the normal direction, which is typically in the order of 10−7m10^{-7}\mathrm{m}, is very small in comparison to that of the tangential direction. Hence, we will not consider small quantities of higher order with respect to hh in the numerical simulation. The normal direction, tangential direction, and curvature on the upper and lower surfaces SI±S_I^{\pm} can be approximated as

n±=±n−∇sh∣±n−∇sh∣=±n−∇sh+O(h2),t1±=e1∓e2×∇sh∣e1∓e2×∇sh∣=e1∓e2×∇sh+O(h2),t2±=e2±e1×∇sh∣e2±e1×∇sh∣=e2±e1×∇sh+O(h2),κ±=−12∇⋅n±=±κc+κh+O(h2).(3)\begin{aligned} \mathbf{n}^{\pm} &= \frac{\pm\mathbf{n}-\nabla_s h}{\lvert\pm\mathbf{n}-\nabla_s h\rvert}=\pm\mathbf{n}-\nabla_s h+O(h^2),\\ \mathbf{t}_1^{\pm} &= \frac{\mathbf{e}_1\mp\mathbf{e}_2\times\nabla_s h}{\lvert\mathbf{e}_1\mp\mathbf{e}_2\times\nabla_s h\rvert}=\mathbf{e}_1\mp\mathbf{e}_2\times\nabla_s h+O(h^2),\\ \mathbf{t}_2^{\pm} &= \frac{\mathbf{e}_2\pm\mathbf{e}_1\times\nabla_s h}{\lvert\mathbf{e}_2\pm\mathbf{e}_1\times\nabla_s h\rvert}=\mathbf{e}_2\pm\mathbf{e}_1\times\nabla_s h+O(h^2),\\ \kappa^{\pm} &= -\frac{1}{2}\nabla\cdot\mathbf{n}^{\pm}=\pm\kappa_c+\kappa_h+O(h^2). \tag*{(3)} \end{aligned}

where ∇\nabla is the three dimensional gradient operator that satisfies ∇s=∇−n(n⋅∇)\nabla_s=\nabla-\mathbf{n}(\mathbf{n}\cdot\nabla). The curvature of the center surface is given by κc=0.5∇s2SC\kappa_c=0.5\nabla_s^2S_C, and the local curvature caused by the surface thickness is defined as κh=0.5∇s2h\kappa_h=0.5\nabla_s^2h. In addition, the gradient operator on the upper and lower surfaces SI±S_I^{\pm} can be approximated as

∇S±=∇−n±(n±⋅∇)=∇s±∇sh(n⋅∇)±n(∇sh⋅∇)+O(h2).(4)\nabla_{S^{\pm}}=\nabla-\mathbf{n}^{\pm}(\mathbf{n}^{\pm}\cdot\nabla)=\nabla_s\pm\nabla_s h(\mathbf{n}\cdot\nabla)\pm\mathbf{n}(\nabla_s h\cdot\nabla)+O(h^2). \tag*{(4)}

Governing equations

In this section, we derive the evolution equation of the central surface SCS_C. Considering the flow field near point OO, we assume that the velocity field u\mathbf{u} within −h<z<h-h<z<h satisfies 3D incompressible Navier–Stokes equations:

\begin{cases} \rho\left(\dfrac{\partial\mathbf{u}}{\partial t}+\mathbf{u}\cdot\nabla\mathbf{u}\right)=-\nabla p+\mu\nabla^2\mathbf{u}+\mathbf{f},\\ \nabla\cdot\mathbf{u}=0, \end{cases} \qquad-h<z<h. \tag*{(5)}\end{cases}

The term f\mathbf{f} here denotes the external force. Following Chomaz [ [21], we assume a force-balancing boundary condition at the interfaces SI±S_I^{\pm}:

(p−pa+2κ±γ)n±=−∇s±γ+μ[∇u+(∇u)T]⋅n±,z=±h,(6)(p-p_a+2\kappa^{\pm}\gamma)\mathbf{n}^{\pm}=-\nabla_{s^{\pm}}\gamma+\mu[\nabla\mathbf{u}+(\nabla\mathbf{u})^{T}]\cdot\mathbf{n}^{\pm},\quad z=\pm h, \tag*{(6)}

where pap_a is the air pressure.

By substituting (3) and (4) into (6) and employing Taylor expansion, we can obtain the dominant governing equations at the center surface SCS_C where z=0z=0 as:

ρDuDt+O(h2)=2∇s(κhγ+∇s⋅us)+2γhκcn+1h∇sγ+μ∇s2u+f.(7)\rho\frac{D\mathbf{u}}{Dt}+O(h^2)=2\nabla_s(\kappa_h\gamma+\nabla_s\cdot\mathbf{u}_s)+\frac{2\gamma}{h}\kappa_c\mathbf{n}+\frac{1}{h}\nabla_s\gamma+\mu\nabla_s^2\mathbf{u}+\mathbf{f}. \tag*{(7)}

Here us=u−(n⋅u)n\mathbf{u}_s=\mathbf{u}-(\mathbf{n}\cdot\mathbf{u})\mathbf{n} is the tangential velocity. We refer the readers to Appendix A for details. The mass conservation equation in (5) immediately yields the equation for the conservation of the height field [Solenthaler et al. [73]] as

DhDt=−(∇s⋅us)h.(8)\frac{Dh}{Dt}=-(\nabla_s\cdot\mathbf{u}_s)h. \tag*{(8)}

The strength of surface tension of soap water is under the influence of multiple factors, including the water temperature and the concentration level of surfactant. We will only consider the latter under the assumption of always keeping a constant room temperature. Surfactants refer to chemical substances that can significantly reduce water’s surface tension when dissolved by them, like soap, oil, and kitchen detergents. The relationship between the concentration of a surfactant Γ\Gamma and the thin film’s surface tension coefficient γ\gamma can be described by the following Langmuir equation of state: γ(Γ)=γ0+RTΓ∞log⁡(1−ΓΓ∞)\gamma(\Gamma)=\gamma_0+RT\Gamma_{\infty}\log\left(1-\frac{\Gamma}{\Gamma_{\infty}}\right) [Muradoglu and Tryggvason [57]], where γ0\gamma_0 is the surface tension coefficient of an untainted interface (Γ=0\Gamma=0), Γ∞\Gamma_{\infty} is the maximum packing concentration, RR and TT are ideal gas constant and temperature respectively. All these four quantities are considered as constants here. In our case, where Γ≪Γ0\Gamma\ll\Gamma_0, the Langmuir equation of state can be approximated by γ(Γ)=γ0−γaΓ\gamma(\Gamma)=\gamma_0-\gamma_a\Gamma with γa=RT\gamma_a=RT [Xu et al. [81]]. We further assume that the surfactant concentration Γ\Gamma is invariant with the normal coordinate and it satisfies the classical convection–diffusion equation with the diffusion coefficient aca_c as:

DΓDt=αc∇s2Γ.(9)\frac{\mathrm{D}\Gamma}{\mathrm{D}t}=\alpha_c\nabla_s^2\Gamma. \tag*{(9)}

Discarding the quantities of the magnitude O(h2)O(h^2) and combining (7), (8), and (9), we arrive at the our functional dynamics model:

{ρDuDt=2∇s(κhγ+∇s⋅us)+2γhκcn+1h∇sγ+μ∇s2u+f,DhDt=−(∇s⋅us)h,DΓDt=αc∇s2Γ.(10)\begin{cases} \rho\frac{\mathrm{D}\mathbf{u}}{\mathrm{D}t}=2\nabla_s(\kappa h\gamma+\nabla_s\cdot\mathbf{u}_s)+\frac{2\gamma}{h}\kappa_c\mathbf{n}+\frac{1}{h}\nabla_s\gamma+\mu\nabla_s^2\mathbf{u}+\mathbf{f},\\ \frac{\mathrm{D}h}{\mathrm{D}t}=-(\nabla_s\cdot\mathbf{u}_s)h,\\ \frac{\mathrm{D}\Gamma}{\mathrm{D}t}=\alpha_c\nabla_s^2\Gamma. \tag*{(10)} \end{cases}

SPH Discretization

Particle Height

The key intuition underpinning our SPH particle height model in codimension-1 space is that each thin-film particle carries along with a certain mass of fluid. In the regions where particles are denser, the thin film is deemed thicker because more fluid is contained per unit area on the tangential plane. This intuition can be mathematically captured by the codimension-1 SPH framework. Given the SPH integration of a physical quantity AA on the thin film

Ai=∑jsjAjWij=∑jVjhjAjWij,A_i=\sum_j s_jA_jW_{ij}=\sum_j\frac{V_j}{h_j}A_jW_{ij},

where sjs_j represents the control area of particle jj. If we set the function AA to equal hh, then we obtain the SPH integrated expression of the (half-)height field hh on a thin film as:

hi=∑jVjWij.(11)h_i=\sum_j V_jW_{ij}. \tag*{(11)}

In this way, the height of a particle is decided by (i) the particle distribution near its neighborhood and (ii) the volume that each neighboring particle carries. To view it another way, this translates the typical SPH mass density (how much mass per unit area) [77] to the volume density (how much volume per unit area), which naturally equates the concept of height on a thin film, an correlation previously explored by Solenthaler et al. [ [73]. Note that hh and VV are one-sided quantities because we assume symmetry about SCS_C, and the half volume Vi=mi/ρiV_i=m_i/\rho_i is assigned with every particle at the beginning and is conserved throughout the simulation.

The height hih_i that is so computed will be termed the numerical height, and we use it for all computation relevant to the dynamics of soap bubbles, e.g., the discretization of all differential operators,

and the first equation of (10) describing the momentum evolution of fluid. It offers a smooth surface that prevents numerical instabilities, however "blurs" the height field with a mollifying kernel. To preserve the vibrant and turbulent flow patterns originating from the advection-diffusion evolution of the height field in (10), we introduce an additional advected height h^\hat{h}, that actually follows the Lagrangian evolution equation (8),

Dh^Dt=−(∇s⋅us)h^,(12)\frac{\mathrm{D}\hat{h}}{\mathrm{D}t}=-(\nabla_s\cdot\mathbf{u}_s)\hat{h}, \tag*{(12)}

which will be used to compute the interference color for rendering. Now we compare the two forms of height computation. The advected height is obtained by temporally integrating the flux about a particle from the velocity field. The numerical height is obtained by first temporally integrating the particles’ positions using the same velocities and then estimating the volume density. The two forms are equivalent if there are no numerical errors. In practice, they deviate in their behavior, each with its advantages and drawbacks. The numerical height is free from error accumulation, as it is recomputed at each step, but it is inevitably smoothed due to the SPH kernel convolution. The advected height can suffer from numerical drift, but it can preserve higher-frequency details. In our system, we use both to their advantages. We use the numerical height to compute the dynamics, where smoothness is beneficial for robustness, and we use the advected height in the color computation for more appealing visual results. To reduce the numerical drift, we normalize the advected height at each timestep to conserve the total volume. As shown in Figure 3, the numerical height is much smoother and does not preserve the flow pattern introduced by convection. We provide further comparisons in the appendix.

Comparison between numerical height and advected height

Figure 3. The comparison between numerical height (left) and advected height (right).

Differential Operators

In our scheme, the discretization of surface differential operators, i.e., ∇s\nabla_s, (∇s⋅)(\nabla_s\cdot) and ∇s2\nabla_s^2 at particle ii are obtained by projecting all of its neighboring particles to the plane defined by its local frame ei\mathbf{e}_i, and performing traditional SPH operators on that codimension-1 plane, as shown in (13):

(∇sf)i=∑jhiVj(fihi2+fjhj2)∇sWij,(symmetric form)(∇sf)i=∑jVjhj(fj−fi)∇sWij,(difference form)(∇s⋅us)i=∑jVjhju~ij⋅∇sWij,(∇s2f)i=∑jVjhj(fj−fi)2∣∇sWij∣∣r~ij∣.(13)\begin{aligned} (\nabla_s f)_i &= \sum_j h_i V_j \left(\frac{f_i}{h_i^2}+\frac{f_j}{h_j^2}\right)\nabla_s W_{ij}, &&\text{(symmetric form)}\\ (\nabla_s f)_i &= \sum_j \frac{V_j}{h_j}(f_j-f_i)\nabla_s W_{ij}, &&\text{(difference form)}\\ (\nabla_s\cdot\mathbf{u}_s)_i &= \sum_j \frac{V_j}{h_j}\widetilde{\mathbf{u}}_{ij}\cdot\nabla_s W_{ij},\\ (\nabla_s^2 f)_i &= \sum_j \frac{V_j}{h_j}(f_j-f_i)\frac{2\lvert\nabla_s W_{ij}\rvert}{\lvert\widetilde{\mathbf{r}}_{ij}\rvert}. \tag*{(13)} \end{aligned}

Distinguishing between the symmetric and difference forms of the surface gradient operator is a common numerical technique employed in SPH fluid simulations [46, 56]. In our discretization, we primarily use the symmetric form to take advantage of its momentum conserving nature, with two exceptions. One is the Marangoni force, where we want to highlight the directional quality of the motion. The other is when treating particles near the boundary to negate their tendencies to be pulled towards the center due to the lack of particles on the other side.

The surface vector r~ij\widetilde{\mathbf{r}}_{ij} in (13) is obtained by subtracting the local normal component ni\mathbf{n}_i from the vector rij=ri−rj\mathbf{r}_{ij}=\mathbf{r}_i-\mathbf{r}_j pointing from particle jj to $i as r~ij=rij−(rij⋅ni)ni\widetilde{\mathbf{r}}_{ij}=\mathbf{r}_{ij}-(\mathbf{r}_{ij}\cdot\mathbf{n}_i)\mathbf{n}_i.

We further define the surface gradient ∇sWij\nabla_s W_{ij} of a codimension-1 kernel scalar kernel function W=W(r~)W=W(\widetilde{r}) as

∇sWij=gi−1dWdr~r~ij∣r~ij∣.(14)\nabla_s W_{ij}=g_i^{-1}\frac{\mathrm{d}W}{\mathrm{d}\widetilde{r}}\frac{\widetilde{\mathbf{r}}_{ij}}{\lvert\widetilde{\mathbf{r}}_{ij}\rvert}. \tag*{(14)}

Here gig_i is the metric tensor at particle ii and r~=∣r~ij∣\widetilde{r}=\lvert\widetilde{\mathbf{r}}_{ij}\rvert. We use the fourth-order spline function [77] to compute the numerical height hih_i and the Spiky kernel [56] to compute all other terms to avoid clustering caused by inappropriate repulsive forces. Mathematically, these kernel functions are all in 2D forms because they’re operating on a codimension-1 plane.

The velocity difference u~ij\widetilde{\mathbf{u}}_{ij} we used for divergence operator is different from the projection of uj−ui\mathbf{u}_j-\mathbf{u}_i to codimension-1 plane eii\mathbf{e}_i^i. The reason arises from the insight that a streamline on the surface, with a constant velocity rate α\alpha (i.e., ∣ui∣=∣uj∣=α\lvert\mathbf{u}_i\rvert=\lvert\mathbf{u}_j\rvert=\alpha, ui⋅ni=uj⋅nj=0\mathbf{u}_i\cdot\mathbf{n}_i=\mathbf{u}_j\cdot\mathbf{n}_j=0), should yield a zero divergence. However, if we directly project uj\mathbf{u}_j to the local plane at particle ii, the deviation of normal directions ni−nj≠0\mathbf{n}_i-\mathbf{n}_j\ne0 will incorrectly distort the project velocity rate as ∣uj−(uj⋅ni)ni∣≠α\lvert\mathbf{u}_j-(\mathbf{u}_j\cdot\mathbf{n}_i)\mathbf{n}_i\rvert\ne\alpha. To avoid this numerical artifact, we imitate the idea of the great-circle-advection algorithm used by Huang et al. [ [34]; in particular, we pass the same coordinate values from the local frame at jj to that at ii instead of performing a projection, as shown in Figure 7.

Half bubble

Figure 7. Half bubble: The surface-tension-driven oscillation for a half bubble standing on a plane. In the beginning, a push toward the center is applied on the top right region of the bubble. A vorticity confinement force is employed to enhance the rotational motion on the bubble surface.

First, we build temporary coordinate systems (e~i,n~i)(\widetilde{\mathbf{e}}^i,\widetilde{\mathbf{n}}_i) and (e~j,n~j)(\widetilde{\mathbf{e}}^j,\widetilde{\mathbf{n}}_j) at local frames ii and jj, with their normal directions unchanged, and one tangential axis, say, e~1i\widetilde{\mathbf{e}}^i_1, along the direction of rij\mathbf{r}_{ij}:

n~i=nj,n~j=nj,\widetilde{\mathbf{n}}_i=\mathbf{n}_j,\qquad\widetilde{\mathbf{n}}_j=\mathbf{n}_j,
e~1i=e~1j=rij∣rij∣,\widetilde{\mathbf{e}}^i_1=\widetilde{\mathbf{e}}^j_1=\frac{\mathbf{r}_{ij}}{\lvert\mathbf{r}_{ij}\rvert},
e~2i=n~i×e~1i,e~2j=n~j×e~1j.(15)\widetilde{\mathbf{e}}^i_2=\widetilde{\mathbf{n}}_i\times\widetilde{\mathbf{e}}^i_1,\qquad\widetilde{\mathbf{e}}^j_2=\widetilde{\mathbf{n}}_j\times\widetilde{\mathbf{e}}^j_1. \tag*{(15)}

Then, with the decomposition of u\mathbf{u} at temporary coordinates (e~,n~)(\widetilde{\mathbf{e}},\widetilde{\mathbf{n}}) we have

ui=uie~1i+vie~2i+win~i,\mathbf{u}_i=u_i\widetilde{\mathbf{e}}^i_1+v_i\widetilde{\mathbf{e}}^i_2+w_i\widetilde{\mathbf{n}}_i,
uj=uje~1j+vje~2j+wjn~j.(16)\mathbf{u}_j=u_j\widetilde{\mathbf{e}}^j_1+v_j\widetilde{\mathbf{e}}^j_2+w_j\widetilde{\mathbf{n}}_j. \tag*{(16)}

Finally, as shown in Figure 6, we compute the actual velocity difference u~ij\widetilde{\mathbf{u}}_{ij} used for divergence as:

Definition of the velocity difference between temporary coordinate systems

Figure 6. Definition of u~ij\widetilde{\mathbf{u}}_{ij} in (13). Here n~\widetilde{\mathbf{n}} represents normal axes, e~1\widetilde{\mathbf{e}}_1 is a unit vector pointing from ii to jj, and e~2\widetilde{\mathbf{e}}_2 is the cross product of n~\widetilde{\mathbf{n}} and e~1\widetilde{\mathbf{e}}_1.

u~ij=(uj−ui)e~1i+(vj−vi)e~2i.(17)\widetilde{\mathbf{u}}_{ij}=(u_j-u_i)\widetilde{\mathbf{e}}^i_1+(v_j-v_i)\widetilde{\mathbf{e}}^i_2. \tag*{(17)}

State Equation

With a linear formulation, the state equation which relates the compression of particles and the pressure of fluid in a classical SPH scheme can be written as

pi=αp(ρiρ0−1),(18)p_i=\alpha_p\left(\frac{\rho_i}{\rho_0}-1\right), \tag*{(18)}

with αp\alpha_p as a constant parameter specifying the stiffness of the feedback. In our numerical algorithm, we combine this equation of state with the thin-film pressure we derived in the previous section to obtain

p=κhγ+∇s⋅us,(19)p=\kappa_h\gamma+\nabla_s\cdot\boldsymbol{u}_s, \tag*{(19)}

which suggests that the fluid pressure inside the thin film is a function of the local curvature κh\kappa_h and velocity’s divergence on surface. With the analogy of density ρ\rho in the classical SPH scheme and the numerical height hh in ours, we acquire a final formulation of the particle pressure as

pi=αh(hih0−1)+αkγi(κh)i+αd(∇s⋅us)i.(20)p_i=\alpha_h\left(\frac{h_i}{h_0}-1\right)+\alpha_k\gamma_i(\kappa_h)_i+\alpha_d(\nabla_s\cdot\boldsymbol{u}_s)_i. \tag*{(20)}

Here h0h_0 is the rest thickness of thin films, and αh,αk,αd\alpha_h,\alpha_k,\alpha_d are three constant parameters controlling the tangential incompressibility of thin-film system. The first term administrates the weakly compressibility to ensure that the particles are relatively evenly populated in the simulation domain to ensure numerical robustness, while the latter two terms achieve the surface-tension-driven behaviors of the thickness evolution. Specifically, the stiffness of our system is much lower than that of a standard SPH algorithm used for volumetric incompressible flow simulation. Therefore, the dynamics of particles are dominated by physical evolution instead of by the tendency to be evenly distributed.

Force Discretization

We discretize the fluid forces in (10) using our surface SPH operators (13). The mean curvature κc=0.5∇s2SC\kappa_c=0.5\nabla_s^2S_C, where SC:z=z(x,y)S_C:z=z(x,y), is calculated using the surface Laplacian operator

2κc=∑jVjhj(−rij⋅ni)2∣∇sWij∣∣rij∣.(21)2\kappa_c=\sum_j\frac{V_j}{h_j}(-\boldsymbol{r}_{ij}\cdot\boldsymbol{n}_i)\frac{2|\nabla_sW_{ij}|}{|\boldsymbol{r}_{ij}|}. \tag*{(21)}

We further introduce reviseaa vorticity confinement force [[71] (Yoon et al. 2009; Zhu et al. 2010)] to enhance the vortical motion on the bubble surface. We carry the vorticity ζi\zeta_i on every particle ii, which is subject to a similar convection-diffusion equation of the surfactant concentration (9). The vorticity confinement force fisf_i^s takes the form fis=−∑jrij×(ζjezj)f_i^s=-\sum_j\boldsymbol{r}_{ij}\times(\zeta_j\boldsymbol{e}_z^j).

Time Integration

Before computing the forces from the SPH discretization of (10), we first calculate the surface tension coefficient γi\gamma_i and the fluid pressure pip_i for each particle as shown in Algorithm 1. After that, we compute all forces in Algorithm 2. Following the position update, the local frames and metric tensors are reconstructed at every particle with the PCA-based method [80]. Finally, the numerical height hh is updated with (11). We summarize our time integration scheme in Algorithm 3.

Algorithm 1 Compute Preliminary Variables for particle ii

  1. Update surface tension: γi=γ0−γaΓi\gamma_i=\gamma_0-\gamma_a\Gamma_i.

  2. for each particle jj in the neighborhood of ii do

  3. Update divergence: (∇s⋅us)i=∑jVjhjuij⋅∇sWij(\nabla_s\cdot\boldsymbol{u}_s)_i=\sum_j\frac{V_j}{h_j}\boldsymbol{u}_{ij}\cdot\nabla_sW_{ij}.

  4. Update local curvature: (κh)i=∑jVjhj(hj−hi)2∣∇sWij∣∣rij∣(\kappa_h)_i=\sum_j\frac{V_j}{h_j}(h_j-h_i)\frac{2|\nabla_sW_{ij}|}{|\boldsymbol{r}_{ij}|}.

  5. end for

  6. Update pressure: pi=αh(hih0−1)+αkγi(κh)i+αd(∇s⋅us)ip_i=\alpha_h\left(\frac{h_i}{h_0}-1\right)+\alpha_k\gamma_i(\kappa_h)_i+\alpha_d(\nabla_s\cdot\boldsymbol{u}_s)_i.

Codimension Transition

Under certain circumstances, the codimension-1 thin film will shrink or rupture into volumetric droplets. We capture this phenomenon with the criteria that (κc)i>κ0(\kappa_c)_i>\kappa_0 or ni<2n_i<2. Here κ0\kappa_0 is a constant depending on the setup of our scene, and nin_i is the number of neighbors within the SPH kernel radius. The first criterion checks if the particle still lives on a relatively even surface, and the second checks

Algorithm 2 Compute Forces for Particle ii

  1. Compute external force: fie=mig+fext\mathbf{f}^{e}_{i}=m_{i}\mathbf{g}+\mathbf{f}_{\mathrm{ext}}.

  2. for each particle jj in the neighborhood of ii do

  3. Compute vorticity confinement force: fis=−∑jr~ij×(ζjnj)\mathbf{f}^{s}_{i}=-\sum_{j}\tilde{\mathbf{r}}_{ij}\times(\zeta_{j}\mathbf{n}_{j}).

  4. Compute pressure force with symmetric form: fip=2Vi∑jVjhi(pihi2+pjhj2)∇sWij\mathbf{f}^{p}_{i}=2V_{i}\sum_{j}\frac{V_{j}}{h_{i}}\left(\frac{p_{i}}{h_{i}^{2}}+\frac{p_{j}}{h_{j}^{2}}\right)\nabla_{s}W_{ij}.

  5. Compute Marangoni force with difference form: fim=Vihi∑jVjhj(γj−γi)∇sWij\mathbf{f}^{m}_{i}=\frac{V_{i}}{h_{i}}\sum_{j}\frac{V_{j}}{h_{j}}(\gamma_{j}-\gamma_{i})\nabla_{s}W_{ij}.

  6. Compute capillary force: fic=γiVihini∑jVjhj(−r~ij⋅ni)2∣∇sWij∣∣rij∣\mathbf{f}^{c}_{i}=\frac{\gamma_{i}V_{i}}{h_{i}}\mathbf{n}_{i}\sum_{j}\frac{V_{j}}{h_{j}}(-\tilde{\mathbf{r}}_{ij}\cdot\mathbf{n}_{i})\frac{2\lvert\nabla_{s}W_{ij}\rvert}{\lvert\mathbf{r}_{ij}\rvert}.

  7. Compute viscosity force: uij=uj−ui\mathbf{u}_{ij}=\mathbf{u}_{j}-\mathbf{u}_{i}, fiv=Viμ∑jVjhj(uij−(uij⋅ni)ni)2∣∇sWij∣∣rij∣\mathbf{f}^{v}_{i}=V_{i}\mu\sum_{j}\frac{V_{j}}{h_{j}}\left(\mathbf{u}_{ij}-(\mathbf{u}_{ij}\cdot\mathbf{n}_{i})\mathbf{n}_{i}\right)\frac{2\lvert\nabla_{s}W_{ij}\rvert}{\lvert\mathbf{r}_{ij}\rvert}.

  8. end for

Algorithm 3 Advance a Time Step

  1. for each particle ii do

  2. Compute preliminary variables with Algorithm 1.

  3. Update advected height: h^i+=−h^i(∇s⋅us)iΔt\hat{h}_{i+}=-\hat{h}_{i}(\nabla_{s}\cdot\mathbf{u}_{s})_{i}\Delta t.

  4. Diffuse surfactant concentration: Γi+=αcΔt∑jVjhj(Γj−Γi)2∣∇sWij∣∣rij∣\Gamma_{i+}=\alpha_{c}\Delta t\sum_{j}\frac{V_{j}}{h_{j}}(\Gamma_{j}-\Gamma_{i})\frac{2\lvert\nabla_{s}W_{ij}\rvert}{\lvert\mathbf{r}_{ij}\rvert}.

  5. Compute forces with Algorithm 2.

  6. Update velocity: ui+=Δtmi(fie+fis+fip+fim+fic+fiv)\mathbf{u}_{i+}=\frac{\Delta t}{m_{i}}\left(\mathbf{f}^{e}_{i}+\mathbf{f}^{s}_{i}+\mathbf{f}^{p}_{i}+\mathbf{f}^{m}_{i}+\mathbf{f}^{c}_{i}+\mathbf{f}^{v}_{i}\right).

  7. Update position: ri+=uiΔt\mathbf{r}_{i+}=\mathbf{u}_{i}\Delta t.

  8. Update local frame ei\mathbf{e}^{i}, normal ni\mathbf{n}_{i} and metric tensor gig_{i}.

  9. Update numerical height: hi=∑jVjWijh_{i}=\sum_{j}V_{j}W_{ij}.

  10. end for

if the particle is all alone. When both criteria are met, particle ii is deleted from our surface SPH solver and transferred to a volumetric SPH solver [Akinci et al. 2013; Yang et al. 2017b; Zhu et al. 2010]. Conversely, for a volumetric particle ii, if there is a codimension-1 particle jj nearby, and (rj−ri)⋅nj<threshold(\mathbf{r}_{j}-\mathbf{r}_{i})\cdot\mathbf{n}_{j}<threshold, particle jj is deleted from 3D SPH solver, and transported to our codimension-1 surface SPH solver. An example of codimension-1-to-0 transition is illustrated in Figure 10. We can see that green-colored volumetric particles are detached from the orange-colored codimension-1 thin film, at where the thin film shows a sharp corner. Under surface tension, the bulk fluid tends to form a spherical drop.

Codimension transition shown with particlesCodimension transition shown with surface

Figure 10. An example of codimension transition. In the left subfigure, codimension-1 particles are colored with orange and codimension-0 particles with green. In the right subfigure, the surface consisted of codimension-1 particles is also displayed. One can see that at the tip of the cone formed by the thin film, some particles are transiting to codimension-0 because they passed the threshold.

Additional Air Pressure Difference

For a closed bubble, the air pressure differs between the interface, as suggested by the Young-Laplace equation, which tends to contract the bubble into a singularity. Thus an additional force is needed to retain its shape. We calculate the pressure inside the bubble pbp_b with the ideal gas equation pbVb=αpp_bV_b = \alpha_p, where αp=nRT\alpha_p = nRT is a constant number. The volume of closed bubble VbV_b is given by a sum with pyramid volume formula Vb=∑i13Vihi(ni⋅xi)V_b = \sum_i \frac{1}{3}\frac{V_i}{h_i}(\mathbf{n}_i \cdot\mathbf{x}_i), with xi\mathbf{x}_i the vector pointing from the gravity center of all particles on the bubble to particle ii. Afterwards, an external force fext=pa−pb2hn\mathbf{f}_{\mathrm{ext}} = \frac{p_a-p_b}{2h}\mathbf{n} is added to all particles.

Particle Reseeding

During the evolution of soap films, the total area of films may be enlarged from the boundary. For example, a common way to produce bubbles is to blow air into a circle soap film on a ring soaked with soap water, and as the bubble forms, new portions of soap film are replenished from the ring.

Our algorithm includes a reseeding step for every iteration to implement this feature. At the end of every time step, every fixed boundary particle ii is checked with its nearest non-boundary neighbor particle jj, and if rij>thresholdr_{ij} > threshold, a new particle kk is reseeded at rk=ri+rj2+σ\mathbf{r}_k = \frac{\mathbf{r}_i+\mathbf{r}_j}{2} + \boldsymbol{\sigma}, with a random perturbation σ\boldsymbol{\sigma}. The perturbation term alleviates artifacts emerging from regular patterns in the distribution of newly-generated particles. The mass of a new particle kk inherits from mk=mjm_k = m_j, and uk=uj2\mathbf{u}_k = \frac{\mathbf{u}_j}{2}. While adding particles to SPH solvers can undermine the physical consistency and cause visible artifacts if not treated carefully, we note that in our case, this reseeding step only takes place near the boundary and is viewed as the physical process of fluid flowing from the boundary, so no mass or momentum redistribution is performed.

Boundary Treatment

For our various examples that involve interaction with circular or square solid rims, it is necessary to devise appropriate boundary handling methods. The task is twofold: First, the particles should not penetrate the solid boundary. Second, a particle should behave consistently when its neighborhood is under-sampled near the boundary. For the first task, we correct the velocities of particles that are going to penetrate the solid boundary defined by an implicit boundary (e.g., the solid ring in the Newton ring example). For the second task, we adopt a geometric compensation method illustrated in Figure 12. For a particle PP with its neighborhood CC truncated by the boundary, we find the nearest neighboring particle BB that is on the boundary, take its mirrored point with respect to particle PP as B′B', and draw the secant SS across B′B' perpendicular to B′−PB' - P. All neighboring points sampled within the circular segment defined by CC and SS are counted twice. If the boundary is a straight line, this method would precisely “clone-stamp” a part of the sampled region to fill up the empty region. Otherwise, the cloned region would not fill the empty region perfectly, then we estimate the unsampled area and adjust the compensation accordingly.

Illustration of the compensation method to treat boundary

Figure 12. Illustration of the compensation method to treat boundary.

We adopt this geometric compensation method in place of typical boundary particle method for two reasons: first, the relative positions of the boundary particles to the fluid particles must change as the surface deforms, which adds complication to the traditional ways with multiple layers of boundary particles.

Secondly, we encourage the spatial variance of particle density with low stiffness, so having boundary particles with fixed volume or mass would not do justice. For example, if the particles congregate along the border, we would want the area near the border to rise in height/density, in which case this adaptive clone-stamp strategy is useful as it preserves the state of the fluid. This mirroring approach to enable large density variation is inspired by Keiser et al. [2006]; the dynamic and adaptive nature is also similar to the Ghost SPH approach [69].

Thin-Film Visualization

The color in all of our simulations is computed with the CIE Standard Illuminant D65, a standard illuminant that represents the average, open-air illumination under daylight. Given the discretized spectral power distribution, we compute the reflection, refraction, and interference for the individual wavelengths as a function of the thin film thickness along with the refractive indices of the external medium and the fluid. As light illuminates a thin film, there exists a difference in distance traveled between the reflected lightwaves and the refracted lightwaves. The shift of phase can cause them to interfere constructively or destructively travel, with the exactitude dependent on the exact thickness of the film. The resultant light intensities for all wavelengths will be converted to a single RGB color value by integrating with the CIE matching functions. There exists various open-source software that performs such tasks; we rely on ColorPy [45] in our implementation. We utilize OpenGL for generating experimental visualizations and Houdini for rendering photorealistic images and videos. In Houdini, we render the particles both as circles and as mesh. Circles can highlight the intricate flow patterns, and the mesh is used for better realism. The physically-based spectral color calculated in the abovementioned way will serve as the base color of the particles, and additional

Results

Thickness Profile. Here a piece of a planar thin film is confined in a vertically positioned rim, and the gravitational force pulls the fluid volume to amass at the bottom, resulting in a height field that decreases with the elevation. The vertically varying thickness would result in a set of horizontal color stripes known as the Newton interference pattern. The thickness profile η=η(z)\eta=\eta(z) can be approximated by an exponential function η(z)=η∗exp⁡(ρgη∗z2(σ0−σ∗))\eta(z)=\eta^{*}\exp\left(\frac{\rho g\eta^{*}z}{2(\sigma_{0}-\sigma^{*})}\right) derived by Couder et al. [1989], where η∗\eta^{*} and σ∗\sigma^{*} represents the surface’s equilibrium thickness and surface tension coefficient when horizontally placed. Our experiments use η∗=387.875nm\eta^{*}=387.875\mathrm{nm} and σ∗=71.996⋅10−6N/m\sigma^{*}=71.996\cdot10^{-6}\mathrm{N/m}. Since our surface simulation is allowed to be compressible in nature, it handles the volume aggregation at the bottom automatically. As displayed in Figure 11, both the visual result of Newton interference patterns and the thickness profile matches the real-world data in trend.

Newton interference pattern and thickness profiles

Figure 11. The Newton Interference pattern. The upper two pictures are from our simulation and the lower two pictures shows a real-world experiment [25]. In the right column, elevation(horizontal) vs. thickness (vertical) graphs are displayed. Compared with the experimental result, our simulation can generate visually realistic color fringes. As shown in the right figures, the thickness profile generated by our simulation matches the one measured in the real experiment. Overlaid in the top-right figure is the analytical profile (blue curve) predicted according to Couder et al. [1989]; the proximity of it with our simulation results (yellow dots) further confirms our simulation result.

Surface Flow on Oscillating Bubbles. As shown in the upper part of Figure 4, we initialize the simulation bubble as a perfect sphere. In the first 1.0 second, we apply an impulse towards the center at the north and south poles. Meanwhile, one hundred in-plane vortices are seeded randomly. The induced capillary wave by the initial perturbation propagates through the bubble, causing it to deform and oscillate. The height field is evolved by the surface deformation and vortical flows jointly, forming vivid color patterns. Our method is independent of the initialization method and can be easily extended to bubbles with custom shapes. The lower part of the same figure shows a simulation initialized on an irregular mesh and without the initial impulse. Furthermore, as shown in Figure 7, the simulation can also be extended to a half bubble standing on a plane. The initial impulse in Figure 7 is applied at the top right region at the bubble instead of the north-pole.

Bubble oscillation

Figure 4. Bubble oscillation: A perfect sphere ocillates under perturbations and vortices (upper part), and an irregular bubble (lower part).

Bubble Rupture. In the example shown in Figure 5, we burst a bubble into filaments and droplets. We first manually mark every particle in a small region as "punctured", and give it an inward push, imitating the bubble to be poked by, for example, a human finger. Then, the surface near that region is bent inward by the momentum of the initial impulse, causing more and more codimension-1 particles to meet the criteria of codimension transition and hence rupture into volumetric fluid particles. These particles are then taken over by the 3D SPH solver, morphing them into numerous thin filaments and tiny droplets. The mechanism for bubble bursting is general to the bubble’s shape and dynamics. The shown example directly follows the bubble oscillation example depicted in the upper part of Figure 4. The rupture animation is displayed at 0.1× speed of the oscillation animation. A feature that separates our animation from the existing ones is that our method models the change in the bubble’s hue due to surface contraction. As one can see in Figure 5, the bubble’s color changes from green to purple, providing an extra layer of richness than if such phenomenon is modeled by a volumetric SPH solver only.

Bubble rupture sequence

Figure 5. Bubble rupture: The bubble bursts into filaments and droplets after being "punctured" in a small region on the right. The color change on the bubble comes as a result of the surface contraction, which increases the thickness of the thin film.

Large-Deforming Thin Films with Rims. In Figure 8, a thin film is confined in a square rim, and we apply a large gravitational pull whose direction circulates periodically around the surface. On the surface, we seed 20 random vortices and perform a slight perturbation to the volume of particle ViV_i as well as density ρi\rho_i with Perlin noise, which reflects in the initial color pattern. The rotating force causes the particles to perform in-plane and out-of-plane motions alternatively, forming appealing color patterns and surface morphology. In Figure 9, we use a circular rim to contain a thin film and recreates on it the R-T instability, a beautiful, classic flow pattern that can be captured by SPH method [74]. Unlike the oscillating bubble example, where we desire the bouncy feeling, here, we set the surface tension coefficient low to give the film a soft and mellow feeling, with plenty of high-frequency motions. In addition to the downward gravity, we apply a large external force Fext=β[(cos⁡α,sin⁡α,0)+(0,cos⁡2α,sin⁡2α)]\mathbf{F}_{ext} = \beta[(\cos\alpha,\sin\alpha, 0) + (0,\cos2\alpha,\sin2\alpha)], in which β\beta is the scalar of force strength and α=2πt/T\alpha= 2\pi t/T where tt is the simulation time and TT is the period. We initialize the film so that the upper half has a density 4 times as large, and the lower half has a height 1.5 times as large, reflected in the color difference. Under gravity, the heavier top moves down, and the height difference tends the bottom to move up, countering each other and evolve into various finger-like patterns. Besides the flow on the surface, the aggressive deformation of the surface itself is also reflected by the color. For example, the stretched parts are visibly darker than the rest of the thin film.

Thin-film confined in a square

Figure 8. Thin-film confined in a square: A gravitational pull is being rotated periodically around the surface, expediting the formation of appealing color patterns.

Rayleigh-Taylor instability simulated on a piece of dynamically deforming thin film

Figure 9. Rayleigh-Taylor instability simulated on a piece of dynamically deforming thin film. Upon initialization, the upper half of the thin film carries a larger density, and the lower half carries a larger volume. The interface evolves into finger-like patterns, which further disintegrates into numerous delicate, colorful threads, making up the rich and realistic palette as seen in the last two subfigures.

Thin-film Dripping with Circular Rim. As shown in Figure 14, we initialize the thin film as a half-sphere. Particles under gravity tend to fall down, and under surface tension tend to contract. When

Thin-film dripping rendered as mesh and circles

Figure 14. Thin-film dripping, surface particles at the tip transform into volumetric particles, detaching from the thin film and falls down as spherical drips. The upper and lower subfigures depict the same simulation sequence rendered as mesh and a collection of circles, respectively.

the tip of the thin film contracts, some particles transform from codimension-1 to codimension-0, separating from others and drops down, forming droplets under the surface tension modeled by our auxiliary volumetric SPH solver.

Catenoid. Consider two rims connected by a thin soap film are pulled away from each other. The thin film will try to shrink under the area minimizing tendency, forming a catenoid, as have been validated numerically in Appendix B. Figure 13 shows the rendered result our simulation. After the separation between the two rims exceeds the Laplace limit, no more catenoids can sustain. Then, the membrane would further contract and collapse into a droplet in the center. As in the figure, our system can accurately simulate the surface-tension-driven deformation while considering the color changes due to the surface elongation.

Catenoid simulation sequence

Figure 13. Catenoid: Two parallel, circular rims are connected via thin film, under surface tension, the thin film would contract in the center and converge to the minimal surface of the catenoid. After the rim separation surpasses the Laplace limit, the catenoid can no longer be sustained by the thin film, which will eventually be separated and pinch off a small droplet.

Droplet Marangoni Effect. In the previous examples, we showcase the transition from surface particles to volumetric particles. As shown in Figure 15, we highlight the reverse process by releasing four drops of soap solution with high surfactant concentration Γ\Gamma to the thin film with low surfactant concentration. As the droplets impact the film, they are transformed as codimension-1 particles and blend into the surface, significantly reducing the local surface tension of the thin film. The response would twofold: first, the reduced surface tension can tolerate higher surface curvature; therefore, one can observe more high-frequency vibrations of the surface; secondly, a soapy droplet would significantly increase the soap concentration at the impact location, thereby creating a zone with low surface tension. Thus, a nonzero gradient of surface tension would occur at the perimeter of this zone, pointing outwards, pushing particles out, a phenomenon known as the Marangoni effect. As this happens, more particles will cluster at the outskirt of the low surface tension zone, resulting in an increase in film thickness, which is reflected in the color change.

Four drops of soap solution deposited onto a thin film

Figure 15. Droplet Marangoni Effect: Four drops of soap solution is deposited onto the thin film. After the soap solutions is absorbed by the surface, the surface tension of the impacted area would be lowered, which enables more high-frequency deformation to be observed. Moreover, the droplets induce local non-zero gradients of surface tension, causing the particles to move towards the high surface tension region, which is known as the Marangoni effect. The color change in the surface would reflect such movements.

Performance

Our algorithm benefits from the intrinsic parallelizability of the particle method and thus is highly efficient. All parts in Algorithm 1, 2 and 3 are implemented in parallel with OpenMP for multi-core processors. However, the codimension transition takes a linear time complexity because it needs to move particles between the surface and volumetric solvers. The performance of all scenes is displayed in Table 2 in Appendix B.

FigureDescriptionNumber of ParticlesComputational ResourceFPS*Time / Frame (Avg.)
Figure 11Thickness Profile5,154~5,785†Laptop C with 6 Cores101.409s
Figure 4 (Upper)Oscillating Bubble (Sphere Bubble)163,842Server A with 16 Cores5010.65s
Figure 4 (Lower)Oscillating Bubble (Irregular Bubble)24,578Server A with 128 Cores500.225s
Figure 7Oscillating Bubble (Half Bubble)86,013Server A with 32 Cores509.6s
Figure 5Bubble Rupture163,842Server A with 128 Cores5010.92s
Figure 8Large-Deforming Thin Films (Square)58,081Server A with 128 Cores515.48
Figure 9Large-Deforming Thin Films (Circular)126,282Server A with 128 Cores1013.575s
Figure 14Thin-Film Dripping5,185~5501†Server A with 16 Cores509.74s
Figure 13,17Catenoid4,968~5,542†Laptop C with 6 Cores3000.883s
Figure 15Droplet Marangoni Effect8,173Laptop C with 6 Cores502.01s
Figure 16Mean Curvature Validation10,000Laptop C with 6 Cores100.35s
Figure 19Numerical Height Validation5154Laptop C with 6 Cores100.774s
Figure 18Capillary Wave Validation1,000Laptop B with 4 Cores500.02s

Table 2. Performances of Different Scenes. A in table is a 128-core 3.1GHz AMD Ryzen Threadripper 3990X workstation, B in table is a 4-core 2.8GHz Intel(R) Core(TM) laptop, and C is a 6-core 2.6GHz Intel(R) Core(TM) laptop. † The number of particles increases throughout the simulation due to particle reseeding, the two numbers listed in the table are the number of particles at the first and last frame. * The number of frames per second for simulation. For example, FPS=50 means the time step of a frame Δt=0.02s\Delta t = 0.02s. We take CFL condition number C=0.1C = 0.1, so a frame may consist of multiple time iterations depending on vmax⁡v_{\max}, and the simulation time of a frame is subject to it.

Discussion and Future Works

We propose a novel particle-based, thin-film simulation framework that jointly facilitates large surface deformation and lively in-surface flows. Our dynamic model is based on the surface-tension-driven 3D Navier-Stokes equations simplified under the lubrication assumption. We devise a set of differential operators on curved point-set surfaces that are discretized by SPH. Our key insight lies in that the compressible nature of SPH, which tends to create artifacts in its typical usage, can be leveraged to our benefit by defining an evolving height field hh that enables the incorporation of the surface tension model into the thin-film fluid. Due to the particle-based nature, our method easily handles codimension transitions and topology changes and conveniently integrates an auxiliary 3D SPH solver to simulate a wide gamut of visually appealing phenomena simultaneously featuring surface and volumetric characteristics, such as the pinch-off of catenoids, dripping from a thin film, the merging of droplets, as well as bubble rupture.

The main limitation of the proposed algorithm is its incapability of dealing with surfaces carrying non-manifold intersections. In the future, we seek to extend it to simulate the interaction of complex bubble clusters that form a network of plateau borders. Then, the dilemma between particle density variation required for interesting color patterns and relatively even distribution of particles needed for the SPH framework limits our system in recreating color fields with a steep gradient, which may be alleviated by adopting the adaptive kernels. We also look forward to exploring more dynamic interactions with solid boundaries, e.g. activated by boundary deformation, intrusion, or even inter-crossing.

The codimension transition is another challenging topic, for the criterion must be carefully chosen. If the transition happens too easily, the thin film can easily break because a hole of volumetric particles appears somewhere. If it’s too hard, the thin film will form unnatural sharp corners instead of turning to the volumetric SPH solver. Due to the lack of adaptivity, the simulation of pinch-off is affected by subjectively defined parameters more or less, which we think is a possible direction for future improvement. On the other hand, adding and deleting particles during the reseeding step has been a long-standing and difficult problem in conventional SPH simulation, which might cause physical quantity inconsistency. Our thin-film SPH model alleviated this problem thanks to its compressible nature and low stiffness coupling density and pressure on the particle thin film, although the volumetric particles in the simulation (in particular when the codimension transition occurs) could still suffer from such inconsistencies when transferring mass and momentum between the thin film.

On the animation side, the level of sophistication in the color pattern that our simulation generates is not quite at the level of real-world verisimilitude. That is because our displayed particles are exactly the ones used for the simulation, which is inevitably limited in the number. In the future, we may further investigate the possibility of using our SPH system as a background simulation, on top of which a larger number of tracker particles are advected, to make for visualization of improved richness and fidelity. Finally, we hope to customize a set of rendering algorithms that can directly take advantage of the geometric representation and computation tools we have already developed for the simulation to allow more consistent and physically accurate visual results.

Acknowledgments

We thank all the anonymous reviewers for their constructive comments. We acknowledge the funding support from NSF 1919647 and Dartmouth UGAR. We credit the Houdini Education licenses for the video rendering.

A Momentum Equation at Center Surface

The normal and tangential components of (6) are

p−pa+2κ+γ=2μn+⋅(∇u)⋅n++O(h2),tx+⋅(∇sγ)=μtx+⋅[∇u+(∇u)T]⋅n++O(h2),ty+⋅(∇sγ)=μty+⋅[∇u+(∇u)T]⋅n++O(h2),(22)\begin{aligned} p-p_a+2\kappa^+\gamma&= 2\mu\mathbf{n}^+\cdot(\nabla\mathbf{u})\cdot\mathbf{n}^+ + O(h^2),\\ \mathbf{t}_x^+\cdot(\nabla_s\gamma) &= \mu\mathbf{t}_x^+\cdot[\nabla\mathbf{u}+(\nabla\mathbf{u})^{\mathrm{T}}]\cdot\mathbf{n}^+ + O(h^2),\\ \mathbf{t}_y^+\cdot(\nabla_s\gamma) &= \mu\mathbf{t}_y^+\cdot[\nabla\mathbf{u}+(\nabla\mathbf{u})^{\mathrm{T}}]\cdot\mathbf{n}^+ + O(h^2), \tag*{(22)} \end{aligned}

respectively. Using (3), we obtain

tx+⋅(∇sγ)=(ex+ey×∇sh)⋅(∇sγ+∇shez⋅∇γ+ez∇sh⋅∇γ)+O(h2)=ex⋅∇sγ+O(h2),ty+⋅(∇sγ)=(ey+ex×∇sh)⋅(∇sγ+∇shez⋅∇γ+ez∇sh⋅∇γ)+O(h2)=ey⋅∇sγ+O(h2).(23)\begin{aligned} \mathbf{t}_x^+\cdot(\nabla_s\gamma) &=(\mathbf{e}_x+\mathbf{e}_y\times\nabla_s h)\cdot(\nabla_s\gamma+\nabla_s h e_z\cdot\nabla\gamma+\mathbf{e}_z\nabla_s h\cdot\nabla\gamma)+O(h^2)\\ &=\mathbf{e}_x\cdot\nabla_s\gamma+O(h^2),\\ \mathbf{t}_y^+\cdot(\nabla_s\gamma) &=(\mathbf{e}_y+\mathbf{e}_x\times\nabla_s h)\cdot(\nabla_s\gamma+\nabla_s h e_z\cdot\nabla\gamma+\mathbf{e}_z\nabla_s h\cdot\nabla\gamma)+O(h^2)\\ &=\mathbf{e}_y\cdot\nabla_s\gamma+O(h^2). \tag*{(23)} \end{aligned}

Substituting (3) and (23) into (22) yields

p−pa+2(±κc+κh)γ=2μ(±ez−∇sh)⋅(∇u)⋅(±ez−∇sh)+O(h2),ex⋅∇sγ=μ(ex∓ey×∇sh)⋅[∇u+(∇u)T]⋅(±ez−∇sh)+O(h2),ey⋅∇sγ=μ(ey∓ex×∇sh)⋅[∇u+(∇u)T]⋅(±ez−∇sh)+O(h2).(24)\begin{aligned} p-p_a+2(\pm\kappa_c+\kappa_h)\gamma &=2\mu(\pm\mathbf{e}_z-\nabla_s h)\cdot(\nabla\mathbf{u})\cdot(\pm\mathbf{e}_z-\nabla_s h)+O(h^2),\\ \mathbf{e}_x\cdot\nabla_s\gamma &=\mu(\mathbf{e}_x\mp\mathbf{e}_y\times\nabla_s h)\cdot[\nabla\mathbf{u}+(\nabla\mathbf{u})^{\mathrm{T}}]\cdot(\pm\mathbf{e}_z-\nabla_s h)+O(h^2),\\ \mathbf{e}_y\cdot\nabla_s\gamma &=\mu(\mathbf{e}_y\mp\mathbf{e}_x\times\nabla_s h)\cdot[\nabla\mathbf{u}+(\nabla\mathbf{u})^{\mathrm{T}}]\cdot(\pm\mathbf{e}_z-\nabla_s h)+O(h^2). \tag*{(24)} \end{aligned}

Further, we substitute the component-wise forms of ∇sh\nabla_s h and ∇u\nabla\mathbf{u} into (24) as

p−pa+2(±κc+κh)γ=2μ(∂w∂z∓∂h∂x∂u∂z∓∂h∂y∂v∂z)+O(h2),∂γ∂x=μ[±∂w∂x−2∂h∂x(∂u∂x−∂w∂z)−∂h∂y(∂v∂x+∂u∂y)±∂u∂z]+O(h2),∂γ∂y=μ[±∂w∂y−2∂h∂y(∂v∂y−∂w∂z)−∂h∂x(∂v∂x+∂u∂y)±∂v∂z]+O(h2).(25)\begin{aligned} p-p_a+2(\pm\kappa_c+\kappa_h)\gamma &=2\mu\left(\frac{\partial w}{\partial z}\mp\frac{\partial h}{\partial x}\frac{\partial u}{\partial z}\mp\frac{\partial h}{\partial y}\frac{\partial v}{\partial z}\right)+O(h^2),\\ \frac{\partial\gamma}{\partial x} &=\mu\left[\pm\frac{\partial w}{\partial x}-2\frac{\partial h}{\partial x}\left(\frac{\partial u}{\partial x}-\frac{\partial w}{\partial z}\right)-\frac{\partial h}{\partial y}\left(\frac{\partial v}{\partial x}+\frac{\partial u}{\partial y}\right)\pm\frac{\partial u}{\partial z}\right]+O(h^2),\\ \frac{\partial\gamma}{\partial y} &=\mu\left[\pm\frac{\partial w}{\partial y}-2\frac{\partial h}{\partial y}\left(\frac{\partial v}{\partial y}-\frac{\partial w}{\partial z}\right)-\frac{\partial h}{\partial x}\left(\frac{\partial v}{\partial x}+\frac{\partial u}{\partial y}\right)\pm\frac{\partial v}{\partial z}\right]+O(h^2). \tag*{(25)} \end{aligned}

Suppose the tangential velocity is even along the local z-coordinate. Similar to the idea of asymptotic expansion [21], we take the Taylor expansion of usu_s as

u=u(z=0)+∂2u∂z2∣z=0z2+O(h4),v=v(z=0)+∂2v∂z2∣z=0z2+O(h4).(26)\begin{aligned} u&=u(z=0)+\left.\frac{\partial^2u}{\partial z^2}\right|_{z=0}z^2+O(h^4),\\ v&=v(z=0)+\left.\frac{\partial^2v}{\partial z^2}\right|_{z=0}z^2+O(h^4). \tag*{(26)} \end{aligned}

and with the solenoidal condition, we obtain

∂w∂z=−∇s⋅us=−∇s⋅us(z=0)+O(h2).(27)\frac{\partial w}{\partial z}=-\nabla_s\cdot\mathbf{u}_s=-\nabla_s\cdot\mathbf{u}_s(z=0)+O(h^2). \tag*{(27)}

Combining (26) and (27), as well as using the boundary conditions (25), we obtain

p=pa−2[κhγ+∇s⋅us(z=0)]−2hγκc+O(h2),∂2u∂z2∣z=0=1h∂γ∂x+O(h2),∂2v∂z2∣z=0=1h∂γ∂y+O(h2).(28)\begin{aligned} p&=p_a-2[\kappa_h\gamma+\nabla_s\cdot\mathbf{u}_s(z=0)]-\frac{2}{h}\gamma\kappa_c+O(h^2),\\ \left.\frac{\partial^2u}{\partial z^2}\right|_{z=0}&=\frac{1}{h}\frac{\partial\gamma}{\partial x}+O(h^2),\\ \left.\frac{\partial^2v}{\partial z^2}\right|_{z=0}&=\frac{1}{h}\frac{\partial\gamma}{\partial y}+O(h^2). \tag*{(28)} \end{aligned}

Then, we substitute (28) into (5) to obtain the momentum equation at z=0z=0:

ρDuDt+O(h2)=2∇s(κhγ+∇s⋅us)+2γhκcn+1h∇sγ+μ∇s2u+f.(29)\rho\frac{D\mathbf{u}}{Dt}+O(h^2) =2\nabla_s(\kappa_h\gamma+\nabla_s\cdot\mathbf{u}_s)+\frac{2\gamma}{h}\kappa_c\mathbf{n}+\frac{1}{h}\nabla_s\gamma+\mu\nabla_s^2\mathbf{u}+\mathbf{f}. \tag*{(29)}

B Numerical Validation and Performance Table

To evaluate the accuracy of our algorithm, we perform a set of numerical tests concerning the main key elements in our algorithm in both the geometric and dynamic computations. We will compare our simulation results with both the ones derived from analytic equations and real-life experiments.

Mean Curvature. The centerpiece of computing the surface tension behavior is the estimation of mean curvature κ\kappa, which relates to the pressure jump across the air-fluid interface via the Young-Laplace equation Δp=−γκ\Delta p=-\gamma\kappa.

Estimated Mean Curvature using our codimension-1 differential operators versus the analytical ground truth

Figure 16. Estimated Mean Curvature using our codimension-1 differential operators vs. the analytical ground truth. From top to bottom are respectively: the sphere, the torus, and the trigonometric surface.

Our method computes the mean curvature κc\kappa_c of the center surface, which are curved 3D surfaces defined by the particles using codimension-1 planar operators. To verify the correctness and robustness of our method under various surface geometries, we compute the mean curvature of three different shapes: a sphere with R=1R = 1; a torus

(x,y,z)=R((c+cos⁡−1(v))cos⁡(u),sin⁡−1(v),(c+cos⁡−1(v))sin⁡(u))(x,y,z)=R\left((c+\cos^{-1}(v))\cos(u),\sin^{-1}(v),(c+\cos^{-1}(v))\sin(u)\right)

with c=0.8c = 0.8, a=0.3a = 0.3, u∈[0,2π)u \in[0,2\pi), v∈[0,2π)v \in[0,2\pi), and a surface defined by y=0.1(3sin⁡(x)+2cos⁡(z)+4sin⁡(2x+z))y = 0.1\left(3\sin(x)+2\cos(z)+4\sin(2x+z)\right) with x,z∈[0,2π)x,z \in[0,2\pi). To highlight the robustness of our algorithm, we initialize the sample particles from a uniform random distribution to rehearse the scenarios where particles are unevenly distributed in simulation. In Figure 16, we plot the numerical and analytical estimations of mean curvature on the left two columns and the error between them on the right column. We can see that overall, our algorithm does well in estimating the mean curvature for all kinds of surfaces. The error is mostly gathered on the edges due to insufficiently sampled neighborhoods, a shortcoming common to SPH methods [46].

Minimal Surface. The dynamics of thin-film are marked by its tendency to form minimal surfaces under the surface tension, which constantly contracts the surface to minimize the area locally. When two rings are connected by a continuous soap film, and gravity is ignored, the soap film between them will form the catenoid — a minimal surface formed by rotating a catenary. The analytical definition of a catenoid is given by

(x,y,z)=(ccosh⁡(vc)cos⁡u,v,ccosh⁡(vc)sin⁡u).(x,y,z)=\left(c\cosh\left(\frac{v}{c}\right)\cos u,v,c\cosh\left(\frac{v}{c}\right)\sin u\right).

The way that soap-film catenoids are typically formed is by gradually pulling the parallel rims apart. If we let DD denote the diameter of the rims, and let dd denote the separation between them, then an analytical catenoid can be solved for when dD<0.66274\frac{d}{D}<0.66274.

The constant 0.66274 is the approximation of the Laplace limit, which is the value 1sinh⁡u\frac{1}{\sinh u} for u=coth⁡uu=\coth u, u>0u>0. As a result, until this condition is met, we can obtain a corresponding analytical catenoid to compare and contrast for every point cloud in our simulation.

In the upper subfigures in Figure 17, we plot the result of our simulation along with the photographed real-world soap catenoid. On the rightmost one, we overlay our simulated results (orange) with the corresponding analytical catenoid(blue). As we can see, our simulation is only marginally different from the analytical solution, and the difference between our simulation and the photography is almost imperceptible. The bottom-left displays a close-up look of a curve from a cross-section of our simulated shape (orange) and an analytical catenary. The bottom-right displays two subplots that are time-varying: the upper one records the varying average mean curvature, which is supposed to be 0 as it is for all minimal surfaces, and the lower one is an average relative positional error, which represents the average distance between a particle and the analytical catenoid relative to the arc length of the catenary. As one can see, both plots illustrate a decreasing trend marked by periodic fluctuation, which corresponds to the oscillating motion of the simulated thin film; until the Laplace limit is violated, the simulated thin film does well in keeping close to the theoretical shape with the relative positional error less than 0.06.

Thin-film catenoid photographed, simulated, and overlaid with an analytical catenoid

Figure 17. On the top row, display the thin-film catenoid as photographed, our simulation results, and our results overlaid with a corresponding analytical catenoid. The left figure in the bottom row shows a detailed display of one curve of the cross-section of our simulated thin film with an analytical catenoid. The right two figures plot the average mean curvature and the positional error to the analytical surface.

Numerical Height vs. Advected Height. We investigate qualitatively and quantitatively the behavioral discrepancy between the two forms of height computation. In the left subfigure of Figure 19, we exhibit the surface defined by the advected height (orange) and by the numerical height (blue) at frames [1, 3, 10, 22, 32, 100] of a simulation where a centripetal velocity is initially applied to move particles towards the middle, while the surface tension works to flatten out the curvature. The two surfaces are congruent in trend, and yet the surface formed by the advected height is bumpier than the other. In the top-right subfigure, the difference between the two surfaces is plotted alongside the surfaces to show that their commonality dominates their difference. In the bottom-right subfigure,

Numerical and advected height surfaces

Figure 19. Left: the surface of numerical height (blue), the surface of advected height (orange). Right: The difference between the two surfaces in a single frame (top) and over time (bottom).

we show that the change in the average percent difference over time is confined within 5%.

Capillary Wave. Figure 18 shows the capillary wave on a bubble. The scene setup is a simplification of that in Figure 4, where initially one downward impulse, instead of two, is applied on the north pole of the bubble. It immediately creates a perturbation at the top and then propagated to the bottom. This propagation is dominated by the capillary force 2γhκcn\frac{2\gamma}{h}\kappa_c\mathbf{n}, and thus a capillary wave. Note that κc\kappa_c is calculated by half of the Laplacian of surface, then the local dynamics along normal direction system subjects to wave equation

Figure 18. The capillary wave on a bubble. We take the surface tension coefficient γ=1.1×10−5 N/m\gamma= 1.1 \times10^{-5}\,N/m, thickness 2h=800nm2h = 800nm, fluid density ρ=103 kg/m3\rho= 10^3\,kg/m^3 and bubble radius R=0.80mR = 0.80m. The blue lines of the left part are the velocity vectors of particles.

ρD2rzDt2=γh∂2rz∂x2,(30)\rho\frac{D^2 r_z}{Dt^2} = \frac{\gamma}{h}\frac{\partial^2 r_z}{\partial x^2}, \tag*{(30)}

with rzr_z as the local zz-component of particle position. Thus the phase velocity of the wave is analytically given by vp=ω/k=γ/hρv_p = \omega/k = \sqrt{\gamma/h\rho}.

The right part of Figure 18 shows the time-distance relationship traveled by the down-most wave knot, which represents the phase velocity of the capillary wave, comparing analytical solution and simulation results. It proves that our algorithm can accurately and convincingly reproduce the effect surface tension.

References

  1. [1]Mridul Aanjaneya, Saket Patkar, and Ronald Fedkiw. 2013. A monolithic mass tracking formulation for bubbles in incompressible flow. J. Comput. Phys. 247 (2013), 17–61.
  2. [2]Nadir Akincı, Giezm Akıncı, and Matthias Teschner. 2013. Versatile surface tension and adhesion for SPH fluids. ACM Transactions on Graphics (TOG) 32, 6 (2013), 1–8.
  3. [3]A Albadawi, DB Donoghue, AJ Robinson, DB Murray, and YMC Delauré. 2013. Influence of surface tension implementation in volume of fluid and coupled volume of fluid with level set methods for bubble growth and detachment. International Journal of Multiphase Flow 53 (2013), 11–28.DOI
  4. [5]Stefan Auer, Colin B Macdonald, Marc Treib, Jens Schneider, and Rüdiger Westermann. 2012. Real-time fluid effects on surfaces using the closest point method. In Computer Graphics Forum, Vol. 31. Wiley Online Library, 1909–1923.DOI
  5. [6]Stefan Auer and Rüdiger Westermann. 2013. A Semi-Lagrangian Closest Point Method for Deforming Surfaces. In Computer Graphics Forum, Vol. 32. Wiley Online Library, 207–214.DOI
  6. [7]Omri Azencot, Orestis Vantzos, Max Wardetzky, Martin Rumpf, and Mirela Ben-Chen. 2015a. Functional thin films on surfaces. In Proceedings of the 14th ACM SIGGRAPH/Eurographics Symposium on Computer Animation. 137–146.
  7. [8]Omri Azencot, Orestis Vantzos, Max Wardetzky, Martin Rumpf, and Mirela Ben-Chen. 2015b. Functional thin films on surfaces. In Proceedings of the 14th ACM SIGGRAPH/Eurographics Symposium on Computer Animation. 137–146.
  8. [9]Omri Azencot, Steffen Weißmann, Maks Ovsjanikov, Max Wardetzky, and Mirela Ben-Chen. 2014. Functional fluids on surfaces. In Computer Graphics Forum, Vol. 33. Wiley Online Library, 237–246.DOI
  9. [10]Stefan Band, Christoph Gissler, Markus Ihmsen, Jens Cornelis, Andreas Peer, and Matthias Teschner. 2018. Pressure boundaries for implicit incompressible SPH. ACM Transactions on Graphics (TOG) 37, 2 (2018), 1–11.DOI
  10. [11]Christopher Batty, Andres Uribe, Basil Aleman, and Eitan Grinspun. 2012. Discrete viscous sheets. ACM Transactions on Graphics (TOG) 31, 4 (2012), 1–7.DOI
  11. [12]Markus Becker and Matthias Teschner. 2007. Weakly compressible SPH for free surface flows. In Proceedings of the 2007 ACM SIGGRAPH/Eurographics symposium on Computer animation. 209–217.
  12. [13]Laurent Belcour and Pascal Barla. 2017. A practical extension to microfacet theory for the modeling of varying iridescence. ACM Transactions on Graphics (TOG) 36, 4 (2017), 1–14.DOI
  13. [14]Mikhail Belkin and Partha Niyogi. 2008. Towards a theoretical foundation for Laplacian-based manifold methods. J. Comput. System Sci. 74, 8 (2008), 1289–1308.
  14. [15]Mikhail Belkin, Jian Sun, and Yusu Wang. 2009. Constructing Laplacian operator from point clouds in R d. In Proceedings of the twentieth annual ACM-SIAM symposium on Discrete algorithms. Society for Industrial and Applied Mathematics, 1031–1040.
  15. [16]Jan Bender and Dan Koschier. 2016. Divergence-free SPH for incompressible and viscous fluids. IEEE Transactions on Visualization and Computer Graphics 23, 3 (2016), 1193–1206.DOI
  16. [17]Miklós Bergou, Basile Audoly, Etienne Vouga, Max Wardetzky, and Eitan Grinspun. 2010. Discrete viscous threads. ACM Transactions on graphics (TOG) 29, 4 (2010), 1–10.
  17. [18]Robert Bridson. 2015. Fluid simulation for computer graphics. CRC press.
  18. [19]L. Brookshaw. 1985. A Method of Calculating Radiative Heat Diffusion in Particle Simulations. Publications of the Astronomical Society of Australia 6, 2 (1985), 207–210.DOI
  19. [20]Ka Chun Cheung, Leevan Ling, and Steven J Ruuth. 2015. A localized meshless method for diffusion on folded surfaces. J. Comput. Phys. 297 (2015), 194–206.DOI
  20. [21]Jean-Marc Chomaz. 2001. The dynamics of a viscous soap film with soluble surfactant. Journal of Fluid Mechanics 442 (2001), 387–409.DOI
  21. [22]Jens Cornelis, Markus Ihmsen, Andreas Peer, and Matthias Teschner. 2014. IISPH-FLIP for incompressible fluids. In Computer Graphics Forum, Vol. 33. Wiley Online Library, 255–262.DOI
  22. [24]Fang Da, Christopher Batty, Chris Wojtan, and Eitan Grinspun. 2015. Double bubbles sans toil and trouble: Discrete circulation-preserving vortex sheets for soap films and foams. ACM Transactions on Graphics (TOG) 34, 4 (2015), 1–9.DOI
  23. [25]C Gaulon, C Derec, T Combiat, P Marmottant, and F Elias. 2017. Sound and Vision: Visualization of music with a soap film, and the physics behind it. (2017).
  24. [26]Robert A Gingold and Joseph J Monaghan. 1977. Smoothed particle hydrodynamics: theory and application to non-spherical stars. Monthly notices of the royal astronomical society 181, 3 (1977), 375–389.
  25. [27]Christoph Gissler, Andreas Henne, Stefan Band, Andreas Peer, and Matthias Teschner. 2020. An implicit compressible SPH solver for snow simulation. ACM Transactions on Graphics (TOG) 39, 4 (2020), 36–1.DOI
  26. [28]Christoph Gissler, Andreas Peer, Stefan Band, Jan Bender, and Matthias Teschner. 2019. Interlinked SPH pressure solvers for strong fluid-rigid coupling. ACM Transactions on Graphics (TOG) 38, 1 (2019), 1–13.DOI
  27. [29]Andrew Glassner. 2000. Soap bubbles: part 2. IEEE Annals of the History of Computing 20, 06 (2000), 99–109.
  28. [30]David J Hill and Ronald D Henderson. 2016. Efficient fluid simulation on the surface of a sphere. ACM Transactions on Graphics (TOG) 35, 2 (2016), 1–9.DOI
  29. [31]Jeong-Mo Hong and Chang-Hun Kim. 2003. Animation of bubbles in liquid. In Computer Graphics Forum, Vol. 22. Wiley Online Library, 253–262.DOI
  30. [32]Jeong-Mo Hong and Chang-Hun Kim. 2005. Discontinuous fluids. ACM Transactions on Graphics (TOG) 24, 3 (2005), 915–920.
  31. [33]Libo Huang, Torsten Hädrich, and Dominik L Michels. 2019. On the accurate large-scale simulation of ferrofluids. ACM Transactions on Graphics (TOG) 38, 4 (2019), 1–15.DOI
  32. [34]Weizhen Huang, Julian Iseringhausen, Tom Kneiphof, Ziyin Qu, Chenfanfu Jiang, and Matthias B. Hulin. 2020. Chemomechanical Simulation of Soap Film Flow on Spherical Bubbles. ACM Transactions on Graphics 39, 4 (2020). https://doi.org/10.1145/3358669.3329094
  33. [35]Markus Ihmsen, Jens Cornelis, Barbara Solenthaler, Christopher Horvath, and Matthias Teschner. 2013. Implicit incompressible SPH. IEEE transactions on visualization and computer graphics 20, 3 (2013), 426–435.DOI
  34. [36]Sadashige Ishida, Peter Snyak, Fumiya Narita, Toshiya Hachisuka, and Chris Wojtan. 2020. A Model for Soap Film Dynamics with Evolving Thickness. ACM Transactions on Graphics 39, 4, Article 31 (2020), 31:1–31:11 pages. https://doi.org/10.1145/3386569.3329405
  35. [37]Sadashige Ishida, Masafumi Yamamoto, Ryoichi Ando, and Toshiya Hachisuka. 2017. Hyperbolic geometric flow for evolving films and foams. ACM Transactions on Graphics (TOG) 36, 6 (2017), 1–11.DOI
  36. [39]Dariusz Jaszkowski and Janusz Rzeszut. 2003. Interference colours of soap bubbles. The Visual Computer 19, 4 (2003), 252–270.
  37. [40]Min Jiang, Yahan Zhou, Rui Wang, Richard Southern, and Jian Jun Zhang. 2015. Blue noise sampling using an SPH-based method. ACM Transactions on Graphics (TOG) 34, 6 (2015), 1–11.DOI
  38. [41]Myungjao Kang, Barry Merriman, and Stanley Osher. 2008. Numerical simulations for the motion of soap bubbles using level set methods. Computers & fluids 37, 5 (2008), 524–535.
  39. [43]Namjung Kim, SaeWon Oh, and Kyounygi Park. 2015. Giant soap bubble creation model. Computer Animation and Virtual Worlds 26, 3–4 (2015), 445–455.DOI
  40. [44]Theodore Kim, Jerry Tessendorf, and Nils Thuerey. 2013. Closest point turbulence for liquid surfaces. ACM Transactions on Graphics (TOG) 32, 2 (2013), 15.DOI
  41. [45]M. Kness. 2008. ColorPy-A Python package for handling physical descriptions of color and light spectra. (2008).
  42. [46]Dan Koschier, Jan Bender, Barbara Solenthaler, and Matthias Teschner. 2019. Smoothed Particle Hydrodynamics Techniques for the Physics Based Simulation of Fluids and Solids. In Eurographics 2019 - Tutorials, Wenzel Jakob and Enrico Puppo (Eds.). The Eurographics Association.
  43. [47]Rongjie Lai, Jiang Liang, and Hongkai Zhao. 2013. A local mesh method for solving PDEs on point clouds. Inverse Problems & Imaging 7, 3 (2013).DOI
  44. [48]Peter Lancaster and Kes Salkauskas. 1981. Surfaces generated by moving least squares methods. Mathematics of computation 37, 155 (1981), 141–158.DOI
  45. [49]David Levin. 1998. The approximation power of moving least-squares. Mathematics of computation 67, 224 (1998), 1517–1531.DOI
  46. [50]MB Liu and GR Liu. 2010. Smoothed particle hydrodynamics (SPH): an overview and recent developments. Archives of computational methods in engineering 17, 1 (2010), 25–76.DOI
  47. [51]Frank Losasso, Jerry Talton, Nipun Kwatra, and Ronald Fedkiw. 2008. Two-way coupled SPH and particle level set fluid simulation. IEEE Transactions on Visualization and Computer Graphics 14, 4 (2008), 797–804.DOI
  48. [52]Joe J Monaghan. 1992. Smoothed particle hydrodynamics. Annual review of astronomy and astrophysics 30, 1 (1992), 543–574.
  49. [53]Joseph J Monaghan and John C Lattanzio. 1985. A refined particle method for astrophysical problems. Astronomy and astrophysics 149 (1985), 135–143.
  50. [55]Joseph P Morris, Patrick J Fox, and Yi Zhu. 1997. Modeling low Reynolds number incompressible flows using SPH. J. Comput. Phys. 136, 1 (1997), 214–226.DOI
  51. [56]Matthias Müller, David Charypar, and Markus H Gross. 2003. Particle-based fluid simulation for interactive applications. In Symposium on Computer animation. 154–159.
  52. [57]Metin Muradoglu and Gretar Tryggvason. 2008. A front-tracking method for computation of interfacial flows with soluble surfactants. J. Comput. Phys. 227, 4 (2008), 2238–2262.DOI
  53. [58]Andrew Nealen. 2004. An as-short-as-possible introduction to the least squares, weighted least squares and moving least squares methods for scattered data approximation and interpolation. URL: http://www.nealen.com/projects 130, 50 (2004), 25.
  54. [59]Xingyu Ni, Bo Zhu, Bin Wang, and Baoquan Chen. 2020. A level-set method for magnetic substance simulation. ACM Transactions on Graphics (TOG) 39, 4 (2020), 29–1.DOI
  55. [60]M Omang, Steinar Børve, and Jan Trulsen. 2006. SPH in spherical and cylindrical coordinates. J. Comput. Phys. 213, 1 (2006), 391–412.DOI
  56. [61]Saket Patkar, Mridul Aanjaneya, Dmitriy Karpman, and Ronald Fedkiw. 2013. A hybrid Lagrangian-Eulerian formulation for bubble generation and dynamics. In Proceedings of the 12th ACM SIGGRAPH/Eurographics Symposium on Computer Animation. 105–114.DOI
  57. [62]Andreas Peer, Christoph Gissler, Stefan Band, and Matthias Teschner. 2018. An implicit SPH formulation for incompressible linearly elastic solids. In Computer Graphics Forum, Vol. 37. Wiley Online Library, 135–148.
  58. [63]Andreas Peer, Markus Ihmsen, Jens Cornelis, and Matthias Teschner. 2015. An implicit viscosity formulation for SPH fluids. ACM Transactions on Graphics (TOG) 34, 4 (2015), 1–10.
  59. [64]Fabiano Petronetto, Afonso Paiva, Elias S Helou, DE Stewart, and Luis Gustavo Nonato. 2013. Mesh-Free Discrete Laplace–Beltrami Operator. In Computer Graphics Forum, Vol. 32. Wiley Online Library, 214–226.DOI
  60. [65]Daniel J Price. 2012. Smoothed particle hydrodynamics and magnetohydrodynamics. J. Comput. Phys. 231, 3 (2012), 759–794.
  61. [66]Steven J Ruuth and Barry Merriman. 2008. A simple embedding method for solving partial differential equations on surfaces. J. Comput. Phys. 227, 2 (2008), 1943–1961.DOI
  62. [68]Robert I Saye and James A Sethian. 2013. Multiscale modeling of membrane rearrangement, drainage, and rupture in evolving foams. Science 340, 6133 (2013), 720–724.DOI
  63. [69]Hagit Schechter and Robert Bridson. 2012. Ghost SPH for animating water. ACM Transactions on Graphics (TOG) 31, 4 (2012), 1–8.DOI
  64. [70]Frank Schmidt. 2014. The laplace-beltrami-operator on riemannian manifolds. In Seminar Shape Analysis.
  65. [71]Andrew Selle, Nick Rasmussen, and Ronald Fedkiw. 2005. A vortex particle method for smoke, water and explosions. In ACM SIGGRAPH 2005 Papers. 910–914.
  66. [72]Brian E. Smit and Gary W Meyer. 1992. Newton’s colors: simulating interference phenomena in realistic image synthesis. In Photorealism in Computer Graphics. Springer, 185–194.
  67. [73]Barbara Solenthaler, Peter Bucher, Nuttapong Chentanez, Matthias Müller, and Markus Gross. 2011. SPH based shallow water simulation. (2011).DOI
  68. [74]Barbara Solenthaler and Renato Pajarola. 2008. Density contrast SPH interfaces. (2008).
  69. [75]Barbara Solenthaler and Renato Pajarola. 2009. Predictive-corrective incompressible SPH. In ACM SIGGRAPH 2009 papers. 1–6.
  70. [76]Jos Stam. 2003. Flows on surfaces of arbitrary topology. ACM Transactions On Graphics (TOG) 22, 3 (2003), 724–731.
  71. [77]Alexandre M Tartakovsky and Paul Meakin. 2005. A smoothed particle hydrodynamics model for miscible flow in three-dimensional fractures and the two-dimensional Rayleigh–Taylor instability. J. Comput. Phys. 207, 2 (2005), 610–624.DOI
  72. [78]Sasan Tavakkol, Amir Reza Zarrati, and Mahdiar Khayrorr. 2017. Curvilinear smoothed particle hydrodynamics. International Journal for Numerical Methods in Fluids 83, 2 (2017), 115–131.DOI
  73. [79]Orestis Vantzos, Saar Raz, and Mirela Ben-Chen. 2018. Real-time viscous thin films. ACM Transactions on Graphics (TOG) 37, 6 (2018), 1–10.DOI
  74. [80]Hui Wang, Yongxu Jin, Anqi Luo, Xubo Yang, and Bo Zhu. 2020. Codimensional surface tension flow using moving-least-squares particles. ACM Transactions on Graphics (TOG) 39, 4 (2020), 42–1.DOI
  75. [81]Jian Jun Xu, Zhilin Li, John Lowengrub, and Hongkai Zhao. 2006. A level-set method for interfacial flows with surfactant. J. Comput. Phys. 212, 2 (2006), 590–616.DOI

Paper details

vlnc:W_ravmmr3w
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents