+ All Categories
Home > Documents > Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling...

Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling...

Date post: 02-Jun-2020
Category:
Upload: others
View: 11 times
Download: 0 times
Share this document with a friend
28
Introduction Turbulence Simulations Direct Numerical Simulation of Turbulent Flows Michael Wilczek Institute for Theoretical Physics, University of M¨ unster 22.07.09 Michael Wilczek Direct Numerical Simulation of Turbulent Flows
Transcript
Page 1: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

Direct Numerical Simulation of Turbulent Flows

Michael Wilczek

Institute for Theoretical Physics, University of Munster

22.07.09

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 2: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

Is turbulence a solved problem?

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 3: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

Is turbulence a solved problem?

Engineering: conceptually yes

(depends on the complexity of your problem)

relevant scenarios are computationallyaccessible

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 4: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

Is turbulence a solved problem?

Engineering: conceptually yes

(depends on the complexity of your problem)

relevant scenarios are computationallyaccessible

Physics: no

statistical description from first principles ismissing

→ non-equilibrium thermodynamics?

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 5: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

Is turbulence a solved problem?

Engineering: conceptually yes

(depends on the complexity of your problem)

relevant scenarios are computationallyaccessible

Physics: no

statistical description from first principles ismissing

→ non-equilibrium thermodynamics?

Mathematics: no

boundedness of solutions with smooth initalconditions?

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 6: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

Introduction

Problem: turbulence . . .

is described by nonlinear equations

exhibits spatio-temporal chaos

involves large space- and time-scales

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 7: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

Introduction

Problem: turbulence . . .

is described by nonlinear equations

exhibits spatio-temporal chaos

involves large space- and time-scales

Possible solutions:

understanding of structures

formulating a statistical theory

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 8: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

Introduction

Problem: turbulence . . .

is described by nonlinear equations

exhibits spatio-temporal chaos

involves large space- and time-scales

Possible solutions:

understanding of structures

formulating a statistical theory

Tools:

any kind of mathematics, that will do

computer simulations

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 9: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

DNS

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 10: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

DNS: Visualization

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 11: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

DNS: equations

Navier-Stokes equations:

∂u

∂t(x, t) + u(x, t) · ∇u(x, t) = −∇p(x, t) + ν∆u(x, t) + f(x, t)

∇ · u(x, t) = 0

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 12: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

DNS: equations

Navier-Stokes equations:

∂u

∂t(x, t) + u(x, t) · ∇u(x, t) = −∇p(x, t) + ν∆u(x, t) + f(x, t)

∇ · u(x, t) = 0

Vorticity: ω(x, t) = ∇× u(x, t)Vorticity equation:

∂ω

∂t(x, t) = ∇×

(

u(x, t) × ω(x, t))

+ ν∆ω(x, t) + f(x, t)

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 13: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

DNS: numerics I

aim: forced (stationary) homogeneous, isotropic turbulence

temporal discretization: RK3 TVD

spatial discretization: box-length 2π, dim grid points, periodicboundary conditions

pseudospectral code

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 14: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

DNS: numerics II

∂ω

∂t(k, t) + ν k2 ω(k, t) = ik ×F{u(x, t) × ω(x, t)} + f(k, t)

adaptive time-stepping (Courant-Friedrichs-Levy criterion)

pseudospectral: forward/backward FFT is computationallycheaper than convolution (N log N vs. N2)

aliasing: smooth Fourier filter

viscosity is treated exactly (integrating factor)

forcing: freezing of low modes

code is MPI parallel

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 15: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

DNS: computational costs IE

(k)

∼ k−5/3

inertial range

extends with Re

integral scale

dissipative scale

k

forcing

dissipation

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 16: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

DNS: computational costs II

forcing scale and dissipative scale should be well seperated

inertial range extends with increasing Re

size of smallest structures decreases with Re

smallest structures should be well-resolved by the grid

turbulent field should be accurately advanced in time

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 17: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

DNS: computational costs III

to be more precisely . . .

η =

(

uL

ν

)

−3/4

L = Re−3/4L

∆x ∼ η

Nx ∼

(

∆x

)3

(

L

)3

Re9/4 −→ Re ∼

(

L

)4/3

N4/9x

Nt ∼T

∆t∼

T

∆x/u∼

T

l/uRe3/4

$$$ ∼ NxNt ∼

(

T

l/u

)(

l

)3

Re3

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 18: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

DNS: computational costs IV

10243512325631283

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 19: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

DNS: computational costs V$$

$

serial

OpenMP

MPI

2563

Re

10243

and beyond

5123

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 20: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

DNS: computational costs V$$

$

serial

OpenMP

MPI

2563

Re

10243

and beyond

5123

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 21: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

DNS: computational costs V$$

$

serial

OpenMP

MPI

2563

Re

10243

and beyond

5123

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 22: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

DNS: computational costs V$$

$

serial

OpenMP

MPI

2563

Re

10243

and beyond

5123

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 23: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

DNS: OpenMP vs. MPI

OpenMP

“fork and join” principle

easy

incrementalparallelization

medium number of cores

limited degree ofscalability

MPI

decomposition ofcomputational domain

“communicate whennecessary” principle

broad range ofapplication

high scalability

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 24: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

Amdahl‘s Law

consider serial code with runtime 1

P denotes the parallelizable fraction of code

runtime on n cores: (1 − P ) + PN

maximum expectable speed up S(N) = 1(1−P )+ P

N

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 25: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

Amdahl‘s Law

consider serial code with runtime 1

P denotes the parallelizable fraction of code

runtime on n cores: (1 − P ) + PN

maximum expectable speed up S(N) = 1(1−P )+ P

N

2

4

10

20

100

2 8 32 128 512 2048 8192 32768

spee

d up

number of cores

P=0.50P=0.75P=0.90P=0.95P=0.99

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 26: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

DNS: parallelization via MPI

DD

core 3

core 2

core1

core 0

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 27: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

DNS: scaling

32

16

8

4

2

1

1024 512 256 128 64 32

spee

dup

number of cores

scaling performance of VOrTEx on HLRB II, 10243 grid points, single precision

reference point

two partitions in use

three partitions in use

high density blades

ideal scaling

5.28

9.19

18.5

34.55

60.15

119.17

1024 512 256 128 64 32

time

per

step

(se

c)

Michael Wilczek Direct Numerical Simulation of Turbulent Flows

Page 28: Direct Numerical Simulation of Turbulent Flows · Introduction Turbulence Simulations DNS: scaling 32 16 8 4 2 1 32 64 128 256 512 1024 speedup number of cores scaling performance

Introduction Turbulence Simulations

Demos

Hello OpenMP/ MPI world

HLRBII @ LRZ

remote visualization

Michael Wilczek Direct Numerical Simulation of Turbulent Flows


Recommended