FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac...

30
FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology

Transcript of FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac...

Page 1: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

FlowFixer: Using BFECC for Fluid Simulation

ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac

Georgia Institute of Technology

Page 2: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

ContentsContents

• Abstract

• Introduction

• Previous Work

• Fluid Simulation

• The BFECC Method

– BFECC for Velocity Advection

– BFECC for Smoke Density and Image Advection

– BFECC for Level Set Advection

• Results

• Conclusion

Page 3: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

AbstractAbstract

• Back and Forth Error Compensation and Correction (BFECC)

• Reduce dissipation and diffusion

– First order upwinding or semi-Lagrangian integration

– Second order accuracy both in space and time

• Animation : Image advection, Smoke, Water

Page 4: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

Dissipation Example Dissipation Example

• The function moves to the left

Page 5: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

Dissipation Example Dissipation Example

• To appear dissipation

Interpolation

Page 6: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

IntroductionIntroduction

• Simulation based on Navier-Stokes equation

– Smoke : density

– Image advection : colored density

– Water : level-set

• First order semi-Lagrangian

– Numerical diffusion and dissipation

– Higher order schemes : WENO or CIP

Page 7: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

Introduction Introduction (Con’t)

• BFECC

– Easily

– Very simple

• Combine particle level set method

– Reduced the volume loss

Page 8: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

Previous Work

• Stable fluid [1999]

– Semi-Lagrangian treatment

• Visual simulation of smoke [2001]

– Smoke simulation

– Vorticity is added

• Practical animation of liquids Animation [2001]

• Animation and rendering of complex water surface

– Free surface flows

Page 9: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

Previous Work (Con’t)

• Constrained Interpolation Profile [CIP]– Yabe and Aoki [1991]

– Stable but nondissipative water [2005]

– To include velocity and partial derivatives advecting

Page 10: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

What’s CIPWhat’s CIP

• Constrained Interpolation Profile

Include partial derivatives

Page 11: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

Previous Work (Con’t)

• Particle level-set method– volume preservation

Particle Level-set Method

Page 12: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

컴퓨터 그래픽스 연구실

The Equations of FlowThe Equations of Flow

• Navier-Stokes equation

– Velocity vector field u = (u, v, w)

0 u

u p f t

: velocity : density : pressure

: viscosity : external force : time step

fuuuu

2v

p

t

Page 13: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

Fluid Simulation

fuuuu

p

vt )()(

fuuuuu

)()(* nnn

n

t

p

t

n

*uu

*2 u

t

p

ptn

*1 uu

Split

Project term

Advect term Diffuse term

Page 14: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

Fluid Simulation

*2 u

t

p

• Project term

– To solve Poisson equation

Page 15: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

The BFECC Method

• Velocity (u,v,w), density, RGB, level-set

• First order upwinding or semi-Lagrangian integration

Page 16: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

Implementation of BFECC

• BFECC is implemented as:

Page 17: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

Implementation of BFECC

~n 1~ n ~

Page 18: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

BFECC for Velocity Advection

• BFECC needs to be turned off

– Multiphase flow

– To prevent velocities of different fluids

– To prevent different densities

– |φ| < 5∆x

Page 19: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

BFECC for Velocity Advection

BFECC in velocity advection on a 80×200 grid.

small scale details as well as large scale fluctuations

Page 20: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

BFECC for Velocity Advection

The bottom row is simulated with BFECCThe cup tumbles thanks to the reduced damping in velocity field

Page 21: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

BFECC for Smoke Density and Image Advection

Advection of an image100×250 grid

Page 22: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

BFECC for Smoke Density and Image Advection

bubble rising and bursting

Page 23: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

BFECC for Smoke Density and Image Advection

• To measure the diffusion/dissipation amount

– test problem similar to Zalesak’s problem

(800×800 grid, CFL = 6.29)B : original imageC: without BFECC time 0.156 secD: with BFECC time 0.36 sec

Page 24: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

BFECC for Level Set Advection

• Redistancing equation

• Semi-Lagrangian style integration

Page 25: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

What’s Redistancing (Reinitialize)What’s Redistancing (Reinitialize)

0

0Reinitialize

water

Air

0

Using Fast-marching Method orRedistancing equation

Page 26: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

BFECC for Level Set Advection

• Turning redistancing off near the interface

• Following two conditions

Page 27: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

BFECC for Level Set Advection

• First order semi-Lagrangian implementation of level set advection

Without BFECC With BFECCTo reduced volume loss

Page 28: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

BFECC for Level Set Advection

Left : Without BFECC

Right : With BFECC

highly dynamic behaviorof water interaction with air, air bubbles, and solid

Page 29: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

Results

• Using PovRay

• To implement the rigid fluid method

• 30 ~130 seconds per time step on 703 GRID

Page 30: FlowFixer: Using BFECC for Fluid Simulation ByungMoon Kim Yingjie Liu Ignacio Llamas Jarek Rossignac Georgia Institute of Technology.

• Adding BFECC with a trivial amount of code

– Velocity, smoke density, image or level set advections

– Reducing diffusion and dissipation

– Preserving volume

Conclusion