Fluid simulation Marek Trtík PA199 ‹#› Motivation Other pictures source: [5] ‹#› uEuler approach: uFluid is modelled by a vector field, representing the velocity of the fluid. u uLagrange approach: uFluid is modelled by set of particles. u uSmoothed Particle Hydrodynamics: uFluid is modelled by set of particles moved via a velocity vector field. u uHight-field surface approximation: uSuitable for simulation of only fluid’s surface, e.g., lake or ocean surface. Outline ‹#› Euler approach Start: 0h05m ~15m ‹#› Fluid Model ‹#› Navier-Stokes Equations advection pressure diffusion external accel. ‹#› Gradient, Divergence and Laplacian ‹#› Gradient, Divergence and Laplacian ‹#› Adding Custom Quantities ‹#› Boundary Conditions ‹#› Discretize fields 2D grid ‹#› Discretize derivatives ‹#› Solving Equations ‹#› Solving Equations ‹#› Solving Equations ‹#› Solving Equations ‹#› Euler approach DEMO! https://paveldogreat.github.io/WebGL-Fluid-Simulation/ http://haxiomic.github.io/projects/webgl-fluid-and-particles/ Start: 0h28m ~2m ‹#› Lagrange approach Start: 0h30m ~10m ‹#› Particles Simulation ‹#› External Forces ‹#› Lagrange approach DEMO! Start: 1h13m ‹#› u Smoothed Particle Hydrodynamics ‹#› Smoothed Particle Hydrodynamics Start: 1h05m ~8m ‹#› Smoothed Particle Hydrodynamics ‹#› Smoothed Particle Hydrodynamics ‹#› Height-field surface approximation Start: 1h15m ~7m ‹#› Fluid Surface Model ‹#› Discretize Model ‹#› Hight-field surface approximation DEMO! Start: 1h22m ‹#› u[1] W.J. Laan, S. Green, M. Sainz; Screen Space Fluid Rendering with Curvature Flow; I3D 2009. u[2] S. Green; Screen Space Fluid Rendering for Games; GDC 2010. u[3] Jos Stam; Stable Fluids; ACM Transactions on Graphics, 2001. u[4] R.Bridson, M.Müller; Fluid simulation; SIGGRAPH 2007 course notes. u[5] GPU Gems 3; Chapter 30: Real-Time Simulation and Rendering of 3D Fluids. u[6] GPU Gems; Chapter 38: Fast Fluid Dynamics Simulation on the GPU; https://developer.download.nvidia.com/books/HTML/gpugems/gpugems_ch38.html u[7] C. Johanson; Real-time water rendering; Master thesis, Lund University,2004. u u References Start: 1h24m