dr. greg wolffe dr. christian trefftz

19
by Dirk Hekhuis Advisors Dr. Greg Wolffe Dr. Christian Trefftz

Upload: others

Post on 12-Sep-2021

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Dr. Greg Wolffe Dr. Christian Trefftz

byDirk Hekhuis

AdvisorsDr. Greg Wolffe

Dr. Christian Trefftz

Page 2: Dr. Greg Wolffe Dr. Christian Trefftz
Page 3: Dr. Greg Wolffe Dr. Christian Trefftz

ApplicationsComputational Fluid Dynamics have many applications

Automotive AerodynamicsDesigning HVAC SystemsWater Flow Around SubmarinesModeling Dams

Page 4: Dr. Greg Wolffe Dr. Christian Trefftz

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

Fluid Representation

Page 6: Dr. Greg Wolffe Dr. Christian Trefftz

Implementing Navier‐StokesExternal ForcesDiffusionAdvectionProjection

Page 7: Dr. Greg Wolffe Dr. Christian Trefftz

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

Diffusion

Page 9: Dr. Greg Wolffe Dr. Christian Trefftz

Advection

Page 10: Dr. Greg Wolffe Dr. Christian Trefftz

Projection

Page 11: Dr. Greg Wolffe Dr. Christian Trefftz
Page 12: Dr. Greg Wolffe Dr. Christian Trefftz

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

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

CPU vs GPU ‐ Hardware

More transistors devoted to data processing

Page 15: Dr. Greg Wolffe Dr. Christian Trefftz

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

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

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

Demonstration

Page 19: Dr. Greg Wolffe Dr. Christian Trefftz

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