Validation of Magmasoft Simulation of the Sand Casting Process
Sand Simulation
-
Upload
keegan-morrow -
Category
Documents
-
view
20 -
download
1
description
Transcript of Sand Simulation
![Page 1: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/1.jpg)
May 6, 2009 1
![Page 2: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/2.jpg)
MotivationMotivation
Movies, games
Engineering design – grain silos
Avalanches, Landslides
May 6, 2009 2
Spiderman 3 The Mummy
www.stheoutlawtorn.com
![Page 3: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/3.jpg)
OverviewOverview
What are Granular Materials?
Proposed Model
Actual Progress
May 6, 2009 3
![Page 4: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/4.jpg)
OverviewOverview
What are Granular Materials?
Proposed Model
Actual Progress
May 6, 2009 4
![Page 5: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/5.jpg)
What are Granular Materials?What are Granular Materials?
A granular material is a conglomeration of discrete solid, macroscopic particles characterized by a loss of energy whenever the particles interact (Wikipedia)
Size variation from 1μm to icebergs
Food grains, sand, coal etc.
Powders – can be suspended in gas
May 6, 2009 5
![Page 6: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/6.jpg)
What are Granular materials?What are Granular materials?
Can exist similar to various forms of matter
Gas/Liquid – powders can be carried by velocity fields
Sandstorms
Liquid/Solid – similar to liquids embedded with multiple solid objects
Avalanches, landslides
Hourglass
Similar to viscous liquids
May 6, 2009 6
![Page 7: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/7.jpg)
Why the separate classification?Why the separate classification?
Behavior not consistent with any one state of matter
1. Can sustain small shear stresses – stable piles
Hydrostatic pressure achieves a maximum
2. Particle interactions lose energy
Collisions approach inelastic
Infinite collisions in finite time – inelastic collapse
3. Inhomogeneous and anisotropic
Particle shape and size inhomogeneous
May 6, 2009 7
Granular solids, liquids, and gases – Jaeger et al.
![Page 8: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/8.jpg)
Understanding the behavior - Understanding the behavior - StressStress
Stress
At equilibrium – matrix is symmetric – 6 degrees of freedom
Pressure for fluids – tr(σ)/ 3
May 6, 2009 8
A
F
zzzyzx
yzyyyx
xzxyxx
y
z
y
zShear
Normal
![Page 9: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/9.jpg)
StressStress
Different matrix for different basis – need invariants
Pressure! – I0
Deviatoric invariants – Invariants based on J1,J2
Eigen values? – called principle stresses
May 6, 2009 9
0I
![Page 10: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/10.jpg)
Understanding the behaviorUnderstanding the behavior
Why can sand sustain shear stress?
Friction between particles
When does it yield? – yield surface/condition
May 6, 2009 10
![Page 11: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/11.jpg)
Yield surfaceYield surface
Many surfaces – suitable for different materials
Mohr Coulomb surface with Von-Mises equivalent stress – f(I0, J1)
Condition for stability/rigidity:
sinΦ – coefficient of friction
May 6, 2009 11
30
trI m
21
FmJ
sin3 01 IJ
![Page 12: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/12.jpg)
So why is it difficult to simulate?So why is it difficult to simulate?
Scale - >10M particles
Nonlinear behavior – yield surface
Representation – discrete or continuum?
May 6, 2009 12
![Page 13: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/13.jpg)
SimulationSimulation
Depends on what scenario to simulate
Discrete particles – Particle-Based Simulation of Granular Materials, Bell et al.
Continuum – Animating Sand as a Fluid, Zhu et al.
May 6, 2009 13
![Page 14: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/14.jpg)
Particle-Based Simulation of Granular Particle-Based Simulation of Granular MaterialsMaterials
Use a particle system with collision handling
Define objects in terms of spheres
Need to define per sphere pair interaction forces
Collision system based on Molecular Dynamics
Allow minor spatial overlap between objects
May 6, 2009 14
![Page 15: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/15.jpg)
Sphere pair interactionSphere pair interaction
Define overlap(ξ), relative velocity(V), contact normal(N), normal and tangential velocities(Vn, Vt), rate of change of overlap(V.N)
Normal forces
kd : dissipation during collisions, kr : particle stiffness
Best choice of coefficients: α=1/2, β=3/2
Given coefficient of restitution ε, and time of contact tc, we can determine kd and kr
May 6, 2009 15
NfF nn
0 rdn kkf
![Page 16: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/16.jpg)
Sphere pair interactionSphere pair interaction
Tangential forces
These forces cannot stop motion – require true static friction
Springs between particles with persistent contact?
Non-spherical objects
May 6, 2009 16
t
tttntV
VVkfF
,min
![Page 17: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/17.jpg)
Solid bodiesSolid bodies
Map mesh to structure built from spheres
Generate distance field from mesh
Choose offset from mesh to place spheres
Build iso-surface mesh (Marching Tetrahedra)
Sample spheres randomly on triangles
Let them float to desired iso-surface by repulsion forces
D=sphere density, A=triangle area, R=particle radius, place particles, 1 more with fractional probability
May 6, 2009 17
2r
DA
![Page 18: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/18.jpg)
Solid bodiesSolid bodies
K – interaction kernel, P – Position of particle, V – velocity of particle, Φ – distance field
Rigid body evolution
Overall force = Σ forces
Overall torque = Σ torques around center of mass
May 6, 2009 18
i
i
PSPiR
PP
PPPPKV
i
\
RF VVV
NPVF
![Page 19: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/19.jpg)
Efficient collision detectionEfficient collision detection
Spatial hashing
Grid size = 2 x Maximum particle radius
Need to look at 27 cells for each particle O(n)
Not good enough, insert each particle into not 1, but 27 cells check only one cell for possible collisions
Why better?
Spatial coherence
Particles moving to next grid cell, rare (inelastic collapse)
Wonderful for stagnant regions
May 6, 2009 19
![Page 20: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/20.jpg)
Advantages/DisadvantagesAdvantages/Disadvantages
The Good
Faithful to actual physical behavior
The Bad and the Ugly
Computationally intensive
Small scale scenes
Scenes with some “control” particles
May 6, 2009 20
![Page 21: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/21.jpg)
Animating Sand as a FluidAnimating Sand as a Fluid
Motivation
Sand ~ viscous fluids in some cases
Continuum simulation
Bootstrap additions to existing fluid simulator
Why?
Simulation independent of number of particles
Better numerical stability than rigid body simulators
May 6, 2009 21
![Page 22: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/22.jpg)
Fluid simulation? what’s that?Fluid simulation? what’s that?
Discretize 3D region into cuboidal grid
3 step process to solve Navier Stokes equations
Advect
Add body forces
Incompressibility projection
Stable and accurate under CFL condition
May 6, 2009 22
v
v
uu p, ρ
![Page 23: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/23.jpg)
Extending our fluid simulatorExtending our fluid simulator
Extra things we need for sand
Friction (internal, boundary)
Rigid portions in sand
Recall
Stress
Yield condition
May 6, 2009 23
![Page 24: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/24.jpg)
Calculating stressCalculating stress
Exact calculation infeasible
Smart approximations
Define strain rate – D = d/dt(strain)
Approximate stresses
Rigid
Fluid
May 6, 2009 24
TuuD
i
u
j
uD ji
ji 2
1,
F
fD
Dp
3/1sin
t
xDrigid
2
![Page 25: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/25.jpg)
The algorithm in a nutshellThe algorithm in a nutshell
Calculate strain rate
Find rigid stress for cell
Cell satisfies yield condition?
Yes – mark rigid, store rigid stress
No – mark fluid, store fluid stress
For each rigid connected component
Accumulate forces and torques
For fluid cells, subtract friction force
May 6, 2009 25
![Page 26: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/26.jpg)
Yield conditionYield condition
Recap
Can add a cohesive force for sticky materials
May 6, 2009 26
30
trI m
21
FmJ
sin3 01 IJ
cIJ sin3 01
![Page 27: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/27.jpg)
Rigid componentsRigid components
All velocities must lie in allowed space of rigid motion (D=0)
Find connected components – graph search
Accumulate momentum and angular momentum
Ri – solid region, u – velocity, ρ – density, I – moment of inertia
May 6, 2009 27
iR
iiii dVuvM ˆˆ iR
iiiii dVurI ˆ
Rigid Fluid: Animating the Interplay Between Rigid Bodies and Fluid, Carlson et al.
![Page 28: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/28.jpg)
Friction in fluid cellsFriction in fluid cells
Update cell velocity
Boundary conditions
Normal velocity:
Tangential velocity:
May 6, 2009 28
ftu /
0nu
TT
T uu
nuu
1,0max
![Page 29: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/29.jpg)
RepresentationRepresentation
Defining regions of sand
Level sets
Particles
Allow improved advection
Hybrid simulation
PIC – Particle In Cell
FLIP – FLuid Implicit Particle
May 6, 2009 29
![Page 30: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/30.jpg)
Advantages/DisadvantagesAdvantages/Disadvantages
Advantages
Fast & stable
Independent of number of particles – large scale scenes possible
Disadvantages
Not completely true to actual behavior
Detail issues – smoothing in simulation, surface reconstruction
May 6, 2009 30
![Page 31: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/31.jpg)
OverviewOverview
What are Granular Materials?
Proposed Model
Actual Progress
May 6, 2009 31
![Page 32: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/32.jpg)
Proposed ModelProposed Model
Minimization problem
Inelasticity -> stress tries to minimize kinetic energy
Constraints
Friction, yield condition
Boundary conditions
Unilateral incompressibility
May 6, 2009 32
![Page 33: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/33.jpg)
Proposed ModelProposed Model
Friction
Nice, but not linear – Frobenius Norm
Infinity/1 Norm – linear
Unilateral Incompressibility
Boundary conditions
May 6, 2009 33
30
trI m
21
FmJ
sin3 01 IJ
max0 p
0nu TT
T uu
nuu
1,0max
![Page 34: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/34.jpg)
ProblemsProblems
Friction not orthogonal
LCP bye bye
KKT solver slow
Iterative solvers
LCP for unilateral incompressibility, boundary conditions
Friction checking after that
Recurse till convergence
May 6, 2009 34
![Page 35: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/35.jpg)
OverviewOverview
What are Granular Materials?
Proposed Model
Actual Progress
May 6, 2009 35
![Page 36: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/36.jpg)
Actual progressActual progress
Boundary cases!
90% of all effort in writing fluid solver
Minor details
Particle reseeding / preventing clumping
Continuity of stress field
Parameter tuning
May 6, 2009 36
![Page 37: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/37.jpg)
Actual progressActual progress
Running implementation of “Animating Sand as a Fluid”, Zhu et al.
3D real-time – albeit with simple rendering
Takes care of friction
Rigid, fluid cases
Boundary cases – tangential contact friction
Variational formulation – “Variational Fluids”, Bridson and Batty
May 6, 2009 37
![Page 38: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/38.jpg)
ImplementationImplementation
Grids coupled with particles
Particles dictate fluid density
One way velocity mapping – need ghost fluids for proper 2 way mapping
Grid based advection
Variational model – better interaction handling with non-axis-aligned objects
Rigid projection
May 6, 2009 38
![Page 39: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/39.jpg)
Actual progressActual progress
The nitty-gritty
Implemented 3D fluid solver from scratch
Particle System reused from previous assignments
Rigid projection – “Rigid Fluids”
Variational pressure solve – equality constraints
May 6, 2009 39
![Page 40: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/40.jpg)
Pluses/Minuses?Pluses/Minuses?
Issues
Bugs – known and unknown remain
LCP solver couldn’t be completed in time – no unilateral incompressibility, improved contact
Iterative testing couldn’t be done
Pluses
3D fluid simulator working
With minor fixes – should be perfectly functional
May 6, 2009 40
![Page 41: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/41.jpg)
ReferencesReferences
1. Granular Solids, Liquids, and Gases – Jaeger et al.Review of Modern Physics ’96
2. Particle-Based Simulations of Granular Materials – Bell et al., Eurographics ‘05
3. Animating Sand as a Fluid – Zhu et al.SIGGRAPH ‘05
4. Rigid Fluid: Animating the Interplay Between Rigid Bodies and Fluid – Carlson et al.SIGGRAPH ’04
May 6, 2009 41
![Page 42: Sand Simulation](https://reader036.fdocuments.us/reader036/viewer/2022062517/56812fe0550346895d95567d/html5/thumbnails/42.jpg)
ReferencesReferences
5. A Fast Variational Framework for Accurate Solid-Fluid Coupling – Batty et al.SIGGRAPH 2007
May 6, 2009 42