betaFeedback

WorksComputer Science

Ships, Splashes, and Waves on a Vast Ocean

Abstract

The simulation of large open water surface is challenging using a uniform volumetric discretization of the Navier-Stokes equations. Simulating water splashes near moving objects, which height field methods for water waves cannot capture, necessitates high resolutions. Such simulations can be carried out using the Fluid-Implicit-Particle (FLIP) method. However, the FLIP method is not efficient for the long-lasting water waves that propagate to long distances, which require sufficient depth for a correct dispersion relationship. This paper presents a new method to tackle this dilemma through an efficient hybridization of volumetric and surface-based advection-projection discretizations. We design a hybrid time-stepping algorithm that combines a FLIP domain and an adaptively remeshed Boundary Element Method (BEM) domain for the incompressible Euler equations. The resulting framework captures the detailed water splashes near moving objects with the FLIP method, and produces convincing water waves with correct dispersion relationships at modest additional costs.

CCS Concepts: • Computing methodologies → Physical simulation.

Additional Key Words and Phrases: Boundary Element Method (BEM), Fluid Dynamics, Fluid-Implicit-Particle (FLIP) Method, Hybrid Discretization, Multiscale Modeling.

Authors’ addresses: Libo Huang, KAUST, Visual Computing Center, Thuwal 23955, KSA; Ziyin Qu, UCLA and UPenn; Xun Tan, Zenus Technology, Shenzhen; Xinxin Zhang, Zenus Technology, Shenzhen; Dominik L. Michels, KAUST, Visual Computing Center, Thuwal 23955, KSA; Chenfanfu Jiang, UCLA and UPenn.

Introduction

As the Hong Kong American martial artist and actor Bruce Lee commented, “water can flow or creep or drip or crash.” From calm waves on a boundless sea to roaring splashes around a speedboat, intriguing large-scale and small-scale aspects of dynamic liquids have attracted great attention in computational physics and computer graphics.

Simulating the high-frequency water splashes near the moving structure is relatively easy by a volumetric Navier-Stokes solver. One of such solvers is the popular Fluid-Implicit-Particle (FLIP) method, which was proposed by Brackbill and Ruppel [1986] as an extension to the Particle-In-Cell (PIC) method [29], and introduced to computer graphics by Zhu and Bridson [2005]. The difficulty is to efficiently propagate the water waves away from the structure. Simulating the wide and deep water with high resolution FLIP for the low frequency waves seems uneconomic. However, a shallow but wide simulation compromises quality. The depth of the simulated ocean plays a critical role in determining the shape of the surface, as pointed out by Nielsen and Bridson [2011]. Their approach recovers what was lost in shallow simulations using a pre-computed deep coarse simulation. Along similar lines, adaptive discretizations based on advanced grid structures [2, 3, 34, 57] have been extensively explored as an option to alleviate the difficulty in computational cost and memory brought by the demanding resolution in volumetric schemes. However, these adaptive spatial discretizations are known for large dissipation in coarse regions. It is not clear if the long-lasting wide-spreading water waves can be preserved.

Deviating from the adaptivity-related strategies, reduced fluid models represented by height field approaches [10, 40, 42, 64, 71] have also been widely used in graphics applications for capturing large scale water waves with correct dispersion relationship. Despite their pronounced efficiency for wave phenomena, these methods cannot capture the water splashes near obstacles. It is also non-trivial to two-way couple such approaches with volumetric Navier-Stokes solvers, due to the difficulty in translating back and forth between the height-field information and the velocity-pressure values. Although shallow water equation (SWE) solvers have been coupled with volumetric solvers [12, 66] to produce water splashes, the incorrect dispersion relationship of water waves in deep water can cause unnatural artifacts.

Taking a different route, we hybridize a local high-resolution volumetric FLIP discretization and a surface-based BEM ocean discretization for the large, deep ocean. Through a consistent advection-projection discretization of the incompressible Euler equations, we develop a natural way to synchronize velocity-pressure information between the two domains. With a surface representation of water body, we avoid storing any interior fluid quantities in a large and deep water body, while the surface mesh can be further adapted by criteria such as wave shape and velocity. For water splashes, we adopt a massively parallel FLIP simulation in a small region near the structure and ocean surface to enable intricate close-shot water dynamics.

Our method is inspired by the following observations. First, the investigations by Da et al. [ [16] demonstrated the potential of BEM for reproducing complex fluid features with degrees of freedoms only on a surface geometry. Although its demos are at small scale, we speculate that it can produce correct wave dynamics (and it does as shown in the result section) in large scale simulation, and be most efficient compared to volumetric methods for liquid with a large volume/surface ratio such as a large ocean tank. Second, the traditionally challenging aspects of BEM such as solid boundary-handling can be effectively resolved by hybridizing it with a general-purpose volumetric discretization (the FLIP method), making the whole system robust. Finally, the fact that both the BEM and the FLIP method adopt 3D velocity representations of fluid quantities makes the information transfer between them very natural.

Specific Contributions

To summarize, we design a new hybrid scheme to efficiently extend water waves generated in a high resolution FLIP simulation. Our method consists of FLIP to BEM coupling where BEM receives correction of volumetric simulation, and BEM to FLIP coupling, where BEM provides the ambient flux of water for the FLIP simulation, similar to the fluxed animated boundary method [63]. Our method captures both splashes near structures in multiple moving FLIP domains and long spreading waves on a vast and deep ocean. The water wakes extended by our hybrid approach match oceanography studies [55], and brute-force FLIP simulation up to 1.7 billion particles. It also has performance advantages compared to the narrow-band FLIP method [21] and the adaptive octree solver [25] implemented in the commercial software Houdini [58].

Related Work

Boundary Element Methods in Graphics. The boundary element method (BEM) has a wide range of applications in computer graphics. James and Pai [1999] simulated deformable objects interactively with the BEM for linear elasticity. More complex solid behaviors like fracture can also be captured and accelerated through the BEM [28]. The BEM is adopted for simulating various fluid phenomena including large scale deep ocean waves [44], fluid chains, water droplets [16], and even magnetic fluids [33]. Besides, BEM has also been adopted in sound rendering [73] and geometry processing [61].

Hybrid Lagrangian-Eulerian Simulation. Hybrid fluid solvers combining Lagrangian and Eulerian perspectives have gained popularity in recent years. The Particle-In-Cell (PIC) method [30], as a pioneering work of this kind, is limited by its excessive numerical dissipation. The FLIP method [8, 75] effectively improves this issue by only interpolating grid changes back to particles. More recent approaches such as the APIC method [43] and the PolyPIC method [22] were proposed to reduce noise and instability of the FLIP method while keeping numerical dissipation during particle grid transfer under control. By coupling an Eulerian fluid solver with a narrow band of FLIP particles, Ferstl et al. [2016] greatly reduced the particle counts while maintaining an indistinguishable result from a pure FLIP simulation. Losasso et al. [2008] incorporated Smoothed Particle Hydrodynamics (SPH) within a grid-based simulation. Domain decomposition approaches [24] effectively reduce the memory and computational costs by combining Eulerian simulations with vortex particles. Recently, Yue et al. [2018] coupled material point and discrete element methods to simulate granular material.

2D Methods. SWE methods have been adopted due to their simplicity. Thuerey et al. [2007] enhanced this model with the capability of handling overturning waves. Solenthaler et al. [2011] used SPH particles to the SWE. Procedural waves [64] are effective on simulating vast oceans, however it is non-trivial to handle boundaries. Procedural waves could be enhanced by satisfying solid boundary conditions [39], handling moving obstacles with wavelet discretization [40], handling static obstacles [41], or adding high frequency details while matching the given coarse waves [53]. Schreck et al. [2019] simulated water waves through fundamental solutions which do not require grids or meshes. However, in their boat wake scene, the wake does not show the feather-like pattern in reality. Lagrangian wave particles simulate water waves with propagating particles [42, 71]. Canabal et al. [2016] applied pyramids of convolution kernels with finite support to 2D height fields to get realistic wave dispersion relationships. The amplitude of the wave animation is given as a parameter tuned by artists. 2D methods are limited to only capture waves.

2D-3D Coupled Methods. To capture water splashes, coupling 2D methods with 3D methods is a natural choice. Chentanez et al. [2015] coupled particles, Eulerian grid solver, and SWE. Thuerey et al. [2006] coupled the SWE with a 3D solver employing a Lattice Boltzmann Method (LBM). However, as commented by Chentanez et al. “the SWE and 3D grids simulate inherently different physical phenomena”. The waveform and propagation speed is visibly different from that of a 3D solver.

Spatial Adaptivity. Fluid simulations in large domains such as oceans could be troublesome with uniform volumetric solvers due to the high computational costs and limited memory capacities. Adaptive methods such as octrees [1, 2, 31, 47] are usually dissipative in coarse regions. It is not sure if the water waves could be preserved away from the fine region. Tall cell methods [13, 37] were initially designed for shallow water regime. As reported by Irving et al. [2006], the performance gain due to use of tall cells is only about a factor of two compared to uniform methods. It offers no adaptivity along horizontal directions, so simulating wide water bodies is still challenging for tall-cells methods. Chimera grid methods [19] require sophisticated mesh handling, and suffer from inefficient pressure projection. The far-field grid method [74] is suitable for propagating waves from a single domain, however, supporting multiple moving domains is difficult. Nielsen and Bridson [2016] adopted adaptive tile tree for FLIP simulation. Goldade et al. [2019] incorporated an adaptive octree for viscosity and pressure projection.

Guided Simulation. Nielsen and Bridson [2011] proposed guided shapes for high resolution simulations to reduce the design cycles. Later, Nielsen et al. [2017] further improved this method by localizing the guided shapes only requiring the surface mesh. Bojsen-Hansen and Wojtan [2016] proposed a way for achieving generalized non-reflecting boundary conditions for localized re-simulation. Absorbing boundary conditions has also been investigated [59]. Similar to our approach, flux boundary method [63] coupled outer prescribed ocean motion with FLIP/MPM solver through boundary flux, while it is non-trivial to achieve two way coupling with their method.

Lagrangian Methods. Lagrangian particles such as SPH are also adopted for fluid simulation [32, 36]. Secondary effects such bubble, foam, and sprays [35] can visually enhance the look of liquid in post processing. Recently, adaptivity has also been investigated in the context of SPH particles [68].

Engineering Paradigms. Early work from Longuet-Higgins and Cokelet [1976] utilized the BEM to numerically compute steep water waves. Higher order time-stepping techniques with BEM are essential for resolving more general wave phenomena [27]. The BEM could also be combined with the Finite Element Method (FEM) and be applied for analyzing the nonlinear interactions between waves and bodies [69]. More applications and experiments like propeller blades [45], added resistance of boats in waves [11], and bubble dynamics [72] have been effectively conducted using the BEM.

Method

The core idea can be intuitively explained by the following imaginary scene: a boat is moving on the ocean, while there is a moving cage containing the boat, water, and air as illustrated in Figure 2. We use a large closed mesh to represent the water of the ocean. Initially there were six faces. The top face is free surface while other five faces are kinematic solid boundaries. The six faces are further tessellated into triangles for the use of BEM simulation [16]. In Figure 2, we only render the top triangles to avoid visual distraction. The FLIP method is used exclusively inside the cage. Liquid-boat interactions are handled by the FLIP method, and the BEM vertices inside the cage follow the motion of the FLIP liquid surface. The BEM in return provides the water flux below free surface on the cage boundary for the FLIP simulation. FLIP influences the BEM only by changing its vertex velocity, and the BEM influences FLIP only by providing the flux boundary condition below water. It is similar to the FAB method [63], except the flux boundary condition in the FAB method is prescribed by animators, while the flux boundary condition here is provided by the BEM, which is not prescribed but driven by the FLIP simulation. This allows waves generated by solids to propagate out of the FLIP domain, and even to another FLIP domain via the BEM mesh.

A moving cage follows the movement of a boat on the ocean

Figure 2. A moving cage follows the movement of a boat on the ocean. The large body of water is solved approximately with the BEM (only top layer rendered), and the resulting water flow enables high resolution simulation with the FLIP method inside the cage.

We briefly cover both FLIP and BEM, and then explain our main contribution, the coupling workflow between them. The entire workflow is summarized in Algorithm 1 and illustrated in Figure 3.

Flow chart of a single time step

Figure 3. Flow chart of a single time step. (1) In this scene a water ball impacts the surface causing it to bend inward. The light blue region is the FLIP liquid domain. The solid dark blue and red lines are the boundary of the FLIP liquid and BEM surface mesh respectively. The dashed blue line indicates the FLIP free surface after advection. The dark blue and red arrows indicate the liquid velocity on the boundary of the FLIP and BEM simulation respectively. The black arrows are the FLIP boundary velocity interpolated from the BEM mesh. (2) BEM vertices move to its new positions guided by the FLIP free surface and velocity; see § 3.2 and Figure 4 (left). (3) After the BEM projection step, the velocity field becomes divergence free again. (4) FLIP advection. (5) The boundary velocity of the FLIP domain is interpolated from the BEM surface velocity field. It is then plugged in the projection step of FLIP to make the velocity field divergence free; see § 3.3. This concludes a single time step.

FLIP and BEM

The governing equation system of our work is the incompressible Euler equation [9]:

DuDt=−1ρ∇P+g,(1)\frac{D u}{D t} = -\frac{1}{\rho}\nabla P + g, \tag*{(1)}
∇⋅u=0,(2)\nabla\cdot u = 0, \tag*{(2)}

where D/Dt:=∂/∂t+u⋅∇D/Dt := \partial/\partial t + \mathbf{u}\cdot\nabla is the material derivative, u\mathbf{u} is the velocity field, ρ\rho is the constant liquid density, PP is the pressure, and g\mathbf{g} is the gravitational acceleration.

In both, BEM and FLIP, the equation is solved by operator splitting in an advection-projection style. Assume, in the beginning of the time step, the velocity is u−=u(t)\mathbf{u}^{-}=\mathbf{u}(t). After the advection, the velocity becomes u\mathbf{u}. Finally, after the projection, the velocity becomes u+=u(t+Δt)\mathbf{u}^{+}=\mathbf{u}(t+\Delta t), where Δt\Delta t is the time step size.

In the advection step, we solve the advection equation

DuDt=0(3)\frac{D\mathbf{u}}{Dt}=0 \tag*{(3)}

to obtain u\mathbf{u} from u−\mathbf{u}^{-}, and then add gravity to it. In the pressure projection step, the incompressibility constraint ∇⋅u=0\nabla\cdot\mathbf{u}=0 is enforced by solving ∂u/∂t=−ρ−1∇P\partial\mathbf{u}/\partial t=-\rho^{-1}\nabla P. The associated Poisson’s equation is

∇2P=ρΔt∇⋅u,P∣ΓD=Pbc,dPdn∣ΓN=ρΔt(u−usolid)⋅n,(4)\begin{aligned} \nabla^{2}P &= \frac{\rho}{\Delta t}\nabla\cdot\mathbf{u},\\ P|_{\Gamma_D} &= P_{\mathrm{bc}},\\ \frac{dP}{dn}\bigg|_{\Gamma_N} &= \frac{\rho}{\Delta t}(\mathbf{u}-\mathbf{u}_{\mathrm{solid}})\cdot\mathbf{n}, \tag*{(4)} \end{aligned}

where ΓD\Gamma_D and ΓN\Gamma_N are liquid-air (Dirichlet) and liquid-solid (Neumann) boundaries respectively. PbcP_{\mathrm{bc}} is the Dirichlet pressure boundary condition which usually consists of surface tension, usolid\mathbf{u}_{\mathrm{solid}} is the desired liquid velocity on the solid boundary, which can introduce inflow and outflow, and n\mathbf{n} is the external normal vector of the liquid domain. Eq. (4) is solved to get the pressure PP, and the velocity is then updated by

u(t+Δt)=u+=u−Δtρ∇P.(5)\mathbf{u}(t+\Delta t)=\mathbf{u}^{+}=\mathbf{u}-\frac{\Delta t}{\rho}\nabla P. \tag*{(5)}

The pressure projection Eq. (4) is solved differently in the BEM and FLIP. For the FLIP simulation, we generally follow Zhu and Bridson [ [75]. In the pressure projection step, we use the approach of Ng et al. [ [50] to handle the liquid-solid boundary, and refer to Gibou et al. [2002] for the free-surface boundary condition. Since we focus on large scenes, we neglect the surface tension.

In short, the BEM simulates the motion of liquid by evolving triangle meshes. Each vertex carries position and velocity information of the liquid surface. In the advection step, each vertex moves with corresponding velocity to the new position. However, when these vertices move, collisions between points to triangles, and edges to edges happen. Furthermore, when two droplets collide, topology changes are required to join two disjoint droplet meshes together. Such collision handling and topology changes are handled by a mesh-based surface tracking program LosTopos [15]. The input of LosTopos is the original vertex positions, triangle connectivity, and the target vertex positions. It resolves collisions, topology changes, and outputs a new set of vertex positions and triangle connectivity. The output mesh is intersection-free and watertight. After the advection, the surface velocity field may not represent the boundary value of a divergence-free velocity field. Therefore, it is followed by a projection step consisting of Helmholtz decomposition (H.D.) and solving a Laplace equation with mixed boundary condition. We refer the reader to the work of Da et al. [2016a], and the work of Huang and Michels [2020] for details. We prefer the H.D. in the implementation of Da et al. [2016a] because the look is closer to our reference 3D simulation, see Figure 9a and Figure 9b. The theoretical analysis of such preference is presented in the supplemental material.

Simulation of a water ball dropping into a cylinder pool

Figure 9. Simulation of a water ball dropping into a cylinder pool. The pure BEM simulation (a) and our hybrid FLIP-BEM simulation (c) with particles and BEM mesh can match the reference FLIP simulation (e), but the BEM with full H.D. (b) does not match the reference FLIP simulation (e). The FLIP simulation without coupling (d) is affected by its boundary.

ALGORITHM 1: A single frame is simulated using our coupled BEM and FLIP approach. A time step size of Δtframe\Delta t_{\mathrm{frame}} is used, λBEM\lambda_{\mathrm{BEM}} denotes the minimum edge length of the BEM mesh, vBEM\mathbf{v}_{\mathrm{BEM}} indicates the BEM vertex velocity, ΔtFLIP\Delta t_{\mathrm{FLIP}} denotes the FLIP voxel size, and the FLIP velocity is given by vFLIP\mathbf{v}_{\mathrm{FLIP}}. The CFL number is given by cfl⁡()\operatorname{cfl}(). Extra coupling steps are written in blue.

Input: FLIP particles and BEM mesh at time tt.

Output: FLIP particles and BEM mesh at time t+Δtft+\Delta t_f.

t_BEM ← 0;
while t_BEM < Δt_frame do
    Δt_BEM ← min(Δt_BEM / max(v_BEM), Δt_frame − t_BEM);
    t_BEM ← t_BEM + Δt_BEM;
/* Figure 3, Plot (2), Figure 4 (left), Section 3.2 */
FLIPtoBEMCoupling(Δt_BEM, FLIP SDF and velocity);
BEMAdvection(Δt_BEM);
/* Figure 3, Plot (3)                                      */
BEMProjection(Δt_BEM);
end
t_FLIP ← 0;
while t_FLIP < Δt_frame do
    Δt_CFL ← cfl()Δx_FLIP / max(v_FLIP);
    Δt_FLIP ← min(Δt_CFL, Δt_frame − t_FLIP);
    t_FLIP ← t_FLIP + Δt_FLIP;
/* Figure 3, Plot (4)                                      */
FLIPAdvection(Δt_FLIP);
/* Figure 4 (right), Section 3.3                         */
BEMtoFLIPCoupling(BEM mesh and velocity);
/* Figure 3, Plot (5)                                      */
FLIPProjection(Δt_FLIP);
end

FLIP Influence on the BEM

This section corresponds to the guided advection step in Figure 3. The BEM takes information from the FLIP simulation by tracking the water flow on the liquid-air and liquid-solid interfaces of the FLIP system. However, just advecting BEM vertices with FLIP velocity field may leads to a drift of free surface. Therefore we must consider both the flow velocity and liquid interface.

We expect the FLIP to BEM coupling to be non-intrusive to the existing BEM program, so we decide to achieve the goal by modifying the velocity of each vertex before the BEM time stepping function, instead of directly matching the interface position and flow velocity separately inside the advection function of the BEM.

There are splashes in the FLIP simulation. Letting the BEM track all these detailed droplets is unnecessary because those droplets will eventually merge into the main body water. When they merge, the BEM is going to track the main surface again. Therefore, we let the BEM track a smoothed FLIP liquid signed distance function (SDF).

The detailed algorithm is as follows. The key steps are illustrated in Figure 4. Snapshots from actual simulations are shown in Figure

Illustration of the advection step in the coupling mechanism between BEM and FLIP

Figure 4. Illustration of the advection step in the coupling mechanism between BEM and FLIP. The details are explained in § 3.2 and 3.3. Left: A BEM vertex at x0x_0 moves under the guidance of FLIP to its final destination at xfinalx_{\mathrm{final}}. Right: A boat is moving on the ocean represented by the BEM domain. A buffer region around the FLIP domain is divided into the sink zone where particles are removed, and the fill zone where new particles are generated.

  1. We use the smoothed SDF of the FLIP liquid and velocity field at the beginning of current frame as a guidance to find the target position that a BEM vertex is supposed to be at the end of a substep. Based on that we modify the velocity.

First, given the current BEM vertex position x0x_0, we search from a point below x0x_0 and inside the FLIP fluid, stepping 0.5ΔxFLIP0.5\Delta x_{\mathrm{FLIP}} upward until the sampled liquid SDF becomes positive, then based on the sampled positive SDF we move downward to get the sub-voxel position of the interface x1x_1. If there is no intersection x1x_1, then all following operations are skipped.

In the current cut-cell formulation of Neumann boundary conditions in the FLIP [50], we find it helpful to produce water splashes in front of the boat if we mix the liquid velocity with solid velocity proportional to the solid fraction of the corresponding voxel face. For example, if the voxel face of a velocity component has 30% of solid, with an artificial friction coefficient of 0.8, and the boat is static, the blended component velocity would be 76% of the original value. However, the side effect is that BEM takes such low velocity as a sign of large resistance, producing exaggerated wake amplitudes (Figure 10). To alleviate this side effect, we sample the FLIP velocity not directly at the surface point x1x_1, but a few voxels below:

Wake patterns of a sailing boat with different configurations

Figure 10. Wake patterns of a sailing boat on a 120 m×240 m domain with different configurations. Figures a-e correspond to hybrid methods with ΔxFLIP=0.07\Delta x_{\mathrm{FLIP}} = 0.07 m, ΔxBEM=0.7\Delta x_{\mathrm{BEM}} = 0.7 m, FLIP depth 3.5 m, artificial friction coefficient = 0.8, and BEM samples FLIP velocity 0,1,2,3,4 voxels below the FLIP surface. Figure f and g correspond to FLIP simulation with 20 and 3.5 m depth, and ΔxFLIP=0.14\Delta x_{\mathrm{FLIP}} = 0.14 m. Figure h is without artificial friction, and samples three voxels below the interface. Blue and red colors map to -0.8 m and 0.8 m elevation in all figures. Black boxes indicate the FLIP regions.

xsample=x1−(0,αΔxFLIP,0),vFLIP=VelocitySample⁡(FLIP,xsample).(6)\begin{aligned} x_{\mathrm{sample}} &= x_1 - (0,\alpha\Delta x_{\mathrm{FLIP}},0),\\ v_{\mathrm{FLIP}} &= \operatorname{VelocitySample}(\mathrm{FLIP},x_{\mathrm{sample}}). \tag*{(6)} \end{aligned}

The BEM still tracks the correct free surface, but feels less resistance due to faster flow velocity sampled from the FLIP. The effects of sampling depth α\alpha will be investigated in Section 5.5 and in Figure 10.

The sampled velocity vFLIPv_{\mathrm{FLIP}} determines the ideal target location of the BEM vertex x2x_2 at the end of the frame:

x2=x1+ΔtframevFLIP.(7)x_2 = x_1 + \Delta t_{\mathrm{frame}}v_{\mathrm{FLIP}} . \tag*{(7)}

A problem with setting x2x_2 as the substep target position for the BEM vertex is that it would attempt to have a high velocity to travel very long distance (x2−x0)(x_2-x_0) in a short period of time if there is initial surface mismatch or substep time ΔtBEM\Delta t_{\mathrm{BEM}} is smaller than frame time Δtframe\Delta t_{\mathrm{frame}}. Therefore, we limit the distance that a BEM vertex can travel by its original velocity vBEMv_{\mathrm{BEM}} and substep time ΔtBEM\Delta t_{\mathrm{BEM}} to get the limited surface target x4x_4:

x3=x0+ΔtBEMvBEM,(8)x_3 = x_0 + \Delta t_{\mathrm{BEM}}v_{\mathrm{BEM}} , \tag*{(8)}
x4=x0+x2−x0∣x2−x0∣min⁡(∣x2−x0∣,∣x3−x0∣).(9)x_4 = x_0 + \frac{x_2-x_0}{\lvert x_2-x_0\rvert}\min(\lvert x_2-x_0\rvert,\lvert x_3-x_0\rvert) . \tag*{(9)}

However, if all BEM vertices are initially static, they would not move at all. Therefore we need to blend the velocity with the FLIP flow velocity vFLIPv_{\mathrm{FLIP}}. The target position with pure FLIP flow velocity is x5x_5:

x5=x0+ΔtBEMvFLIP.(10)x_5 = x_0 + \Delta t_{\mathrm{BEM}}v_{\mathrm{FLIP}} . \tag*{(10)}

The final substep target position of the BEM vertex is a linear mixture of free surface target x4x_4 and FLIP flow target x5x_5. We just take their mid point:

xfinal=12(x4+x5).(11)x_{\mathrm{final}} = \frac{1}{2}(x_4+x_5). \tag*{(11)}

Finally, the vertex velocity is obtained:

vBEM=xfinal−x0ΔtBEM.(12)v_{\mathrm{BEM}} = \frac{x_{\mathrm{final}}-x_0}{\Delta t_{\mathrm{BEM}}}. \tag*{(12)}

Although the SDF and velocity of the FLIP are taken at the beginning of the frame, the surface target position x2x_2 is at the end of the frame as an approximation of where the FLIP surface is supposed to be. An alternative way is to advect the SDF and velocity to the end of BEM substep time, and design another workflow, but it is more costly. When it is not the first substep, the projection from x0x_0 to x1x_1 actually do not happen at the beginning of the frame. To force it to happen at the frame beginning, one can estimate where the vertex would be by backtracking with the vertex velocity backward to the frame beginning, find the vertical projection point x1x_1, and estimate the target position x2x_2 at the end of the frame. However, we did not observe visual differences in this more intricate approach. Also most of the time there is only one BEM substep.

BEM Influence on the FLIP

The BEM provides the water flow boundary condition of the FLIP domain. The difficulty is to know the velocity inside the BEM mesh. If this interpolation problem is to be solved by potential flow or Stokes flow [6], the whole BEM domain would be voxelized and equations are inefficiently solved. Finding the nearest point velocity on the surface seems to be the simple solution, but the velocity field is not physical, see Figure 8. Therefore we propose to use boundary integral over BEM triangles to get the velocity on the FLIP Neumann boundary inside BEM mesh:

u(x)=v∫Γn(y)⋅u(y)4π∣x−y∣ dsy−∇×∫Γn(y)×u(y)4π∣x−y∣ dsy,(13)\mathbf{u}(x)=\mathbf{v}\int_{\Gamma}\frac{\mathbf{n}(y)\cdot\mathbf{u}(y)}{4\pi\lvert x-y\rvert}\,ds_y-\nabla\times\int_{\Gamma}\frac{\mathbf{n}(y)\times\mathbf{u}(y)}{4\pi\lvert x-y\rvert}\,ds_y, \tag*{(13)}

where xx is inside the BEM domain, and yy is on the BEM boundary Γ\Gamma. If we introduce two auxiliary variables cc and jj (similar to charges and currents in electrodynamics), the above equation becomes:

c(y)=n(y)⋅u(y),(14)c(y)=\mathbf{n}(y)\cdot\mathbf{u}(y), \tag*{(14)}
j(y)=n(y)×u(y),(15)\mathbf{j}(y)=\mathbf{n}(y)\times\mathbf{u}(y), \tag*{(15)}
u(x)=∇∫Γc(y)4π∣x−y∣ dsy−∇×∫Γj(y)4π∣x−y∣ dsy,=∇∫Γc(y)4π∣x−y∣ dsy+∫Γj(y)×∇14π∣x−y∣ dsy.(16)\begin{aligned} \mathbf{u}(x)&=\nabla\int_{\Gamma}\frac{c(y)}{4\pi\lvert x-y\rvert}\,ds_y-\nabla\times\int_{\Gamma}\frac{\mathbf{j}(y)}{4\pi\lvert x-y\rvert}\,ds_y,\\ &=\nabla\int_{\Gamma}\frac{c(y)}{4\pi\lvert x-y\rvert}\,ds_y+\int_{\Gamma}\mathbf{j}(y)\times\nabla\frac{1}{4\pi\lvert x-y\rvert}\,ds_y. \tag*{(16)} \end{aligned}

Since xx is not on the boundary Γ\Gamma, ∣x−y∣≠0\lvert x-y\rvert\ne0. The above integral is not singular. The integral is calculated as the summation of integrals of each triangle on the BEM mesh. On each triangle, the normal direction n\mathbf{n} is constant and the velocity u\mathbf{u} is the barycentric interpolation of vertex values. Accordingly c(y)c(y) and j(y)\mathbf{j}(y) on the triangle are calculated based on the interpolated velocity. On each triangle, we select three symmetric quadrature points, whose barycentric coordinates are 2/3,1/6,1/62/3,1/6,1/6 with rotation, and weights are just one third of the triangle area.

The interpolation point xx can still be close to the quadrature point which introduces error. The easy solution is to use nearest neighbor interpolation, or one can apply the more expensive analytic integration of the fundamental solution 1/∣x−y∣1/\lvert x-y\rvert over triangles, as adopted by Huang and Michels [2020]. The brute force integration for each position on the FLIP boundary is expensive. We take the advantage that the interpolated velocity field inside BEM mesh is smooth. We create a narrow band velocity volume which typically has grid resolution of 4ΔxFLIP4\Delta x_{\mathrm{FLIP}} around the FLIP boundary. The interpolated velocity based on boundary integral is zero if xx is outside the BEM mesh. Therefore when creating this narrow band velocity volume, we only sample velocity inside the BEM mesh, and extrapolate one layer to enhance coverage. Otherwise the velocity near BEM free surface would be affected by the zero velocity sample outside.

Figure 8.

In addition to boundary velocity, we also need to add and remove particles. Otherwise when the water flows in, FLIP particles left the influx Neumann boundary, and there is a gap between particles and Neumann boundary. Therefore we just need to fill the gap. The gap size is related to the CFL condition, so it is usually a few voxels after advection. Inside the Neumann boundary, we set a fill zone, where particles are filled. Since our maximum CFL is 4, we use 4 voxels wide fill zone. A voxel in the fill zone and inside the BEM mesh are filled with particles, whose initial velocity is given by the narrow band velocity volume obtained from boundary integral. We also set a sink zone where particles are removed. The sink zone is similarly defined except it is outside of the BEM mesh. See Figure 4 and Figure 5.

BEM mesh and FLIP particles

Figure 5. Top: The BEM mesh moves under the guidance of FLIP particles, closely matching its surface. The incoming boat is removed for better visualization of the bottom FLIP surface. With reference coordinate system fixed at the boat, white color indicates slow velocity while blue indicates high velocity. Bottom: Particles move to the left, exiting the FLIP domain. Particles in the buffer zone and above the BEM mesh are removed, while particles below the BEM mesh are filled to keep constant density.

Implementation

The BEM part is based on the open source code of Da et al. [2016b] with CUDA acceleration provided by Huang and Michels [2020]. The FLIP code is based on the open source implementation of Batty et al. [2007] and Ng et al. [2009] provided by Batty [2018]. However, we re-wrote the whole FLIP simulation with OpenVDB [49] to support sparse data structures.

During the guided advection step in the BEM, the liquid SDF of FLIP is represented as an OpenVDB float grid. We first re-initialize the liquid SDF in FLIP simulation with OpenVDB function “levelSetRebuild”, since only in the one-voxel neighborhood of a particle we have a valid SDF, while the following Gaussian filter needs wider bandwidth. We then apply three passes of one-voxel-wide Gaussian filters provided by OpenVDB to smooth the liquid SDF. As illustrated in Figure 4 (left), we need to find the BEM vertex vertical projection point on the FLIP surface. We search from the bottom of the FLIP domain, and step upward until the sampled liquid SDF becomes positive. The search step size is half of the FLIP voxel size. The projection step of the BEM is a Galerkin boundary element method as described and implemented by Huang and Michels [2020].

In the grid-to-particle step of FLIP, we use 0.95 FLIP velocity mixed with 0.05 PIC velocity. In the particle-to-grid step we transfer not only the momentum but also the liquid’s SDF. Each FLIP particle is a liquid ball, whose diameter is 1.01 times half of the voxel diagonal.

For moving FLIP domains, we update the location of the fill and sink zones at the beginning of each sub-step before particle advection. The sub-step size must be small enough so no particles moves outside the updated fill zone. All air gaps are immediately filled by particles after the advection step. In the fill and remove particles step, we convert the BEM mesh to a SDF with functions provided by OpenVDB. When we fill new particles, we must ensure that after the new particles turned into a smoothed SDF, the smoothed FLIP SDF should coincide with the BEM SDF, so that the water level is not altered by coupling. We found generating a particle if its center is slightly (0.7 of the particle radius) interior to the BEM surface reproduces the same SDF after smoothing. We remove all FLIP particles in the sink zones (domain buffer zone where the BEM SDF is greater than the -0.7 radius threshold). Around the fill zone (domain buffer zone with BEM mesh and SDF smaller than zero) we create a narrow band velocity volume and sample the interpolated velocity every four voxels according to § 3.3. We count the particle numbers in each voxel in the fill zone. We generate new particles at random positions in a voxel if the count is less than 8, and remove extra particles if it is larger than 16. The newly generated particles in the fill zone takes velocities linearly interpolated from the narrow band velocity volume. This approach saves the expensive boundary integral in Eq. (13).

The FLIP domain boundary velocity is also linearly interpolated from above narrow band velocity volume. In the pressure projection part we generally follow Weber et al. [2015], except we use unsmooth aggregation to build the multigrid hierarchy algebraically and replace their V cycle by the W cycle. We apply three Red-Black Gauss-Seidel iterations before restriction and after prolongation in the W cycle. To define the restriction operator, each eight neighbor voxels at current level are averaged to become a larger voxel at the

coarser level. The coarser level matrix is scaled by 0.5 according to Stüben [2001] (see Section 6.4 therein).

Results

In this section, we present examples to evaluate our hybrid method. In all experiments, we use eight particles per voxel in the FLIP simulation, and reduce the maximum relative divergence error in the pressure equation to 10−710^{-7}. First a BEM dam break example shows that the adopted BEM formulation captures 3D fluid physics. Then we use a reference FLIP simulation to drive both the shallow water equation [12] and BEM, to show that the BEM can extend water waves with the correct shape and speed while SWE cannot. After we test the FLIP to BEM coupling, we show our BEM to FLIP coupling based on the boundary integral is compatible with Stokes’s wave theory [Stokman and Selle 2017]. Next we validate the two-way coupling by extending a small FLIP region with BEM to a larger tank, whose motion qualitatively matches the reference FLIP solution in the larger tank. Furthermore, we evaluate our method where FLIP handles liquid-solid collisions to complement the weakness of BEM. We explore the choice of parameters on the shape of the boat wake pattern, and show the wake pattern can match real world cases measured on airborne images [55]. Finally we show that our hybrid method supports multiple FLIP domains, and supports secondary white water simulation due to the horizontal velocity field provided by the BEM mesh. Relevant parameters and run times are summarized in Table 1.

Dam Break

Our first experiment showcases the ability of the surface-only liquids formulation to capture 3D liquid physics. This distinguishes our BEM solver from height-field- or wave-equation-based options. We position a 2 m×1 m×0.2 m2\,\mathrm{m}\times1\,\mathrm{m}\times0.2\,\mathrm{m} fluid volume at the corner of a 5.366 m×3 m×0.2 m5.366\,\mathrm{m}\times3\,\mathrm{m}\times0.2\,\mathrm{m} container according to the setup of Colagrossi and Landrini [2003] and let it flow freely. Our choice of the BEM solver is able to qualitatively match the shape of their simulation as shown in Figure 6.

Dam break simulated by BEM

Figure 6. Dam break simulated by BEM following the setup of Colagrossi and Landrini [2003]. Our choice for the BEM formulation can capture the defining turning waves of this experiment as well as the turbulent motions of the surface.

FLIP Influencing SWE and BEM

Previous methods on 2D-3D coupling extend the 3D fluid simulation with shallow water equation [12, 66]. However, shallow water equation cannot propagate the water wave with the correct shape and speed. We drop a water ball with 0.7 m radius from 3 m above the ground at the center of a 20 m × 1 m × 20 m shallow tank. The SWE, FLIP and BEM simulation cover the same domain, with Δx=0.1\Delta x = 0.1, 0.1, 0.2 m respectively. The reference FLIP simulation drives the SWE simulation within a 6 m-radius circular region at the center according to [12], and drives the BEM simulation within a square region with 6 m edge length at the center. The result is shown in Figure 7. When waves propagate out of the influence region, the SWE water waves have incorrect shapes and speeds while BEM waves can qualitatively match the reference. Note this example already use a shallow tank. The SWE would perform worse in a deeper tank.

SWE, FLIP, and BEM elevation and error comparisons

Figure 7. SWE and BEM simulations driven by a reference FLIP simulation. Middle: the reference FLIP simulation. Top left (right): The SWE (BEM) simulation driven by the reference FLIP. Blue and red indicate low and high elevation. Bottom left (right): The same SWE (BEM) simulation color encoded with nearest distance to the reference FLIP mesh. When waves propagate out of the influence region, SWE water waves have incorrect shapes and speeds while BEM waves can qualitatively match the reference.

Boundary Integral Velocity Interpolation

We determine the velocity inside the BEM mesh by computing the boundary integral of the velocity on the mesh. This approach is compatible with Stokes’s wave theory adopted in the FAB method [63]. We start with a mesh that represents the shape of a Stokes wave, with correct mesh surface velocity field according to Stokes’s theory both on and below the curvy free surface. The simulation is carried out in a reference frame moving along with the wave, so the mesh look static over time. We carve out a piece of mesh and fill with FLIP particles. With the correct flow boundary condition, the FLIP simulation should reproduce the same Stokes wave. In Figure 8 we compare the nearest neighbor interpolation, our interpolation, as well as the velocity directly from Stokes’s theory. Our interpolation method is able to correctly recover the fluid velocity inside the mesh.

Two-Way Coupling for Domain Extension

We validate our two-way coupling scheme in a domain extension problem. A water ball with 0.1 m radius impacts a 1.2 m × 0.4 m × 1.2 m square FLIP domain from 1 m above the waterline. The waves are extended by the BEM, and touch the outer cylinder boundary with 1 m radius and 0.6 m depth. The reflected waves in BEM propagate back to the small FLIP domain. Ideally, the motion should match a reference FLIP simulation in the larger domain. In this example, the minimum edge length of the triangle in the BEM simulation is 0.02 m. The voxel size of the FLIP simulation is 0.01 m.

The FLIP particles are integrated with midpoint rule with CFL condition = 1. The results are shown in Figure 9.

Comparison of velocity interpolation method for a Stokes wave mesh

Figure 8 (PDF p. 9). Comparison of velocity interpolation method for a Stokes wave mesh. Top: Nearest neighbor interpolation. Middle: Our boundary integral interpolation. Bottom: Reference Stokes wave theory velocity. The nearest neighbor interpolation does not provide a correct boundary condition for the FLIP to maintain Stokes’s wave. Our interpolation method can produce the correct result.

We prefer the partial H.D. (Helmholtz decomposition). formulation of Da et al. [2016a] over the full H.D. of Huang and Michels [2020]. We show the different H.D. in Figure 9a and 9b respectively. The BEM solver with partial H.D. is able to qualitatively match the dynamic motion of the reference FLIP simulation. However, the full H.D. leads to quite different results compared to the reference FLIP simulation.

Since BEM alone already matches the reference FLIP qualitatively, using it to extend the small FLIP domain can probably produce a matching result as well. This is indeed the case. As shown in Figure 9c, the hybrid simulation looks similar to the reference one. Initially, the BEM mesh is static and the momentum is transferred from the water drop in the center FLIP simulation. Our hybrid method allows the water wave to propagate beyond the FLIP box boundary and to reach the true cylinder boundary. There is visible square pattern because we render the FLIP particles with their simulation radius, so part of the sphere intersects the BEM mesh. In Figure 9c (second from left), the interior particles rise slightly higher than the transition zone. This is an artifact of our weakly coupling scheme. Here, when the water ball impacts the surface, the velocity interpolated from BEM does not generate enough outflow of the liquid on the FLIP domain boundary. Therefore, the particles inside the small FLIP domain was squeezed by the impact and rise up. A strong coupling scheme may solve this issue, but it may be much more expensive to solve the system. The BEM vertex inside the FLIP domain is governed by FLIP system with BEM velocity boundary, while the BEM vertex just outside is governed by BEM system. The seam indicates how these two systems match. The two system is different, but most of the time, their difference is small. In contrast, as shown in Figure 9d, without the BEM coupling, the FLIP simulation alone is influenced by the box boundary leading to different fluid motion.

Wake Pattern

We analyze our hybrid method for simulating the ship/boat wakes. In particular, we analyze key factors influencing the wake amplitudes, compare the wake angles to real world measurements, and examine the overturning waves behind the ship/boat.

The wake amplitudes and wake angle tests are carried out in a 120 m ×\times 20 m ×\times 240 m domain. The boat is about 10 m long. The coupled FLIP domain is 20 m ×\times 3.5 m ×\times 60 m. The water flow velocity is 10 m/s.

The influence of sampling depth α\alpha in Eq. (6) is illustrated in Figure 10. In Figure 10a-Figure 10e, we sample at 0,1,2,3,4 voxels below the FLIP surface respectively. The artificial friction coefficient is 0.8. In Figure 10f, we run the reference FLIP simulation, and in Figure 10g, we only simulate a shallow 3.5 m tank to examine influence of depth on the wake pattern. Additionally, in Figure 10h we turn off the artificial friction, and sample 3 voxels below. With increasing sampling depth, the amplitudes are closer to that of the reference FLIP. For the same sampling depth, turning off the artificial friction also leads to an amplitude closer to the reference as shown in Figure 10h. The shallow tank simulation in Figure 10g has a different water wave dispersion relationship compared to Figure 10f.

In Figure 11, we render some wake patterns to investigate the influence of wake amplitudes on visual appearance. We choose the hybrid results with 3 voxels of sampling depth, with (Figure 11a,Figure 11b) and without (Figure 11c) artificial friction. The reference FLIP simulation is presented in Figure 11d. It shows that our method, especially without artificial friction, can approximate the look of reference FLIP simulation qualitatively without the noise on FLIP surface reconstructed from particles. The reference FLIP simulation at half of the resolution of the hybrid FLIP already costs 120 Gb memory with 1.7 billion particles. Memory consumption prevents us to compute the reference at the same resolution. A photograph of real boat wakes is in Figure 12. In Figure 11e, we show the result of a height field approach with correct dispersion relationship [10].

Simulated boat wakes

Figure 11. Simulated boat wakes. In realistic renderings, FLIP particles are converted to mesh, and rendered with BEM mesh. See § 5.6 for detailed steps. (a) FLIP particles and BEM mesh from hybrid simulation in Figure 10d. (b) Realistic rendering of hybrid simulation in Figure 10d. (c) Realistic rendering of Figure 10h. (d) Realistic rendering of reference FLIP simulation in Figure 10f. (e) Simulated result with [10].

Real photo of boat wakes at Lyse fjord in Norway

Figure 12. Real photo of boat wakes at Lyse fjord in Norway, adapted from a photograph by Edmont, distributed under a CC BY-SA 3.0 license [18].

Next we analyze the wake angles. The wakes behind a ship/boat are usually referred to as the Kelvin wakes, which are characterized by a fixed angle around 20∘20^\circ and feather like pattern. The fixed angle is due to the dispersion relationship of deep water waves of all wavelengths. However in reality, Rabaud and Moisy [ [55] reported the transition of fixed Kelvin angle to increasingly smaller Mach angles when the ship/boat moves faster. They believe "the finite size of the disturbance (ship) explains this transition". Our hybrid approach reproduces their discoveries, matching their theory as well as their real world measurements from airborne images. In Figure 13 we can observe the transition with increasing speed.

Wake angle as a function of the hull Froude number

Figure 13. Wake angle as a function of the hull Froude number Fr=U/gLFr = U/\sqrt{gL}, where UU is the flow velocity, gg is the gravity, and LL is the length of the boat. Our results match the measurements based on airborne images from [55].

In the transition zone between FLIP and BEM we fill and remove FLIP particles to track the BEM free surface. This is visualized in Figure 14.

FLIP-BEM transition boundary in the hybrid simulation

Figure 14. FLIP-BEM transition boundary in the hybrid simulation in Figure 10d. The transition zone is visible in the first zoomed in figure, since particles above the BEM mesh are removed in the coupling algorithm to match the BEM free surface. Particles and triangles are colored by velocity.

Our method is capable of extending overturning waves behind the obstacle. However, the BEM is not the best choice for such turbulent waves because it handles complex topology changes less efficiently compared to the FLIP method. In addition, the BEM is not designed for capturing vortices near the surface. Hence extending overturning waves are not the recommended usage of our approach. Nevertheless, we show the overturning wave results in Figure 15.

Extending overturning waves behind a wedge

Figure 15. Extending overturning waves behind a wedge with (a) particles and the BEM mesh in our hybrid method and (b) particles in the reference FLIP simulation. Only the top layer of particles are exported to save IO. The domain size is 20 m × 10 m × 45 m. ΔxBEM=0.14\Delta x_{\mathrm{BEM}} = 0.14 m, ΔxFLIP=0.07\Delta x_{\mathrm{FLIP}} = 0.07 m

In a more complex example, the boat moves like a sine wave. The FLIP domain size is 32 m × 3.5 m × 85 m. The results are shown in Figure 16.

Simulation of a speedboat following a serpentine movement

Figure 16. Simulation of a speedboat following a serpentine movement. The BEM allows for the natural extension of the waves. Particles are rendered inside the FLIP domain. The BEM mesh subtracting the FLIP domain patch are rendered on the outside.

Multiple Moving Domains and Rendering

In this example, we show that the method handles multiple moving FLIP domains interacting with each other through BEM meshes. As shown in Figure 1, and 17, three FLIP domains follow the cycling motion of three boats. The boat at the front excites the water surface. When a FLIP domain in the back sweeps through the perturbed region, newly generated particles follow the perturbed water surface and its motion. There are three 50 m × 3.5 m × 50 m FLIP domains in a cylinder tank with 100 m radius and 20 m depth. The track radius is 40 m while speedboats travel at 10 m/s. In principle, the FLIP domains can overlap, because they only interact with each other through the BEM mesh. However, we avoid doing so because it can introduce extra difficulty in rendering overlapping surfaces.

Photorealistic rendering of a simulation comprising three speedboats riding in a circle on the ocean

Figure 1. Photorealistic rendering of a simulation comprising three speedboats riding in a circle on the ocean computed with our hybrid approach combining FLIP and BEM.

We use this scene as an example to demonstrate a simplified production pipeline. Our hybrid method allows secondary whitewater simulation to enhance the final look. This is possible because the BEM mesh provides surface velocity field. We convert the BEM mesh to SDF with OpenVDB, and create narrow band volumetric velocity field around the mesh according to the closest point velocity on the BEM mesh for each voxel. The BEM SDF and velocity field are replaced by FLIP SDFs and velocity fields inside FLIP domains. Such combined velocity field and SDF are used for the off-the-shelf whitewater simulation included in Houdini [58].

The final image is composed of different render passes. Initially we have a BEM mesh (Figure 17a). We smooth it and flatten the edge near BEM boundary to match a flat ocean surface. The intersection of BEM mesh and a large cylinder is rendered together with the exterior flat plane subtracting the same cylinder to create seamless ocean. Next, FFT waves [64] are added at low velocity regions. This forms the first pass (Figure 17b).

Simulation of speedboats riding in a circle computed with our hybrid method

Figure 17. Simulation of speedboats riding in a circle computed with our hybrid method. (a) Raw BEM mesh without subdivision colored by velocity. (b) Rendered BEM mesh and exterior ocean with FFT waves. (c) Raw top layer FLIP particles colored by velocity. (d) Rendered FLIP mesh with FFT waves. (e) Composed image of b and d. (f) Composed image of a secondary whitewater simulation. The water surface is perturbed by the previous FLIP domain and affects the following FLIP domain.

We only output the surface layer of particles (Figure 17c) and the other particles are exported as a SDF at simulation resolution to save disk consumption. The surface particles are turned into a higher resolution SDF and merged with the rest simulation resolution SDF. The combined SDF are turned into polygons. We extract the FLIP surface by taking the intersection of three FLIP polygon meshes and three boxes slightly smaller than the FLIP domains. In order to reduce artifacts on the FLIP-BEM boundary, near the intersecting box, we pull the intersected FLIP mesh vertices towards the nearest point on smoothed BEM mesh. The closer they are to the intersecting box, the more they cling to the smoothed BEM mesh. These flattened FLIP meshes are augmented with FFT waves to render the high resolution liquid mesh (Figure 17d). When rendering Figure 17d, the smoothed BEM mesh subtracting the three boxes participates in light transport, but are not rendered (Houdini phantom).

Figure 17d is put on top of Figure 17b to get the rendered liquid surface in Figure 17e. Finally the whitewater pass are added in Figure 17f.

Runtime Performance

One of the motivations of our work is the limited runtime performance of existing methods when simulating a large body of water. In this section we compare to several other possible methods in terms of runtime performance. The runtime performances of some methods are only available for different scenes and machine configurations. Therefore we scale these runtimes linearly for rough estimation.

First we compare variations of FLIP solvers. We compare our FLIP with narrow band FLIP [21] and adaptive octree pressure solver [25] provided by Houdini [58] directly on the same machine. The comparison is

summarized in Table 2. First we compare the FLIP part in our hybrid simulation of wake pattern (Figure 10). Our FLIP implementation is faster than the two improvements combined. Furthermore we try to simulate the whole ocean with brute force. However, neither Houdini nor our FLIP can fit into the memory. Therefore we simulate the first three sub-steps of the shallow ocean in Figure 10 but at high resolution, which amounts to extending the FLIP region horizontally to fit the BEM region. Tall-cells methods [13, 37] are slower than uniform methods for the same degrees of freedom (DOF). Even if they run as fast as the uniform methods with the same DOF, given the runtime in Table 2, a 5-cell-thick simulation of the large domain with tall-cells methods would take 58s , still slower than our hybrid method (42s in Table 1).

MethodNBOctreeDOFLiquid Voxelsε\varepsilont/frame
Our FLIPNONO12.2M285 × 50 × 85710−710^{-7}28s
YESYES2.4M285 × 50 × 85710−410^{-4}43s
HoudiniYESNO12.2M285 × 50 × 85710−410^{-4}90s
NONO12.2M285 × 50 × 85710−410^{-4}105s
Our FLIPNONO293M1714 × 50 × 342910−710^{-7}576s
HoudiniYESYES50M1714 × 50 × 342910−410^{-4}1077s

Table 2. Runtime comparison of our FLIP and Houdini [58], which implements narrow band FLIP (NB) [21] and adaptive octree solver for pressure (Octree) [25]. The comparison is on the same machine A in Table 1 with three substeps/frame. The first two rows corresponds to the FLIP region in Figure 10h. The last two rows corresponds to brute force simulation of high resolution (ΔxFLIP=0.07\Delta x_{\mathrm{FLIP}} = 0.07 m) shallow ocean in Figure 10g (ΔxFLIP=0.14\Delta x_{\mathrm{FLIP}} = 0.14 m). Our FLIP outperforms Houdini even with stricter accuracy (ε\varepsilon) for the pressure solver.

Next we roughly estimate the performance of a recent octree simulator [2]. It provides not only adaptivity inside the liquid volume, but also on the liquid surface, making it very suitable for both deep and wide liquid simulation. Our hybrid framework is comparable to its high performance. They reported 20s/substep for a water tank scene with equivalently 33.3M uniform liquid voxels (or 266M particles) on a 8-core Intel CPU at 3.6 GHz.

We estimate the run time if we use such octree simulator for the FLIP part of our straight boat wake scene in Figure 10. Taking into account of CPU frequency and core numbers, their simulator would take 20 s/substep×8 cores/24 cores×3.6GHz/3.0GHz×99M/266M=3.0 s/substep20\ \text{s/substep} \times8\ \text{cores}/24\ \text{cores} \times3.6\text{GHz}/3.0\text{GHz} \times99\text{M}/266\text{M} = 3.0\ \text{s/substep}. Hence compared to our 9.3 s/substep FLIP performance in Table 1, it is three times faster. The BEM domain is 24 times larger and 7 times deeper. It is possible to simulate this using the octree method because these additional volumes would be filled with coarse grids. However, whether it can preserve wakes and simulate the whole domain efficiently cannot be concluded with our estimation. In their airplane scene, the wakes seem to dissipate quickly.

SceneFigureNTriN_{\mathrm{Tri}}NParticleN_{\mathrm{Particle}}ΔxBEM\Delta x_{\mathrm{BEM}}ΔxFLIP\Delta x_{\mathrm{FLIP}}Δt\Delta tTFrameT_{\mathrm{Frame}}TBEMT_{\mathrm{BEM}}TFLIPT_{\mathrm{FLIP}}TCouplingT_{\mathrm{Coupling}}Machine
Dam Break620K/0.03/1/20004.7 (4000)3.8 (4925)//A
Crown Splash9a24K/0.02/1/606.8 (600)5.2 (786)//A
9b33K/0.02/1/608.2 (600)5.3 (932)//A
9c20K5M0.020.011/606.3 (600)3.7 (717)0.7 (999)0.6A
9d/5M/0.011/602.0 (600)/0.7 (1707)/A
9e/15M/0.011/604.3 (600)/1.62 (1598)/A
Boat (Straight, Half Resolution)10f/1705M/0.141/2470.5 (480)/70.5 (480)/B
10g/320M/0.141/2421.6 (480)/21.6 (480)/B
Boat (Straight)10d65K99M0.70.071/2449.3 (480)10.1 (480)10.6 (1415)7.1C
10h55K99M0.70.071/2442.4 (480)7.4 (480)9.3 (1414)6.8A
15a111K21M0.140.071/10059.7 (500)55.3 (501)2.4 (500)1.8A
15b/210M/0.071/10018.2 (500)/18.2 (500)/A
Boat (Wavy)1689K230M0.70.071/24105.1 (480)15.8 (923)22.5 (1404)9.8C
Boats (Cycling)1, 17170K634M0.70.071/24248.9 (600)41.2 (600)64.3 (1766)15.8D

Table 1. Overview of the different scenes presented in this paper. The resolution Δx\Delta x is stated in meter, and the time step size Δt\Delta t and per-invocation run time TT in seconds. We list the invocation counts in the parenthesis for each type of run time since adaptive sub-steps happen. The coupling is carried out once per frame. Eight particles occupy a single voxel when using FLIP. Machine A has 2 × 12-core Intel Xeon [email protected] and NVIDIA RTX 2080Ti. Machine B has 2 × 64-core AMD EPYC [email protected]. Machine C has 2 × 16-core Intel Gold [email protected] and RTX2080Ti. Machine D has 2 × 24-core Intel Platinum [email protected] and NVIDIA V100.

Discussion and Future Work

In this paper, we hybridize a local high-resolution FLIP solver and a surface-based BEM solver for multiscale ocean modeling. This method allows us to naturally extend the FLIP domain to a larger extent as shown in the crown splash experiment in Figure 9. The accuracy is demonstrated by comparing the boat wake pattern to the brute-force FLIP results and a real example (Figure 10, Figure 11 Figure 13). Through the BEM mesh, multiple volumetric domains can interact with each other and collectively generate complex patterns in a large body of water (Figure 17). Thanks to the surface representation of liquid and adaptive triangle sizes of the BEM, the BEM mesh can cheaply expand both horizontally and vertically.

Our method is suitable for open water simulation with both water splashes near the main object, and waves that travel long distances. The most time consuming part of the simulation is the volumetric solver near the main object, even with our optimized implementation. The extra time induced by the BEM simulation in the calm region and coupling is usually no more than 30%. The FLIP part consumes about 90% of the memory, up to 120 Gb for the 7.1 billion particles scene. It is up to the user to decide the resolution and size of the FLIP region in the BEM water body depending on the machine capability. The BEM is limited by the acceleration grid for collision detection. Currently, it uses uniform grids with a cell size equal to the smallest triangle edge length. Hence, the bounding box of the BEM cannot be too large.

The performance of the BEM is the main drawback. It is limited by the serial surface tracking program LosTopos [15], which takes quite a long time to resolve collisions and topology changes, etc. The BEM involves dense matrix-vector multiplication as a result of integral equation systems. In principle, the fast multipole method (FMM) [26] can solve the matrix-vector multiplication problem, but for the problem sizes in our experiments, the naive summation on the GPU is faster given the overhead of the FMM. In our most challenging triple boat scene, the BEM simulation takes up to 2 minutes per frame for 170K triangles. About half of the time is spent on remeshing. Therefore, the smart usage of the BEM is for calm waves, rather than splashes and overturning waves. When the main object is placed in a stormy ocean, the propagated waves are negligible. The prescribed waves with one-way interaction are more efficient. The BEM does not interacts with beaches, cliffs either, because of the irregularity of solids unsupported by LosTopos. Another issue is the wake amplitudes in Figure 10. We alleviate this issue by sampling below the interface. We believe this problem is due to the Helmholtz decomposition which interprets slow velocity as resistance. The resistance causes the elevation of the BEM mesh ahead of the boat. When the detailed water waves in the FLIP domain enter the BEM domain, most of the details will be lost because the BEM mesh has lower resolution, dedicated for large wave features.

The coupling workflow may look heuristic compared to a strong coupling framework that bridges a dense integral equation system in BEM and a sparse equation system in FLIP. However, at this stage we are satisfied with its results, considering potentially larger implementation effort of a strong coupling system, and corresponding lower efficiency of a mixed integral and differential equation system.

For the problem of extending waves with correct dispersion relationships, we believe the dispersion kernel method [10] shows great potential. We look forward to seeing coupling of such height field methods with correct dispersion relationships with 3D simulations. Canabal et al. directly modified the height field, so the height field does not have horizontal displacement or velocity information. The two-way coupling for domain extension may not be trivial due to their inherently different physics.

It would be interesting to see our method applied to other types of hybrid Lagrangian-Eulerian simulations such as IQ-MPM [20].

Acknowledgements

This work has been supported by KAUST (individual baseline funding of the Computational Sciences Group within the Visual Computing Center), the National Science Foundation (NSF CAREER IIS-1943199), and CCF-1813624 and ECCS-2023780.

We thank Da Fang and Christopher Batty for releasing their source code and Miguelangelo Rosario for providing the ship model. The valuable comments of the anonymous reviewers are gratefully acknowledged.

References

References

  1. [1]Mridul Aanjaneya, Ming Gao, Haixiang Liu, Christopher Batty, and Eftychios Sifakis. 2017. Power Diagrams and Sparse Paged Grids for High Resolution Adaptive Liquids. ACM Trans. Graph. 36, 4, Article 140 (July 2017), 12 pages.
  2. [2]Ryoichi Ando and Christopher Batty. 2020. A Practical Octree Liquid Simulator with Adaptive Surface Resolution. ACM Trans. Graph. 39, 4, Article 32 (July 2020), 17 pages.DOI
  3. [3]Ryoichi Ando, Nils Thuerey, and Chris Wojtan. 2013. Highly Adaptive Liquid Simulations on Tetrahedral Meshes. ACM Trans. Graph. 32, 4, Article 103 (July 2013), 10 pages.DOI
  4. [6]Haimasree Bhattacharya, Michael Bang Nielsen, and Robert Bridson. 2012. Steady State Stokes Flow Interpolation for Fluid Control. In Eurographics (Short Papers). Citeseer, 57–60.DOI
  5. [8]Jeremiah U. Brackbill and Hans M. Ruppel. 1986. FLIP: A method for adaptively zoned, particle-in-cell calculations of fluid flows in two dimensions. J. Comput. Phys. 65, 2 (1986), 314–343.DOI
  6. [9]Robert Bridson and Matthias Müller-Fischer. 2007. Fluid Simulation: SIGGRAPH 2007 Course Notes. In ACM SIGGRAPH 2007 Courses. Association for Computing Machinery, New York, NY, USA, 1–81.
  7. [10]José A. Canabal, David Miraut, Nils Thuerey, Theodore Kim, Javier Portilla, and Miguel A. Otaduy. 2016. Dispersion Kernels for Water Wave Simulation. ACM Trans. Graph. 35, 6, Article 202 (Nov. 2016), 10 pages.DOI
  8. [11]Xi Chen, Ren chuan Zhu, Wen Jun Zhou, and Ji Zhao. 2018. A 3D multi-domain high order boundary element method to evaluate time domain motions and added resistance of ship in waves. Ocean Engineering 159 (2018), 112–128.DOI
  9. [12]Nuttapong Chentanez, Matthias Müller, and Tae-Yong Kim. 2015. Coupling 3D eulerian, heightfield and particle methods for interactive simulation of large scale liquid phenomena. IEEE Transactions on Visualization and Computer Graphics (TVCG) 21, 10 (2015), 1116–1128.
  10. [13]Nuttapong Chentanez and Matthias Müller. 2011. Real-Time Eulerian Water Simulation Using a Restricted Tall Cell Grid. ACM Trans. Graph. 30, 4, Article 82 (July 2011), 10 pages.
  11. [15]Fang Da, Christopher Batty, and Eitan Grinspun. 2014. Multimaterial Mesh-Based Surface Tracking. ACM Trans. Graph. 33, 4, Article 112 (July 2014), 11 pages.DOI
  12. [16]Fang Da, David Hahn, Christopher Batty, Chris Wojtan, and Eitan Grinspun. 2016a. Adaptive Liquids. ACM Trans. Graph. 35, 4, Article 78 (July 2016), 12 pages.
  13. [18]Edmont. 2009. Fjordn surface wave boat. https://commons.wikimedia.org/wiki/File:Fjordn_surface_wave_boat.jpg
  14. [19]R. Elliot English, Linhai Qiu, Yue Yu, and Ronald Fedkiw. 2013. Chimera Grids for Water Simulation. In Proceedings of the 12th ACM SIGGRAPH/Eurographics Symposium on Computer Animation (Anaheim, California) (SCA ’13). Association for Computing Machinery, New York, NY, USA, A5–84.
  15. [20]Yu Fang, Ziyin Qu, Minchen Li, Xinxin Zhang, Yixin Zhu, Mridul Aanjaneya, and Chenfanfu Jiang. 2020. IQ-MPM: An Interface Quadrature Material Point Method for Non-Sticky Strongly Two-Way Coupled Nonlinear Solids and Fluids. ACM Trans. Graph. 39, 4, Article 51 (July 2020), 16 pages.DOI
  16. [21]Florian Ferstl, Ryoichi Ando, Chris Wojtan, Rüdiger Westermann, and Nils Thuerey. 2016. Narrow Band FLIP for Liquid Simulations. In Proceedings of the 37th Annual Conference of the European Association for Computer Graphics (Lisbon, Portugal) (EG ’16). Eurographics Association, Goslar, DEU, 225–232.DOI
  17. [22]Chuyu an Fu, Qi Guo, Theodore Gast, Chenfanfu Jiang, and Joseph Teran. 2017. A Polynomial Particle-in-Cell Method. ACM Trans. Graph. 36, 6, Article 222 (Nov. 2017), 12 pages.DOI
  18. [24]Abhinav Golasa, Rahul Narain, Jason Sewall, Pavel Krajcevski, Pradeep Dubey, and Ming Lin. 2012. Large-Scale Fluid Simulation Using Velocity-Vorticity Domain Decomposition. ACM Trans. Graph. 31, 6, Article 148 (Nov. 2012), 9 pages.
  19. [25]Ryan Goldade, Yiping Wang, Mridul Aanjaneya, and Christopher Batty. 2019. An Adaptive Variational Finite Difference Framework for Efficient Symmetric Octree Viscosity. ACM Trans. Graph. 38, 4, Article Article 94 (July 2019), 14 pages.DOI
  20. [26]Leslie Greengard and Vladimir Rokhlin. 1987. A fast algorithm for particle simulations. Journal of computational physics 73, 2 (1987), 325–348.
  21. [27]Stephan T. Grilli, J. Skourup, and I.A. Svendsen. 1989. An efficient boundary element method for nonlinear water waves. Engineering Analysis with Boundary Elements 6, 2 (1989), 97 – 107.DOI
  22. [28]David Hahn and Chris Wojtan. 2016. Fast Approximations for Boundary Element Based Brittle Fracture Simulation. ACM Trans. Graph. 35, 4, Article 104 (July 2016), 11 pages.DOI
  23. [29]Francis H Harlow. 1964. The particle-in-cell computing method for fluid dynamics. Methods Comput. Phys. 3 (1964), 319–343.
  24. [30]Francis H. Harlow and J. Eddle W. Welch. 1965. Numerical Calculation of Time-Dependent Viscous Incompressible Flow of Fluid with Free Surface. Physics of Fluids 8 (1965), 2182–2189.DOI
  25. [31]Woo-Suck Hong. 2009. An Adaptive Sampling Approach to Incompressible Particle-Based Fluid. Texas A & M University, USA. AAI3370710.
  26. [32]Libo Huang, Torsten Hädrich, and Dominik L. Michels. 2019. On the Accurate Large-scale Simulation of Ferrofluids. ACM Trans. Graph. 38, 4, Article 93 (July 2019), 15 pages.DOI
  27. [33]Libo Huang and Dominik L. Michels. 2020. Surface-Only Ferrofluids. ACM Trans. Graph. 39, 6, Article 174 (Nov. 2020), 17 pages.DOI
  28. [34]H. Ibayashi, C. Wojtan, N. Thuerey, T. Igarashi, and R. Ando. 2020. Simulating Liquids on Dynamically Warping Grids. IEEE Transactions on Visualization and Computer Graphics 26, 06 (jun 2020), 2288–2302.
  29. [35]Markus Ihmsen, Nadir Akinci, Gizem Akinci, and Matthias Teschner. 2012. Unified spray, foam and air bubbles for particle-based fluids. The Visual Computer 28, 6 (2012), 669–677.DOI
  30. [36]Markus Ihmsen, Jens Cornelis, Barbara Solenthaler, Christopher Horvath, and Matthias Teschner. 2014. Implicit Incompressible SPH. IEEE Transactions on Visualization and Computer Graphics 20, 3 (2014), 426–435.DOI
  31. [37]Geoffrey Irving, Arash Gendelman, Frank Losasso, and Ronald Fedkiw. 2006. Efficient Simulation of Large Bodies of Water by Coupling Two and Three Dimensional Techniques. ACM Trans. Graph. 25, 3, 805–811.
  32. [39]Stefan Jeschke, Christian Hafner, Nuttapong Chentanez, Miles Macklin, Matthias Müller-Fischer, and Christopher Wojtan. 2020. Making Procedural Water Waves Boundary-aware. Computer Graphics Forum 39, 8 (2020), 47–54.DOI
  33. [40]Stefan Jeschke, Tomáš Skřivan, Matthias Müller-Fischer, Nuttapong Chentanez, Miles Macklin, and Chris Wojtan. 2018. Water Surface Wavelets. ACM Trans. Graph. 37, 4, Article 94 (July 2018), 13 pages.DOI
  34. [41]Stefan Jeschke and Chris Wojtan. 2015. Water Wave Animation via Wavefront Parameter Interpolation. ACM Trans. Graph. 34, 3, Article 27 (May 2015), 14 pages.DOI
  35. [42]Stefan Jeschke and Chris Wojtan. 2017. Water Wave Packets. ACM Trans. Graph. 36, 4, Article 103 (July 2017), 12 pages.
  36. [43]Chenfu Jiang, Craig Schroeder, Andrew Selle, Joseph Teran, and Alexey Stomakhin. 2015. The Affine Particle-in-Cell Method. ACM Trans. Graph. 34, 4, Article 51 (July 2015), 10 pages.DOI
  37. [44]Todd Keeler and Robert Bridson. 2015. Ocean Waves Animation Using Boundary Integral Equations and Explicit Mesh Tracking. In Proceedings of the ACM SIGGRAPH/Eurographics Symposium on Computer Animation (Copenhagen, Denmark) (SCA ’14). Eurographics Association, Goslar, DEU, 11–19.
  38. [45]Spyros A. Kinnas and Ching-Yeh Hsin. 1992. Boundary element method for the analysis of the unsteady flow aroundextreme propeller geometries. AIAA Journal 30, 3 (1992), 688–696.DOI
  39. [47]Frank Losasso, Frédéric Gibou, and Ronald Fedkiw. 2004. Simulating Water and Smoke with an Octree Data Structure. ACM Trans. Graph. 23, 3 (Aug. 2004), 457–462.
  40. [49]Ken Museth. 2013. VDB: High-Resolution Sparse Volumes with Dynamic Topology. ACM Trans. Graph. 32, 3, Article 27 (July 2013), 22 pages.
  41. [50]Yen Ting Ng, Chohong Min, and Frédéric Gibou. 2009. An Efficient Fluid-Solid Coupling Algorithm for Single-Phase Flows. J. Comput. Phys. 228, 23 (Dec. 2009), 8807–8829.
  42. [53]Michael B. Nielsen, Andreas Söderström, and Robert Bridson. 2013. Synthesizing Waves from Animated Height Fields. ACM Trans. Graph. 32, 1, Article 2 (Feb. 2013), 9 pages.DOI
  43. [55]Marc Rabaud and Frédéric Moisy. 2013. Ship wakes: Kelvin or Mach angle? Physical review letters 110, 21 (2013), 214503.
  44. [57]Rajsekhar Setaluri, Mridul Aanjaneya, Sean Bauer, and Efthychios Sifakis. 2014. A Sparse Paged Grid Structure Applied to Adaptive Smoke Simulation. ACM Trans. Graph. 33, 6, Article 205 (Nov. 2014), 12 pages.
  45. [58]Side Effects Software. 2021. Houdini. (2021).
  46. [59]Andreas Söderström, Matts Karlsson, and Ken Museth. 2010. A PML-Based Nonreflective Boundary for Free Surface Fluid Animation. ACM Trans. Graph. 29, 5, Article 136 (Nov. 2010), 17 pages.
  47. [61]Justin Solomon, Amir Vaxman, and David Bommes. 2017. Boundary Element Octahedral Fields in Volumes. ACM Trans. Graph. 36, 3, Article 28 (May 2017), 16 pages.
  48. [63]Alexey Stomakhin and Andrew Selle. 2017. Fluxed Animated Boundary Method. ACM Trans. Graph. 36, 4, Article 68 (July 2017), 8 pages.
  49. [64]Jerry Tessendorf. 2001. Simulating Ocean Water. SIGGRAPH’99 Course Note (01 2001).
  50. [66]Nils Thuerey, Ulrich Rüde, and Marc Stampel. 2006. Animation of Open Water Phenomena with coupled Shallow Water and Free Surface Simulations. In ACM SIGGRAPH / Eurographics Symposium on Computer Animation. Marie-Paule Cani and James O’Brien (Eds.). The Eurographics Association.DOI
  51. [68]Rene Winchenbach, Hendrik Hochstetter, and Andreas Kolb. 2017. Infinite Continuous Adaptivity for Incompressible SPH. ACM Trans. Graph. 36, 4, Article 102 (July 2017), 10 pages.
  52. [69]Guoxiong Wu and R. Eatock Taylor. 2003. The coupled finite element and boundary element analysis of nonlinear interactions between waves and bodies. Ocean Engineering 30, 3 (2003), 387 – 400.DOI
  53. [71]Cem Yuksel, Donald H. House, and John Keyser. 2007. Wave Particles. In ACM SIGGRAPH 2007 Papers (San Diego, California) (SIGGRAPH ’07). Association for Computing Machinery, New York, NY, USA, 99–95.
  54. [72]Aman Zhang and Yun-Long Liu. 2015. Improved three-dimensional bubble dynamics model based on boundary element method. J. Comput. Phys. 294 (2015), 208 – 223.DOI
  55. [73]Changxi Zheng and Doug L. James. 2010. Rigid-Body Fracture Sound with Precomputed Soundbanks. In ACM SIGGRAPH 2010 Papers. Association for Computing Machinery, New York, NY, USA.
  56. [74]Bo Zhu, Wenlong Lu, Matthew Cong, Byungmoon Kim, and Ronald Fedkiw. 2013. A New Grid Structure for Domain Extension. ACM Trans. Graph. 32, 4, Article 63 (July 2013), 12 pages.DOI
  57. [75]Yongning Zhu and Robert Bridson. 2005. Animating Sand as a Fluid. ACM Trans. Graph. 24, 3 (July 2005), 965–972.

Paper details

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

views · 9

downloads · 0

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

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents