Escolar Documentos
Profissional Documentos
Cultura Documentos
http://www.nd.edu/~gtryggva/CFD-Course/!
Finite Volume Methods are used in the vast majority of CFD codes. However, there are other ways to compute the motion of uids. Some of the more common alternatives include:! Spectral Methods! Finite Element Methods! Lattice Boltzmann Methods! Smoothed Particle Hydrodynamics! Vortex Methods and other particle methods! Here we will briey examine those!
Consider the initial-boundary value problem for the one dimensional heat equation!
Spectral! Methods !
f ( x, t ) = an ( t )sin nx
n =1
an ( t ) = f n e n t 2 f n = f ( x )sin nx dx 0
2
Assuming that the time integration is exact, the error by using only N terms is!
f f N e N
2
f ( x, t ) = an ( t )sin nx
n =1
Sum to N only!!
This is faster than any power of N. Recall that the error for nite difference/nite volume methods is!
O (h ) 1 N
Spectral methods are said to have spectral or innite order accuracy! This property is not retained if the solution has discontinuities!
dan = n 2 an ; an (0) = f n dt
( n = 1,2, N )
For nonlinear equations the use of spectral methods becomes much more involved!
f f f + f = 2 t x x
2
a ( t )e
k |k|< K
2 kx L
Computing the nonlinear term can become expensive, particularly for three-dimensional systems. By using the Fast Fourier Transform, the computation can be made faster by taking the inverse transform and do the multiplication in real space. Then Fourier transform the product back into spectral space. The multiplication can, however, lead to aliasing problems where the resolved wave numbers are contaminated by unresolved ones.!
e fj f l
l =1
2 l j N
Although spectral methods can have very high accuracy, they can be difcult to apply to nonlinear problems, problems with complex boundary conditions, and complicated geometries.! In addition to Fourier series, several other basis function can be used for other geometries and to control the resolution near boundaries! Spectral elements methods, where a complex domain is broken into large blocks and each block is treated spectrally can be used treat somewhat complex boundaries !
inverse!
f e f l j
l =1
2 lj N
Finite element methods are similar to spectral methods in that we expand the solution in terms of a known basis function. Unlike spectral methods, where the basis functions are dened globally over the whole computational domain, in the nite element method the basis functions are dened locally on each element.!
f ( x) = f I N I ( x)
I
f N I = fI I x x
Element 1!
Element 2!
N i(1) 1
N i(2)
(2) i +1
N i(1) =
x x i1 ; x i
N i(1) 1 =
xi x x i
i 1 element 1! i
element 2!
i +1
N i(1) 1 = ; x x i
For element 2:!
N i(1) 1 1 = x x i
x xi x i +1
N i(1) =
For element 2:!
x x i1 ; x i
x i +1 x ; x i +1
N i(1) 1 =
N i(2) +1 =
xi x x i
x xi x i +1
N i(2) =
x i +1 x ; x i +1
N i(2) +1 =
N i(2) =
N i(2) 1 = ; x x i +1
N i(2) 1 +1 = x x i +1
f k = q x x
The residual is:!
f k dx = x x
q Wdx
Integrate by parts!
f R = k q x x
The weighted residual is:!
f W dx + k x x
f W k dx = x x
q Wdx
Or:!
W ( x ) R( x ) dx = 0
W
f f f W dx + W k W k = k x x x 2 x 1
q Wdx
f k dx = x x
q Wdx
f ( x) = f I N I ( x)
I
j = i 1
f k
j i 1
i +1
integrating!
f W dx = k x x
For node i:!
q W dx
ki +1/2
fi +1 fi f f q + 4 qi + qi +1 ki 1/2 i 2i 1 i 1 =0 x 2 x 6
Notice that a nite difference method would give the same result except with qi on the RHS!
j = i 1
fj
i +1
i +1
i 1
i +1 N j Ni dx qN i ( x )dx = 0 x x i 1
where!
ki +1/2
1 = x
i +1
k dx
i
t W dx + U x W dx = 0
f ( x) = f I N I ( x)
I
f f +U =0 t x
Weak formulation!
t W dx + U x W dx = 0
t N N
I I
f I
dx + U N I
dN J dx = 0 dx
or!
t
I
f I
M IJ + U K IJ = 0
I
f ( x) = f I N I ( x)
I
M IJ =
N I N J dx;
K IJ =
dN J dx; dx
Mass matrix!
Stiffness matrix!
In two-dimensions triangular (or tedrahedron) elements are frequently used! The mass matrix makes it complex to use simple explicit time integrators. This can be overcome by lumping the matrix!
While nite elements dominate solid mechanics, their role in computational uid dynamics has been secondary to nite volume methods. Indeed, most methodological progress has been rst developed in the context of nite volumes and then implemented in the nite element framework. Some areas, such as simulations of viscoelastic ows have, however, relied heavily on nite elements for historical reasons.!
) (
u = f e
=1
e6 e3
e7
e2
e5 e1 e8
e4
f 1 + e f v = ( f ( eq ) f ), = 0,1,, M t
Approximate the time derivative by a rst order forward in time, the advection term by upwind and the collision by downwind, we get! f ( x, t + t ) f ( x, t ) = f ( x, t ) f x te , t
f ( x te , t ) f ( eq ) ( x te , t )
Set! = t e
x ; = x
x = t e
t e x
Replace! x
t e
by!x + te
))
where!
f ( x te , t ) f ( eq ) ( x te , t )
f ( x + te , t + t ) f ( x + te , t ) =
( f (x + te , t ) f (x, t ))
( eq )
= t e x ; = x
x = t e
f ( x + te , t + t ) f ( x, t ) =
1 ( eq ) ( f (x, t ) f (x, t ))
f ( x + te , t + t ) f ( x, t ) =
1 ( eq ) ( f (x, t ) f (x, t ))
e =
e = 2
e6
e5 e1
e6 e3
e7
e2
e5 e1 e8
w0 = 0 w = 4 9 = 1, 3, 5, 7
e3
e7 e4
u = f e
=1
w = 1 36 v = 2, 4, 6, 8
e8
e4
From: K. Sankaranarayanan, I.G. Kevrekidis, S. Sundaresan , J. Lu, G. Tryggvason. A comparative study of lattice Boltzmann and front-tracking nitedifference methods for bubble simulations. Int. J. Multiphase Flow 29 (2003) 109116.!
We could select the kernal to be a Gaussian, although usually we desire a compact support!
r2 W (r, h) = 3/ 2 exp h2 h 1
A = mk k W (| r rk |, h) k k
Where:!
W (r, h) dr = 1
()
A(r ) = mk
k
Ak W (| r rk |, h) k
P P = mk k2 W (| r rk |, h) k k
Ak W (| r rk |, h) k
dE P = u dt
A(r ) = mk
k
Ak W (| r rk |, h) k
Using that!
= mk W (| r rk |, h)
k
( u) = ( u) u
The mass conservation equation is!
d i = mk u k u i W (| ri rk |, h) dt k
P P P u = u u
= mk W (| r rk |, h)
k
gives!
dEi dt = mk
k
Pk
2 k
(u
u i W (| ri rk |, h)
mk
(u
u i W (| ri rk |, h)
Mass!
W ( s) =
P du i P = mk k2 + i2 W (| ri rk |, h) dt k i k
10 7 h2
3 3 1 s 2 + s3 0 s 1 2 4 1 2 1< s 2 4 (2 s) 0 2<s<
dEi P = mk k2 u k u i W (| ri rk |, h) dt k k
SPH has been modied to include viscous effects by local averaging as well as incompressibility.!
For a more complete introduction, see: J. J. Monaghan. An introduction to SPH. Computer Physics Communications 48, 1988, Pages 89-96.!
dri = ui dt
P = P( , e)
!Particle-in-Cell codes! !Direct Simulation Monte Carlo (raried ow)! !Dissipative particle methods ! !Molecular dynamics! !and many more! In many cases a grid is used also, either for efciency or to account for some of the physics!
Dissipative Particles Dynamics: particles represents molecules or uid blobs but while the method has similarities with SPH, it is generally used to model mesoscale behavior of complex uids and more liberties are taken in modeling the interactions of the particles! Molecular Dynamics: Not really a CFD technique but can be used to simulate small (really small) uid regions!