Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
byDirk Hekhuis
AdvisorsDr. Greg Wolffe
Dr. Christian Trefftz
ApplicationsComputational Fluid Dynamics have many applications
Automotive AerodynamicsDesigning HVAC SystemsWater Flow Around SubmarinesModeling Dams
The Physics of FluidsNavier‐Stokes equations for incompressible flow
Equation for velocity in a compact vector notation
Equation for density moving through the velocity field
Fluid Representation
Implementing Navier‐StokesExternal ForcesDiffusionAdvectionProjection
External ForcesExternal forces applied to the fluid can be either local forces or body forcesLocal forces are applied to a specific region of the fluid – for example the force of a fan blowing airBody forces are forces that apply evenly to the entire fluid, like gravity
Diffusion
Advection
Projection
Why use CUDA?
0.7737
0.0693
1.021
0.0155 0.01010.0711
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
1.1
Diffuse Advect Project
Seco
nds
CPUGPU
CPU vs GPUCPU
Fast cachesBranching adaptabilityHigh performance
GPUMultiple ALUsFast onboard memoryHigh throughput on parallel tasks
Executes program on each fragment/vertex
CPUs are great for task parallelismGPUs are great for data parallelism
CPU vs GPU ‐ Hardware
More transistors devoted to data processing
What is CUDA?Compute Unified Device ArchitectureNVIDIA’s software architecture for developing and running data‐parallel programsProgrammed in an extension to the C language
Programming CUDAKernel Functions
A kernel function is code that runs on the GPUThe code is downloaded and executed simultaneously on all stream processors on the GPU
SIMD ModelSIMD stands for Single Instruction, Multiple DataSIMD exploits data level parallelism by performing the same operation on multiple pieces of data at the same timeExample: Performing addition on 128 numbers at once
Fluid Dynamics on the GPUTo implement the Navier‐Stokes equations on a GPU we need to write kernel functions for:
External ForcesDiffusionAdvectionProjection
Demonstration
Acknowledgements“Real‐Time Fluid Dynamics for Games” by Jos Stam“Fast Fluid Dynamics Simulation on the GPU” by Mark J. HarrisNVIDIA
developer.nvidia.com/CUDA“CUDA: Introduction” by Christian Trefftz / Greg WolffeGrand Valley State University