Академический Документы
Профессиональный Документы
Культура Документы
"# #$
u = 0! =0 v =0!" =0
"y #x
! # = Constant ! $ = Constant
!" ! 2"
= Uwall; # wall = $ 2
The wall vorticity must be found from the streamfunction. !y !y
The stream function is constant on the walls. !
+ ' 2 *
Re & h )
"! i, j =1 " 2! i , j =1 h 2
j=3
given:! ! i, j = 2 = ! i, j =1 + h+ + O(h3 )
"y "y 2 2
j=2
! = Constant
!" ! 2" Using:! # 2$ i, j =1 #$ i, j =1
j=1
Uwall = U wall ; # wall = $ 2 ! wall = " ; Uwall =
!y !y #y 2 #y
i -1 i i+1
this becomes:!
h2
Expand the streamfunction!
! i, j = 2 = ! i, j =1 + Uwallh " # wall + O(h 3 )
2
"! i, j =1 " 2! i , j =1 h 2 Solving for the wall vorticity:!
! i, j = 2 = ! i, j =1 + h+ + O(h3 )
! wall = (" i , j =1 # " i , j =2 )
"y "y 2 2 2 2
+ Uwall + O(h)
h2 h
Solve by SOR!
+ (1$ # )! "i, j
v(i,j)=v(i,j)+dt*rhs(i,j)!
Update vorticity in interior! Update vorticity in interior!
t=t+!t! t=t+!t!
Computational Fluid Dynamics
Computational Fluid Dynamics
The Code! Results:!
Streamfunction! Vorticity!
17 by 17!
Dt=0.01!
0.1 25
20
D=0.1!
0.08
15
0.06 10
5
!" " i, j +1 $ "i, j$1
ui, j = #
0.04
0
0.02
-5 !y 2h
0 -10
20 20
!" " i+1, j $" i$1, j
v i, j = $ #$
15 20 15 20
15 15
!x
10 10
5
5
10
5
5
10
2h
0 0 0 0
Why is vorticity !
Streamfunction at t = 1.2!
important?!
Vorticity at t = 1.2!
Computational Fluid Dynamics
Computational Fluid Dynamics
Vorticity! Vorticity!
Helmholtz decomposition:! For incompressible flow with constant density and viscosity,
Any vector field can be written as a sum of ! taking the curl of the momentum equation yields:!
u = +
Take divergence! + u = ( )u + 2
t
u = = 2 = 0
Take the curl! or:!
D
u = ( ) = = ( )u + 2
Dt
By a Gauge transform this can be written as!
Helmholtzs theorem:!
2 = Inviscid Irrotational flow remains irrotational!
v u
=
x y
or:! Rotational wake!
D
= 2 =
2
Dt
u u u 1 P 2 u 2 u
Advection and t
+u +v =
x y
+ +
x x 2 y 2
diffusion! f f 2 f
+U =D 2
Boundary layers! t x x
Computational Fluid Dynamics
Computational Fluid Dynamics
Boundary Layers! Boundary Layers!
r=20;for i=1:100,x(i)=(i-1)/99;end;!
for i=1:100,f(i)=(exp(r*x(i))-1)/(exp(r)-1);end;! Scaling:! 1
plot(x,f)!
1 df D d 2 f 0.9
R=1 !L/R=1!
=
dx U dx 2
0.8
0.9
R=5 !L/R=0.2!
R=1! 0.8
0.7
R=5! 0.7
0.6 R=10 !L/R=0.1!
R=10! Estimate the
0.6
0.5
R=20 !L/R=0.05!
R=20!
0.5 thickness of the 0.4
0.2
0.3
1 D 1 DL L
= =
0.1
0.2
0.1 U 2 UL R 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Computational Fluid Dynamics
Computational Fluid Dynamics
Boundary Layers! Objectives!
f 2 f 2 f
2D! Solution of:! U
x
= D 2 + 2
x y
Develop an understanding of the steps involved in
solving the Navier-Stokes equations using a numerical
method!
U=1! D
D=0.025! Write a simple code to solve the driven cavity
U
f problem using the Navier-Stokes equations in vorticity
f=0
=0 form!
x
Short discussion about why looking at the vorticity is
sometimes helpful!
f=1