1.CFD Introduction Notes
1.CFD Introduction Notes
计算流体⼒学
Course syllabus
Benefits of the course
1986 –1990 Ph.D. student with D.E. Stock and C.T. Crowe, WSU, Pullman, Washington, USA
1990 –1992, 1st Postdoc with Martin Maxey, Brown University, USA
1992 –1994, 2nd Postdoc with Jim Brasseur & John Wyngaard, Penn State, USA
1994 – , Professor of Mechanical Engineering, University of Delaware, USA
Masters (7)
Numerical methods
Ph.D students (6)
Fortran programming
35 students Unix OS experience
Lian-Ping Wang
Hao Chen (TA)
Xiaozheng Zhao (Department system administrator)
4
Benefits of the course (1)
What is computational fluid dynamics?
1. Physical assumptions & governing principles:
mass conservation, momentum conservation
1st law of thermodynamics, 2nd law of thermodynamic
equation of state
2. Mathematical models:
continuum mechanics, boundary /initial conditions
3. Numerical algorithms:
finite difference, finite element, spectral, lattice-Boltzmann
……
4. Realization of computation:
coding: Fortran, C, matlab, …., code optimization
implementation: computers, OS, parallelization
5. Verification and Validation
6. Use and interpretation of the computer solution
5
An example: development of a transient laminar flow in a channel
1. Physical assumptions & governing principles:
² Initial velocity =0
²The flow is driven by a body force (or constant pressure gradient) starting at t=0
²Governing equations:
y
mass conservation – continuity equation x
2L
6
An example: development of a transient laminar flow in a channel
2. Mathematical model
y
2L x
7
Analytical solution (the method of separation of variables)
Exact solution
u " y2 % ∞ 4(−1)k ( (k + 0.5)2 π 2ν t + ( y+
= $1− 2 ' − ∑ exp *− - cos *(k + 0.5)π -
u0 # L & k=0 [π (k + 0.5)]3 ) L2 , ) L,
Transient_Laminar_Flow_FD_Codes/Channel_FD_onwall0_class.f90 10
5. Verification and validation
Will update
11
6. Use and interpretation of the computer solution
Numerical stability?
Code optimization?
12
CFD is an interdisciplinary topic
Numerica Fluid
l analysis Mechanic
s
CFD
Computer
Science
13
Benefits of the course (2)
Finite difference
Finite volume
Spectral ….
……
Lattice Boltzmann
Gas kinetic scheme
……
14
Benefits of the course (3)
Hands-on experience
15
Why do we need a computer and programming?
ssh –Y [email protected]
your password
17
A simple example
If a coin is tossed 1,000 times, what is the probability of having the head
exactly 500 times?
1000
C500 1000 ⋅ 999 ⋅ 998 ⋅ ....⋅ 503⋅ 502 ⋅ 501
Mathematical expession p = =
1000
2 500 ⋅ 499 ⋅ 498 ⋅ ....⋅ 3⋅ 2 ⋅1⋅ 4500
Details matter!
18
Graphically, see the cumulative result
19
Necessary computer skills
Unix: http://www.udel.edu/it/help/unix/using.html
Introduction to Unix / Linux, a handout you should read
20
The devil is in the details
21
Introduction to
22
Computation has always been helpful for routine tasks:
Examples:
Roots of a nonlinear equation
Numerical differentiation
Numerical integration
Interpolation
Curve fitting / regression
Optimization
Boundary element
Vorticity based methods
Lattice Boltzmann method (since 1988, evolved from lattice gas automata)
Dissipative particle dynamics (Since 1992, evolved from lattice gas automata)
Smoothed particle hydrodynamics (since 1977)
26
Finite volume method (FVM)
• FVM enjoys an advantage in memory use and speed for very large
problems, higher speed flows, turbulent flows, and source term
dominated flows (like combustion).
• Advantages: basic FV control volume balance does not limit cell shape;
mass, momentum, energy conserved even on coarse grids; efficient,
iterative solvers well developed.
What is it?
Why?
28
Computer simulation:
A third pillar for scientific discovery
Why?
Better computers
New methods and algorithms
29
Historical note
Current technology: transistors on integrated circuit
1943-1969, The early days - First computers / supercomputers
1970-1990, The vector computing years
1991- now, The parallel computing years, clusters, scalable, up to
100,000 processors
Alternate technologies?
Optical
Biological / Molecular
Quantum
Speed of computer – FLOPS
λ
R ≈ 10 1
0
10 10
1940 1950 1960 1970 1980 1990 2000 2010 2020
Year
Hello
The cost of computation is decreasing, but the cost of performing experimentation is increasing!
NSF Cyberinfrastructure Framework for 21st Century Science and Engineering (CF21):
Computation is accepted as the third pillar supporting innovation and discovery ...
Computer modeling or computer simulation??
35
Modeling
36
Simulations
37
Hybrid Direct Numerical Simulation
! (α ) ! (α ) ! (α ) ! ! (α )
dV (t)
=−
V (t)[− (U(Y (t),t) + u ]
(Y ,t) !
−g
dt τ (pα )
!
dY (α ) (t) ! (α )
= V (t)
dt
Droplet-droplet aerodynamic
interactions are considered
39
Simulations can lead to discovery
40
Particle distribution and settling in isotropic turbulence
Wang & Maxey, J. Fluid Mechanics, 256, 27-68, 1993.
Point-particle based
One-way coupling
41
Experimental validations came later …
Kolmogorov scaling of Enhanced settling
preferential concentration rate
45
Comparison of approaches
47