fluid simulation

9
Fluid Simulation Koray Balcı Işık Barış Fidaner

Upload: isik-baris-fidaner

Post on 16-Mar-2016

215 views

Category:

Documents


2 download

DESCRIPTION

Fluid simulation

TRANSCRIPT

Page 1: Fluid Simulation

Fluid Simulation

Koray BalcıIşık Barış Fidaner

Page 2: Fluid Simulation

Level set

• Implicit signed distance function• Negative inside, positive outside• Isocontour at zero is the surface.

• Evolves in time by eqn:

Page 3: Fluid Simulation

Particles

• Level set methods tend to lose volume

• Particles are added to prevent this loss.

• Each particle adds tolevel set equation by:(r: radius, s: sign of particle (inside / outside))

• Then surface is smoothed by a function S.

Only levelsets

Level setswith particles

Page 4: Fluid Simulation

3D grid of cells• Pressures at the

center of cells

• Velocities at the faces of cells

• High resolution Euler grid

• Low resolution Navier-Stokes subgrid

Page 5: Fluid Simulation

The Navier-Stokes Equations

1) Incompressibility. No fluid flows out of the cell, mass is conserved.

(: viscosity, : density, p: pressure, g: gravity)

2) Velocity and pressure fields are related through conservation of momentum.

(u: velocity field)

Page 6: Fluid Simulation

Solving Navier-Stokes

i) Initial velocity field at a time step

ii) Firstly, forces are added to the velocity field.

Velocity field u is updated after each time step through 4 operations:

u(t) add force advect diffuse project u(t+1)

Page 7: Fluid Simulation

Solving Navier-Stokes

iii) Semi-Lagrangian method for stability of fluid movement. Velocity is traced back in one time step. Thus, momentum is carried forward in time.

iv) Diffusion (viscousity) of the fluid is realized in this step.

Page 8: Fluid Simulation

Solving Navier-Stokes

v) Finally, incompressibility is enforced.

By using Helmholtz-Hodge Decomposition, a vector field can be divided into a divergence free vector field and the gradient of a scalar field.

In this step, we find the divergence-free part of the velocity field.

Page 9: Fluid Simulation

Time step limitations

• Timestep must be short enough that no significant change occurs.

• Width of a cell, divided by maximum velocity

• CFL (Courant-Friedrichs-Levy) condition: