Upload
maximillian-asher-strickland
View
218
Download
0
Embed Size (px)
Citation preview
Course 14Course 14
Fluid SimulationFluid SimulationMonday, Half Day, 8:30 am - 12:15 pmMonday, Half Day, 8:30 am - 12:15 pm
Course ScheduleCourse Schedule
• The Basics of Fluid Flow (Robert, 105 min)
• Break (15 min)
• The Cutting-Edge in Film (Eran, 45 min)
• Real Time Fluids in Games (Matthias, 45 min)
• Non-Newtonian Fluids (Robert, 15 min)
Talk OutlineTalk Outline
• Particle level set method
• Vorticity confinement & vortex particles
• Fire simulation
• Solid-fluid coupling
Particle Level Set MethodParticle Level Set Method
[Enright et al. ’02]
Level SetsLevel Sets
• We like level sets:
– Smooth surface for rendering
– Geometric information (normals, curvature)
– Handle topological changes
simple rigid body rotation vortex stretching
Problem: Bad Mass ConservationProblem: Bad Mass Conservation
• Even with high order solvers!
SolutionSolution
Lagrangian marker particlesEulerian level set
0
0
COMBINE
ParticlesParticles
• Passively advected with flow
• Help correct interface
– Especially areas of high curvature
• Hybrid surface model [Foster & Fedkiw ’01]
– Particles inside water
• Particle level set method [Enright et al. ’02]
– Particles on both sides
ParticlesParticles
Rigid Body
Original shape
Level set only One-sided particles Particle level set method
ParticlesParticles
• Seeded within band of interface
• Carry sign and radius
• Periodically reseed particles
– Add to under-resolved regions
– Delete unnecessary particles
Error IdentificationError Identification
• Escaped particles (on wrong side of interface)
pr
0
0
Error QuantificationError Quantification
• Particles behave like little level set spheres
pr
Error CorrectionError Correction
• Compute corrections to >0 and <0 regions
• Merge into final corrected level set
– Take minimum magnitude
0
0
E
0 0
0
0
Particle Level Set UpdateParticle Level Set Update
• Advect particles & level set
• Particle correction
• Reinitialize
• Particle correction
• Adjust radii
simple rigid body rotation vortex stretching
Reduced Mass LossReduced Mass Loss
Fast and Accurate PLSFast and Accurate PLS
• Original PLS:
– 3rd order RK; 5th order HJ-WENO
• [Enright et al. ‘04]: Good results with lower order methods
– Semi-Lagrangian (advection)
– Fast marching method (redistancing)
– 2nd order RK for particles
• Easier for adaptive grids
Vorticity Confinement & Vorticity Confinement & Vortex ParticlesVortex Particles
[Selle et al. ’05]
VorticityVorticity
• Vorticity:
– Local rigid rotation
• Want to simulate turbulent phenomena
– Problem: numerical dissipation (boring flows)
Fixing Boring FlowsFixing Boring Flows
Boring Flow Vorticity Confinement Vortex Particle Method
Vorticity ConfinementVorticity Confinement
2. Compute vorticity
4. Compute a force
1. Start with a velocity field
3. Compute vectors directed toward local maxima in vorticity magnitude
[Steinhoff & Underhill ’94; Fedkiw et al. ’01]
[Andrew Selle]
Confinement ParameterConfinement Parameter
=0.25 =0.50
Limitations of Vorticity ConfinementLimitations of Vorticity Confinement
• Uniformly amplifies vorticity ) grid artifacts
• Can only amplify vorticity already on the grid
• Unstable with larger
=2
Vortex Equations of FlowVortex Equations of Flow
Navier-Stokes Equations
Vortex Equations of Flow
Vortex Particle MethodVortex Particle Method
• Hybrid method:
– Vortex particles & grid-based fluid solver
– Evolve both and u
• Easier than trying to compute u from
[Selle et al. ’05]
Vortex Particle MethodVortex Particle Method
• Vortex particle update:
– Move particles (advection)
– Change vorticity (vortex stretching)
• Adding vorticity to flow:
– Apply analytic confinement force
– Ensures vorticity is conserved
Results - SmokeResults - Smoke
Hybrid Method(6000 particles)
Results - Smoke Results - Smoke
Results - WaterResults - Water
[320x128x320 effective octree, 600 particles]
Fire SimulationFire Simulation
[Nguyen et al. ’02]
FireFire
Gaseous fuel
Blue core
Blackbody radiation
Soot & smoke
Heating
Cooling
Emission due to chemical reaction
Assumed premixed with air
Yellowish/orange glow
Visible after cooling
ignition
Fire SimulationFire Simulation
• 2 phase flow
– Gaseous fuel
– Hot gaseous product
• Level set captures interface (blue core)
• Incompressible & inviscid
• Model gas expansion
[Nguyen et al. ’01,’02]
Flame ModelingFlame Modeling
hot gaseous product
gaseous fuel
thin flame
Blue CoreBlue Core
• Track using level set (don’t need PLS)
Varying flame reaction speed S (smaller on right)
Jump ConditionsJump Conditions
• Using:
• e.g. Conservation of mass:
Shorthand:
Mass flux entering flame front
Mass flux exitingflame front
Jump ConditionsJump Conditions
• Conservation of mass and momentum:
Jump ConditionsJump Conditions
• Can rewrite as
Varying Density RatioVarying Density Ratio
Larger f / h on right
Ghost ValuesGhost Values
Fuel
Ghost ValueHot Gas
Ghost Fluid Method: [Fedkiw et al. ’99]
Velocity JumpVelocity Jump
Solve for fuel phase Solve for products phase
Pressure JumpPressure Jump
• Incorporate into pressure solve (projection step)
• e.g. In 1D:
pi+2
pi pi-1
xi xi-1 xi+1 xi+2 xI
pi+1
ghost
When All is Said and Done…When All is Said and Done…
• Still symmetric, positive definite!
Temperature & Smoke DensityTemperature & Smoke Density
Temperature
• Used for color map
Smoke Density
• Soot & smoke
CampfireCampfire
Flammable SolidsFlammable Solids
• Voxelize solid
• Track solid’s temperature (heat conduction)
• After ignition
– Change solid voxels to negative (fuel)
– Set injection velocity on faces of solid voxels
Flammable BallFlammable Ball
Multiple Interacting LiquidsMultiple Interacting Liquids[2nd talk – “Fluids” papers session – Wed. 8:30-10:15]
Solid-Fluid CouplingSolid-Fluid Coupling
[Guendelman et al. ’05]
Lagrangian vs. Eulerian MeshesLagrangian vs. Eulerian Meshes
Lagrangian (moving) mesh
• Good for solids
• Bad for fluids
– Significant deformation and topology change
Eulerian (static) mesh
• Good for fluids
• Bad for solids
– Harder to track moving material quantities
Strong vs. Weak CouplingStrong vs. Weak Coupling
Strong coupling
(simultaneous solution)
• Monolothic system
• More stable
Weak coupling
(staggered solution)
• Use existing simulators
• Less stable
SOLIDS SIM
FLUIDS SIMSOLIDS + FLUIDS SIM
e.g. [Chentanez et al. ’06]
Volumetric vs. Thin SolidsVolumetric vs. Thin Solids
Volumetric Thin shell
256x256x192 effective octree; 30k triangles
Coupling to Thin SolidsCoupling to Thin Solids[Guendelman et al. ’05]
Preventing Leaks: VisibilityPreventing Leaks: Visibility
Check visibility of interpolation nodesUse replacement ghost value when interpolating
One-Sided InterpolationOne-Sided Interpolation
One-Sided AdvectionOne-Sided Advection
• Clip semi-Lagrangian rays
u
x-ut
Additional ConsiderationsAdditional Considerations
• Crossed-over nodes
• Preventing particles from crossing solid
• Redistancing & velocity extrapolation
Simulation StepSimulation Step
un,n
Advance particle level set ! n+1
Advect un and add gravity ! u*
Project u* ! un+1
un+1,n+1
One-sided advection( and particles)
One-sided advection (u)
Solid Affecting FluidSolid Affecting Fluid
• Rasterize solid onto grid faces
• Enforce solid velocity with Neumann boundary conditions
Project u* ! un+1
One-Way Coupling StepOne-Way Coupling Step
un,n
Advance particle level set ! n+1
Advect un and add gravity ! u*
Project u* ! un+1
un+1,n+1
Advance solid
Enforce solid velocities at solid-fluid interface
160x192x160 effective octree
One Way Coupling ExampleOne Way Coupling Example
Fluid Coupling ForceFluid Coupling Force
• Want to use fluid pressure
• Incompressible pressure can be noisy
– Incompressibility = hard constraint
– Enforcing solid velocity = hard constraint
– Better for compressible fluids [Yngve et al. ‘00; Fedkiw ‘02]
Smoother Coupling PressureSmoother Coupling Pressure
• Don’t enforce solid velocity
– Treat solid as fluid
• Solve variable density fluid for pc
Two Pressure Solves!Two Pressure Solves!
• Incompressible pressure (projection):
– Enforce incompressibility & solid velocity
– Essential for reducing mass loss
• Coupling pressure:
– Does not modify fluid velocity
– Essential for smoother coupling force on solid
Computing Force on SolidComputing Force on Solid
• Fluid pressure pushes on both sides
p1
p2
Computing Force on SolidComputing Force on Solid
• Net force is proportional to pressure jump [pc]
p1 - p2
Computing Force on SolidComputing Force on Solid
Rasterize solid
Compute coupling pressure
Pressure jumps on faces
Average to nodes
Extrapolate
Interpolate at centroid
Compute force
Two-Way Coupling StepTwo-Way Coupling Step
un,n
Advance particle level set ! n+1
Advect un and add gravity ! u*
Advance solid
Project u* ! un+1
un+1,n+1
Compute coupling pressure and apply force to solid
148x148x111 uniform; 2.5k triangles
Rigid ShellRigid Shell
200x200x200 effective octree; 30k triangles
Water-Cloth CouplingWater-Cloth Coupling
210x140x140 uniform; 30k triangles
Coupling to SmokeCoupling to Smoke
Coupling to Volumetric SolidsCoupling to Volumetric Solids[Losasso et al. ’06]
ApproachApproach
• Rasterize solid onto fluid grid
– Compute object
• Fill with ghost fluid values
• Two-way coupling as for thin shells
Volumetric SolidsVolumetric Solids
Extrapolate fluid values[Houston et al. ’03;
Rasmussen et al. ’04]
Need grid values in solid
Volumetric SolidsVolumetric Solids
• Velocity boundary conditions
– Model object friction (slip to no-slip)
boundary conditions
– Extrapolate fluid into object
• Separation conditions
– Avoid pulling water out of solid
• Also collide fluid particles against objects
Two-Way CouplingTwo-Way Coupling
Solid Affecting Fluid
• Neumann boundary conditions
Fluid Affecting Solid
• Compute coupling pressure
• Apply force
Ice Cubes ExampleIce Cubes Example
100x100x100 uniform grid
SummarySummary
• Particle level set method
– Particles help conserve mass
• Vorticity confinement & vortex particles
– Help preserve “turbulence” in flow
• Fire simulation
– 2 phases with jump conditions
• Solid-fluid coupling
– Couple using solid velocity & fluid pressure