mode-splitting for highly detail, interactive liquid simulation h. cords university of rostock...

Post on 15-Jan-2016

217 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Mode-Splitting for Highly Detail, Interactive Liquid

Simulation

H. Cords University of Rostock

Presenter: Truong Xuan Quang

Content

0. Abstract

1. Introduction

2. Related work

3. Our Approach

4. Implement and Result

Abstract

A new technique for highly detailed interactive liquid simulation

Separated low-frequency (LF) and high-frequency (HF)

LF: free surface wave, 2D wave equation

HF: liquid follow, 3D Navier-Stock equation

Rendering in 2.5 D

Simulation liquid follow according to gravity, ground, obstacles and interaction with impacts, moving impact, etc

IntroductionReal-time liquid simulation can be classified as follows:

Empirical (expert) surface simulation

Physically-based surface simulation (wave equation)

Physically-based volume simulation(Navier-Stokes equations )

Introduction

The Goal : mode-splitting to increase quality of the simulate liquid. Moving obstacles, rain, surface wave generation, etc……

Splitting based:

Navier-Stockes based method: Fluid flow, movement of free surface

2D wave equation: fast solve wave equation

Finally combines the advantages of both physically-based approaches

Limitation: not valid in splashing or breaking wave

Related work Simulation and rendering liquids and effected (e.g. [Carlson

et al. 2004] [Hong and Kim 2005] [Guendelman et al. 2005] [Muller et al. 2005]).

The Navier-Stokes equations are usually solved with particle-based systems (e.g Smoothed Particle Hydrodynamics - SPH), [Adabala and Manohar 2002].

In [Stam and Fiume 1995] the first real-time approach using SPH is presented.

Interactive simulation of fluids was introduced in [Stam 1999]

Execution on the GPU with reasonable frame rates [Harris-2005]

Solving the wave equation was presented [Yuksel et al. 2007]

And etc..

Our Approach Goal for simulation: real-time and large scale Lagrangian methods few particlesLiquid volume Small grid size (Eulerain)

Propose model-slitting method to simulate highly detailed surface: described by 2D wave equation is solve by FDM and liquid flow by Navier-Stockes equations there is solve with the (SPH)

Our Approach

Our Approach

For visualization we use a height field-based rendering approach most liquid surface can be rendered appropriately as height fields.

However, complex liquid phenomena, such as breaking waves or splashes, cannot be visualized as height fields.

Mode Splitting

Using oceanography the method is used to simulated high frequency waves is external gravity waves-included by tide and atmospheric pressure, water waves, free surface water.

And low frequency waves Internal gravity wave included by wind and density gradients, vertical turbulences.

Different algorithms are used, external and internal algorithms are solved separately with different time steps

c : speed of lightl :amplify frequencyNth mode

Mode Splitting Moving external waves need to be solved at small

time steps

The slow moving internal waves are more expensive to solve (due to complex turbulences), large time step can be used

We used the 2D equation for surface simulation and a 3D SPH-based Navier-Stokes equations solver for volume flow simulation

Surface simulation

The general wave equation describes the propagationsof wave in time t and space x, liquid surface wave the 2DWave equation can be used, describing the circular wavePropagation

Laplace operator in 2D and c is the velocity at the which wave propagate acrossThe wave equation can be solved with Eulerian finite difference approach

Implicit different method

2),(2

),(2

t

txutxuc

,0)()0,(

0,0),(),0(

0,0

lxxfxu

ttlutu

tlxi

α is constant, m>0 is integer and time step size k>0, with h=l/m

ihxi for each i=0, 1…, m

jkt j for each i=0, 1…, m

Implicit different method

02)(

)1t,i(x)t,iu(x2)1t,iu(x2)2(

)it,12(x)t,u(x2)t,12u(x2α2)1(

)it,11(x)t,u(x2)t,11u(x2α

22

)t,1(x)t,iu(x2)t,1iu(x)it,i(x2

2x

u2

21

)it,11(x)t,u(x2)t,11u(x)it,(x

21x

u2

2)1it,(x)t,u(x2)1t,u(x

)it,1(x2t

u2

t

iuii

x

uiii

x

iii

x

iiii

x

iiii

it

iiiii

i

Implicit different method

2/1/

xtry

xtrx

)1,()),12(),12((2

)),11(),11((2),()]22(22[)1,(

itxiuitxuitxury

itxuitxurxitixuryrxitixu

1 2 3

1. Several radius wave propagations2. Rain-Drop 3. A swimming object is moving

Liquid simulation

)0( t

p

Navier-Stokes equations

Conservation of mass (continuity equation ) in rest position

V is velocity filed Ρ the pressure field μ: viscosity f: external force

Incompressible liquids, density is constant

Resulting in the mass conservation

0v

Simple and fast handling of boundary conditions as collisions

Mass conservation is guaranteed (number of particles = const; mass of each particle = const)

Nonlinear convective acceleration can be neglected

SPH for real-time simulation

vv ).(

SPHSPH (Smooth Particle Hydro-dynamics) is an simulation method for particle systems defined at discrete particle locations can be evaluated everywhere in the space.

Continuous field quantities distributed in the localneighborhood according to the discrete particle positions andthe smoothing kernels Wh(x).

Scalar quantities A(x) can be estimated for n particles as :

SPHPressure force

External force

Viscosity forceneglected

Smoothing kernel for pressure and viscosity

SPH

a(t0)v(t0)xi(t0)

tiv a(t0+Δt)v(t0+ Δt)xi(t0+ Δt)

The liquid volume is discredited by particles

z

preshW

yi

xi

zi

x

preshW

y

preshW

SPH

CollisionsCollisions of liquids particles with objects are using a force vector field surrounding collision objects

Where d is the closet distance between object and particle nObject is normal vector of the object at the points closet objectFcol: is acting on each particle being close to collision objects

V: reflect velocity, friction coefficient

Free surface Extraction Generated height surface: number of neighbors potential Φ

for n particles with position xi (i=1..n) is determined by the following spherical potential

These particles can be detected according to their actual number of neighbors

Threshold (condition of the smoothness), to reduce unwanted surface ripples cause by the discrete sampling of the liquids

Free surface Extraction (2/2)

Depending kinetic energy

n particlesvi velocitiesmi mass (i=1..m)

If Ekin exceeds a defined of threshold, no smoothing occurs

Else bellow threshold, the number of smoothing steps is increased, until the Maximum number of smoothing step is reach

Simulation time-steps

Surface simulation (wave equation) and volume simulation (SPH) should be synchronized

be integer fraction Ntime of

WE-TS

N-S TS

Example of time step (TS)Synchronization, Ntime=3WE is solved 3 times, whileNavier-Stockes is solve once

Combine surface and volume simulation Final surface just depends on the different field

resolution

SPH generated surface Xsph x Ysph

Wave equation surface size XWE x YWE

Rendering (1/2)

Using cube map contain the environment for approximating the effects.

Surface variation (position and normal) calculating reflection and refraction vectors.

Reflection and refraction is described by Fresnel equation.

Rendering (2/2)

•Planar light map is generated via light ray tracing using Snell’s law

•Other liquid can be also applied, simple liquid like:

milk, cola, oil.

SPH WE

4.1 Implementation and Results

Using OpenGL 2.0 and shading language GLSL in C++, dual core PC 2.6 GHz AMD Athlon 64 CPU.

2 GBs of RAM and graphics card ATIRadeon x 1900 GPU.

Using Parallel implementation with one core simulation SPH and one core solving wave equation

4.1 Implementation and Results

Performance of the technique mainly depend on the following parameter:

Number of SPH particles

XSPH . YSPH

XWE . YWE

Results of experiments show that SPH simulation account for 40-70% of the run time-less than 4000 particles.

Disadvantage is impossible to visualize 3D liquid effects like: splashes, breaking waves, cause by 2.5D rendering approach

(2D WE + 3D SPH+ rendering)=2.5D

4.1 Implementation and Results

Advantaged: Volume interaction (moving glass of water, obstacles) Surface interaction (rain, moving objects) Automatic, natural and global flow Object moving with the follow Simulation pool or sea

4.2 Conclusion and future work Simulation of the low frequency liquid flow and the high

frequency free surface waves are separated

2D WE and 3D fluid (SPH-method) presented realistic and highly detailed results

Future works: Simulation in real-time environments at high frame rates,

better rendering approach.

GPU or PPU (Physic Processing Unit) for physical calculations.

Applied for larger liquid volume

top related