






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 1
0 1 2 3 4 5 6
-1.
-
-0.
0
0.
1
1.
Solution at t = 6.283; anu = 0.1; a = 1
X
U
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 2
From
last
lecture!
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 3
r
v
u #
quantity
unit mass
!
"
" t
UdV
V
= $
r
F •
r
n ( )
S
dS +
r
Q S
r
n ( )
S
dS + Q V
dV
V
!
r
Q S
!
U
!
dV
!
r
n
!
dS
!
Q V
!
r
F D
!
r
F C
!
S
!
V
From
last
lecture!
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 4
"# u
" t
r
r
v u %
r
S
r
$ u
V
!
r
D
r
& u ( $ " diffusivity constant)
r
C
r
v U = #
r
v u u "
quantity
unit mass
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 5
i.e. All internal fluxes and surface sources cancel!
!
"
" t
UdV
V
r
F •
r
n
AEBCA
dS =
r
Q S
r
n
AEBCA
dS + Q V
dV
V
!
"
" t
UdV
V 1
r
F •
r
n
ABCA
r
Q S
r
n
ABCA
V 1
"
" t
UdV
V 2
r
F •
r
n
DEBD
r
Q S
r
n
DEBD
V 2
"
" t
UdV
V 3
r
F •
r
n
AEDA
r
Q S
r
n
AEDA
V 3
!
V 1
!
V 2
!
V 3
!
A
!
B
!
C
!
D
!
E
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 6
average
i
i
ij
ij
j = 1
ij
ij
j = 1
V i
i
From
last
lecture!
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 7
Can discretize using finite differences (Euler, 1768)
" t
dV +
r
r
dV
V
V
r
r
dV
V
V
dV
V
r
r
n
S
dS =
r
r
dV
V
" t
r
r
C
r
S
r
V
From
last
lecture!
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 8
! t
r
r
" t
r
v
U
r
r
v
r
v +
r
v + pI , -
r
v E
r
F C
r
v p , - •
r
v
,
r
Q S
, k * T
r
F D
r
f e
r
f e
r
v + q H
Q V
u " 1 ;
r
S
V
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 13
Characteristic EquationsCharacteristic Equations
Forms the basis of the method of characteristics
" w i
" t
i
" w i
" x
= 0 for i = 1,2, 3
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 14
Scalar Scalar PDEPDE !! ss
undisturbed medium in 1-D with no mean velocity:
0
p # p 0
u # u $ (^) ( x , t )
"
2 $#
" t
2
% c 0
2 "
2 $#
" x
2
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 15
Scalar Scalar (^) PDEPDE !! ss (2)(2)
" t
v_
0 ( )
" x
v_
0
" u
" x
$ k
" x
u + q H
!
" u
" x
= 0
!
T 0
= T +
u
2
2 c p
" T
" c v
( T ) $^ k
2 T
2
= q H
t
xx
" # k $ c v
; q # q H
$ c v
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 16
Simple Model Equations Simple Model Equations
(parabolic)
(hyperbolic)
(parabolic)
(elliptic)
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 17
Diffusion (Dissipation)Diffusion (Dissipation)^ EqEq..
" u
" t
"
2 u
" x
2
(parabolic) u xx
; 0 $ x $ L
u = u 0 k
e
! " k
2 t
sin kx
k
u x = 0
u x = 0
! u x = L [ ]
x
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 18
Diffusion Diffusion EqEq. (2). (2)
x = 0 x = L
t = 0
t
x
u(x,0)
u(0,t)
u(L,t)
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 19
0 1 2 3 4 5 6
-1.
-
-0.
0
0.
1
1.
Solution at t = 6.283; anu = 0.05; a = 0
X
U
Diffusion Diffusion EqEq. (3). (3)
dampen out the
fastest
dampen out the
slowest
a music concert?
t = 0.
t = 1.
t = 6.
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 20
Convection (Advection) Convection (Advection) EqEq..
! u
! t
! u
! x
= 0 (hyperbolic) u x
u = u 0 k
e
! ikat e
ikx
k
" = u 0 k
e
ik ( x! at )
k
"
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 25
0 1 2 3 4 5 6
-1.
-
-0.
0
0.
1
1.
Solution at t = 6.283; anu = 0.01; a = 1
X
U
Convection-Diffusion Convection-Diffusion EqEq. (2). (2)
t = 0.
t = 1.
t = 6.
dampen out the
fastest
dampen out the
slowest
(convection) of
the waves as well
as damping with
time
a music concert?
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 26
PoissonPoisson !! s Equations Equation
2 "
! x
2
2 "
! y
2
x
y
b.c.
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 27
Equal-Spaced Mesh Equal-Spaced Mesh
Justify inJustify in
Class?Class?
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 28
Abbreviations and NotationAbbreviations and Notation
ODE: Ordinary Differential Equation
O"E: Ordinary Difference Equation
PDE: Partial Differential Equation
FDE: Finite Difference Equation
u: Dependent Variable
t,x,y,z: Independent Variables (Time & Space)
If
du
dt
is ordinary derivative &
du
dt
! u "
!u
!t
is partial derivative &
!u
!t
" u t
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 29
Analytical Analytical vsvs. Discrete. Discrete
x
u(x)
x
u(x j )
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 30
u x
"u
"x
! lim
u ( x + # x ) % u ( x )
" x
u =
u j + 1
j_ # 1
2 $ x
% u x
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 31
Space-Time GridSpace-Time Grid
x = x j
= j! x
t = t n
= n! t = nh
u ( t + kh ) = u n + k
u ( x + m! x ) = u j + m
u (^) ( t + kh , x + m! x ) = u j + m
n + k
x
u j
= u j + 1
Eu
n = u
n + 1
x
m u j
= u j + m
k u
n = u
n + k
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 32
Point Differential Operator Point Differential Operator
!x j
x
u j
x
u j
x
u
j-1 j j+
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 37
Second DerivativeSecond Derivative
2 )
xx
u j
u j + 1
$ 2 u j
% x
2
x
x
$ 1
% x
2
u j
xx
u j
xx
u j
u j + 2
$ 2 u j + 1
% x
2
x
2 $ 2 E x
% x
2
u j
xx
u j
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 38
Point Difference Operator - Time Point Difference Operator - Time
2 )
Note: Time derivative is usually written as update!
u n + 1
! u n " 1
u n + 1
! u n
u n + 1
! u n
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 39
Point Difference Operators II Point Difference Operators II
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 40
Taylor Series Analysis Taylor Series Analysis
expansion of function and derivatives at one point!
u j + k
= u j
" u
" x
j
( k! x )
2
u
" x
2
j
n!
( k! x )
n^ "^
n u
" x
n
j
u j + 1
= u j
+! x
" u
" x
j
! x
2
2 u
" x
2
j
n!
! x
n
n u
" x
n
j
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 41
Taylor Series Analysis (2) Taylor Series Analysis (2)
---> Method of Undetermined Coefficients
(reduces chances for errors)
u j + 1
! u j
" x
j
" x
2 u
2
j
n!
" x
n! 1
n u
n
j
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 42
Taylor Table Taylor Table
, a 1
, and a 0
for greatest accuracy?
=? (<--- Taylor series error)
u x
j
" x
a 0
u j
u j # 1
u ( (^) j # 2 )
Next Next
ClassClass
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 43
ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder
Lecture #2 - 44
difference) or over a control volume (finite volume). Conservation principles consider the change in a quantity
as made up of convective and diffusive fluxes as well as the volume and surface sources. Although, generally
in fluid mechanics, the Navier-Stokes equations are considered to be of primary importance for modeling
continuum flow it is often times more insightful and efficient to solve simple governing equations if possible.
to a scalar linear PDE. In this class we will often times look at simplified model problems that mathematically
can be explained as representative of parabolic, hyperbolic and elliptic equations. Physically, these are
explained as diffusion (or dissipation), convection (or diffusion) and Poisson’s equation. Because of the
varying mathematics and physics represented by these different model equations we will often times develop
differing numerical methods. One also needs to consider both physical and numerical boundary conditions.
One can take advantage of the fact that complicated geometries can be handled through coordinate
transformations; therefore we will limit ourselves this semester to solve scalar PDE problems on equi-spaced
Cartesian meshes.
non-unique and can vary according to the number of points used to derive the difference operator, the method
used to determine the coefficients associated with each of the points, the size of the mesh spacing and the level
of numerical precision. These choices will affect the accuracy of the solution (Taylor series) as well as
possibly affect the stability and convergence when these approximations are used to discretize a PDE into a set
of algebraic equations!
Not inNot in
ClassClass