dr. greg wolffe dr. christian trefftz
TRANSCRIPT
![Page 1: Dr. Greg Wolffe Dr. Christian Trefftz](https://reader035.vdocument.in/reader035/viewer/2022071602/613d5e40736caf36b75c804d/html5/thumbnails/1.jpg)
byDirk Hekhuis
AdvisorsDr. Greg Wolffe
Dr. Christian Trefftz
![Page 2: Dr. Greg Wolffe Dr. Christian Trefftz](https://reader035.vdocument.in/reader035/viewer/2022071602/613d5e40736caf36b75c804d/html5/thumbnails/2.jpg)
![Page 3: Dr. Greg Wolffe Dr. Christian Trefftz](https://reader035.vdocument.in/reader035/viewer/2022071602/613d5e40736caf36b75c804d/html5/thumbnails/3.jpg)
ApplicationsComputational Fluid Dynamics have many applications
Automotive AerodynamicsDesigning HVAC SystemsWater Flow Around SubmarinesModeling Dams
![Page 4: Dr. Greg Wolffe Dr. Christian Trefftz](https://reader035.vdocument.in/reader035/viewer/2022071602/613d5e40736caf36b75c804d/html5/thumbnails/4.jpg)
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
![Page 5: Dr. Greg Wolffe Dr. Christian Trefftz](https://reader035.vdocument.in/reader035/viewer/2022071602/613d5e40736caf36b75c804d/html5/thumbnails/5.jpg)
Fluid Representation
![Page 6: Dr. Greg Wolffe Dr. Christian Trefftz](https://reader035.vdocument.in/reader035/viewer/2022071602/613d5e40736caf36b75c804d/html5/thumbnails/6.jpg)
Implementing Navier‐StokesExternal ForcesDiffusionAdvectionProjection
![Page 7: Dr. Greg Wolffe Dr. Christian Trefftz](https://reader035.vdocument.in/reader035/viewer/2022071602/613d5e40736caf36b75c804d/html5/thumbnails/7.jpg)
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
![Page 8: Dr. Greg Wolffe Dr. Christian Trefftz](https://reader035.vdocument.in/reader035/viewer/2022071602/613d5e40736caf36b75c804d/html5/thumbnails/8.jpg)
Diffusion
![Page 9: Dr. Greg Wolffe Dr. Christian Trefftz](https://reader035.vdocument.in/reader035/viewer/2022071602/613d5e40736caf36b75c804d/html5/thumbnails/9.jpg)
Advection
![Page 10: Dr. Greg Wolffe Dr. Christian Trefftz](https://reader035.vdocument.in/reader035/viewer/2022071602/613d5e40736caf36b75c804d/html5/thumbnails/10.jpg)
Projection
![Page 11: Dr. Greg Wolffe Dr. Christian Trefftz](https://reader035.vdocument.in/reader035/viewer/2022071602/613d5e40736caf36b75c804d/html5/thumbnails/11.jpg)
![Page 12: Dr. Greg Wolffe Dr. Christian Trefftz](https://reader035.vdocument.in/reader035/viewer/2022071602/613d5e40736caf36b75c804d/html5/thumbnails/12.jpg)
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
![Page 13: Dr. Greg Wolffe Dr. Christian Trefftz](https://reader035.vdocument.in/reader035/viewer/2022071602/613d5e40736caf36b75c804d/html5/thumbnails/13.jpg)
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
![Page 14: Dr. Greg Wolffe Dr. Christian Trefftz](https://reader035.vdocument.in/reader035/viewer/2022071602/613d5e40736caf36b75c804d/html5/thumbnails/14.jpg)
CPU vs GPU ‐ Hardware
More transistors devoted to data processing
![Page 15: Dr. Greg Wolffe Dr. Christian Trefftz](https://reader035.vdocument.in/reader035/viewer/2022071602/613d5e40736caf36b75c804d/html5/thumbnails/15.jpg)
What is CUDA?Compute Unified Device ArchitectureNVIDIA’s software architecture for developing and running data‐parallel programsProgrammed in an extension to the C language
![Page 16: Dr. Greg Wolffe Dr. Christian Trefftz](https://reader035.vdocument.in/reader035/viewer/2022071602/613d5e40736caf36b75c804d/html5/thumbnails/16.jpg)
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
![Page 17: Dr. Greg Wolffe Dr. Christian Trefftz](https://reader035.vdocument.in/reader035/viewer/2022071602/613d5e40736caf36b75c804d/html5/thumbnails/17.jpg)
Fluid Dynamics on the GPUTo implement the Navier‐Stokes equations on a GPU we need to write kernel functions for:
External ForcesDiffusionAdvectionProjection
![Page 18: Dr. Greg Wolffe Dr. Christian Trefftz](https://reader035.vdocument.in/reader035/viewer/2022071602/613d5e40736caf36b75c804d/html5/thumbnails/18.jpg)
Demonstration
![Page 19: Dr. Greg Wolffe Dr. Christian Trefftz](https://reader035.vdocument.in/reader035/viewer/2022071602/613d5e40736caf36b75c804d/html5/thumbnails/19.jpg)
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