pressure solve
TRANSCRIPT
-
7/29/2019 Pressure Solve
1/23
More Accurate Pressure Solves
-
7/29/2019 Pressure Solve
2/23
Solid Boundaries
Voxelized version works great if solids aligned with
grid
If not: though the error in geometry is O(x),
translates into O(1) error in velocities!
The simulation physics sees stair-steps, and gives
you motion for the stair-step case
-
7/29/2019 Pressure Solve
3/23
-
7/29/2019 Pressure Solve
4/23
Quick Fix Fails
This is equivalent for grid-aligned solids
Works great for highly dynamic splashing etc.
Fails miserably in steadier situations
-
7/29/2019 Pressure Solve
5/23
Quick Fix Fails
This is equivalent for grid-aligned solids
Works great for highly dynamic splashing etc.
Fails miserably in steadier situationsGRAVITY
-
7/29/2019 Pressure Solve
6/23
Quick Fix Fails
This is equivalent for grid-aligned solids
Works great for highly dynamic splashing etc.
Fails miserably in steadier situationsBOUNDARY FIX
-
7/29/2019 Pressure Solve
7/23
Quick Fix Fails
This is equivalent for grid-aligned solids
Works great for highly dynamic splashing etc.
Fails miserably in steadier situationsPRESSURE SOLVE
-
7/29/2019 Pressure Solve
8/23
Quick Fix Fails
This is equivalent for grid-aligned solids
Works great for highly dynamic splashing etc.
Fails miserably in steadier situations Fictitious currents emerge and unstably grow
-
7/29/2019 Pressure Solve
9/23
Rethinking the problem
See Batty et al. (tomorrow)
If we keep our fluid blobs constant volume,
incompressibility constraint means:
blobs stay in contact with each other
(no interpenetration, no gaps)
Staying in contact == inelastic, sticky collision
-
7/29/2019 Pressure Solve
10/23
Inelastic, sticky collisions
Take two particles. Interaction force update:
(F is like pressure gradient) Contact constraint is:
(like divergence-free condition)
u1 vu1
1
m1
vF
vu2
vu2
1
m2
vF
u1 u2 0
-
7/29/2019 Pressure Solve
11/23
Inelastic, sticky collisions (2)
Can solve for F to satisfy kinematic constraint
Equivalently, find F that minimizes kinetic energy
of system:
Kinematics comes for free
F argmin1
2m1
vu1
21
2m2
vu2
2
-
7/29/2019 Pressure Solve
12/23
Variational Pressure Solve
Pressure update is fluid particle interaction
Incompressible means no stored energy:
fully inelastic
Thus it must minimize kinetic energy + work
with constraint p=0 on free surface
Can prove its equivalent to regular PDE form!
p argmin 12unew
2
p(n)gtusolidsolid
-
7/29/2019 Pressure Solve
13/23
Variational goodness
The solid wall boundary condition vanishes!
(automatically enforced at minimum)
Discretizing kinetic energy integral much simpler:
Just need average fluid density in each cell, and
volume fraction of fluid inside cell
KE1
2
i 12jkVoli1/2 jk ui 1
2jk
2
ijk
K
-
7/29/2019 Pressure Solve
14/23
Linear System
Plug in discrete pressure update in discrete KE
Quadratic in pressures
Find discrete minimum == solve linear system Linear system guaranteed to be symmetric,
positive definite
In fact, its exactly the same as voxelized
except each term is weighted by volume fractions
-
7/29/2019 Pressure Solve
15/23
Benefits
Actually converges! (error is O(x) or better)
Handles resting case perfectly:
KE is minimized by zeroing out velocity, which we
get from hydrostatic pressure field
Can handle sub-grid-scale geometry
E.g. particles immersed in flow, narrow
channels, hair
Just need to know volume displaced!
-
7/29/2019 Pressure Solve
16/23
Extra goodness
Can couple solids in flow easily:
Figure out formula for discrete pressure update to
solid velocity
Add solids kinetic energy to minimization
Automatically gives two-way strong couplingbetween rigid bodies and flow, perfectly
compatible velocities at boundary, no tangential
coupling
-
7/29/2019 Pressure Solve
17/23
Free Surfaces
The other problem we see with voxelization is free
surface treatment
Physics only sees voxels: waves less than
O(x) high are ignored
At least position errors will converge to zero but
errors in normal are O(1)!
(rendering will always look awful)
-
7/29/2019 Pressure Solve
18/23
Ghost Fluid Method
Due to Fedkiw and coauthors
pi p
i+1
p=0
-
7/29/2019 Pressure Solve
19/23
-
7/29/2019 Pressure Solve
20/23
Ghost Fluid Method
GFM version:
pi p
i+1
p=0
px
pi1 pix
-
7/29/2019 Pressure Solve
21/23
GFM with solids
Complementary to variational solve:
GFM just changes the pressure update
However, for triple junctions (solid+liquid+air) it
gets difficult to make this just right
-
7/29/2019 Pressure Solve
22/23
Reinterpret GFM
The multiple fluid (two-phase) jump conditions:
So take finite difference for Use average fluid density for pressure update
(average between liquid and air)
[p] 0
vugn 0 1
p
n
0
1
pn
-
7/29/2019 Pressure Solve
23/23