The Impulse Particle in Cell Method Paper
The Impulse Particle in Cell Method Paper
The Impulse Particle in Cell Method Paper
Figure 1: We propose the Impulse Particle-In-Cell (IPIC) method, a novel extension of the Affine Particle-In-Cell (APIC) method. Our method
can be used for both liquid and smoke simulations to better preserve circulation and vortical details.
Abstract
An ongoing challenge in fluid animation is the faithful preservation of vortical details, which impacts the visual depiction of flows.
We propose the Impulse Particle-In-Cell (IPIC) method, a novel extension of the popular Affine Particle-In-Cell (APIC) method
that makes use of the impulse gauge formulation of the fluid equations. Our approach performs a coupled advection-stretching
during particle-based advection to better preserve circulation and vortical details. The associated algorithmic changes are
simple and straightforward to implement, and our results demonstrate that the proposed method is able to achieve more energetic
and visually appealing smoke and liquid flows than APIC.
CCS Concepts
• Computing methodologies → Physical simulation;
(a) MC (b) MC+R (c) CF-BFECC velocities. It thus agrees with the backwards flow map correction
used in the semi-Lagrangian context by the Covector Fluids method
of Nabizadeh et al. [NWRC22]. Our method is straightforward
to implement and can be readily integrated into existing solvers,
adding only a small computational overhead. We further present
a practical technique to significantly improve on the stability of
Covector Fluids, by detecting when the correction is likely to be
inaccurate. The presented results demonstrate that the flows obtained
by our technique are more energetic, better preserve vorticity, and
produce more visually compelling details. Our contributions can be
summarized as
(a) FLIP (b) APIC (c) IPIC (α=0.99, β=0.998) (d) IPIC (α=0.8, β=0.9) (e) IPIC w/o Hessian
Figure 3: 2D Dam Break simulations at the resolution of 64 × 64 grid cells. All examples are initialized with 8 particles per cell. A
second-order time integration scheme is used with ∆t = 0.25. From top to bottom, we show results at time steps t = 25, t = 220 and t = 389.5.
Our method (c) shows more vortical structures than FLIP (a) and APIC (b). Employing lower limiter values for α and β (d) allow less accurate
Jacobian of the flow maps, but is able to provide a more vortical result at t = 220. IPIC without the Hessian correction (e) becomes less
energetic, but is still more vortical than FLIP and APIC.
Crucial to the work of Nabizadeh et al. [NWRC22] is the com- APIC has become a fundamental part of production pipelines for
bination of more accurate semi-Lagrangian advection schemes liquid simulations [FSN17]. APIC was further extended to model
(e.g., BFECC [DL03] or MacCormack [SFK∗ 08]) with two-step higher order quantity tracking [FGG∗ 17], combined with a FLIP
time-splitting methods [ZNT18, NZT19]. Their approach, however, scheme [FGW∗ 21], and extended in space with a Taylor expan-
is limited to purely Eulerian grid-based settings, and does not nat- sion [NMM23]. For a more thorough analysis of the convergence
urally extend to modelling liquids. Recent work has explored the and properties of the APIC method applied specifically to fluid
improvement of the impulse method’s accuracy in a grid-based scenarios, please refer to [DSS20].
setting by using neural fields [DYZ∗ 23].
Prominent among hybrid approaches is the popular Fluid Implicit where u(x), p(x) and f(x) denote the velocity, pressure and external
Particle method (FLIP) [BR86, ZB05], which increments, rather force fields, respectively, while x represents the spatial coordinates
than overwrites, the particles’ velocities by transferring only the of the domain and ρ the constant fluid density. Viscosity terms are
interpolated change in the grid velocities before and after pressure often omitted due to the inherent dissipation of numerical solvers
projection. FLIP, however, introduces noise due to the discrepancy [ETK∗ 07, MCP∗ 09]. These equations can be discretized through a
in the information carried by the particles and the discretization grid. time-splitting method as
Jiang et al. [JSS∗ 15,JST17] therefore proposed the Affine Particle in
Cell method (APIC), which uses concepts of the Generalized Inter- ∂u(x)
= −u(x) · ∇u(x) + f(x), (3)
polation Material Point method (GIMP) [BK04, PCW07] to create ∂t
transfers between particles and grid that preserve angular momen- ∂u(x) 1
= − ∇p(x), subject to ∇ · u(x) = 0. (4)
tum. Due to its versatility and ability to maintain vortical structures, ∂t ρ
(a) APIC
Figure 4: 3D Liquid Street simulations with a resolution 150 × 75 × 45 grid cells. A liquid wave generator causes waves that collide with
obstacles. Both methods are simulated with ∆t = 0.25 using a second-order integration scheme. From left to right, we show results at t = 75.25,
t = 86.25 and t = 100.75 respectively. Our method (b) is able to produce more detailed wakes at the downstream of the obstacles when
compared to APIC (a).
3.1. Impulse-based methods By first solving the advection term u · ∇m to obtain an intermediate
∗ m∗ , the velocity stretching term can then be discretized by backward
The impulse formulation [Cor95,SC96,FLX 22] of the equations of
Euler integration as m∗∗ = m∗ − ∆t(∇u)⊤ m∗∗ . Rearranging the
motion allows for a relaxation of the global incompressibility con-
terms of this equation shows the relationship between the velocity
straint during advection by employing an additional gauge variable.
gradient and the advected stretched transport as
Given that the flow u is incompressible (i.e., ∇ · u = 0), the impulse
gauge variable m is defined as m∗∗ = (I + ∆t ∇u)−⊤ m∗ . (9)
m = u + ∇φ, (5) We will demonstrate how the expression I + ∆t ∇u is connected
with the definition of the flow map in the next section.
where ∇φ is the gradient of an arbitrary scalar field. This term can be
reinterpreted as the gradient of pressure that will modify m to satisfy
incompressibility. The resulting equations for mass conservation 3.2. The Flow Map
become A flow map represents the correspondences created by the passively
∇2 φ(x) = ∇ · m x ∈ Ω, transported grid variables that track fluid quantities, yielding a con-
nection between an undeformed fluid domain and its deformed
∂φ(x)
=0 x ∈ ∂Ωb , (6) counterpart. Flow maps have been employed as part of a circulation-
∂n preserving vorticity-streamfunction solver [ETK∗ 07], incorporated
φ(x) = 0 x ∈ ∂Ω f , within a higher-order semi-Lagrangian scheme [NWRC22], inte-
where Ω represents the fluid domain, and ∂Ωb and ∂Ω f are its fluid- grated into Material Point Methods [SSC∗ 13, JST∗ 16], and used for
solid and fluid-air boundaries, respectively. Due to the change of visualizing flows through Lagrangian coherent structures, such as
variables induced by the new gauge variable, the inviscid equation Finite-Time Lyapunov Exponents (FTLEs) [Hal01,Hal02]. The flow
for advection becomes (see Appendix for the derivation): map Φt (x) that maps each fluid initial position x0 in the domain to
its location at time t is defined by the integration of the flow velocity
∂m
+ u · ∇m + (∇u)⊤ m = 0. (7) field as
∂t Z t
The major difference between the impulse formulation and the orig- Φt (x0 ) = x0 + u(x(τ), τ) dτ. (10)
0
inal advection in Equation (3) is the extra (∇u)⊤ m term, which
accounts for the stretching of the advected velocity due to deforma- The Jacobian of the flow map, ∇Φt (x), represents the deforma-
tion of the space. Through operator splitting, this equation can be tion tensor of the fluid domain, and its derivative over time is directly
broken down into passive transport and velocity stretching as connected with the velocity gradient [Cor95] as
∂m ∂m ∂
+ u · ∇m = 0, + (∇u)⊤ m = 0. (8) ∇Φt (xt ) = ∇u(x) ∇Φt (xt ). (11)
∂t ∂t ∂t
Covector Fluids [NWRC22] discretizes flow maps by integrating notation, in the following explanation we assume that all particles
grid locations backwards in time, sampling extra points around the carry unit mass and that quantity transfers are normalized by the
advected vector component (Figure 5, (b)). Instead, we adopt an transferred mass at the computed position to conserve momentum.
approach common in FTLE visualizations, computing forward flow
The advection in a Lagrangian setting updates particle positions
maps by sampling extra points around a given particle (Figure 5,
with a forward flow map computed from the grid velocities, while
(c)). Adopting a forward Euler time integration scheme, one can
the attributes that these particles carry are kept unchanged. We
discretize Equation (11) as
denote the discrete particle-based flow map as Φ◦ : RN×3 → RN×3 ,
∇Φn+1 (xn+1 ) = ∇Φn (xn ) + ∆t∇u(xn )∇Φn (xn ), (12) with N being the number of particles. The advected velocities that
satisfy momentum conservation on the grid are
with n and ∆t being the time step index and the time step size,
respectively. Since the Jacobian of the flow map relative to the ũ⊞ ← I p2g (u◦ , Φ◦ (x◦ ), x⊞ ), (15)
current time step is the identity ∇Φn (xn ) = I, we have
where I p2g is a particle-to-grid transfer function. The standard
∇Φn+1 (xn+1 ) = I + ∆t∇u(xn ). (13) Particle-in-Cell (PIC) method defines the I p2g routine as
We will drop the subscript n for the rest of the paper, assuming that PIC ◦ ◦ ⊞
I p2g (u , x , x ) = ∑ w(x⊞ , x◦p ) u◦p , (16)
the flow map is always computed with respect to the previous time p
step. This derivation relates the flow map from Equation (13) to the
impulse stretching in Equation (9) as with w(x⊞ , x◦p ) representing the weights obtained from a pre-
specified interpolation function. The summation in Equation (16)
m∗∗ = (∇Φ)−⊤ m∗ . (14) is conducted over the particles inside a small vicinity of each grid
These definitions set up a mathematical approach that simultane- point. Since PIC suffers from severe energy dissipation, the Affine
ously simplifies the formalism outlined by previous exterior calculus Particle-in-Cell (APIC) method modifies the particle-to-grid trans-
approaches, while clarifying how flow maps interact with classical fer to better preserve the velocity field. The corresponding I p2g
impulse methods. operation is
APIC ◦ ◦ ⊞
I p2g (u , x , x , A◦ ) = ∑ w(x⊞ , x◦p ) u◦p + A◦p (x⊞ − x◦p ) .
p
(17)
where u◦p + A◦p (x⊞ − x◦p ) is the per-particle affine velocity contribu-
tion relative to a grid variable at x⊞ . After transferring the particle
velocities, mass conservation (Equation (4)) is solved on the grid.
The resulting divergence-free velocity field is used to update the
per-particle linear velocity and affine transformation as
(a) [ETK∗ 07] (b) [NWRC22] (c) Ours
u◦ = ∑ w(x⊞ ◦ ⊞
i , x ) ui , A◦ = ∑ ∇w(x⊞ ◦ ⊞
i , x ) ui . (18)
i i
Figure 5: Differences in how flow maps are computed by distinct
methods. The black color represents the undeformed state, while the The above equation assumes that the interpolation kernel w(x, y) is
blue color represents the deformed state. (a) Elcott et al. [ETK∗ 07] trilinear [PCW07, NMM23]. This assumption simplifies the compu-
use a streamfunction-vorticity formulation to backtrace circulation tation of the affine velocity, which effectively models the per-particle
(black empty circle) sampled in the deformed space (blue dotted matrix A◦ as the interpolation of the velocity gradient at the given
lines). (b) Nabizadeh et al. [NWRC22] employ a backwards flow location, ∇u(x).
map discretization: given a staggered grid location (black circle),
the advected velocity vector is multiplied by a single row of the 4. An Impulse-based Hybrid Advection Scheme
transposed Jacobian of the inverse flow map, which is geometrically
equivalent to the approach of Elcott et al. (c) Our approach samples Having outlined how the flow map relates to the impulse equations,
four additional points (c1 to c4 ) for each particle, which are then and how hybrid discretizations can efficiently model advection, we
advected forward (ĉ1 to ĉ4 ). The full forward flow map Jacobian is can now propose a simple modification to hybrid schemes that
computed using a finite-difference approach as in FTLE methods. incorporates structure-preserving deformations when advecting the
impulse gauge variable. Accordingly, the particles are now defined
to carry impulse (and its affine component), rather than velocity. The
particle positions are first passively advected by the incompressible
3.3. Hybrid discretizations
flow velocities, as usual. Then, per Equation (14), the per-particle
Hybrid methods discretize the equations of motion with two distinct impulse gauge variables are stretched by the inverse transposed
representations: Lagrangian particles are used to solve the advec- Jacobian of the flow map, denoted J ◦ = (∇Φ◦ )−⊤ , using
tion terms (Equation (3)) and to track the evolution of the surface,
m◦ = J ◦ u◦ . (19)
while a background Eulerian grid is used to enforce incompress-
ibility (Equation (4)). We represent discrete grid-based positions We re-initialize the impulse variable at each step to be the divergence-
and velocities as x⊞ and u⊞ respectively, while their particle-based free velocity u◦ , and denote the impulse gauge variable value after
counterparts are represented by x◦ and u◦ . For the simplicity in stretching as m◦ .
m(x⊞ ) ≈ J ◦ u◦ + ∇ J ◦ u◦ ∆x.
(21)
(a) CF-BFECC
Assuming that the Jacobian of the flow map is locally constant
around the transported particles, Equation (21) simplifies to
The extra term comes from the gradient of the non-constant Jacobian:
4.1. Non-constant Jacobian Flow Map
∇J ◦ is the Hessian of the inverse transposed flow map, a third order
Modifying per-particle quantities with Equation (23) only works if tensor that is single contracted with the vector u◦ . The last two
the Jacobian of the flow map is locally constant around a particle. In terms of Equation (25) can be combined to derive a more convenient
(a) SL (b) MC (c) MC+R (d) CF+BFECC (e) APIC (f) IPIC (Ours)
Figure 7: 3D Smoke Plume simulations at a resolution of 128 × 256 × 128 cells. SL (a), MC(b), APIC (e) use ∆t = 0.125 while MC+R (c),
CF+BFECC (d) and ours (f) are simulated with ∆t = 0.25 using a second-order integration scheme. We show results for all methods at t = 100
except for CF+BFECC, which explodes after t = 68. Our method exhibits more vortical details than the other methods while also maintaining
better stability than CF+BFECC.
expression to update the per-particle affine matrix as coupled with an accurate position integrator, the determinant of the
flow map should be equal to 1, indicating that the volume is per-
Ã◦m ◦
= J ∇u + ∇J ◦ ◦ ◦ ◦
: u = J (A − H ), ◦ ◦
⊤ fectly conserved. To limit the amount of incorrect stretching induced
∂Φx ∂Φy
+ mz ∇ ∂Φ by inaccurate flow maps, we apply a smoothed double-sided step
mx ∇ ∂x + my ∇ z
∂x ∂x
⊤ (26) function to modulate the strength of the stretching of Lagrangian
with H◦ =
∂Φy
∂Φx
mx ∇ ∂y + my ∇ ∂y + mz ∇ ∂Φ
∂y
z ,
quantities as
⊤
m◦ = ξ(q◦ )J ◦ u◦ + 1 − ξ(q◦ ) u◦ ,
∂Φ
mx ∇ ∂Φ
∂z
x
+ my ∇ ∂zy + mz ∇ ∂Φ
∂z
z
(27)
Ã◦m = ξ(q◦ )Ã◦m + 1 − ξ(q◦ ) A◦ ,
where m◦ = (mx , my , mz )⊤ and ∇ ∂Φ∂f
e
, e, f ∈ (x, y, z) represents the
second order derivatives of the flow map. with
◦ q≤0
The per-particle matrix H requires the evaluation of second ◦ 0,
1 − ||J | − 1| − α
derivatives of the flow map, and extra points need to be sampled to q◦ = , ξ(q◦ ) = 3q2 − 2q3 , 0 ≤ q ≤ 1
in order to compute these derivatives. In the supplementary material β−α
1, 1≤q
we include detailed diagrams that illustrate how we sample particles (28)
to approximate the Hessian, along with the derivations needed to where α and β are parameters satisfying 0 ≤ α < β ≤ 1 that control
obtain Equation (26). In summary, when the Jacobian of the flow the blending limits. In Section 5, we demonstrate the impact of the
map is not constant around the particle positions, the APIC transfer Jacobian-aware blending. When ξ(q◦ ) is far from one, the method
(Equation (17)) employs the stretched velocity m◦ and modified is more strict in enforcing flow map correctness, and the behavior
affine matrix Ã◦m . A full outline of a single time step of the IPIC of the solver more closely mimics a standard APIC solver; with
advection-stretching is shown in Algorithm 1. For time integration, less strict enforcement, the method becomes less stable while also
we employ a second-order multi-stepping algorithm [NWRC22], producing and maintaining more intricate, vortical details.
outlined in Algorithm 2.
Moreover, when simulating liquids, the evaluation of the Jacobian
of the flow map at the interface between air and fluid cells can
4.2. Enforcing Stability by a Jacobian-Aware Blending
become incorrect, since velocities from the fluid are extrapolated to
The original covector approach [NWRC22] can simulate fluids with the air. Since this creates simulations that have noticeable artifacts,
intricate vortical details, but suffers from significant instability issues we revert back to FLIP at the interface of fluid and air cells.
that severely limit the time step size of the algorithm. We propose a
novel limiter on the Jacobian of the flow map that improves stability
of impulse-based formulations. Our key insight is that velocity 5. Results
stretching is unstable when flow maps are not accurately constructed. We test the effectiveness of our method in several different sce-
Errors in the construction of the flow map are exacerbated in regions narios, evaluating its performance and quality against established
of higher turbulence or close to boundaries, where inaccuracies due state-of-the-art methods. One advantage of our proposed hybrid
to numerical integration of particle positions and the negative effects approach is that it can be seamlessly integrated into liquid solvers,
of not enforcing strictly divergence-free interpolants [CPAB22] are extending previous approaches [NWRC22] that were limited to
more severe. smoke settings. We also reimplemented several methods in our
The flow map error can be quantified by measuring the deter- pipeline to provide fair comparisons. The first-order (in time)
minant of its Jacobian: for a strictly divergence-free velocity field semi-Lagrangian [Sta99] and MacCormack [SRF05], second-order
(a) MC+R
(b) CF+BFECC
(c) APIC
Figure 8: Vortex Leapfrogging simulations at a resolution of 256 × 128 × 128 cells. MC+R (a), CF+BFECC (b) and our method (d) use
∆t = 0.5, while APIC (c) employs ∆t = 0.25. From left to right, we show results at t = 121, t = 258, t = 500.5 and t = 767.5, respectively.
IPIC produces more detailed vortical structures when compared with other methods.
Table 1: Summary of methods used in this paper. tics. We refer the reader to the accompanying video for animated
Method Acronym Reference visualizations of our results.
Semi-Lagrangian SL [Sta99] The Impulse Particle-In-Cell method is implemented in Py-
MacCormack MC [SFK∗ 08] torch [PGM∗ 19], extending a previous differentiable solver pipeline
Back-and-Forth Error [TCCS21]. All simulations were performed on a system with an
BFECC [SFK∗ 08]
Compensation and Correction NVIDIA RTX3090 GPU with 24GB memory and an AMD Ryzen
Advection-Reflection R [NZT19] 7 5800X CPU with 64GB memory. Efficiently performing particle-
Covector Fluids CF [NWRC22] to-grid operations implies increased memory costs, which can be
Fluid-Implicit-Particle FLIP [ZB05] prohibitive when evaluating our method on GPUs. We alleviate
Affine Particle-In-Cell APIC [JSS∗ 15] this requirement by sequentially computing the particle splatting
Impulse Particle-In-Cell IPIC Our method operation in chunks, which can make particle-to-grid transfers less
efficient. We use linear interpolation kernels for both grid-to-particle
and particle-to-grid transfers and a third-order Runge-Kutta integra-
advection-reflection [NZT19], and second-order (in time) Covector tor for advancing positions.
Fluids [NWRC22] are the baseline implementations for simulating
smoke examples; PIC, FLIP [ZB05] and APIC [JSS∗ 15] provide 5.1. Validation
baselines for liquid scenes. Table 1 shows all the implemented meth- 2D Taylor Vortices Our 2D solver is validated using a Taylor
ods, and Table 2 lists experiment parameters and performance statis- vortices setup [McK07] that has been widely used for testing
·10−2
Algorithm 1 A single step of the IPIC advection-stretching 1.2
Energy
⊞ ◦ ⊞
Input: flow field u ; particle positions x ; grid positions x ;
timestep ∆t; non-constant Jacobian flag H; stability parameters 1
α and β.
1: u◦ , A◦ ← Ig2p
APIC ◦ ⊞ ⊞
(x , x , u ) 0.8
2: for each particle do
3: c◦ ← C REATE JACOBIAN PARTICLES(x◦ )
4: if H then 0.6
h◦ ← C REATE H ESSIAN PARTICLES(x◦ )
Time
5:
6: h◦ ← RUNGE K UTTA(h◦ ; u⊞ , ∆t) 100 200 300 400 500 600
20: m ⊞ APIC
← I p2g (m◦ , x◦ , x⊞ , A◦ ) Taylor Vortices (Fig. 2) 256×256 1.05M 0.77 0.55 0.35
2D Plume (Fig. 6) 384×512 786k 0.71 0.56 0.44
⊞
Output: Advected stretched impulse field m 2D Dam Break (Fig.3) 64×64 10k 0.18 0.17 0.15
Leapfrogging (Fig. 8) 256×128×128 16.78M 69.2 29.0 8.6
3D Plume (Fig. 7) 128×256×128 16.78M 67.8 28.6 7.4
Algorithm 2 Second order time integration scheme
3D Dam Break (Fig. 10) 128×100×40 471k 2.1 1.0 0.4
Liquid Sink (Fig. 11) 96×24×96 1.77M 5.3 2.2 0.7
Input: Flow field u⊞
n ; timestep ∆t
Liquid Street (Fig. 4) 150×75×45 1.2M∼1.8M 7.2 2.9 0.8
1: m̃n+ 1 ← IPIC(mn ; un , ∆t
2) ▷ Algorithm 1
2
2: un+ 1 ← D IV F REE P ROJECTION(m̃n+ 1 )
2 2 ging example. Concentric vortex rings with different radii are ini-
3: m̃n+1 ← IPIC(mn ; un+ 1 , ∆t) ▷ Algorithm 1 tialized with equal circulations, and the expected behavior is that
2
4: un+1 ← D IV F REE P ROJECTION(m̃n+1 ) one ring will go through the other in alternating fashion. The true
Output: Velocity field u⊞ analytical solution for the inviscid case would reproduce this behav-
n+1
ior indefinitely; for numerical solvers, we observe the number of
times that each vortex ring goes through another before collapsing
to a single ring. Figure 8 shows leapfrogging results for grid-based
energy preservation properties in Computer Graphics. We gen- Advection-Reflection MacCormack (MC+R) and Covector Fluids
erate two initial
vortices
separated
by a distance of 0.81 using
methods, and for hybrid APIC and IPIC discretizations. APIC was
2 2
ω(x) = Ua 2 − ar 2 exp 12 1 − ar 2 , with a = 0.3 and U = 1.0. simulated with a halved time step size, since all other methods are
Vortex core positions are set so that they should theoretically remain second-order in time. Thus, the number of pressure projections is
separated through the course of the simulation; dissipative solvers the same across different methods. The sequence shows that IPIC
are not able to preserve this property. Note that methods such as produces more detailed vortical structures when compared to other
MacCormack and APIC are run with halved time steps to match methods, while also producing consistent ring motion. We compare
the number of projection steps of second-order in time methods the kinetic energy profile of different methods in Figure 9.
(Algorithm 2). Figure 2 provides a visualization of the resulting vor-
ticity maps in each of the methods at time t = 6. We observed that
5.2. Smoke
Covector Fluids is very sensitive to MacCormack / BFECC extrema
clamping modes, and minor changes to the clamping procedure can 2D Smoke Plume We initialize a 2D smoke source in a rectangular
drastically decrease or increase the energy of the system. domain. For all smoke examples, advection of the smoke concen-
tration ρ(x) is performed on the regular grid with the MacCormack
3D Leapfrogging Vortex Rings An alternative evaluation of a advection scheme, instead of transporting densities through particles.
solver’s ability to conserve kinetic energy is to test a vortex leapfrog- We chose this setting so we could provide fair visual comparisons
5.3. Liquids
2D Dam Break Existing hybrid liquid solvers can be easily ex-
tended with our particle-based algorithm, offering better circulation-
preserving capabilities. In this example, we initialize a column of (b) IPIC (Ours)
water in the left side of the domain. We show in Figure 3 a com-
Figure 10: 3D Dam Break simulations at a resolution of 128 ×
parison between FLIP, APIC and IPIC: how our method is able to
100 × 40 with ∆t = 0.25. The liquid block is initialized with 8 par-
maintain more energetic vortical structures. Additionally, we com-
ticles per cell. From left to right, we show results at t = 27.25 and
pare the effect of the parameters of the Jacobian-aware blending:
t = 91.25. Our method (b) gives similar results to APIC (a). Because
less strict (α=0.8, β=0.9) settings allow less accurate Jacobian of the
the flow map at interfaces is not correct due to the extrapolation of
flow map, making the simulation less stable. But it is able to provide
velocities, IPIC reverts back to FLIP on those regions.
a more vortical result at t = 220. More strict (α=0.99, β=0.998) pa-
rameters constrain the Jacobian better, and are also able to provide
a much more vortical simulation than FLIP and APIC. Lastly, we
also observe that the simulation is less energetic if we assume the
Jacobian is constant around a particle position.
6. Conclusions
The major limitation of IPIC is its reliance on sampling extra
We have presented the Impulse Particle-In-Cell method, a novel particles to compute the deformation flow map. This can introduce
hybrid discretization that combines the strength of particle-based computational inefficiency and higher memory costs, especially
transport with the versatility of grid-based incompressibility. Our when assuming that the Jacobian is not constant around particles.
method can model both smoke and liquid phases, and exhibits im- Moreover, flow maps can be inaccurate close to interfaces, and
proved conservation of energy and vortical details compared to we rely on reverting back to simpler advection schemes in those
previous methods. Furthermore, we proposed a novel Jacobian- scenarios. For future work, we believe that our method can benefit
aware blending that increases the stability of the velocity-stretching from a more thorough treatment of boundary conditions. In addition,
step commonly used in related impulse-based/structure-preserving the Jacobian-aware blending can be employed as a limiter for pure
approaches. grid-based advection schemes that rely on velocity-stretching.
[KL95] KOUMOUTSAKOS P., L EONARD A.: High-Resolution simulations [PTG12] P FAFF T., T HUEREY N., G ROSS M.: Lagrangian vortex sheets
of the flow around an impulsively started cylinder using vortex methods, for animating fluids. ACM Transactions on Graphics 31, 4 (jul 2012),
vol. 296. 1995. doi:10.1017/S0022112095002059. 2 1–8. doi:10.1145/2185520.2185608. 2
[KLTB21] K UGELSTADT T., L ONGVA A., T HUEREY N., B ENDER J.: [PTSG09] P FAFF T., T HUEREY N., S ELLE A., G ROSS M.: Synthetic tur-
Implicit Density Projection for Volume Conserving Liquids. IEEE Trans- bulence using artificial boundary layers. ACM Transactions on Graphics
actions on Visualization and Computer Graphics 27, 4 (apr 2021), 2385– 28, 5 (dec 2009), 1. doi:10.1145/1618452.1618467. 2
2395. doi:10.1109/TVCG.2019.2947437. 3 [QLDJ22] Q U Z., L I M., D E G OES F., J IANG C.: The power particle-
[KTJG08] K IM T., T HÜREY N., JAMES D., G ROSS M.: Wavelet tur- in-cell method. ACM Transactions on Graphics 41, 4 (jul 2022). doi:
bulence for fluid simulation. In ACM Transactions on Graphics (TOG) 10.1145/3528223.3530066. 3
(2008), vol. 27, ACM, p. 50. 2
[QZG∗ 19] Q U Z., Z HANG X., G AO M., J IANG C., C HEN B.: Efficient
[Leo80] L EONARD A.: Vortex methods for flow simulation. Journal and conservative fluids using bidirectional mapping. ACM Transactions
of Computational Physics 37, 3 (1980), 289–335. doi:10.1016/ on Graphics 38, 4 (2019), 1–12. doi:10.1145/3306346.3322945.
0021-9991(80)90040-6. 2 2
[LMLD22] L I W., M A Y., L IU X., D ESBRUN M.: Efficient kinetic [SC96] S UMMERS D. M., C HORIN A. J.: Numerical vorticity creation
simulation of two-phase flows. ACM Transactions on Graphics 41, 4 based on impulse conservation. Tech. Rep. 5, 1996. doi:10.1073/
(2022). doi:10.1145/3528223.3530132. 2 pnas.93.5.1881. 2, 4
[LTKF08] L OSASSO F., TALTON J., K WATRA N., F EDKIW R.: Two-way [SFK∗ 08] S ELLE A., F EDKIW R., K IM B., L IU Y., ROSSIGNAC J.:
coupled sph and particle level set fluid simulation. IEEE Transactions on An unconditionally stable MacCormack method. Journal of Sci-
Visualization and Computer Graphics 14, 4 (2008), 797–804. 3 entific Computing 35, 2-3 (jun 2008), 350–371. doi:10.1007/
[McK07] M C K ENZIE A.: HOLA: a High-Order Lie Advection s10915-007-9166-4. 2, 3, 8
of discrete differential forms, with applications in fluid dynam- [SIBA17] S ATO T., I GARASHI T., BATTY C., A NDO R.: A Long-term
ics. URL: https://resolver.caltech.edu/CaltechETD: semi-lagrangian method for accurate velocity advection. SIGGRAPH Asia
etd-05292007-100432. 2, 8 2017 Technical Briefs, SA 2017 (2017). doi:10.1145/3145749.
[MCP∗ 09] M ULLEN P., C RANE K., PAVLOV D., T ONG Y., D ESBRUN 3149443. 2
M.: Energy-preserving integrators for fluid animation. ACM Transactions [SRF05] S ELLE A., R ASMUSSEN N., F EDKIW R.: A vortex particle
on Graphics 28, 3 (jul 2009), 1. doi:10.1145/1531326.1531344. method for smoke, water and explosions. ACM Transactions on Graphics
2, 3 24, 3 (jul 2005), 910–914. doi:10.1145/1073204.1073282. 2, 7
[NMM23] NAKAMURA K., M ATSUMURA S., M IZUTANI T.: Taylor [SSC∗ 13] S TOMAKHIN A., S CHROEDER C., C HAI L., T ERAN J., S ELLE
particle-in-cell transfer and kernel correction for material point method. A.: A material point method for snow simulation. ACM Transactions on
Computer Methods in Applied Mechanics and Engineering 403 (jan 2023), Graphics 32, 4 (jul 2013), 1–10. doi:10.1145/2461912.2461948.
115720. doi:10.1016/j.cma.2022.115720. 3, 5, 6 4
[NNC∗ 20] NAKANISHI R., NASCIMENTO F., C AMPOS R., PAGLIOSA [Sta99] S TAM J.: Stable fluids. In Proceedings of the 26th Annual Con-
P., PAIVA A.: RBF liquids: An Adaptive PIC Solver Using RBF-FD. ference on Computer Graphics and Interactive Techniques, SIGGRAPH
ACM Transactions on Graphics 39, 6 (2020), 1–13. doi:10.1145/ 1999 (New York, New York, USA, 1999), ACM Press, pp. 121–128.
3414685.3417794. 3 doi:10.1145/311535.311548. 2, 7, 8
[NWRC22] NABIZADEH M. S., WANG S., R AMAMOORTHI R., C HERN [SWT∗ 18] S ATO T., W OJTAN C., T HUEREY N., I GARASHI T., A NDO R.:
A.: Covector fluids. ACM Transactions on Graphics 41, 4 (jul 2022), Extended narrow band FLIP for liquid simulations. Computer Graphics
1–16. doi:10.1145/3528223.3530120. 2, 3, 4, 5, 6, 7, 8 Forum 37, 2 (may 2018), 169–177. doi:10.1111/cgf.13351. 3
[NZT19] NARAIN R., Z EHNDER J., T HOMASZEWSKI B.: A second- [TBBC∗ 22] TAO M., BATTY C., B EN -C HEN M., F IUME E., L EVIN
order advection-reflection solver. Proceedings of the ACM on Computer D. I.: VEMPIC: Particle-in-Polyhedron Fluid Simulation for Intricate
Graphics and Interactive Techniques 2, 2 (jul 2019), 1–14. doi:10. Solid Boundaries. ACM Transactions on Graphics 41, 4 (2022). doi:
1145/3340257. 3, 8 10.1145/3528223.3530138. 3
[Ose89] O SELEDETS V. I.: On a new way of writing the Navier-Stokes
[TCCS21] TANG J., C. A ZEVEDO V., C ORDONNIER G., S OLENTHALER
equation. The Hamiltonian formalism. Tech. Rep. 3, 1989. doi:10.
B.: Honey, I Shrunk the Domain: Frequency-aware Force Field Reduction
1070/rm1989v044n03abeh002122. 2
for Efficient Fluids Optimization. Computer Graphics Forum 40, 2 (may
[PCK∗ 19] PADILLA M., C HERN A., K NÖPPEL F., P INKALL U., 2021), 339–353. doi:10.1111/cgf.142637. 8
S CHRÖDER P.: On bubble rings and ink chandeliers. ACM Transac-
[TP11] T ESSENDORF J., P ELFREY B.: The Characteristic Map
tions on Graphics 38, 4 (aug 2019), 1–14. doi:10.1145/3306346.
for Fast and Efficient VFX Fluid Simulations. Computer
3322962. 2
(2011). URL: http://jtessen.people.clemson.edu/
[PCW07] P. C. WALLSTEDT J. E. G.: Improved Velocity Projection papers_files/CMFluids.pdf. 2
for the Material Point Method. Computer Modeling in Engineering &
[TRLX22] TAO R., R EN H., L IU J., X IAO F.: A Lagrangian vor-
Sciences 19, 3 (2007), 223–232. doi:10.3970/cmes.2007.019.
tex method for smoke simulation with two-way fluid–solid coupling.
223. 3, 5, 6
Computers and Graphics (Pergamon) 107 (2022), 289–302. doi:
[PGM∗ 19] PASZKE A., G ROSS S., M ASSA F., L ERER A., B RADBURY 10.1016/j.cag.2022.08.007. 2
J., C HANAN G., K ILLEEN T., L IN Z., G IMELSHEIN N., A NTIGA L.,
D ESMAISON A., K ÖPF A., YANG E., D E V ITO Z., R AISON M., T EJANI [UBH14] U M K., BAEK S., H AN J.: Advanced Hybrid Particle-Grid
A., C HILAMKURTHY S., S TEINER B., FANG L., BAI J., C HINTALA S.: Method with Sub-Grid Particle Correction. Computer Graphics Forum
PyTorch: An imperative style, high-performance deep learning library. 33, 7 (oct 2014), 209–218. doi:10.1111/cgf.12489. 3
Advances in Neural Information Processing Systems 32 (dec 2019). URL: [WFS22] W RETBORN J., F LYNN S., S TOMAKHIN A.: Guided bubbles
http://arxiv.org/abs/1912.01703, arXiv:1912.01703. and wet foam for realistic whitewater simulation. ACM Transactions on
8 Graphics 41, 4 (2022). doi:10.1145/3528223.3530059. 3
[PK05] PARK S. I., K IM M. J.: Vortex fluid for gaseous phenomena. In [WP10] W EISSMANN S., P INKALL U.: Filament-based smoke with vortex
Computer Animation, Conference Proceedings (New York, New York, shedding and variational reconnection. In ACM SIGGRAPH 2010 papers
USA, 2005), ACM Press, pp. 261–270. doi:10.1145/1073368. on - SIGGRAPH ’10 (New York, New York, USA, 2010), ACM Press,
1073406. 2 p. 1. doi:10.1145/1833349.1778852. 2
[XTZ∗ 21] X IONG S., TAO R., Z HANG Y., F ENG F., Z HU B.: Incom-
pressible flow simulation on vortex segment clouds. ACM Transactions
on Graphics 40, 4 (2021). doi:10.1145/3450626.3459865. 2
[YXZ∗ 21] YANG S., X IONG S., Z HANG Y., F ENG F., L IU J., Z HU
B.: Clebsch gauge fluid. ACM Transactions on Graphics 40, 4 (2021).
doi:10.1145/3450626.3459866. 10
[ZB05] Z HU Y., B RIDSON R.: Animating sand as a fluid. ACM Trans-
actions on Graphics 24, 3 (jul 2005), 965–972. doi:10.1145/
1073204.1073298. 3, 8
[ZBG15] Z HANG X., B RIDSONY R., G REIFZ C.: Restoring the missing
vorticity in advection-projection fluid solvers. ACM Transactions on
Graphics 34, 4 (jul 2015), 52:1–52:8. doi:10.1145/2766982. 2
[ZNT18] Z EHNDER J., NARAIN R., T HOMASZEWSKI B.: An advection-
reflection solver for detail-preserving fluid simulation. ACM Transac-
tions on Graphics 37, 4 (aug 2018), 1–8. doi:10.1145/3197517.
3201324. 2, 3