Simulating Fluids in CG - PowerPoint PPT Presentation

1 / 38
About This Presentation
Title:

Simulating Fluids in CG

Description:

We cannot model sound waves. We cannot model shock waves. Speed must be below speed of sound. Mathematical tools. Divergence. Gauss' Theorem ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 39
Provided by: michaelba1
Category:
Tags: fluids | of | simulating | sound | speed

less

Transcript and Presenter's Notes

Title: Simulating Fluids in CG


1
Simulating Fluids in CG
  • The Equations of Fluids

2
Last Time
  • Introduction to smoke and water simulations in
    computer graphics
  • Brief overview of state-of-the-art
  • Brief overview of course
  • The project and exam
  • Rendering of participating media
  • Ray marching

3
This Lecture
  • The equations of fluids
  • Pressure
  • Hydrostatic equilibrium
  • Differential operators Gradient, divergence
  • Incompressible Euler Equations
  • Gauss Theorems

4
Incompressible Euler Equations
Momentum and continuity equations for ideal
fluids
In this course we assume that the fluid has
constant density equal to one and ignore
viscosity.
5
The Chaotic Nature of the Equations
6
Incompressibility
  • We model smoke (air) and water as incompressible.
    Is this a safe assumption?
  • We cannot model sound waves
  • We cannot model shock waves
  • Speed must be below speed of sound
  • Mathematical tools
  • Divergence
  • Gauss Theorem

7
Incompressibility
n
W
Consider the mass of fluid inside the volume
Mass cannot be created or destroyed, so how can
it change?
8
Incompressibility
v
v
n
W
v
Mass flow out of small surface area is given by
Change of mass inside is given by
9
Gauss Theorem
  • Gauss theorem comes in several variants.
  • Here, we use the following

10
The Divergence
  • The divergence is a vector differential operator,
    i.e. it differentiates a vector. Let V be a 3D
    vector
  • The divergence is defined as
  • What is the intuitive meaning of divergence?

11
Incompressibility
v
v
n
W
v
Change of mass inside is given by
12
Incompressibility
Incompressibility means
Since this must be true for any volume
13
Incompressible Euler Equations
The continuity equation thus means Conservation
of mass
The velocity field is called divergence-free
14
Newtons Second Law
  • F ma

Net force mass x acceleration
  • Force and acceleration are vectors
  • Given the forces we can integrate to find
    velocity and position

15
Hydrostatic Equilibrium
V 0
Consider water in equilibrium
  • a 0
  • F 0

(net force)
Which forces are in play?
Answer Gravity and pressure.
16
What is Pressure?
  • Pressure, p, is force per area.
  • Pressure is a contact force (per area).
  • Pressure acts orthogonal to any (imaginary)
    surface.
  • Pressure is a compression force (per area)
  • Pressure is independent of orientation.
  • Pressure is a scalar quantity.

Given a body immersed in a fluid, how do we
determine the force resulting from pressure?
17
Force From Pressure
n
W
18
Hydrostatic Equilibrium
V 0
  • a 0
  • F 0

W
What does the force balance look like?
19
Rewriting Force-Balance to Volume Integral
  • Rewriting the first integral to a volume integral
    requires
  • Definition of the gradient
  • The Gauss Theorem

20
The Gradient
  • The gradient of a scalar function (e.g.
    density/pressure) is a vector that points in the
    direction of maximal change
  • Is normal to
  • iso-surfaces/
  • level sets
  • We will utilize the gradient a lot of times!

21
Gauss Theorem Again
  • Gauss theorem comes in several variants.
  • Here, we use the following

22
Local Hydrostatic Equilibrium
  • Because the volume we look at is arbitrary, the
    integrand (force-density) must be zero.

23
Incompressible Euler Equations
Hydrostatic Equilibrium
What is the connection and intuition?
Intuition R.h.s. are body and contact
force-densities. In which
direction does point?
24
Hydrostatic Pressure
p0
e2
W
h
B
p1
25
Newtons Second Law
  • F ma

Net force mass x acceleration
We wish to consider Newtons second law in
context of a fluid
How should we apply Newtons second law?
26
Lagrangian vs Eulerian Viewpoints
Lagrangian We look at varying points in space
(particles)
Eulerian We look at fixed points in space
Each point has an associated Position, mass,
velocity, acceleration, density
27
Newtons Second Law in Stationary Frame
We consider Newtons second law in a stationary
point.
Consider a stationary velocity field (steady
flow)
Does not work!
What is the acceleration
?
0
28
Newtons Second Law in Co-Moving Frame
  • We consider Newtons second law applied to a
    small (material) particle moving along with the
    flow

Force per volume
For density equal to 1
We must now make a connection between Newtons
second law in a co-moving (Lagrangian) frame and
our Eulerian frame.
29
Newtons Second Law in Co-Moving Frame
We write the acceleration of a material particle
as
The velocity field depends on position and time
The particles flow along curves x(t)
Essentially we wish to sample the velocity of the
co-moving particles at stationary positions in
the domain.
30
Newtons Second Law in Co-Moving Frame
31
Incompressible Euler Equations
Newtons second law
  • F ma

Incompressible Euler Equations
What is the connection and intuition?
32
Whiteboard Exercise
  • Lets make sure we understand the components of
    the Incompressible Euler Equations!

33
Pressure Re-Visited
  • Pressure is whatever-it-takes-to-make-the-velocit
    y-field-divergence-free.
  • What does this mean and how do we solve for it in
    practice?

34
Pressure Re-Visited
A Poisson Equation
35
Pressure Re-Visited
Pressure is whatever-it-takes-to-make-the-veloci
ty- field-divergence-free
36
Boundary Conditions
  • Free-slip (no-stick)
  • No-slip (stick)

Static
Moving
With free-slip there are no constraints on
tangential component
37
Additional Resources
  • Book Mathematical Methods for Physicists
  • Web www.mathworld.com and http//en.wikipedia.org

38
Next Two Times
  • How to solve the Incompressible Euler Equations
    numerically
  • Advection
  • Adding forces
  • Solving the Poisson equation for pressure
Write a Comment
User Comments (0)
About PowerShow.com