You are on page 1of 11

)(MIC2011

17 19 -1390

CFD OpenMP

1 2 3

1 aziziyeng@yahoo.com

2 dvdmnzdh@gmail.com
3 seif@sharif.edu
4 mehdi@sharif.edu

CFD .

.
CFD
OpenMP .
.
4 4 2 8 .
)
( 2 .
.
:
VOF CFD GPU OpenMP .



. .
] .[1 CFD
.

. - -
. CPU
.
.
.
. -
) (1 -
.
.
.

)(MIC2011
17 19 -1390

CPU ) (1GPU
. CPU ) (
.
. .

:1


-
. 2
) CPU( .
CFD

.
CFD . -
3 .
.

.
) (
. .

.
.

. .
CFD
. .
. 4
) (
.
CFD
. .

.

Graphic Processor Unit


2
General Purposed
3
Domain Decomposition
4
Alternating Schwarz methods
2

)(MIC2011


1
17 19 -1390

) (1
.

CFD
2



CFD

3


( NUMELS
N
)
.

].[32




CFD

.





. 2





.

.
-




.

CFD :
. D
.
4 CPU
-1
7
6
5
CPU .
-2
-3 U
GPU .
-4 .


:2

CPU

.


.



.


.

Function Decompositionn
2
Finite Voluume
3
Numerical Marine Eng. Lab. of Sharif university
4
Distributedd Memory
5
Shared Mem
mory
6
Multi-Proceessor
7
Multi-Core
3

)(MIC2011
17 19 -1390

.

2 .
MPI . CFD

... .
.
.
.

.
. 1 2
.
CPU ) (2 .
)
(
. OpenMP .
3
. GCC
. 4
.
OpenMP
16 48
. OpenMP
)
( .
OpenMP 4 8
.
.
GPU . 3 GPU . GPU
5 6 "
" . .
. ) 7ALU(
GPU CPU ) (
. 4 GPU CPU .

Data independency
2
Thread
3 OpenMP .
4

Eclipse
Thread Processor
6
Double
7
Arithmetic Logic Unit
5

)(MIC2011


1
17 19 -1390

GPU
:3

CPU
GPU
:4



(
GPU )


GPU


.




CPU .
U
1
-

.

CFD

(
)



. CFD

100 CFD
].[654
NVID
DIA

CUDA




NVIDIA
.

CPU

CFD
C

OpenCL
. AMD

.
CFD

.


) ( CFD

.


CPU GPU
C
.

.
] .[871

Lattice- Boltzmann
5

)(MIC2011


1
17 19 -1390

CPU
C

5


MPI
.

:5

-



1
.




.


.
.

.


.



.



.

CFD .






.




.



!
.




.



.

OpenMP
P

CP
CPU GPU . PU
U

GPU .

.
MPII


2
SIM .
MD


GR Bi-CGSTAB ...
RMES


.
CFD


.


GPU )
U



CFD

.
(
4
3

.

5

] [9


SIM
MPLE



] .[10

Cache
2
Single Instrruction Multipple Data
3
Projection
4
Fractional Step
S
5
Poisson
6

)(MIC2011
17 19 -1390

GPU
. 10
OpenMP.
NUMELS OpenMP
NUMELS
. CFD
1RANS 6
. 2 [9] 3
4 VOF CICSAM
HRIC FBICS K- . C++
Bi-CGSTAB Laspack .
GAMBIT
.
6 .

:6 NUMELS

9 .
.
.
. -
:
-1 OpenMP
3 4 .
-2 GPU CUDA
10.
-3 MPI
.

Reynolds Averaged Navier-Stokes


2
Kim
3
Choi
4
Collocated
5
Volume Of Fraction
6
Compressive Interface Capturing Scheme for Arbitrary Meshes
7
High Resolution Interface Capturing
8
Flux Blending Interface Capturing Scheme
9
Body attached
7

)(MIC2011
17 19 -1390

.
100100 1000
. 1m1m
1m/s .
-7 . -7
] .[11
.

OpenMP 4
4 2 8 .
1 .
1

0.9
0.8
0.7
0.6

)y(m

0.5
0.4
0.3
0.2
GHIA
Serial
Parallel

)u (m/s

0.1
0

0.8

0.6

0.4

0.2

0.2

0.4

-7 : -7 : u

:1

Intel Pentium

Intel Core

Intel Xeon Intel Core


i5-760
2/8

E5420
2/5

2/2/1

2/2/1

4/4/1

8/8/2

)(

12

) RAM(

)(
/ /

E7500 2 Duo D Processor 945


2/93
3/4

8 .
.
8 4 3/8 2/8 .
9 . ) (1
. %100 n n .

)( 1

)(MIC2011
17 19 -1390

1Core
2Core
4Core
8Core

16

12
10
8
6
4
2

)Computational time per time step (s

14

XeonE5420

Core2Duo

Corei5

System version

Pentum4D

:8
100
)Pentum4D(2Core
)Corei5(4Core
)XeonE5420(8Core
)Pentum4D(2Core

90

70
60
50
40
30

)Parallelism Efficiency (%

80

20
10
0
16

14

12

10

Number of Cores

:9


. 9 . -
. 8
OpenMP .
.
.
] [1213 .
129000 40kn
. -10 -10
. -11 -11 ) ( ) (
- . %100 %98
.
)
( %25 %50 .
4 2 . )
( 4 9 .

)(MIC2011


1
17 19 -1390

][13

: -10 :
-10

Others makePresuure
4%
Matrix2%

makePresuureMatrix
3%
SolveVelocity
y
5%

omentumMatrix
makeMo
13%

Others
4%

UpdatePressu
ure
32%

SolveVelocity
13%
SolvePrressure
11%

makeMomentum
mMatrix
11%

UpdatePresssure
29%
SolvePrressure
41
1%

UpdateVelocity
25%

UpdateVelocity
7%


( ) (
)
-11 :
- -11 :


11
-

2 4
12
.




2
) 4 (
1/36 1/63


2 4
.

2 .

30
1Core
2Core
4Core

25
20
)Time (s

15
10
5
0

-

4
:12

CFD



.
OpenMP



.

.
4
.
) ( 2


OpenMP
O

.


GPU

.




10
] [14

10

(MIC2011)
-1390 19 17

8 8 7
.
:
[1] Kneer A., Schreck E., Hebenstreit M. and Goszler A. (2000), Industrial mixed OpenMP / Mpi CFD-application for
calculations of free-surface flows, Workshop on OpenMP Applications and Tools, San Diego.
[2] Panahi R., Jahanbakhsh E. and Seif M.S. (2006), Development of a VoF fractional step solver for floating body
motion simulation, Appl Ocean Res 28 (3), pp. 171181.
[3] Jahanbakhsh E., Panahi R. and Seif M.S.(2007), Numerical simulation of three-dimensional interfacial flows,
Interant J Numer Methods Heat Fluid Flow 17 (4), pp. 539548.
[4] Elsen Erich, LeGresley Patrick, Darve Eric (2008), Large calculation of the flow over a hypersonic vehicle using a
GPU, Journal of Computational Physics 227- 1014810161.
[5] Bailey Peter, Myre Joe, Walsh Stuart D. C., Lilja David J. and O. Saar Martin.(2009), Accelerating Lattice
Boltzmann Fluid Flow Simulations Using Graphics Processors, ICPP2009, Vienna, Austria.
[6] http://www.nvidia.com/object/computational fluid dynamics.html.
[7] Jacobsen Dana A., and Senocak Inanc (2011) ,Scalability of Incompressible Flow Computations on Multi-GPU
Clusters Using Dual-Level and Tri-Level Parallelism, 49th AIAA, 4 - 7 January 2011, Orlando, Florida.
[8] Yang Chao-Tung ,Huang Chih-Lin ,Li Cheng-Fang (2011), Hybrid CUDA, OpenMP, and MPI parallel programming
on multicore GPU clusters n, Computer Physics Communications 182 (2011) 266269.
[9] Kim D. ,Choi H. (2000),A Second-Order Time-Accurate Finite Volume Method for Unsteady Incompressible Flow
on Hybrid Unstructured Grids, Journal of Computational Physics 162, 411428 .
[10] Hines Jonathan(2008), A Comparative Study of the SIMPLE and Fractional Step Time Integration Methods for
Transient Incompressible Flows, M.S. thesis, University of Waterloo.
[11] Ghia U., Ghia K.N. and Shin C.T. (1982), High-Re solutions for incompressible flow using the NavierStokes
equations and a multigrid method , J Comput Phys 48, pp. 387411.
[12] Jahanbakhsh, E., Panahi, R. & Seif, M.S.(2009), Catamaran Motion Simulation Based On Moving Grid Technique,
Journal of Marine Science and Technology-Taiwan, In Press
[13] R Panahi, E Jahanbakhsh and MS. Seif (2009), Towards simulation of 3D nonlinear high-speed vessels motion.
Ocean Eng, 36 pp. 256265
[14] Combest D. P., Ramachandran P.A., Dudukovic M.P. (2011),Implementing Fast Parallel Linear System Solvers in
OpenFOAM Based on CUDA, 6th OpenFOAM Workshop Penn State University, USA 13-16 June 2011.

11