Profiling fluid flow past an immersed object with

14
Profiling fluid flow past an immersed object with CUDA An Independent Study By Aritra Kumar Nath

Transcript of Profiling fluid flow past an immersed object with

Page 1: Profiling fluid flow past an immersed object with

Profiling fluid flow past an immersed object with CUDA

An Independent Study ByAritra Kumar Nath

Page 2: Profiling fluid flow past an immersed object with

Lattice Boltzmann Method• For simulating fluid flow

• Based on the microscopic kinetic equation for the particle distribution function.

• Fictive particles propagating and colliding over lattice mesh

• Per node Density & Velocity used to determine macroscopic properties of fluid (pressure, fluid velocity, viscosity)

• Linear so less computation intensive

• Straightforward parallel implementation

Page 3: Profiling fluid flow past an immersed object with

Lattice Boltzmann Method

• Simulation domain divided into 2D lattice (D2Q9) • Each node with packet distribution

• Packet distributions have associated velocity vectors

Page 4: Profiling fluid flow past an immersed object with

Packet Distribution

0 v 0 -v 0 v -v -v v0 0 v 0 -v v v -v -v{ vqi , i = 0 . . .

8} =

Page 5: Profiling fluid flow past an immersed object with

Lattice Boltzmann Method• Finite differencing used to compute new packet distributions

• Values computed iteratively • Packet distributions based updated based on values in the previous

time step

• The Lattice Boltzmann equation:

Page 6: Profiling fluid flow past an immersed object with

Simulation Driver Rules

• Collision

• Propagation

ρ = ∑ pqi u= 1/ρ ∑ pqi

vqi

Page 7: Profiling fluid flow past an immersed object with

Boundary Conditions

• Full-Bounce Back

• Half-Bounce Back

Page 8: Profiling fluid flow past an immersed object with

Implementation on GPU• Symmetric velocity vector orientation in every node• Scope for Parallelism inherent• All velocity vectors with same direction grouped together for

computation• Three primary kernels used are for:– Collision– Propagation– Calculating boundary conditions

• NVIDIA GEForce 310M used

Page 9: Profiling fluid flow past an immersed object with

Velocity Vectors Resolved

Division of the D2Q9 model, according to its velocity directions. (Image courtesy: GPU-Based Flow Simulation with Complex Boundaries)

Page 10: Profiling fluid flow past an immersed object with

Flow Chart - LBM Computation

(Image Courtesy: GPU-Based Flow Simulation with Complex Boundaries)

Page 11: Profiling fluid flow past an immersed object with

LBM Fluid Simulation - Graphic Visualization

Page 12: Profiling fluid flow past an immersed object with

Studying Flow Profiles of Fluids• The following simulation parameters are variable:

– Lattice dimensions– Fluid Viscosity– Maximum Velocity

• The following values for the microscopic fictive particles are computed:– Nodal velocity (microscopic fictive particles)– Density (rho)

• The values obtained will further influence macroscopic fluid properties

Page 13: Profiling fluid flow past an immersed object with

Studies Results & Observation• Study 1:Compare different iteration sequences same simulation parameter values:

Parameter Value Set:– Simulation Parameter:– Fluid Viscosity: 0.05– Maximum Fluid Velocity: 0.01

• Study 2:Compare the same iteration sequence with different simulation parameter values without

causing turbulence: Parameter Value Set 1:-- Fluid Viscosity: 0.8-- Maximum Fluid Velocity: 0.1Parameter Value Set 2:-- Fluid Viscosity: 0.01-- Maximum Fluid Velocity: 0.1

Page 14: Profiling fluid flow past an immersed object with

Studies Results & Observation• Study 3: Compare the same iteration sequence with different simulation parameter

values random turbulence: Parameter Value Set:– Simulation Parameter:– Fluid Viscosity: 0.05– Maximum Fluid Velocity: 0.01