Professional Documents
Culture Documents
Assignment
Name Rajath
Roll number SC22M028
Division Thermal and Propulsion
Subject Blasius Solution Assignment
1 Nomenclature
Y 1= velocity ratio(f)
Y 2= velocity gradient(f’)
Y 3= Double derivative of Velocity ratio(f")
no = eta min
nm = eta maximum
dn = differential eta
err = some asymptotic value to satisfy the boundary condition
U = Non dimensional velocity
2 Algorithm
Two guesses will be feed as input in the form of initial values for f".
Consecutive iteration will facilitate an appropriate guess using the Newton Rapson method.
to find out f,f’,f" Numerical techniques such as Euler and RK-4 is been used.
Figure 1: Flow chart for Algorithm
Page 2
Figure 2: F vs F’ plot
3 Result
3.1 Eluer method
Page 3
Figure 5: F’ vs Eta plot
Figure 7: F vs F’ plot
Page 4
Figure 8: F vs eta plot
Page 5
Figure 11: F" vs eta plot
4 Appendix
Matlab code for Euler method
1 n_0 = 0 ;
2 n_max = 1 0 ;
3 Y1_O = 0 ;
4 Y2_0 = 0 ;
5 Y3_0 = z e r o s ( 1 , 2 )
6 Y3_0 ( 1 )=i n p u t ( " Ente r f i r s t g u e s s " )
7 Y3_0 ( 2 )=i n p u t ( " Ente r s e c o n d g u e s s " )
8 d_n = 0 . 1 ;
9 N = (n_max − n_0 ) / d_n ;
10 e r r= 1 ;
11 e t a = n_0 : d_n : n_max ;
12 w h i l e e r r >10^−5
13 for j = 1:2
14 Y1 ( 1 )=Y1_O ;
15 Y2 ( 1 )=Y2_0 ;
16 Y3 ( 1 )=Y3_0( j ) ;% t o f e e d 2 g u e s s
17
18 for i = 1 :N
19 Y1( i +1) = Y1( i )+Y2( i ) ∗d_n
20
25
26 end
27 Y2_i ( j ) = Y2( end ) ; % F ’ a t i n f i n i t y assumed a s y2 l a s t
element
28 end
29 [ e r r , t ]=max ( a b s (1−Y2_i ) )
30
Page 6
31 Y3_0_n= Y3_0 ( 2 ) +(Y3_0 ( 2 )−Y3_0 ( 1 ) ) / ( Y2_i ( 2 )−Y2_i ( 1 ) ) ∗(1−
Y2_i ( 2 ) ) ;
32 Y3_0( t ) = Y3_0_n
33
34 end
35 f o r i =1:100
36 U( i )= . 5 ∗ ( e t a ( i ) ∗Y2( i )−Y1( i ) ) ;
37 end
38 %p l o t ( Y2 , e t a )
39 p l o t ( Y3 , e t a )
40 %p l o t ( Y1 , e t a )
41 p l o t ( Y1 , Y2)
Page 7
Matlab code for Rk-4 method
1 n_0 = 0 ;
2 n_max = 1 0 ;
3 Y1_O = 0 ;% BCs
4 Y2_0 = 0 ;
5 Y3_0 = z e r o s ( 1 , 2 )
6 Y3_0 ( 1 )=i n p u t ( " Ente r f i r s t g u e s s " )
7 Y3_0 ( 2 )=i n p u t ( " Ente r s e c o n d g u e s s " )
8 d_n = 0 . 1 ; %d ETa
9 N = (n_max − n_0 ) / d_n ;
10 e r r= 1 ;
11 e t a = n_0 : d_n : n_max ;
12 w h i l e e r r >10^−10
13 for j = 1:2
14 Y1 ( 1 )=Y1_O ;
15 Y2 ( 1 )=Y2_0 ;
16 Y3 ( 1 )=Y3_0( j ) ;
17
18 for i = 1 :N
19
22 k2 ( i , : ) = d_n∗ [ ( k1 ( i , 1 ) /d_n)+k1 ( i , 1 ) /2 ( k1 ( i
, 2 ) /d_n)+k1 ( i , 2 ) /2 ( k1 ( i , 3 ) /d_n) +0.5∗ k1 ( i , 3 )
];
23
26 k4 ( i , : ) = d_n∗ [ ( k1 ( i , 1 ) /d_n)+k3 ( i , 1 ) ( k1 ( i , 2 ) /
d_n)+k3 ( i , 2 ) ( k1 ( i , 3 ) /d_n)+k3 ( i , 3 ) ] ;
27
28
35
36 end
37 Y2_i ( j ) = Y2( end ) ;
Page 8
38
39 end
40 [ e r r , t ]=max ( a b s (1−Y2_i ) ) % a s s y m p t o t i c a l l y 1−f ’=0 t o
s a t i s f y boundary c o n d i t i o n
41
44
45
46 Y3_0( t ) = Y3_0_n
47
48 end
49 f o r i =1:100
50 U( i )= . 5 ∗ ( e t a ( i ) ∗Y2( i )−Y1( i ) ) ;
51 end
52 p l o t ( Y2 , e t a )
53 h o l d on
54 p l o t ( Y3 , e t a )
55 h o l d on
56 p l o t ( Y1 , e t a )
5 conclusion
F" will Converge at 0.3152 and 0.3144 for Euler and Rk-4 respectively.
Page 9