fluid & rigid body interaction
DESCRIPTION
Fluid & Rigid Body Interaction. Comp 259 - Physical Modeling Craig Bennetts April 25, 2006. Motivation. Fluid/solid interactions are ubiquitous in our environment Realistic fluid/solid interaction is complex not feasible through manual animation. Types of Coupling. - PowerPoint PPT PresentationTRANSCRIPT
University of North Carolina - Chapel HillUniversity of North Carolina - Chapel Hill
QuickTime™ and aTIFF (LZW) decompressor
are needed to see this picture.
Fluid & Rigid Body Interaction
Fluid & Rigid Body Interaction
Comp 259 - Physical ModelingCraig BennettsApril 25, 2006
Comp 259 - Physical ModelingCraig BennettsApril 25, 2006
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
MotivationMotivation
Fluid/solid interactions are ubiquitous in our environment
Realistic fluid/solid interaction is complex not feasible through manual animation
Fluid/solid interactions are ubiquitous in our environment
Realistic fluid/solid interaction is complex not feasible through manual animation
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
Types of CouplingTypes of Coupling
One-way solid-to-fluid reaction
One-way fluid-to-solid reaction
Two-way coupled interaction
One-way solid-to-fluid reaction
One-way fluid-to-solid reaction
Two-way coupled interaction
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
Solid-to-Fluid Reaction
Solid-to-Fluid Reaction
The solid moves the fluid without the fluid affecting the solid
Rigid bodies are treated as boundary conditions with set velocities
Foster and Metaxas, 1997 Foster and Fedkiw, 2001 Enright et al., 2002b
The solid moves the fluid without the fluid affecting the solid
Rigid bodies are treated as boundary conditions with set velocities
Foster and Metaxas, 1997 Foster and Fedkiw, 2001 Enright et al., 2002b
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
Fluid-to-Solid Reaction
Fluid-to-Solid Reaction
The fluid moves the solid without the solid affecting the fluid
Solids are treated as massless particles Foster and Metaxas,1996
The fluid moves the solid without the solid affecting the fluid
Solids are treated as massless particles Foster and Metaxas,1996
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
One-Way InadequacyOne-Way Inadequacy
Fails to simulate true fluid/solid interaction Reactive as opposed to interactive
Fails to simulate true fluid/solid interaction Reactive as opposed to interactive
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
Two-Way Interaction Methods
Two-Way Interaction Methods
Volume Of Fluid and Cubic Interpolated Propagation (VOFCIP)
Arbitrary Lagrangian-Eulerian (ALE) Distributed Lagrange Multiplier (DLM) Rigid Fluid
Volume Of Fluid and Cubic Interpolated Propagation (VOFCIP)
Arbitrary Lagrangian-Eulerian (ALE) Distributed Lagrange Multiplier (DLM) Rigid Fluid
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
VOFCIP methodVOFCIP method
Takahashi et al. (2002,2003) Models forces due to hydrostatic
pressure neglects dynamic forces and torques due
to the fluid momentum
Only approximates the solid-to-fluid coupling
Takahashi et al. (2002,2003) Models forces due to hydrostatic
pressure neglects dynamic forces and torques due
to the fluid momentum
Only approximates the solid-to-fluid coupling
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
ALE methodALE method
Originally used in the computational physics community [Hirt et al. (1974)]
Finite element technique Drawbacks:
computational grid must be re-meshed when it becomes overly distortion
at least 2 layers of cell elements are required to separate solids as they approach
Originally used in the computational physics community [Hirt et al. (1974)]
Finite element technique Drawbacks:
computational grid must be re-meshed when it becomes overly distortion
at least 2 layers of cell elements are required to separate solids as they approach
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
DLM methodDLM method
Originally used to study particulate suspension flows [Glowinski et al. 1999]
Finite element technique Does not require grid re-meshing Ensures realistic motion for both fluid
and solid
Originally used to study particulate suspension flows [Glowinski et al. 1999]
Finite element technique Does not require grid re-meshing Ensures realistic motion for both fluid
and solid
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
DLM Method (cont.)DLM Method (cont.)
Does not account for torques Restricted to spherical solids Surfaces restricted to be at least 1.5 times the velocity element size apart requires application of repulsive force
Does not account for torques Restricted to spherical solids Surfaces restricted to be at least 1.5 times the velocity element size apart requires application of repulsive force
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
Prior Two-Way Limitations
Prior Two-Way Limitations
Solids simulated as fluids with high viscosity ultimately results in solid deformation,
which is undesirable in modeling rigid bodies
Do not account for torque on solids Boundary proximity restrictions
Solids simulated as fluids with high viscosity ultimately results in solid deformation,
which is undesirable in modeling rigid bodies
Do not account for torque on solids Boundary proximity restrictions
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
Rigid Fluid MethodRigid Fluid Method
Carlson, 2004 Extends the DLM method
except uses finite differences
Uses a Marker-And-Cell (MAC) technique
Pressure projection ensures the incompressibility of fluid
Carlson, 2004 Extends the DLM method
except uses finite differences
Uses a Marker-And-Cell (MAC) technique
Pressure projection ensures the incompressibility of fluid
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
Rigid Fluid Method (cont.)
Rigid Fluid Method (cont.)
Treats the rigid objects as fluids: Ensures rigidity through rigid-body-motion
velocity constraints within the object Avoids need to directly enforce boundary
conditions between rigid bodies and fluid approximately captured by the projection
techniques
Uses conjugate-gradient solver
Treats the rigid objects as fluids: Ensures rigidity through rigid-body-motion
velocity constraints within the object Avoids need to directly enforce boundary
conditions between rigid bodies and fluid approximately captured by the projection
techniques
Uses conjugate-gradient solver
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
Semi-Lagrangian MethodSemi-Lagrangian Method
Advantage: simple to use
Disadvantage: additional numerical dampening to the
advection process
Uses conjugate-gradient solver
Advantage: simple to use
Disadvantage: additional numerical dampening to the
advection process
Uses conjugate-gradient solver
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
Computational DomainsComputational Domains Distinct computational domains for fluid
(F) and rigid solids (R) within the entire domain (C):
Distinct computational domains for fluid (F) and rigid solids (R) within the entire domain (C):
€
C = F ∪R
QuickTime™ and aTIFF (LZW) decompressor
are needed to see this picture.
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
Marker-And-Cell Technique
Marker-And-Cell Technique
Harlow and Welch (1965) Harlow and Welch (1965)
QuickTime™ and aTIFF (LZW) decompressor
are needed to see this picture.€
u = u,v,w( )
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
MAC Technique (cont.)MAC Technique (cont.)
Well suited to simulate fluids with relatively low viscosity
Permits surface ripples, waves, and full 3D splashes
Disadvantage: cannot simulate high viscosity fluids (with
free surfaces) without reducing time step significantly
Well suited to simulate fluids with relatively low viscosity
Permits surface ripples, waves, and full 3D splashes
Disadvantage: cannot simulate high viscosity fluids (with
free surfaces) without reducing time step significantly
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
MAC Boundary Conditions
MAC Boundary Conditions
Can use any combination of Dirichlet or Neumann boundary conditions between fluid and air
there must be at least one empty air cell represented in the matrix used to solve the system or will be singular (cannot be inverted uniquely)
Can use any combination of Dirichlet or Neumann boundary conditions between fluid and air
there must be at least one empty air cell represented in the matrix used to solve the system or will be singular (cannot be inverted uniquely)
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
Fluid DynamicsFluid Dynamics
Navier-Stokes Equations Incompressible fluids
Conservation of mass:
Conservation of momentum:
Navier-Stokes Equations Incompressible fluids
Conservation of mass:
Conservation of momentum:
€
∇⋅u = 0
€
ut = − u ⋅∇( )u +∇ ⋅ ν∇u( ) −1
ρ∇p + f
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
Simplifying AssumptionSimplifying Assumption
For fluids of uniform viscosity More familiar momentum diffusion form
For fluids of uniform viscosity More familiar momentum diffusion form
€
ut = − u ⋅∇( )u + ν∇ 2u −1
ρ∇p + f
€
ut = − u ⋅∇( )u +∇ ⋅ ν∇u( ) −1
ρ∇p + f
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
NotationNotation
Fluid velocity:
Time derivative:
Kinematic viscosity:
Fluid density:
Scalar pressure field:
Fluid velocity:
Time derivative:
Kinematic viscosity:
Fluid density:
Scalar pressure field:€
ut = ∂u∂t
€
u = u,v,w( )
€
ν
€
ρ
€
p
€
∇⋅u = 0
€
ut = − u ⋅∇( )u + ν∇ 2u −1
ρ∇p + f
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
Differential OperatorsDifferential Operators
Gradient:
Divergence:
Vector Laplacian:
Gradient:
Divergence:
Vector Laplacian:€
∇⋅u = 0
€
∇p = px, py, pz( )
€
∇⋅u = ux +vy + wz
€
∇2u =∇ ∇ ⋅u( ) −∇ × ∇ × u( )€
ut = − u ⋅∇( )u + ν∇ 2u −1
ρ∇p + f
€
∇×u =
ˆ x ˆ y ˆ z ∂∂x
∂∂y
∂∂z
u v w
Curl:Curl:
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
Conservation of MassConservation of Mass
Velocity field has zero divergence amount of fluid entering the cell is equal to
the amount leaving the cell
Velocity field has zero divergence amount of fluid entering the cell is equal to
the amount leaving the cell
€
∇⋅u = 0
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
Conservation of MomentumConservation of Momentum
The advection term accounts for the direction in which the surrounding fluid pushes a small region of fluid
The advection term accounts for the direction in which the surrounding fluid pushes a small region of fluid
€
ut = − u ⋅∇( )u + ν∇ 2u −1
ρ∇p + f
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
Conservation of MomentumConservation of Momentum
The momentum diffusion term describes how quickly the fluid damps out variation in the velocity surrounding a given point
The momentum diffusion term describes how quickly the fluid damps out variation in the velocity surrounding a given point
€
ut = − u ⋅∇( )u + ν∇ 2u −1
ρ∇p + f
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
Conservation of MomentumConservation of Momentum
The pressure gradient describes how a small parcel of fluid is pushed in a direction from high to low pressure
The pressure gradient describes how a small parcel of fluid is pushed in a direction from high to low pressure
€
ut = − u ⋅∇( )u + ν∇ 2u −1
ρ∇p + f
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
Conservation of MomentumConservation of Momentum
The external forces per unit mass that act globally on the fluid e.g. gravity, wind, etc.
The external forces per unit mass that act globally on the fluid e.g. gravity, wind, etc.
€
ut = − u ⋅∇( )u + ν∇ 2u −1
ρ∇p + f
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
Overview of Fluid Steps
Overview of Fluid Steps
1. Numerically solve for the best guess velocity without accounting for pressure gradient
2. Pressure projection to re-enforce the incompressibility constraint
1. Numerically solve for the best guess velocity without accounting for pressure gradient
2. Pressure projection to re-enforce the incompressibility constraint
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
1. Best Guess Velocity1. Best Guess Velocity
€
ut = − u ⋅∇( )u + ν∇ 2u −1
ρ∇p + f
€
˜ u t = − u ⋅∇( )u + ν∇ 2u + f
€
˜ u = u + ˜ u tΔt
€
˜ u = u + − u ⋅∇( )u + ν∇ 2u + f[ ]Δt
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
2. Pressure Projection2. Pressure Projection
€
un +1 = ˜ u −1
ρ∇p
⎡
⎣ ⎢
⎤
⎦ ⎥Δt
€
∇⋅un +1 = 0
€
∇⋅˜ u −Δt
ρ∇ ⋅ ∇p( ) = 0
€
Δt∇ 2 p = ρ∇ ⋅ ˜ u
Solve for p and plug back in to find un+1
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
Rigid Body DynamicsRigid Body Dynamics
Typical rigid body solver: rigidity is implicitly enforced due to the nature of
affine transformations (translation and rotation about center of mass)
Rigid fluid solver: rigid body motion is determined using the
Navier-Stokes equations requires a motion constraint to ensure rigidity of
the solid
Typical rigid body solver: rigidity is implicitly enforced due to the nature of
affine transformations (translation and rotation about center of mass)
Rigid fluid solver: rigid body motion is determined using the
Navier-Stokes equations requires a motion constraint to ensure rigidity of
the solid
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
Conservation of Rigidity
Conservation of Rigidity
Similar to the incompressibility constraint presented for fluids, but more strict The rigidity constraint is not only divergence
free, but deformation free The deformation operator (D) for a vector
velocity field (u) is:
Rigid body constraint is : (in R)
Similar to the incompressibility constraint presented for fluids, but more strict The rigidity constraint is not only divergence
free, but deformation free The deformation operator (D) for a vector
velocity field (u) is:
Rigid body constraint is : (in R)
€
D u[ ] = 12 ∇u +∇uT[ ]
€
D u[ ] = 0
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
Conservation of Momentum
Conservation of Momentum
For fluid:
For rigid body:
is implicitly defined as an extra part of the deformation stress
For fluid:
For rigid body:
is implicitly defined as an extra part of the deformation stress
€
ut = − u ⋅∇( )u + ν∇ 2u −1
ρ f
∇p + f
€
ut = − u ⋅∇( )u +∇ ⋅Π −1
ρ r
∇p + f
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
Governing EquationsGoverning Equations
For fluid (F):
For rigid body (R):
For fluid (F):
For rigid body (R):
€
ut = − u ⋅∇( )u + ν∇ 2u −1
ρ f
∇p + f
€
ut = − u ⋅∇( )u +∇ ⋅Π −1
ρ r
∇p + f
€
D u[ ] = 0€
∇⋅u = 0
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
ImplementationImplementation
1. Solve Navier-Stokes equations2. Calculate rigid body forces3. Enforce rigid motion
1. Solve Navier-Stokes equations2. Calculate rigid body forces3. Enforce rigid motion
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
1. Solve Navier-Stokes1. Solve Navier-Stokes
Solve fluid equations for the entire computational domain: C = F R Rigid objects are treated exactly as if they were
fluids Perform two steps as described in fluid
dynamics section Result:
divergence-free intermediate velocity field collision and relative density forces of the rigid
bodies are not yet accounted for
Solve fluid equations for the entire computational domain: C = F R Rigid objects are treated exactly as if they were
fluids Perform two steps as described in fluid
dynamics section Result:
divergence-free intermediate velocity field collision and relative density forces of the rigid
bodies are not yet accounted for
€
u → ˜ u
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
2. Calculate Rigid Body Forces
2. Calculate Rigid Body Forces
Rigid body solver applies collision forces to the solid objects as it updates their positions These forces are included in the velocity field to
properly transfer momentum between the solid and fluid domains
Account for forces due to relative density differences between rigid body and fluid:
Rigid body solver applies collision forces to the solid objects as it updates their positions These forces are included in the velocity field to
properly transfer momentum between the solid and fluid domains
Account for forces due to relative density differences between rigid body and fluid:
€
ρr
ρ f
=>1,
<1,
⎧ ⎨ ⎩
sinks
rises and floats
€
˜ u → ˆ u
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
3. Enforce Rigid Motion
3. Enforce Rigid Motion
Use conservation of rigidity and solve for the rigid body forces, R similar to the pressure projection step in
the fluid dynamics solution (: but crazier :)
Use conservation of rigidity and solve for the rigid body forces, R similar to the pressure projection step in
the fluid dynamics solution (: but crazier :)
€
ˆ u → ut +Δt
€
D ut +Δt[ ] = D ˆ u +
Δt
ρ r
R ⎡
⎣ ⎢
⎤
⎦ ⎥= 0
University of North Carolina - Chapel Hill
University of North Carolina - Chapel Hill
Rigid Fluid AdvantagesRigid Fluid Advantages
Relatively straightforward to implement Low computational overhead
scales linearly with the number of rigid bodies Can couple independent fluid and rigid body
solvers Permits variable object densities and fluid
viscosities Allows dynamic forces and torques
Relatively straightforward to implement Low computational overhead
scales linearly with the number of rigid bodies Can couple independent fluid and rigid body
solvers Permits variable object densities and fluid
viscosities Allows dynamic forces and torques