Scilab Code for Introduction to Fluid Mechanics by Fox and McDonald

poisonmammeringΜηχανική

24 Οκτ 2013 (πριν από 3 χρόνια και 8 μήνες)

140 εμφανίσεις

Scilab Code for
Introduction to Fluid Mechanics
by Fox and McDonald
1
Created by
Eswar Prasad
4th Year Student
B.E.(Mech.Engg.)
National Institute of Technology,Trichy
College Teacher and Reviewer
Shivraj Deshmukh
Ph.D student
IIT Bombay
29 June 2010
1
Funded by a grant from the National Mission on Education through ICT,
http://spoken-tutorial.org/NMEICT-Intro.This Textbook companion and scilab
codes written in it can be downloaded from the website www.scilab.in
Book Details
Authors:Robert W.Fox and Alan T.McDonald
Title:Introduction to Fluid Mechanics
Publisher:John Wiley & Sons
Edition:5th
Year:2001
Place:New Delhi
ISBN:9971-51-355-2
1
Contents
List of Scilab Code 4
1 Introduction 10
1.1 Discussion............................10
1.2 Scilab Code...........................10
2 Fundamental Concepts 12
2.1 Discussion............................12
2.2 Scilab Code...........................12
3 Fluid Statics 14
3.1 Discussion............................14
3.2 Scilab Code...........................14
4 Basic Equations in Integral form for a Control Volume 23
4.1 Discussion............................23
4.2 Scilab Code...........................23
5 Introducton to Dierential Analysis of Fluid Motion 38
5.1 Discussion............................38
5.2 Scilab Code...........................38
6 Incompressible Inviscid Flow 42
6.1 Discussion............................42
6.2 Scilab Code...........................42
7 Dimensional Analysis and Simlitude 49
7.1 Discussion............................49
7.2 Scilab Code...........................49
2
8 Internal Incompressible Viscous Flow 55
8.1 Discussion............................55
8.2 Scilab Code...........................55
9 External Incompressible Viscous Flow 66
9.1 Discussion............................66
9.2 Scilab Code...........................66
10 Fluid Machinery 75
10.1 Discussion............................75
10.2 Scilab Code...........................75
11 Introduction to Compressible Flow 95
11.1 Discussion............................95
11.2 Scilab Code...........................95
12 Steady One-Dimensional Compressible Flow 100
12.1 Discussion............................100
12.2 Scilab Code...........................100
3
List of Scilab Code
1.01 1.01.sce.............................10
1.01d 1.01-data.sci..........................10
1.02 1.02.sce.............................11
1.02d 1.02-data.sci..........................11
2.02 2.02.sce.............................12
2.02d 2.02-data.sci..........................13
3.01 3.01.sce.............................14
3.01d 3.01-data.sci..........................15
3.03 3.03.sce.............................15
3.03d 3.03-data.sci..........................17
3.04 3.04.sci.............................17
3.04d 3.04-data.sci..........................18
3.05 3.05.sce.............................19
3.05d 3.05-data.sci..........................20
3.06 3.06.sci.............................20
3.06d 3.06-data.sci..........................20
3.07 3.07.sce.............................21
3.07d 3.07-data.sci..........................21
4.01 4.01.sce.............................23
4.01d 4.01-data.sci..........................24
4.02 4.02.sce.............................24
4.02d 4.02-data.sci..........................25
4.03 4.03.sce.............................25
4.03d 4.03-data.sci..........................26
4.04 4.04.sce.............................26
4.04d 4.04-data.sci..........................27
4.05 4.05.sce.............................27
4.05d 4.05-data.sci..........................27
4
4.06 4.06.sce.............................28
4.06d 4.06-data.sci..........................28
4.07 4.07.sce.............................29
4.07d 4.07-data.sci..........................29
4.08 4.08.sce.............................30
4.08d 4.08-data.sci..........................30
4.09 4.09.sce.............................30
4.09d 4.09-data.sci..........................30
4.10 4.10.sce.............................31
4.10d 4.10-data.sci..........................31
4.11 4.11.sce.............................32
4.11d 4.11-data.sci..........................32
4.12 4.12.sce.............................34
4.12d 4.12-data.sci..........................34
4.14 This is some example.....................34
4.14d 4.14-data.sci..........................35
4.16 4.16.sce.............................35
4.16d 4.16-data.sci..........................36
4.17 4.17.sce.............................36
4.17d 4.17-data.sci..........................36
5.02 5.02.sce.............................38
5.02d 5.02-data.sci..........................38
5.07 5.07.sce.............................39
5.07d 5.07d..............................39
5.08 5.08.sce.............................39
5.08d 5.08-data.sci..........................40
5.09 5.09.sce.............................41
5.09d 5.09-data.sci..........................41
6.01 6.01.sce.............................42
6.01d 6.01-data.sci..........................42
6.02 6.02.sce.............................43
6.02d 6.02-data.sci..........................43
6.03 6.03.sce.............................43
6.03d 6.03-data.sci..........................44
6.04 6.04.sce.............................44
6.04d 6.04-data.sci..........................44
6.05 6.05.sce.............................45
6.05d 6.05-data.sci..........................45
5
6.06 6.06.sce.............................45
6.06d 6.06-data.sci..........................46
6.08 6.08.sce.............................46
6.08d 6.08-data.sci..........................47
6.09 6.09.sce.............................47
6.09d 6.09-data.sci..........................48
7.04 7.04.sce.............................49
7.04d 7.04-data.sci..........................50
7.05 7.05.sce.............................50
7.05d 7.05-data.sci..........................51
7.06 7.06.sce.............................52
7.06d 7.06-data.sci..........................53
8.01 8.01.sce.............................55
8.01d 8.01-data.sci..........................56
8.02 8.02.sce.............................56
8.02d 8.02-data.sci..........................57
8.04 8.04.sce.............................57
8.04d 8.04-data.sci..........................57
8.05 8.05.sce.............................58
8.05d 8.05-data.sci..........................58
8.06 8.06.sce.............................59
8.06d 8.06-data.sci..........................59
8.07 8.07.sce.............................60
8.07d 8.07-data.sci..........................60
8.08 8.08.sce.............................60
8.08d 8.08-data.sci..........................61
8.09 8.09.sce.............................62
8.09d 8.09-data.sci..........................62
8.10 8.10.sce.............................63
8.10d 8.10-data.sci..........................63
8.11 8.11.sce.............................64
8.11d 8.11-data.sci..........................64
9.01 9.01.sce.............................66
9.01d 9.01-data.sci..........................66
9.04 9.04.sce.............................67
9.04d 9.04-data.sci..........................68
9.05 9.05.sce.............................68
9.05d 9.05-data.sci..........................69
6
9.06 9.06.sce.............................69
9.06d 9.06-data.sci..........................70
9.07 9.07.sce.............................70
9.07d 9.07-data.sci..........................70
9.08 9.08.sce.............................71
9.08d 9.08-data.sci..........................72
9.09 9.09.sce.............................72
9.09d 9.09-data.sci..........................74
10.01 10.01.sce............................75
10.01d10.01-data.sci.........................76
10.02 10.02.sce............................76
10.02d10.02-data.sci.........................77
10.03 10.03.sce............................77
10.03d10.03-data.sci.........................78
10.06 10.06.sce............................79
10.06d10.06-data.sci.........................80
10.07 10.07.sce............................81
10.07d10.07-data.sci.........................81
10.08 10.08.sce............................82
10.08d10.08-data.sci.........................85
10.11 10.11.sce............................86
10.11d10.11-data.sci.........................88
10.12 10.12.sce............................91
10.12d10.12-data.sci.........................92
10.14 10.14.sce............................92
10.14d10.14-data.sci.........................93
10.16 10.16.sce............................93
10.16d10.16-data.sci.........................94
11.01 11.01.sce............................95
11.01d11.01-data.sci.........................96
11.03 11.03.sce............................96
11.03d11.03-data.sci.........................97
11.04 11.04.sce............................97
11.04d11.04-data.sci.........................99
12.01 12.01.sce............................100
12.01d12.01-data.sci.........................101
12.02 12.02.sce............................102
12.02d12.02-data.sci.........................103
7
12.03 12.03.sce............................103
12.03d12.03-data.sci.........................104
12.04 12.04.sce............................104
12.04d12.04-data.sci.........................105
12.05 12.05.sce............................106
12.05d12.05-data.sci.........................106
12.06 12.06.sce............................107
12.06d12.06-data.sci.........................108
12.07 12.07.sce............................108
12.07d12.07-data.sci.........................109
12.08 12.08.sce............................110
12.08d12.08-data.sci.........................111
12.09 12.09.sce............................111
12.09d12.09-data.sci.........................113
12.10 12.10.sce............................113
12.10d12.10-data.sci.........................115
8
List of Figures
3.1 Output graph of S 3.01.....................16
4.1 Output graph of S 4.11.....................33
7.1 Output graph of S 7.05.....................52
9.1 Output graph of S 9.08.....................73
10.1 Output graph of S 10.03....................79
10.2 Output graph of S 10.07....................83
10.3 Output graph-1 of S 10.08...................86
10.4 Output graph-2 of S 10.08...................87
10.5 Output graph-1 of S 10.11...................89
10.6 Output graph-2 of S 10.11...................89
10.7 Output graph-3 of S 10.11...................90
11.1 Output graph of S 11.03....................98
9
Chapter 1
Introduction
1.1 Discussion
When executing the code fromthe editor,use the'Execute File into Scilab'tab
and not the'Load in Scilab'tab
The.sci les of the respective problems contain the input parameters of
the question
1.2 Scilab Code
Example 1.01 1.01.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('1.01.sce')
2 f i l ename=pathname+f i l e s e p ( )+'1.01data.s c i'
3 exec( f i l ename )
4//He a t a d d e d d u r i n g t h e p r o c e s s ( i n k J ):
5 Q12=mcp(T2T1)
6 printf ("nnnnRESULTSnnnn")
7 printf ("nnnnHeat added duri ng the pr oces s:%f kJnnnn",
Q12/1000)
Example 1.01d 1.01-data.sci
1//Ma s s o f o x y g e n p r e s e n t ( i n k g ):
2 m=0.95;
10
3//I n i t i a l t e m p e r a t u r ( i n K):
4 T1=300;
5//F i n a l t e m p e r a t u r e o f o x y g e n ( i n K):
6 T2=900;
7//P r e s s u r e o f o x y g e n ( i n k Pa ):
8 p=150;
9//S p e c i f i c h e a t a t c o n s t a n t p r e s s u r e ( i n J/kg K):
10 cp=909.4;
Example 1.02 1.02.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('1.02.sce')
2 f i l ename=pathname+f i l e s e p ( )+'1.02data.s c i'
3 exec( f i l ename )
4//S p e e d a t w h i c h t h e b a l l h i t s t h e g r o u n d ( i n m/s e c ):
5 V=sqrt (mg/k(1%e^(2k/m(y0) ) ) )
6//T e r m i n a l s p e e d ( i n m/s e c ):
7 Vt=sqrt (mg/k)
8//R a t i o o f a c t u a l s p e e d t o t h e t e r m i n a l s p e e d:
9 r=V/Vt;
10 printf ("nnnnRESULTSnnnn")
11 printf ("nnnnSpeed at which the bal l hi t s he ground:%f
m/sec nnnn",V)
12 printf ("nnnnRatio of act ual speed to the termi nal speed
:%fnnnn",r )
Example 1.02d 1.02-data.sci
1//Ma s s o f b a l l ( i n k g ):
2 m=0.2;
3//H e i g h t f o m w h i c h b a l l i s d r o p p e d ( i n m):
4 y0=500;
5//V a l u e o f k:
6 k=210^4;
7//A c c l e r a t i o n d u e t o g r a v i t y ( i n m/s e c ^ 2 ):
8 g=9.81;
11
Chapter 2
Fundamental Concepts
2.1 Discussion
When executing the code fromthe editor,use the'Execute File into Scilab'tab
and not the'Load in Scilab'tab
The.sci les of the respective problems contain the input parameters of
the question
2.2 Scilab Code
Example 2.02 2.02.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('2.02.sce')
2 f i l ename=pathname+f i l e s e p ( )+'2.02data.s c i'
3 exec( f i l ename )
4
5//V i s c o s i t y i n u n i t s o f l b f s/f t ^ 2:
6 u1=u/100/454/32.230.5
7//K i n e m a t i c v i s c o s i t y ( i n m/s e c ^ 2 ):
8 v=u1/SG/d( 0.305) ^2
9//S h e a r s t r e s s o n t h e u p p e r p l a t e ( l b f/f t ^ 2 ):
10 tu=u1U/D1000
11//S h e a r s t r e s s o n t h e l o w e r p l a t e ( i n Pa )
12 t l=tu 4.45/0.305^2
13 printf ("nnnnRESULTSnnnn")
12
14 printf ("nnn nVi s cos i t y i n uni t s of l bf s/f t ^2:%1.8 f
$l bf s/f t ^2nnnn",u1)
15 printf ("nnnnKinematic vi s c o s i t y:%1.8 f m/sec ^2nnnn",v)
16 printf ("nnnnShear s t r e s on the upeer pl at e:%f l bf/f t
^2nnnn",tu )
17 printf ("nnnnSear s t r e s s on the l ower pl at e:%f Pannnn",
t l )
Example 2.02d 2.02-data.sci
1//Ma s s o f o x y g e n p r e s e n t ( i n k g ):
2 m=0.95;
3//I n i t i a l t e m p e r a t u r ( i n K):
4 T1=300;
5//F i n a l t e m p e r a t u r e o f o x y g e n ( i n K):
6 T2=900;
7//P r e s s u r e o f o x y g e n ( i n k Pa ):
8 p=150;
9//S p e c i f i c h e a t a t c o n s t a n t p r e s s u r e ( i n J/kg K):
10 cp=909.4;
13
Chapter 3
Fluid Statics
3.1 Discussion
When executing the code fromthe editor,use the'Execute File into Scilab'tab
and not the'Load in Scilab'tab
The.sci les of the respective problems contain the input parameters of
the question
When we execute S 3.01,we get Fig.3.1.
3.2 Scilab Code
Example 3.01 3.01.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('3.01.sce')
2 f i l ename=pathname+f i l e s e p ( )+'3.01data.s c i'
3 exec( f i l ename )
4//Tu b e d i a m e t e r ( i n mm):
5 D=1:25;
6 D1=D/1000
7 [m n]=si ze (D1)
8 for i =1:n
9//C h a n g e i n l i q u i d l e v e l f o r w a t e r ( i n mm):
10 dhw( i )=4STwcosd ( thetaw)/dw/g/D1( i );
11//C h a n g e i n l i q u i d l e v e l f o r m e r c u r y ( i n mm):
12 dhm( i )=4STmcosd ( thetam)/dm/g/D1( i );
14
13 end;
14
15//P l o t t i n g t u b e d a i m e t e r a n d w a t e r l e v e l:
16 plot (D11000,dhw,'o')
17//P l o t t i n g t u b e d a i m e t e r a n d m e r c u r y l e v e l:
18 plot (D11000,dhm,'')
19 l egend ( ['Water';'Mercury'] );
20 xti tl e ('Li qui d l e ve l vs Tube di ameter','Li qui d l e ve l ( i n
mm)','Tube di ameter ( i n mm)')
Example 3.01d 3.01-data.sci
1//S u r f a c e t e n s i o n o f w a t e r ( i n mN/m):
2 STw=72.810^3;
3//S u r f a c e T e n s i o n o f m e r c u r y ( i n mN/m):
4 STm=37510^3;
5//C o n t a c t a n g l e f o r w a t e r:
6 thetaw=0;
7//C On t a c t a n g l e f o r m e r c u r y:
8 thetam=140;
9//D e n s i t y o f w a t e r ( i n k g/m^ 3 ):
10 dw=1;
11//D e n s i t y o f m e r c u r y ( i n k g/m^ 3 ):
12 dm=13.6;
13//A c c e l e r a t i o n d e t o g r a v i t y ( i n m/s e c ):
14 g=9.81;
Example 3.03 3.03.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('3.03.sce')
2 f i l ename=pathname+f i l e s e p ( )+'3.03data.s c i'
3 exec( f i l ename )
4//P r e s s u r e d i f f e r e n c e ( i n l b f/i n ^ 2 ):
5 dp=gd(d1+SGmd2SGod3+SGmd4+d5)/12/144
6 printf ("nnnnRESULTSnnnn")
7 printf ("nnnnPressure di f f e r e nc e between A and B:%f l bf
/i n ^2nnnn",dp)
15
Figure 3.1:Output graph of S 3.01
16
Example 3.03d 3.03-data.sci
1//A c c e l e r a t i o n d u e t o g r a v i t y ( i n f t/s e c ^ 2 ):
2 g=32.2;
3//S p e c i f i c g r a v i t y o f m e r c u r y:
4 SGm=13.6;
5//S p e c i f i c g r a v i t y o f o i l:
6 SGo=0.88;
7//S p e c i f i c g r a v i t y o f w a t e r:
8 SGw=1;
9//D e n s i t y o f w a t e r ( i n s l u g/f t ^ 3 ):
10 d=1.94;
11//H e i g h t s o f l i q u i d i n v a r i o u s t u b e s ( i n i n c h e s ):
12 d1=10;
13 d2=3;
14 d3=4;
15 d4=5;
16 d5=8;
Example 3.04 3.04.sci
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('3.04.sce')
2 f i l ename=pathname+f i l e s e p ( )+'3.04data.s c i'
3 exec( f i l ename )
4//A s s u mi n g t e m p e r a t u r e v a r i e s l i n e a r l y w i t h a l t i t u d e:
5//T e m p e r a t u r e g r a d i e n t ( i n F/f t ):
6 m=(T1T2)/( z2z1 )
7//V a l u e o f g/( m R ):
8 v=g/m/R/32.2
9//P r e s s u r e a t V a i l P a s s ( i n i n c h e s o f Hg ):
10 p12=p1 ((T2+460)/(T1+460) ) ^v
11//P e r c e n t a g e c h a n g e i n d e n s i t y:
12 pc1=(p12/p1(T1+460)/(T2+460)1)100
13//A s s u mi n g d e n s i t y i s c o n s t a n t:
14//P r e s s u r e a t V a i l P a s s ( i n i n c h e s o f Hg ):
15 p22=p1(1(g( z2z1 )/(R32.2)/(T1+460) ) )
17
16//P e r c e n t a g e c h a n g e i n d e n s i t y:
17 pc2=0;
18//A s s u mi n g t e m p e r a t u r e i s c o n s t a n t:
19//P r e s s u r e a t V a i l P a s s ( i n i n c h e s o f Hg ):
20 p32=p1%e^(g( z2z1 )/(R32.2)/(T2+460) )
21//P e r c e n t a g e c h a n g e i n d e n s i t y:
22 pc3=(p32/p1(T1+460)/(T1+460)1)100
23//F o r a n a d i a b a t i c a t m o s p h e r e:
24 p42=p1((62+460)/(80+460) ) ^( k/(k1) )
25//P e r c e n t a g e c h a n g e i n d e n s i t y:
26 pc4=(p42/p1(T1+460)/(T2+460)1)100
27 printf ("nnnnRESULTSnnnn")
28 printf ("nnnn1) I f temperature var i e s l i ne a r l y with
al t i t ude nnnn")
29 printf ("nnnnntAtmospheri c pr es s ur e at Vai l Pass:%f
i nches of Hgnnnn",p12 )
30 printf ("nnnnntPercentage change i n dens i t y wrt Denver:
%f percent nnnn",pc1 )
31 printf ("nnnn2) I f dens i t y i s constant nnnn")
32 printf ("nnnnntAtmospheri c pr es s ur e at Vai l Pass:%f
i nches of Hgnnnn",p22 )
33 printf ("nnnnntPercentage change i n dens i t y wrt Denver:
%f percent nnnn",pc2 )
34 printf ("nnnn3) I f temperature i s constant nnnn")
35 printf ("nnnnntAtmospheri c pr es s ur e at Vai l Pass:%f
i nches of Hgnnnn",p32 )
36 printf ("nnnnntPercentage change i n dens i t y wrt Denver:
%f percent nnnn",pc3 )
37 printf ("nnnn4) For an adi abat i c atmospherennnn")
38 printf ("nnnnntAtmospheri c pr es s ur e at Vai l Pass:%f
i nches of Hgnnnn",p42 )
39 printf ("nnnnntPercentage change i n dens i t y wrt Denver:
%f percent nnnn",pc4 )
Example 3.04d 3.04-data.sci
1//E l e v a t i o n o f D e n v e r ( i n f t ):
2 z1=5280;
18
3//P r e s s u r e a t D e n v e r ( i n mm o f Hg ):
4 p1=24.8;
5//T e m p e r a t u r e a t D e n v e r ( i n F ):
6 T1=80;
7//E l e v a t i o n a t V a i l P a s s ( i n f t ):
8 z2 =10600;
9//T e m p e r a t u r e a t V s i l P a s s ( i n F ):
10 T2=62;
11//V a l u e o f R i n f t  l b f/l bm R ):
12 R=53.3;
13//A c c e l e r a t i o n d u e t o g r a v i t y ( i n f t/s e c ^ 2 ):
14 g=32.2;
15//V a l u e o f a d i a b a t i c c o n s t a n t:
16 k=1.4;
Example 3.05 3.05.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('3.05.sce')
2 f i l ename=pathname+f i l e s e p ( )+'3.05data.s c i'
3 exec( f i l ename )
4//Ne t f o r c e o n t h e g a t e ( i n kN ):
5 Fr=dgw(DL+L^2/2 si nd ( theta ) )
6//C e n t r e o f p r e s s u r e:
7//C a l c u l a t i o n f o r y c o o r d i n a t e:
8 yc=D/si nd ( theta )+L/2
9//Ar e a ( i n m^ 2 ):
10 A=Lw
11//Mo me n t o f i n e r t i a o f r e c t a n g u l a r g a t e ( i n m^ 4 ):
12 Ixx=wL^3/12
13//y c o o r d i n a t e ( i n m):
14 y=yc+Ixx/A/yc
15//C a l c u l a t i o n f o r x c o o r d i n a t e:
16 Ixy=0
17 xc=w/2
18//x c o o r d i n a t e ( i n m):
19 x=xc+Ixy/A/xc
20 printf ("nnnnRESULTSnnnn")
21 printf ("nnnnNet f or c e on the gate:%f kNnnnn",Fr/1000)
19
22 printf ("nnnnCoordi nate of cent r e of pr es s ur e:( %0.1 f,%0
.1 f ) nnnn",x,y)
Example 3.05d 3.05-data.sci
1//L e n g t h o f g a t e ( i n m):
2 L=4;
3//Wi d t h o f g a t e ( i n m):
4 w=5;
5//De p t h o f g a t e u n d e r w a t e r ( i n m):
6 D=2;
7//D e n s i t y o f w a t e r ( i n k g/m ^ 3:
8 d=999;
9//A c c e l e r a t i o n d u e t o g r a v i t y ( i n m/s e c ^ 2 ):
10 g=9.81;
11//A n g l e o f g a t e w i t h h o r i z o n t a l:
12 theta =30;
Example 3.06 3.06.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('3.06.sce')
2 f i l ename=pathname+f i l e s e p ( )+'3.06data.s c i'
3 exec( f i l ename )
4//F o r c e r e q u i r e d t o k e e p t h e d o o r s h u t ( i n l b f ):
5 function y=f ( z ),y=b/Lp0z+db/L(Lzz ^2),endfunction
6 Ft=intg (0,L,f )
7 printf ("nnnnRESULTSnnnn")
8 printf ("nnnnForce r equi r edt o kep the door shut:%.1 f
l bf nnnn",Ft )
Example 3.06d 3.06-data.sci
1//P r e s s u r e a p l l i e d o n t h e d o o r ( i n p s f g ):
2 p0=100;
3//L e n g t h o f d o o r ( i n f e e t ):
4 L=3;
5//B r e a d t h o f t h e d o o r ( i n f e e t ):
20
6 b=2;
7//D e n s i t y o f l i q i u i d ( i n l b f/f t ^ 3 ):
8 d=100;
Example 3.07 3.07.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('3.07.sce')
2 f i l ename=pathname+f i l e s e p ( )+'3.07data.s c i'
3 exec( f i l ename )
4//H o r i z o n t a l c o mp o n e n t o f r e s u l t a n t f o r c e ( i n kN ):
5 Frh=0.5dgwD^2
6//L i n e o f a c t i o n o f F r h ( i n m):
7 y1=0.5D+wD^3/12/(0.5D)/(wD)
8//V e r t i c a l c o mp o n e n t o f r e s u l t a n t f o r c e ( i n kN ):
9 function y=q( x),y=dgw(Dsqrt ( ax) ),endfunction
10 Frv=intg (0,D^2/a,q)
11//L i n e o f a c i o n o f F r v ( i n m):
12 function k=f ( x),k=dgw/Frvx(Dsqrt ( ax) ),
endfunction
13 xa=intg (0,D^2/a,f )
14//F o r c e r e q u i r e d t o k e e p t h e g a t e i n e q u i l i b r i u m ( i n kN )
:
15 Fa=1/l ( xaFrv+(Dy1) Frh)
16 printf ("nnnnRESULTSnnnn")
17 printf ("nnnnForce r equi r ed to keep the gate at
equi l i br i um:%f kNnnnn",Fa/1000)
Example 3.07d 3.07-data.sci
1//Wi d t h o f g a t e ( i n m):
2 w=5;
3//De p t h o f w a t e r ( i n m):
4 D=4;
5//D e n s i t y o f w a t e r ( i n k g/m^ 3 );
6 d=999;
7//A c c e l r a t i o n d e t o g r a v i t y ( i n m/s e c ^ 2 ):
8 g=9.81;
9//V a l u e o f a ( i n m):
21
10 a=4;
11//P o i n t w h e r e f o r c e a c t s ( i n m):
12 l =5;
22
Chapter 4
Basic Equations in Integral
form for a Control Volume
4.1 Discussion
When executing the code fromthe editor,use the'Execute File into Scilab'tab
and not the'Load in Scilab'tab
The.sci les of the respective problems contain the input parameters of
the question
When we execute S 4.11,we get Fig.4.1.
4.2 Scilab Code
Example 4.01 4.01.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('4.01.sce')
2 f i l ename=pathname+f i l e s e p ( )+'4.01data.s c i'
3 exec( f i l ename )
4//I f I = i n t e g r a l o f ( pV.dA ):
5//F o r s y s t e m:I c s =I A1 +I A2 +I A3 +I A4.
6//F o r a r e a 1
7 IA1=dV1A1
8//F o r a r e a 3:I A2 =d  V3  A3=m3
9 IA3=m3
10//F o r a r e a 4:I A4 =d  V4  A4=d  Q4
23
11 IA4=dQ4
12//F o r a r e a 2:
13 IA2=IA1IA3IA4
14//V e l o c i t y a t s e c t i o n 2 ( i n f t/s e c ):
15 V2=IA2/d/A2
16//V2 i s i n t h e n e g a t i v e y d i r e c t i o n
17 printf ("nnnnRESULTSnnnn")
18 printf ("nnnnVel oci ty at s e c t i on 2:%.0 f j f t/sec nnnn",
V2)
Example 4.01d 4.01-data.sci
1//Ar e a o f 1 ( i n f t ^ 2 ):
2 A1=0.2;
3//Ar e a o f 2 ( i n f t ^ 2 ):
4 A2=0.5;
5//Ar e a o f 3 ( i n f t ^ 2 ):
6 A3=0.4;
7//Ar e a o f 4 ( i n f t ^ 2 ):
8 A4=0.4;
9//D e n s i t y o f w a t e r ( i n s l u g/f t ^ 3 ):
10 d=1.94;
11//Ma s s f l o w r a t e o u t o f s e c t i o n 3 ( i n s l u g/s e c ):
12 m3=3.88;
13//Vo l me f l o w r a t e i n s e c t i o n 4 ( i n f t ^ 3/s e c ):
14 Q4=1;
15//V e l o c i t y a t 1 ( i n f t/s e c ):
16 V1=10;
Example 4.02 4.02.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('4.02.sce')
2 f i l ename=pathname+f i l e s e p ( )+'4.02data.s c i'
3 exec( f i l ename )
4//I f I = i n t e g r a l o f ( pV.dA ):
5//F o r s y s t e m:I CS = I a b + I b c + I c d + I d a
6//Bu t I CS =0
7
24
8//F o r Aa b:
9 function p=f ( y),p=dUwy^0,endfunction
10 IAab=intg (0,t,f )
11
12//F o r Ac d:
13 function q=g( y),q=dUw(2y/t (y/t ) ^2),endfunction
14 IAcd=intg (0,t,g)
15
16//Ma s s f l o w r a t e a c r o s s s u r f a c e b c ( i n k g/s e c ):
17 mbc=(IAabIAcd)/1000
18 printf ("nnnnRESULTSnnnn")
19 printf ("nnnnMass f l ow r at e acr os s s ur f ace bc:%.4 f kg/
sec nnnn",mbc)
Example 4.02d 4.02-data.sci
1//F l o w v e l o c i t y a h e a d o f t h e p l a t e ( i n m/s e c ):
2 U=30;
3//B o u n d a r y l a y e r t c k n e s s a t l o c a t i o n d ( i n mm):
4 t =5;
5//D e n s i t y o f f l u i d a i r ( i n k/m^ 3 ):
6 d=1.24;
7//P l a t e wd t h p e r p e n d i c u l a r t o t h e p l a t e ( i n m):
8 w=0.6;
Example 4.03 4.03.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('4.03.sce')
2 f i l ename=pathname+f i l e s e p ( )+'4.03data.s c i'
3 exec( f i l ename )
4//R a t e o f c h a n g e o f a i r d e n s i t y i n t a n k ( i n ( k g/m^ 3 )/s ):
5 r=dvA/V/10^6
6 printf ("nnnnRESULTSnnnn")
7 printf ("nnnnRate of change of ai r dens i t y i n tank:%.3 f
kg/m^3nnnn",r )
8 printf ("nnnnThe dens i t y decr eas es as i s i ndi cat ed by
the negati ve s i gnnnnn")
25
Example 4.03d 4.03-data.sci
1//Vo l u me o f t a n k ( i n m^ 3 ):
2 V=0.05;
3//P r e s s u r e o f a i r ( I n k Pa ):
4 p=800;
5//T e m p e r a t u r e o f t a n k ( i n C ):
6 T=15;
7//V e l o c i t y o f l e a v i g a i r ( i n m/s e c ):
8 v=311;
9//D e n s i t y o f a i r ( i n k g/m^ 3 ):
10 d=6.13;
11//Ar e a o f v a l v e e x i t ( i n mm^ 2 ):
12 A=65;
Example 4.04 4.04.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('4.04.sce')
2 f i l ename=pathname+f i l e s e p ( )+'4.04data.s c i'
3 exec( f i l ename )
4//1 ) C o n t r o l Vo l u me s e l e c t e d s o t h a t a r e a o f l e f t
s u r f a c e i s e q u a l t o t h e a r e a o f t h e r i g h t s u r f a c e
5 u1=15;
6//F o r c e o f s u p p o r t o n c o n t r o l v o l u m ( i n kN ):
7 function y=f (A),y=u1dV,endfunction
8 Rx1=intg ( 0,0.01,f )
9//H o r i z o n t a l f o r c e o n s u p p o r t ( i n kN ):
10 Kx=Rx1
11//2 ) C o n t r o l v o l u m e s a r e s e l e c t e d d o t h a t t h e a r e a o f
t h e l e f t a n d r i g h t s u r f a c e s a r e e q u i a l t o t h e a r e a
o f t h e p l a t e
12
13 function z=g(A),z=u1dV,endfunction
14 Fsx=intg ( 0,0.01,g)
15//Ne t f o r c e o n p l a t e:Fx =0=Bx p a  Ap+Rx
16//Rx=p a  Ap+Bx
17//Fr o m t h e a b o v e,i t i s o b t a i n e d t h a t:
18 Rx2=2.25
26
19//H o r i z o n t a l f o r c e o n s u p p o r t ( i n kN ):
20 Kx2=Rx2
21 printf ("nnnnRESULTSnnnn")
22 printf ("nnnnHori zontal f or c e on support:%.3 f kNnnnn",
Kx/1000)
Example 4.04d 4.04-data.sci
1//V e l o c i t y o f w a t e r l e a v i n g t h e n o z l e ( i n m/s e c ):
2 V=15;
3//Ar e a o f n o z z l e ( i n m^ 2 ):
4 A=0.01;
5//D e n s i t y o f w a t e r ( i n k g/m^ 3 ):
6 d=999;
Example 4.05 4.05.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('4.05.sce')
2 f i l ename=pathname+f i l e s e p ( )+'4.05data.s c i'
3 exec( f i l ename )
4//We i g h t o f w a t e r i n t h e t a n k ( i n l b f ):
5 d1=62.4;
6 WH2O=d1Ah
7 v=5;
8//T o t a l b o d y f o r c e i n n e g a t i v e y d i r e c t i o n ( l b f ):
9 function y=f (A),y=vd2V1,endfunction
10 F=intg (0,A1,f )
11//F o r c e o f s c a l e o n c o n t r o l v o l u me ( i n kN ):
12 Ry=W+WH2OF
13 printf ("nnnnRESULTSnnnn")
14 printf ("nnnnScal e Reading:%.3 f l bf nnnn",Ry)
Example 4.05d 4.05-data.sci
1//H e i g h t o f t h e c o n t a i n e r ( i n f t ):
2 l =2;
3//Ar e a o f c r o s s s e c t i o n ( i n f t ^ 2 ):
27
4 A=1;
5//We i g h t o f c o n t a i n e r ( i n l b f ):
6 W=5;
7//Wa t e r d e p t h ( i n f t ):
8 h=1.9;
9//Ar e a o f o p e n i n g 1 ( i n f t ^ 2 ):
10 A1=0.1;
11//V e l o c i t y a t o p e n i n g 1 ( i n f t/s e c ):
12 V1=5;
13//Ar e a o f o p e n i n g 2 ( i n f t ^ 2 ):
14 A2=0.1;
15//Ar e a o f o p e n i n g 1 ( i n f t ^ 2 ):
16 A3=0.1;
17//D e n s i t y o f w a t e r ( i n s l u g/f ^ 3 ):
18 d2=1.94;
Example 4.06 4.06.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('4.06.sce')
2 f i l ename=pathname+f i l e s e p ( )+'4.06data.s c i'
3 exec( f i l ename )
4//X c o mp o n e n t o f r e a c t i o n f o r c e p e r u n i t w i d t h o f t h e
g a t e ( i n N/m):
5 Rxw=(d(V2^2D2V1^2D1) )(dg/2(D1^2D2^2) )
6//H o r i z o n t a l f o r c e e x e r t e d p e r u n t w i d t h o n t h e g a t e ( i n
N/m):
7 Kxw=Rxw
8 printf ("nnnnRESULTSnnnn")
9 printf ("nnnnHori zontal f or c e exerted per unt width on
the gate:%.3 f kN/mnnnn",Kxw/1000)
Example 4.06d 4.06-data.sci
1//D i a m e t e r o f c h a n n e l ( i n m):
2 D1=1.5;
3//V e l c i t y o f f l o w i n c h a n n e l ( i n m/s e c ):
4 V1=0.2;
5//D i a m e t e r a t s e c t i o n 2 ( i n m):
28
6 D2=0.0563;
7//V e l o c i t y a s e c t i o n 2 ( i n m/s e c ):
8 V2=5.33;
9//D e n s i t y o f w a t e r ( i n k g/m^ 3 ):
10 d=999;
11//A c c e l e r a t i o n d u e t o g r a v i t y ( i n m/s e c 2 ):
12 g=9.81;
Example 4.07 4.07.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('4.07.sce')
2 f i l ename=pathname+f i l e s e p ( )+'4.07data.s c i'
3 exec( f i l ename )
4//V e l o c i t y a t s e c t i o n 1 ( i n m/s e c ):
5 V1=V2A2/A1
6//Ga u g e p r e s s u r e ( i n k Pa ):
7 p1g=p1patm
8 u1=V1;u2=V2;
9//R e a c t i o n f o r c e c o mp o n e n t i n t h e x d i r e c t i o n ( i n N ):
10 Rx=p1gA1u1dV1A1
11//R e a c t i o n f o r c e c o mp o n e n t i n t h e y d i r e c t i o n ( i n N ):
12 Ry=u2dV2A2
13 printf ("nnnnRESULTSnnnn")
14 printf ("nnnnForce to hol d elbow act i ng to the l e f t:%.3
f kNnnnn",Rx/1000)
15 printf ("nnnnForce to hol d elbow act i ng downwards:%.3 f
Nnnnn",Ry)
Example 4.07d 4.07-data.sci
1//P r e s s u r e a t i n l e t t o t h e e l b o w ( i n N/m^ 2 ):
2 p1=2.2110^5;
3//Ar e a o f c r o s s s e c t i o n ( i n m^ 2 ):
4 A1=0.01;
5//V e l o c i t y a t s e c t o n 2 ( i n m/s e c ):
6 V2=16;
7//Ar e a o f c r o s s s e c t i o n o f s e c t i o n 2 ( i n m^ 2 ):
8 A2=0.0025;
29
9//A t m o s p h e r i c p r e s s u r e ( i n k Pa ):
10 patm=1.01210^5;
Example 4.08 4.08.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('4.08.sce')
2 f i l ename=pathname+f i l e s e p ( )+'4.08data.s c i'
3 exec( f i l ename )
4//T e n s i o n r e q u i r e d t o p u l l t h e b e l t ( i n l b f ):
5 T=Vbel t m/32.2
6 printf ("nnnnRESULTSnnnn")
7 printf ("nnnnTension r equi r ed to pul l the bel t:%.3 f l bf
nnnn",T)
Example 4.08d 4.08-data.sci
1//V e l o c i t y o f c o n v e y o r b e l t ( i n f t/s e c ):
2 Vbel t =3;
3//V e l o c i t y o f s a n d a l l i n g o n t o b e l t ( i n f t/s e c ):
4 Vsand=5;
5//F l o w r a t e ( i n l b m/s e c ):
6 m=500;
Example 4.09 4.09.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('4.09.sce')
2 f i l ename=pathname+f i l e s e p ( )+'4.09data.s c i'
3 exec( f i l ename )
4//Mi n i mu m g a u g e p r e s s u r e r e q u i r e d ( i n l b f/i n ^ 2 ):
5 pg=8/%pi ^2d/D1^4Q^2((D1/D2) ^41)144
6 printf ("nnnnRESULTSnnnn")
7 printf ("Minimum gauge pr es s ur e r equi r ed:%.3 f l bf/i n ^2"
,pg)
Example 4.09d 4.09-data.sci
1//N o z z l e i n l e t d i a m e t e r ( i n i n c h e s s ):
30
2 D1=3;
3//N o z z l e e x i t d i a m e t e r ( i n i n c h e s ):
4 D2=1;
5//D e s i r e d v o l u me f l o w r a t e ( i n f t ^ 3/s e c ):
6 Q=0.7;
7//D e n s i t y o f w a t e r ( i n s l u g/f t ^ 3 ):
8 d=1.94;
Example 4.10 4.10.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('4.10.sce')
2 f i l ename=pathname+f i l e s e p ( )+'4.10data.s c i'
3 exec( f i l ename )
4 u1=VU
5 u2=(VU) cosd ( theta )
6 v2=(VU) si nd ( theta )
7 V1=VU
8 V2=V1
9//X c o mp o n e n t o f mo me n t e q u a t i o n ( i n N ):
10 function y=f (A),y=u1(dV1),endfunction
11 function z=g(A),z=u2dV2,endfunction
12 Rx=intg (0,A,f )+intg (0,A,g)
13
14//Y c o mp o n e n t o f mo me n t e q u a t i o n ( i n N ):
15 function a=h(A),a=v2dV1,endfunction
16 Ry=intg (0,A,h)//T h i s i s a f t e r n e g l e c t i n g w e i g h t o f
v a n e a n d t h e w a t e r.
17 printf ("nnnnRESULTSnnnn")
18 printf ("nnnnNet f or c e on the vane:%.3 f i+%.2 f j kNnnnn
",Rx/1000,Ry/1000)
Example 4.10d 4.10-data.sci
1//Va n e t u r n i n g a n g l e:
2 theta =60;
3//S p e e d o f v a n e ( i n m/s e c ):
4 U=10;
5//Ar e a o f n o z z l e ( i n m2 ):
31
6 A=0.003;
7//F l o w v e l o c i t y o f w a t e r ( i n m/s e c ):
8 V=30;
9//D e n s i t y o f w a t e r ( i n k g/m^ 3 ):
10 d=999;
Example 4.11 4.11.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('4.11.sce')
2 f i l ename=pathname+f i l e s e p ( )+'4.11data.s c i'
3 exec( f i l ename )
4//E v a l u a t i n g t h e v a l u e o f Vb:
5 Vb=V(1cosd ( theta ) ) dA/M
6//V a l u e o f U/V f o r v a r i o u s v a l u e s o f t
7 t =0:20;
8 [m n]=si ze ( t )
9 for i =1:n
10 U
V( i )=Vbt ( i )/(1+Vbt ( i ) );
11 end
12
13//P l o t t i n g U/V v s t:
14 plot ( t,U
V)
15 xti tl e ('U/V vs t','t ( i n sec )','U/V')
Example 4.11d 4.11-data.sci
1//Ma s s o f v a n e a n d c a r t ( i n k g ):
2 M=75;
3//T u r n i n g a n g l e o f v a n e:
4 theta =60;
5//S p e e d o f w a t e r l e a v i n g n o z z l e h o r i z o n t a l l y ( i n m/s e c ):
6 V=35;
7//E x i t a r e a o f n o z z l e ( i n m^ ):
8 A=0.003;
9//D e n s i t y o f w a t e r ( i n k g/m^ 3 ):
10 d=999;
32
Figure 4.1:Output graph of S 4.11
33
Example 4.12 4.12.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('4.12.sce')
2 f i l ename=pathname+f i l e s e p ( )+'4.12data.s c i'
3 exec( f i l ename )
4//A c c e l e r a t i o n o f r o c k e t a t t =0 ( i n m/s e c ^ 2 ):
5 Veme/M0g
6//V e l o c i t y o f r o c k e t a t t =1 0 ( i n m/s e c ):
7 function y=f ( t ),y=Veme/(M0met )g,endfunction
8 Vcv=intg (0,t,f )
9 printf ("nnnnRESULTSnnnn")
10 printf ("nnnnVel oci ty of r ocket at t =10:%.1 f m/secnnnn"
,Vcv)
Example 4.12d 4.12-data.sci
1//I n i t i a l ma s s o f t h r o c k e t ( i n k g ):
2 M0=400;
3//R a t e o f f u e l c o n s u m p t i o n ( i n k g/s e c ):
4 me=5;
5//E x h a u s t v e l o c i t y ( i n m/s e c ):
6 Ve=3500;
7//A c c e l e r a t i o n d u e t o g r a v i t y ( i n m/s e c ^ 2 ):
8 g=9.81;
9//Ti me a f t e r w h i c h v e l o c i t y i s t o b e c a l c u l a t e d ( i n s e c )
:
10 t =10;
Example 4.14 4.14.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('4.14.sce')
2 f i l ename=pathname+f i l e s e p ( )+'4.14data.s c i'
3 exec( f i l ename )
4//Ar e a o f j e t ( i n mm^ 2 ):
5 Aj et=%pi/4D^2
6//J e t s p e e d r e l a t i v e t o t h e n o z z l e ( i n m/s e c ):
7 Vrel=Q/2/Aj et 10^6/60/1000
8//V a l u e o f w R i n m/s e c:
34
9 wR=wR2%pi/60/1000
10//F r i c t i o n t o r q u e a t p i v o t ( i n Nm):
11 Tf=R( Vrel cosd ( al pha )wR) dQ/1000/60/1000
12 printf ("nnnnRESULTSnnnn")
13 printf ("nnnnJet speed r e l a t i ve to each nozzl e:%.2 f m/
sec nnnn",Vrel )
14 printf ("nnn nFr i ct i on torque at pi vot:%.5 f Nmnnnn",Tf )
Example 4.14d 4.14-data.sci
1//I n l e t g a u g e p r e s s u r e ( i n k Pa ):
2 p=20;
3//Vo l u me f l o w r a t e o f w a t e r t h r o u g h t h e s p r i n k l e r ( i n l/
mi n ):
4 Q=7.5;
5//S p e e d o f r o t s t i o n o f s p r i n k l e r ( i n r pm ):
6 w=30;
7//D i a m e t e r o f j e t f s p r i n k l e ( i n mm):
8 D=4;
9//R a d i u s o f s p r i n k l e r ( i n mm):
10 R=150;
11//S u p p l y p r e s s u r e t o s p r i n k l e r ( i n k Pa ):
12 p=20;
13//A n g l e a t w h i c h j e t i s s p r a y e d w r t h o r i z o n t a l:
14 al pha =30;
15//D e n s i t y o f w a t e r ( i n k g/m^ ):
16 d=999;
Example 4.16 4.16.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('4.16.sce')
2 f i l ename=pathname+f i l e s e p ( )+'4.16data.s c i'
3 exec( f i l ename )
4//V e l o c i t y a t e x i t ( i n f t/s e c ):
5 V2=mR(T2+460)/A2/p2/144
6//As p o w e r i n p u t i s t o CV,Ws = 600
7//R a t e o f h e a t t r a n s f e r ( i n Bt u/s e c ):
8 Q=Ws550/778+mcp(T2T1)+mV2^2/2/32.2/778
35
9 printf ("nnnnRESULTSnnnn")
10 printf ("nnnnRate of heat t r ans f e r:%.3 f Btu/secnnnn",Q)
Example 4.16d 4.16-data.sci
1//P r e s s u r e a t e n t r y ( i n p s i a ):
2 p1=14.7;
3//T e m p e r a t u r e a t e n t r y ( i n F ):
4 T1=70;
5//P r e s s u r e a t e x i t ( i n p s i a ):
6 p2=50;
7//T e m p r a t u r e a e x i t ( i n F ):
8 T2=100;
9//C r o s s s e c t i o n a l a r e a o f t h e p i p e a t e x i t ( i n f t ^ 2 ):
10 A2=1;
11//Ma s s f l o w r a t e ( i n l b f/s e c ):
12 m=20;
13//P o we r i n p u t t o t h e c o m p r e s s o r ( i n hp ):
14 Ws=600;
15//V a l u e o f c p ( i n Bt u/l bm R ):
16 cp=0.24;
17//V a l u e o f g a s c o n s t a n t ( i n f t  l b f/( l bm R ) )
18 R=53.3;
Example 4.17 4.17.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('4.17.sce')
2 f i l ename=pathname+f i l e s e p ( )+'4.17data.s c i'
3 exec( f i l ename )
4//D e n s i t y o f t a n k ( i n k g/m^ 3 ):
5 d=(p1+patm)/R/T
6//Ma s s f l o w r a t e o f a i r i n t o t h e t a n k ( i n k g/s e c ):
7 m=dVcvr/R/T1000
8 printf ("nnnnRESULTSnnnn")
9 printf ("nnnnMass f l ow r at e of ai r i nt o the tank:%.3 f g
/sec nnnn",m)
Example 4.17d 4.17-data.sci
36
1//Vo l u me o f t a k ( i n m^ 3 ):
2 V=0.1;
3//T e m p e r a t u r e o f l i n e a n d t a n k ( i n K):
4 T=293;
5//I n i t i a l t a n k g a u g e p r e s s u r e ( i n N/m^ 2 ):
6 p1=110^5;
7//A b s o l u t e l i n e p r e s s u r e ( i n N/m^ 2 ):
8 p=210^6;
9//R a t e o f r i s e o f t e m p e r a t u r e a f t e r o p e n i n g o f t h e
v a l v e ( i n C/s e c ):
10 r =0.05;
11//A t m o s p h e r i c p r e s s u r e ( i n N/m^ 2 ):
12 patm=1.0110^5;
13//Ga s C o n s t a n t ( i n Nm/( kg K) ):
14 R=287;
15//V a l u e o f c v ( i n Nm/kg K):
16 cv=717;
37
Chapter 5
Introducton to Dierential
Analysis of Fluid Motion
5.1 Discussion
When executing the code fromthe editor,use the'Execute File into Scilab'tab
and not the'Load in Scilab'tab
The.sci les of the respective problems contain the input parameters of
the question
5.2 Scilab Code
Example 5.02 5.02.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('5.02.sce')
2 f i l ename=pathname+f i l e s e p ( )+'5.02data.s c i'
3 exec( f i l ename )
4//R a t e o f c h a n g e o f d e n s i t y w i t h t i me ( i n k g/m^3  s ):
5 r=dV/L
6 printf ("nnnnRESULTSnnnn")
7 printf ("nnnnRate of change of dens i t y with time:%.1 f
kg/m^3s nnnn",r )
Example 5.02d 5.02-data.sci
38
1//D i s t a n c e f p i s t o n f r o m c l o s e d e n d o f t h e c y l i n d e r a t
t h e g i v e i n s t a n t ( i n m):
2 L=0.15;
3//D e n s i t y o f g a s ( i n k g/m^ 3 ):
4 d=18;
5//V e l o c i t y o f p i s t o n ( i n m/s e c ):
6 V=12;
Example 5.07 5.07.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('5.07.sce')
2 f i l ename=pathname+f i l e s e p ( )+'5.07data.s c i'
3 exec( f i l ename )
4//At p o i n t b,u =3 mm/s e c
5 u=3;
6//D i s p l a c e m e t o f b ( i n mm):
7 xb=ut
8//R a t e o f a n g u l a r d e f o r m a t i o n ( i n s ^ 1 ):
9 def=U/h
10//R a t e o f r o t a t i o n ( i n s ^ 1 ):
11 r ot =0.5U/h
12 printf ("nnnnRSULTSnnnn")
13 printf ("nnnnRate of angul ar def ormati on:%.1 f/secnnnn"
,def )
14 printf ("nnnnRate of r ot at i on:%.1 f/sec nnnn",r ot )
Example 5.07d 5.07d
1//V a l u e o f ( i n mm/s e c ):
2 U=4;
3//V a l u e o f h ( i n mm):
4 h=4;
5//Tme a t w h i c h t o f i n d p o s i t i o n ( i n s e c ):
6 t =1.5;
Example 5.08 5.08.sce
39
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('5.08.sce')
2 f i l ename=pathname+f i l e s e p ( )+'5.08data.s c i'
3 exec( f i l ename )
4//V a l u e o f T:
5 T=log (3/2)/A
6 x0 =1:2;
7 y0 =1:2;
8 for i =1:2
9 for j =1:2
10//F o r X c o o r d i n a t e:
11 X( i ) ( j )=x0( i ) %e^(AT)
12//F o r Y c o o r d i n a t e:
13 Y( i ) ( j )=y0( j ) %e^(AT)
14 end
15 end
16 plot (X,Y)
17//R a t e s o f l i n e a r d e f o r m a t i o n i n X d i r e c t i o n:
18 Ax=0.3;
19//R a t e o f l i n e a r d e f o r m a t i o n i n t h e y d i r e c t i o n:
20 Ay=0.3;
21//R a t e o f v o l u me d i l a t i o n ( s ^ 1 ):
22 v=AA
23//Ar e a o f a b c d:
24 A1=1;
25//Ar e a o f a'b'c'd':
26 A2=(33/2)(4/32/3)
27 printf ("nnnnRESULTSnnnn")
28 printf ("nnnnRates of l i ne ar def ormati on i n X and Y
di r e c t i on:%.1 f/s,%.1 f/snnnn",Ax,Ay)
29 printf ("nnnnRate of volume di l at i on:%.0 f/secnnnn",v)
30 printf ("nnnnArea of abcd and a,b,c,d:%.1 f m^2,%.1 f m^n
nnn",A1,A2)
Example 5.08d 5.08-data.sci
1//V a l u e o f A ( i n s e c ^ 1 ):
2 A=0.3;
40
Example 5.09 5.09.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('5.09.sce')
2 f i l ename=pathname+f i l e s e p ( )+'5.09data.s c i'
3 exec( f i l ename )
4//Vo l u me f l o w r a t e ( i n m^ 3/s e c ):
5 Q=dgsi nd ( theta ) b(h/1000) ^31000/u/3
6 printf ("RESULTS")
7 printf ("nnnnVolume f l ow r at e:%.4 f m^3/sec nnnn",Q)
Example 5.09d 5.09-data.sci
1//T h i c k n e s s o f w a t e r f i l m ( i n mm):
2 h=1;
3//Wi d t h o f s u r f a c e ( i n m):
4 b=1;
5//A n g l e o f i n c l i n a t i o n o f s u r f a c e:
6 theta =15;
7//D e n s i t y o f w a t e r ( i n k g/m^ 3 ):
8 d=999;
9//A c c e l e r a t i o n du t o g r a v i t y ( i n m/s e c ^ 2 ):
10 g=9.81;
11//V i s c o s i t y ( k g/ms ):
12 u=10^3;
41
Chapter 6
Incompressible Inviscid Flow
6.1 Discussion
When executing the code fromthe editor,use the'Execute File into Scilab'tab
and not the'Load in Scilab'tab
The.sci les of the respective problems contain the input parameters of
the question
6.2 Scilab Code
Example 6.01 6.01.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('06.01.sce')
2 f i l ename=pathname+f i l e s e p ( )+'06.01data.s c i'
3 exec( f i l ename )
4//V e l o c i t y o f f l o w ( i n m/s e c ):
5 V=sqrt (dw/log ( ( r+w)/r ) g/dap/1000)
6//Vo l u me f l o w r a t e ( i n m^ 3/s e c ):
7 Q=V(dw)
8 printf ("nnnnRESULTSnnnn")
9 printf ("nnnnVolume f l ow r at e:%.3 f m^3/sec nnnn",Q)
Example 6.01d 6.01-data.sci
1//De p t h o f t h e d u c t ( i n m):
42
2 d=0.3;
3//Wi d t h o f t h e d u c t ( i n m):
4 w=0.1;
5//I n n e r r a d i u s o f t h e b e n d ( i n m):
6 r =0.25;
7//P r e s s u r e d i f f e r e n c e b e t w e e n t h e t a p s ( i n mm o f Hg ):
8 p=40;
9//D e n s i t y o f w a t e r ( i n k g/m^ 3 ):
10 dw=999;
11//A c c e l e r a t i o n d u e t o g r a v i t y ( i n m/s e c ^ 2 ):
12 g=9.8;
13//D e n s i t y o f a i r ( i n k g/m^ 3 ):
14 da=1.23;
Example 6.02 6.02.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('06.02.sce')
2 f i l ename=pathname+f i l e s e p ( )+'06.02data.s c i'
3 exec( f i l ename )
4//V e l o c i t y o f f l o w ( i n m/s e c ):
5 V=sqrt (2dwgp/1000SG/da)
6 printf ("nnnnRESULTSnnnn")
7 printf ("nnnnVel oci ty of f l ow:%.3 f m/sec nnnn",V)
Example 6.02d 6.02-data.sci
1//P r e s s u r e d i f e r e n c e ( i n mm o f me c u r y ):
2 p=30;
3//D e n s i t y o f w a t e r ( i n k g/m^ 3 ):
4 dw=1000;
5//A c e l e r a t i o n d u e t o g r a v i t y ( i n m/s e c ^ 2 ):
6 g=9.81;
7//D e n s i t y o f a i r ( i n k g/m^ 3 ):
8 da=1.23;
9//S p e c i f i c g r a v i t y o f m e r c u r y:
10 SG=13.6;
Example 6.03 6.03.sce
43
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('06.03.sce')
2 f i l ename=pathname+f i l e s e p ( )+'06.03data.s c i'
3 exec( f i l ename )
4//V e l o c i t y o f f l w a t t h e i n l e t ( i n m/s e c ):
5 V1=Ae/Ai V2
6//Ga u g e p r e s s u r e r e q u i r e d a t t h e i n l e t ( i n k Pa ):
7 p=0.5da(V2^2V1^2)
8 printf ("nnnnRESULTSnnnn")
9 printf ("nnnnGauge pr s s ur e r equi r ed at the i nl e t:%.3 f
kPannnn",p/1000)
Example 6.03d 6.03-data.sci
1//Ar e a o f n o z z l e a t i n p u t ( i n m^ 2 ):
2 Ai =0.1;
3//Ar e a o f n o z z l e a t e x i t ( i n m^ 2 ):
4 Ae=0.02;
5//O u t l e t v e l o c i t y o f f l o w ( i n m/s e c ):
6 V2=50;
7//D e n s i t y o f a i r ( i n k g/m^ 3 ):
8 da=1.23;
Example 6.04 6.04.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('06.04.sce')
2 f i l ename=pathname+f i l e s e p ( )+'06.04data.s c i'
3 exec( f i l ename )
4//S p e e d o f w a t e r a t e x i t ( i n m/s e c ):
5 V2=sqrt (2gz )
6//P r e s s u r e a t p o i n t A i n t h e f l o w ( k Pa ):
7 pA=p1+dg(0l ) 0.5dV2^2
8 printf ("nnnnRESULTSnnnn")
9 printf ("nnnnSpeed of water at e xi t:%.3 f m/secnnnn",V2)
10 printf ("nnnnPressure at poi nt A i n the f l ow:%3f kPannn
n",pA/1000)
Example 6.04d 6.04-data.sci
44
1//L e n g t h o f t u b e a b o v e s u r f a c e ( i n m):
2 l =1;
3//De p t h o f e x i t b e l o w w a t e r s u r f a c e ( i n m):
4 z=7;
5//A c c e l e r a t i o n d u e t o g r a v i t y ( i n m/s e c ^ 2 ):
6 g=9.81;
7//D e n s i t y o f w a t e r ( i n k g/m^ 3 ):
8 d=999;
9//A t m o s p h e r i c p r e s s u r e ( i n N/m^ 2 ):
10 p1=1.0110^5;
Example 6.05 6.05.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('06.05.sce')
2 f i l ename=pathname+f i l e s e p ( )+'06.05data.s c i'
3 exec( f i l ename )
4//V e l o c i t y o f f l o w a t t h e e x i t ( i n f t/s e c ):
5 V2=sqrt (2g(DuDd/12) )
6//Vo l u me f l o w r a t e/w i d t h ( f t ^ 2/s e c ):
7 Q=V2Dd/12
8 printf ("nnnnRESULTSnnnn")
9 printf ("nnnnVel oci ty of f l ow at the e xi t:%.3 f f t/secnn
nn",V2)
10 printf ("nnnnVolume f l ow r at e/width:%.3 f f t ^2/sec nnnn",
Q)
Example 6.05d 6.05-data.sci
1//De p t h o f w a t e r a t t h e u p s t r e a m ( o n f e e t ):
2 Du=1.5;
3//De p t h o f w a t e r a t t h e v e n a c o n t r a c t a d o w n s t r e a m f r o m
t h e g a t e ( i n i n c h e s ):
4 Dd=2;
5//A c c e l e r a t i o n d u e t o g r a v i t y ( i n f t/s e c ^ 2 ):
6 g=32.2;
Example 6.06 6.06.sce
45
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('06.06.sce')
2 f i l ename=pathname+f i l e s e p ( )+'06.06data.s c i'
3 exec( f i l ename )
4//P r e s s u r e o f a i r a t 1 0 0 0 m( i n N/m^ 2 ):
5 p=P1pa
6//D e n s i t y o f a i r a t 1 0 0 0 m( i n k g/m^ 3 ):
7 d=D1da
8//S t a g n a t i o n p r e s s u r e a t A ( i n k Pa ):
9 p0A=p+0.5d(V1000/3600) ^2
10//S t a t i c p r e s s u r e a t B ( i n k Pa ):
11 pB=p+d/2((V1000/3600)^2Vb^2)
12 printf ("nnnnRESULTSnnnn")
13 printf ("nnnnStagnati on pr es s ur e at A:%.3 f kPannnn",p0A
/1000)
14 printf ("nnn nSt at i c pr es s ur e at B:%.3 f kPannnn",pB
/1000)
Example 6.06d 6.06-data.sci
1//S p e e d o f p l a n e ( i n km/h r ):
2 V=150;
3//S p e e d a t p o i n t B r e l a t i v e t o t h e w i n g ( i n m/s e c ):
4 Vb=60;
5//D e n s i t y o f a i r ( i n k g/m^ 3 ):
6 da=1.23;
7//A t m o s p h e r i s p r e s s u r e ( i n N/m^ 2 ):
8 pa=1.0110^5;
9//At 1 0 0 0 m,
10//p/p S L:
11 P1=0.8870;
12//d/d S L:
13 D1=0.9075;
Example 6.08 6.08.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('06.08.sce')
2 f i l ename=pathname+f i l e s e p ( )+'06.08data.s c i'
3 exec( f i l ename )
46
4//V e l o c i t y o f f l o w a t e x i t ( i n f t/s e c ):
5 V4=sqrt (2g( z30) )
6//Ma s s f l o w r a t e o f w a t e r ( i n s l u g/s e c ):
7 m=dV4A4/144
8//R i s e i n t e m p e r a t u r e b e t w e e n p o i n t s 1 a n d 2 ( i n R ):
9 T=Q3413/3600/m/32.2
10 printf ("nnnnRESULTSnnnn")
11 printf ("nnnnRi se i n temperature between poi nt s 1 and 2:
%.3 f Rnnnn",T)
Example 6.08d 6.08-data.sci
1//Ar e a o f c r o s s s e c t i o n o f t h e n o z z l e ( i n i n ^ 2 ):
2 A4=0.864;
3//C a p a c i t y o f h e a t e r ( i n kW):
4 Q=10
5//A c c e l e r a t i o n d u e t o g r a v i t y ( i n f t/s e c ^ 2 ):
6 g=32.2;
7//Wa t e r l e v e l i n r e s e r v o i r a b o v e d a t u m l i n e ( i n f t ):
8 z3=10;
9//D e n s i t y o f w a t e r ( I n s l u g/f t ^ 3 ):
10 d=1.94;
Example 6.09 6.09.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('06.09.sce')
2 f i l ename=pathname+f i l e s e p ( )+'06.09data.s c i'
3 exec( f i l ename )
4 t =0:5
5//V a l u e o f s q r t ( 2 g h ):
6 x=sqrt (2gh)
7//V a l u e o f 1/2 L  s q r t ( 2 g h ):
8 y=1/2/Lx
9 [m n]=si ze ( t )
10 i =1:n;
11//V e l o c i t y ( i n m/s e c ):
12 V2=xtanh( yt ( i ) )
13 plot ( t,V2);
47
14 xti tl e ('Streaml i ne f l ow from 1 to 2','Time( i n s )','V2(
i n m/sec )')
Example 6.09d 6.09-data.sci
1//De p t h t o w h i c h w a t e r i s f i l l e d ( i n m):
2 h=3;
3//L e n g t h o f p i p e ( i n m):
4 L=6;
5//D i a m e t e r o f p i p e ( i n mm):
6 D=150;
7//A c c e l e r a t i o n d u e t o g r a v i t y ( i n m/s e c ^ 2 ):
8 g=9.81;
48
Chapter 7
Dimensional Analysis and
Simlitude
7.1 Discussion
When executing the code fromthe editor,use the'Execute File into Scilab'tab
and not the'Load in Scilab'tab
When we execute S 7.05,we get Fig.7.1.
The.sci les of the respective problems contain the input parameters of
the question
7.2 Scilab Code
Example 7.04 7.04.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('7.04.sce')
2 f i l ename=pathname+f i l e s e p ( )+'7.04data.s c i'
3 exec( f i l ename )
4//V e l o c i t y o f p r o t o t y p e i n f t/s e c
5 Vp1=Vp6080/3600
6//R e y n o l d s n u mb e r o f p r o t o t y p e:
7 Rep=Vp1Dp/vp
8//Re p =Rem
9//T h e r e f o r e:
10 Rem=Rep;
49
11//V e l o c i t y o f a i r f o r w i n d t u n n e l ( i n f t/s e c ):
12 Vm=Remvm/(Dm/12)
13//Dr a g f o r c e o n p r o t o t y p e ( i n l b f ):
14 Fp=Fm( dp/dm) (Vp1/Vm) ^2(Dp/(Dm/12) ) ^2
15 printf ("nnnnRESULTSnnnn")
16 printf ("nnnnTest speed i n ai r:%.3 f f t/sec nnnn",Vm)
17 printf ("nnnnDrag f or c e on prototype:%.3 f l bf nnnn",Fp)
Example 7.04d 7.04-data.sci
1//D i a m e t e r o f t h e p r o t o t y p e ( i n f t ):
2 Dp=1;
3//S p e e d o f t o w i n g o f p r o t o t y p e ( i n k n o t s ):
4 Vp=5;
5//D i a m e t e r o f mo d e l ( i n i n c h e s ):
6 Dm=6;
7//Dr a g f o r mo d e l a t t e s t c o n d i t i o n ( i n l b f ):
8 Fm=5.58;
9//D e n s i t y o f s e a w a t e r a t 5 C f o r p r o t o t y p e ( i n s l u g/f t
^ 3 ):
10 dp=1.99;
11//K i n e m a t i c v i s c o s i t y a t 5 C f o r p r o t o t y p e ( i n f t ^ 2/s e c )
:
12 vp=1.6910^5;
13//D e n s i t y o f a i r a t STP f o r mo d e l ( i n s l u g/f t ^ 3 ):
14 dm=0.00238;
15//K i n e m a t i c v i s c o s i t y o f a i r a t STP f o r mo d e l ( i n f t ^ 2/
s e c ):
16 vm=1.5710^4;
Example 7.05 7.05.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('7.05.sce')
2 f i l ename=pathname+f i l e s e p ( )+'7.05data.s c i'
3 exec( f i l ename )
4//Wi d t h o f t h e mo d e l ( i n m):
5 wm=Swp0.3048
6//Ar e a o f mo d e l ( i n m^ 2 ):
50
7 Am=S^2Ap0.305^2
8 [m n]=si ze (V)
9 i =1:n
10//A e r o d y n a m i c d r a g c o e f f i c i e n t ( ):
11 Cd=2.Fd( i )/d./(V( i ) ) ^2/0.0305
12//R e y n o l d s n u mb e r:
13 Re=V( i ) wm/v
14 plot (Re,Cd);
15 a=gca ( )
16 a.data
bounds =[ 100000,0.4;500000,0.6]
17 xti tl e ('Aerodynamic drag c o e f f i c i e n t vs drag f or c e','
Reynolds number','Model Drag Coef f.')
18//I t i s s e e n t h a t d r a g c o e f f i c i e n t b e c o me s c o n s t a n t a t
CD = 0.4 6 a b o v e Re =4  1 0 ^ 5 a t w h i c h s p e e d o f a i r i s 4 0 m/
s
19 CDc=0.46;
20 Va=40;
21//Dr a g f o r c e ( i n N ):
22 FDp=CDc/2d(Vp5/18) ^2Ap0.305^2
23//P o we r r e q u i r e d t o p u l l p r o t o t y p e a t 1 0 0 kmph ( i n W)
24 Pp=FDpVp5/18
25 printf ("nnnnRESULTSnnnn")
26 printf ("nnnnSpeed above which Cd i s constant:%.3 f m/
sec nnnn",Va)
27 printf ("nnnnDrag Force:%.3 f kNnnnn",FDp/1000)
28 printf ("nnnnPower r equi r ed to pul l prototype at 100
kmph:%.3 f kWnnnn",Pp/1000)
Example 7.05d 7.05-data.sci
1//Wi d t h o f t h e p r o t o t y p e ( i n f t ):
2 wp=8;
3//F r o n t a l a r e a o f t h e p r o t o t y p e ( i n f t ^ 2 ):
4 Ap=84;
5//Mo d e l S c a l e:
6 S=1/16;
7//D e n s i t y o f a i r ( i n k g/m^ 3 ):
8 d=1.23;
51
Figure 7.1:Output graph of S 7.05
9//A i r s p e e d i n w i n d t u n n e l ( i n m/s e c ):
10 V=[18 21.8 26 30.1 35 38.5 40.9 44.1 4 6.7 ];
11//Dr a g f o r c e ( i n N ):
12 Fd=[ 3.1 4.41 6.09 7.97 10.7 12.9 14.7 16.9 1 8.9 ];
13//K i n e m a t i c v i s c o s i t y ( i n m^ 2/s e c ):
14 v=1.4610^5;
15//D e n s i t y o f a i r ( i n k g/m^ 3 ):
16 d=1.23;
17//S p e e d o f p r o t o t y p e ( i n km/h r ):n
18 Vp=100;
52
Example 7.06 7.06.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('7.06.sce')
2 f i l ename=pathname+f i l e s e p ( )+'7.06data.s c i'
3 exec( f i l ename )
4//Th e s a me pump i s u s e d f o r b o t h t h e c o n d i t i o n s.H e n c e:
5 D2=D1;
6//Th e s a me w a t e r i s u s e d f o r b o t h t h e c o n d i t i o n s.H e n c e
:
7 d2=d1;
8//F l o w r a t e a t c o n d i t i o n 2 ( i n gpm ):
9 Q2=Q1N2/N1(D2/D1) ^3
10//He a d a t c o n d i t i o n 1 ( i n f t ):
11 H1=(N1sqrt (Q1)/Nscu1) ^(4/3)
12//He a d a t c o n d i t i o n 1 ( i n f t ):
13 H2=H1(N2/N1) ^2(D2/D1) ^2
14//Pump o u t p u t p o w e r a t c o n d i t i o n 1 ( i n hp ):
15 P1=d1gQ1H1/7.48/60/550
16//Pump o u t p u t p o w e r a t c o n d i t i o n 2 ( i n hp ):
17 P2=P1( d2/d1) (N2/N1) ^3(D2/D1) ^5
18//R e q u i r e d i n p u t p o w e r ( i n hp ):
19 Pin=P2/Ef f p
20//S p e c i f i c s p e e d a t c o n d i t i o n 2:
21 Nscu2=N2sqrt (Q2)/H2^(3/4)
22 printf ("nnnnRESULTSnnnnnn")
23 printf ("nnnnVolume f l ow r at e at condi t i on 2:%.3 f gpmnn
nnnn",Q2)
24 printf ("nnnnHead at condi t i on:%.3 f f t nnnnnn",H2)
25 printf ("nnnnPump output power at condi t i on:%.3 f hpnnnn
nn",P2)
26 printf ("nnnnRequired i nput power:%.3 f hpnnnnnn",Pin)
27 printf ("nnn nSpe c i f i c speed at condi t i on 2:%.3 f nnnnnn",
Nscu2)
Example 7.06d 7.06-data.sci
1//E f f i c i n c o f pump:
2 Ef f p =0.8;
53
3//D e s i g n s p e c i f i c s p e e d ( i n r pm ):
4 Nscu1=2000;
5//I m p e l l e r d i a m e t e r ( i n i n c h e s ):
6 D1=8;
7//O p e r t i o n s p e d a t e s i g n p o i n t f l o w c o n d i t i o n ( i n r pm ):
8 N1=1170;
9//F l o w r a t e a t d e s i g n p o i n t f l o w c o n d i t i o n ( i n gpm ):
10 Q1=300;
11//D e n s i t y o f w a t e r ( i n s l u g/f t ^ 3 ):
12 d1=1.94;
13//A c c e l e r a t i o n d u e t o g r a v i t y ( i n f t ^ 2/s e c ):
14 g=32.2;
15//Wo r k i n g s p e e d 2 ( i n r pm ):
16 N2=1750;
54
Chapter 8
Internal Incompressible Viscous
Flow
8.1 Discussion
When executing the code fromthe editor,use the'Execute File into Scilab'tab
and not the'Load in Scilab'tab
The.sci les of the respective problems contain the input parameters of
the question
8.2 Scilab Code
Example 8.01 8.01.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('8.01.sce')
2 f i l ename=pathname+f i l e s e p ( )+'8.01data.s c i'
3 exec( f i l ename )
4//L e a k a g e f l o w r a t e ( i n mm^ 3/s e c ):
5 Q=%pi/12Da^3( p1p2) 10^3/u/L
6//V e l o c i t y o f f l o w ( i n m/s e c ):
7 V=Q/%pi/D/a/1000
8//S p e c i f i c g r a v i t y o f SAE 1 0W o i l:
9 SG=0.92;
10//R e y n o l d s Nu mb e r:
11 Re=SGdwVa/u/1000
55
12//As Re <1 4 0 0,f l o w i s l a m i n a r.
13 printf ("nnnnRESULTSnnnn")
14 printf ("nnnnLeakage f l ow r at e:%.3 f mm^3/sec nnnn",Q)
Example 8.01d 8.01-data.sci
1//O p e r a t i o n p r e s s u r e o f h y d r a u l i c s y s t e m ( i n k Pa ):
2 p1=20000;
3//O p e r a t i o n t e m p e r a t u r e o f h y d r a u l i c s y s t e m ( i n C ):
4 T=55;
5//P i s t o n d i a m e t e r ( i n mm):
6 D=25;
7//V i s c o s i t y o f SAE 1 0W a t 5 5 C ( i n k g/( ms ):
8 u=0.018;
9//Me a n r a d i a l c l e a r a n c e o f a c y l i n d e r ( i n mm):
10 a=0.005;
11//Ga u g e p r e s s u r e o n l o w e r p r e s s u r e s i d e o f p i s t o n ( i n
k Pa ):
12 p2=1000;
13//L e n t h o f p i s t o n ( i n mm):
14 L=15;
15//D e n i t y o f w a t e r ( i n k g/m^ 3 ):
16 dw=1000;
Example 8.02 8.02.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('8.02.sce')
2 f i l ename=pathname+f i l e s e p ( )+'8.02data.s c i'
3 exec( f i l ename )
4//S h e a r s t r e s ( i n l b f/f t ^ 2 ):
5 Tyx=uN2%pi/60D/2/( a/2)
6//T o r q e ( i n i n c h e s  l b f ):
7 T=%pi/2TyxD^2L/144
8//P o we r d i s s i p a t e d i n t h e b e a r i n g ( i n hp ):
9 P=TN/602%pi/12/550
10//R e y n o l d s n u mb e r:
11 Re=SGpN2%pi/601.5a/2/u/144
12 printf ("nnnnRESULTSnnnn")
56
13 printf ("nnnnTorque:%.3 f i nchesl bf nnnn",T)
14 printf ("nnnnPower di s s i pat e d i n the beari ng:%.3 f hpnnn
n",P)
Example 8.02d 8.02-data.sci
1//t e m p e r a t u r e f o o p e r a t i o n ( i n F ):
2 T=210;
3//D i a m e t e r o f t e b e a r i n g ( i n i n c h e s ):
4 D=3;
5//D i a m e t r a l c l e a r a n c e ( i n i n c h e s ):
6 a=0.0025;
7//L e n g t h o f s h a f t ( i n i n h e s ):
8 L=1.25;
9//S p e e d o f r o t a t i o n o f t h e s h a f t ( i n r pm ):
10 N=3600;
11//V i s c o s i t y o f t h e o i l ( i n l b f s/f t ^ 2 ):
12 u=2.0110^4;
13//S p e c i f i c g r a v i t y o f SAE 1 0W:
14 SG=0.92;
15//D e n s i t y o f w a t e r ( i n s l u g/f t ^ 3 )
16 p=1.94;
Example 8.04 8.04.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('8.04.sce')
2 f i l ename=pathname+f i l e s e p ( )+'8.04data.s c i'
3 exec( f i l ename )
4//V i s c o s i t y o f t h e l i q u i d ( i n Ns/m^ 2 ):
5 u=%pi/128p1000D^4/Q/L/1000
6//V e l o c i t y ( i n m/s e c )
7 V=Q/( %pi/4D^2)/1000
8//R e y n o l d s n u mb e r:
9 Re=dVD/u/1000
10 printf ("nnnnRESULTSnnnn")
11 printf ("nnn nVi s cos i t y of f l ui d %.3 f Ns/m^2nnnn",u)
Example 8.04d 8.04-data.sci
57
1//F l o w r a t e t h r o u g h c a p i l a r r y v i s c o m e t e r ( i n mm^ 3/s e c ):
2 Q=880;
3//Tu b e l e n g t h ( i n m):
4 L=1;
5//Tu b e d i a m e t e r ( i n mm):
6 D=0.5;
7//P r e s s u r e d r o p ( i n k Pa ):
8 p=1000;
9//D e n s i t y o f o i l ( i n k g/m^ 3 ):
10 d=999;
Example 8.05 8.05.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('8.05.sce')
2 f i l ename=pathname+f i l e s e p ( )+'8.05data.s c i'
3 exec( f i l ename )
4//R e s e r v o i r d e p t h r e q u i r e d t o m a i n t a i n f l o w ( i n m):
5 D1=8Q^2/( %pi ) ^2/D^4/g( f L/D+K+1)
6//R e y n o l d s n u mb e r:
7 Re=4dQ/( ( %pi ) uD)
8 printf ("nnnnRESULTSnnnn")
9 printf ("nnnnReservoi r depth r equi r ed to mai ntai n f l ow:
%.3 f mnnnn",D1)
Example 8.05d 8.05-data.sci
1//Vo l me f l o w r a t e o f w a t e r ( i n m^ 3/s e c ):
2 Q=0.0084;
3//L e n g t h o f h o r i z o n t a l p i p e ( i n m):
4 L=100;
5//D i a m e t e r o f p i p e ( i n m):
6 D=0.075;
7//D e n s i t y o f w a t e r ( i n k g/m^ 3 ):
8 d=999;
9//F r i c t i o n f a c t o r:
10 f =0.017;
11//Mi n o r l o s s s e s c o e f f i c i e n t:
12 K=0.5;
58
13//V i s c o s i t y ( i n k g/ms ):
14 u=10^3;
15//A c c e l e r a t i o n d u e t o g r a v i t y ( i n/s e c ^ 2 ):
16 g=9.8;
Example 8.06 8.06.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('8.06.sce')
2 f i l ename=pathname+f i l e s e p ( )+'8.06data.s c i'
3 exec( f i l ename )
4//V e l o c i t y o f f l o w ( i n f t/s e c ):
5 V=Q/24/3600/( %pi/4(D/12) ^2) 42/7.48
6//Ma xi mum s p a c i n g ( i n f t ):
7 L=2/f D/12( p2p1)/(SGd)/V^2144
8//P o we r n e e d e d a t e a c h pump ( i n hp ):
9 Win=1/Ef f pV%pi/4(D/12) ^2( p2p1)/550144
10 printf ("nnnnRESULTSnnnn")
11 printf ("nnnnMaximum spaci ng:%.3 f f e e t nnnn",L)
12 printf ("nnnnPower needed at each pump:%.3 f hpnnnn",Win
)
Example 8.06d 8.06-data.sci
1//F l o w r a t e o f c r u d e o i l ( i n b b l ):
2 Q=1.610^6;
3//I n s i d e d i a m e t e o f p i p e ( i i n c h e s ):
4 D=48;
5//Ma xi mum a l l o w a b l e p r e s s u r e ( i n p s i ):
6 p2=1200;
7//Mi n i mu m p r e s s u r e r e q u i r e d t o k e e p g a s e s d i s s o l v e s ( i n
p s i ):
8 p1=50;
9//S p e c i f i c g r a v i t y o f c r d e o i l:
10 SG=0.93;
11//V i s c o s i t y a t 1 4 0 F ( i n l b f s/f t ^ 2 ):
12 u=3.510^4;
13//E f f i c i n c y o f pump:
14 Ef f p =0.85;
59
15//D e n s i t y ( i n s l u g/f t ^ 3 ):
16 d=1.94;
17//V i s c o s i t y ( i n l b f  s e c ):
18 u=3.510^4;
19//F r i c t i o n f a c t o r:
20 f =0.017;
Example 8.07 8.07.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('8.07.sce')
2 f i l ename=pathname+f i l e s e p ( )+'8.07data.s c i'
3 exec( f i l ename )
4//V e l o c i t y ( i n f t/s e c ):
5 V2=sqrt (2g l/( f ((L+l )/D12+8)+1) )
6//Vo l u me f l o w r a t e ( i n gpm ):
7 Q=V2%pi (D/12) ^2/47.4860
8 printf ("nnnnRESULTSnnnn")
9 printf ("nnnnVolume low r at e:%.3 f nnnn",Q)
Example 8.07d 8.07-data.sci
1//H e i g h t o f s t a n d p i p e ( i n f t ):
2 l =80;
3//L e n g t h o f l o n g e s t p i p e ( i n f t ):
4 L=600;
5//D i a m e t e r o f p i p e ( i n i n c h e s ):
6 D=4;
7//F r i c t i o n f a c t o r:
8 f =0.031;
9//A c c e l e r a t i o n d u e t o g r a v i t y i n f t/s e c ^ 2 ):
10 g=32.2;
Example 8.08 8.08.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('8.08.sce')
2 f i l ename=pathname+f i l e s e p ( )+'8.08data.s c i'
3 exec( f i l ename )
60
4//V a l u e o f dPma x ( i n p s i ):
5 dPmax=p1p2
6//Q i n c u b i c f e e t/s e c:
7 Q1=1500/60/7.48;
8//I n i t i a l l y a s s u me d i a m e t e r t o b e 4 i n c h e s:
9 D=4;
10//R e y n o l d s n u mb e r:
11 Re=4Q1/%pi/v/D12
12//F o r t h i s v a l u e,
13 f =0.012;
14 dP=8f LpQ1^2/( %pi ) ^2/D^51728;
15 while(dP>dPmax)
16 dP=8f LpQ1^2/( %pi ) ^2/D^51728;
17 i f (dP<dPmax)
18 break
19 el se
20 D=D+1;
21 end
22 end
23 printf ("nnnnRESULTSnnnn")
24 printf ("Minimum di ameter that can be used:%.1 f i nches nn
nn",D)
Example 8.08d 8.08-data.sci
1//L e n g t h o f Al t u b i n g ( i n f t ):
2 L=500;
3//Vo l u me f l o w r a t e o f pump o u t p u t ( i n gpm ):
4 Q=1500;
5//D i s c h a r g e p r e s s u r e ( i n p s i g ):
6 p1=65;
7//S p r i n k l e r p r e s s u r e ( i n p s i g ):
8 p2=30;
9//K i n e m a t i c v i s c o s i t y ( i n f t ^ 2/s e c ):
10 v=1.2110^5;
11//D e n s i t y ( i n s l u g/f t ^ 3 ):
12 p=1.94;
61
Example 8.09 8.09.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('8.09.sce')
2 f i l ename=pathname+f i l e s e p ( )+'8.09data.s c i'
3 exec( f i l ename )
4//A v e r a g e v e l o c i t y ( i n f t/s ):
5 V2=4/%piQ/D^2144
6//R e y n o l d s n u mb e r:
7 Re=V2D/v/12
8//F o r t h i s v a l u e,
9 f =0.013;
10//P o we r l a w e x p o n e n t:
11 n=1.7+1.8log10(Re)
12//V a l u e o f V/U:
13 v
u=2n^2/(n+1)/(2n+1)
14//V a l u e o f a l p h a:
15 al pha=(1/v
u ) ^32n^2/(3+n)/(3+2n)
16//L o s s C o e f f i c i e n t f o r a s q u a r e e d g e d e n t r a n c e:
17 K=2gh/V2^2f L/D12al pha;
18 printf ("nnnnRESULTSnnnn")
19 printf ("nnnnLoss Coe f f i c i e nt f or a square edged
entrance:%.3 f nnnn",K)
Example 8.09d 8.09-data.sci
1//L e n g t h o f c o p p e r w i r e ( i n f t ):
2 L=10;
3//I n n e r d i a m e e r o f p i p e ( i n i n c h e s ):
4 D=1.5;
5//D i s c h a r e ( i n f t ^ 3/s e c ):
6 Q=0.566;
7//L e v e l o f r e s e r v o i r a b o v e p i p e c e n t r e l i n e ( i n n f e e t ):
8 h=85.1;
9//K i n e m a t i c v i s c o s i t y a t 7 0 F ( i n f t ^ 2/s ):
10 v=1.0510^5;
11//A c c e l e r a t i o n d u e t o g r a v i t y ( i n f t/s e c ^ 2 ):
12 g=32.2;
62
Example 8.10 8.10.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('8.10.sce')
2 f i l ename=pathname+f i l e s e p ( )+'8.10data.s c i'
3 exec( f i l ename )
4//V e l o c i t y V1 ( i n m/s ):
5 V1=sqrt (2gz0/1.04)
6//Vo l u me f l o w r a t e ( i n m^ 3/s e c ):
7 Q=V1%piD^2/4
8 Kdi f f =11/A
R^2Cp
9//F o r 2 nd c a s e:
10//V e l o c i t y ( i n m/s ):
11 V1=sqrt (2gz0/0.59)
12//Vo l u me f l o w r a t e ( i n m^ 3/s ):
13 Qd=V1%piD^2/4
14//I n c r e a s e i n d i s c h a r g e a f t e r a d d i t i o n o f d i f f u s e r i s:
15 dQ=(QdQ)/Q100
16 printf ("nnnnRESULTSnnnn")
17 printf ("nnnnVolume f l ow r at e i n case1:%.3 f m^3/secnnnn
",Q)
18 printf ("nnnnVolume f l ow r at e i n case 2:%.3 f m^3/secnnn
n",Qd)
19 printf ("nnn nI ncr ease i n di s char ge af t e r addi t i on of
di f f us e r i s:%.3 f percent nnnn",dQ)
Example 8.10d 8.10-data.sci
1//N o z z l e e x i t d i a m e t e r ( i n mm):
2 D=25;
3//N/R1 v a l u e v a l u e:
4 N
R=3;
5//AR v a l u e:
6 A
R=2;
7//S t a t i c h e a d a v a i l a b l e f r o m t h e ma i n ( i n m):
8 z0 =1.5;
9//A c c e l e r a t i o n d u e t o g r a v i t y ( i n m/s e c ^ 2 ):
10 g=9.8;
11//V a l u e o f Cp:
63
12 Cp=0.45;
Example 8.11 8.11.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('8.11.sce')
2 f i l ename=pathname+f i l e s e p ( )+'8.11data.s c i'
3 exec( f i l ename )
4
5//V a l u e o f K B ^ 2:
6 K
B=Q/( %pi/4D^2) sqrt ( 0.5 d1/g/d2/h)
7//R e y n o d s n u mb e r:
8 ReD1=4/%piQ/D/v
9//By t r i a l a n d e r r o r me t h o d,t h e v a l u e o f b e t a i s f i x e d
a t:
10 betta =0.66;
11//K i s t h e n:
12 K=K
B/betta ^2
13//D i a m e t e r o f o r i f i c e p l a t e ( i n m):
14 Dt=bettaD
15//V a l u e o f p3 p 2 ( i n N/m^ 2 ):
16 P1=d1Q^2/( %pi/4D^2) ^2(1/0.65/betta^21)
17//V a l u e o f p1 p 2 ( i n N/m^ 2 ):
18 P2=d2gh
19//He a d l o s s b e t w e e n s e c t i o n s 1 a n d 3 ( i n Nm/k g ):
20 hLT=(P2P1)/d1
21//E x p r e s s i n g t h e p e r m a n e n t p r e s s u r e a s a f r a c t i o o f t h e
me t e r d i f f e r e n t i a l:
22 C=(P2P1)/P2
23 printf ("nnnnnnRESULTSnnnn")
24 printf ("nnnnDiameter of the o r i f i c e:%.3 f mnnnn",Dt)
25 printf ("nnnnHead l o s s between s e c i ons 1 and 3:%.3 f Nm
/kgnnnn",hLT)
Example 8.11d 8.11-data.sci
1//Vo l u me f l w r a t e o f a i ( i n m^ 3/s e c ):
2 Q=1;
3//D i a m e t e r o f p i p e ( i n m):
64
4 D=0.25;
5//D e n s i t y o f a i r ( i n k g/m^ 3 ):
6 d1=1.23;
7//A c c e l e r a t i o n d u e t o g r a v i t y ( i n m/s ^ 2 ):
8 g=9.8;
9//D e n s i t y o f w a t e r ( i n k g/m^ 3 ):
10 d2=999;
11//Maxmum r a n g e o f ma n o me t e r ( i n m):
12 h=0.3;
13//K i n e m a t i c v i s c o s i t y ( i n m^ 2/s ):
14 v=1.4610^5;
65
Chapter 9
External Incompressible
Viscous Flow
9.1 Discussion
When executing the code fromthe editor,use the'Execute File into Scilab'tab
and not the'Load in Scilab'tab
The.sci les of the respective problems contain the input parameters of
the question
When we execute S 9.08,we get Fig.9.1.
9.2 Scilab Code
Example 9.01 9.01.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('9.01.sce')
2 f i l ename=pathname+f i l e s e p ( )+'9.01data.s c i'
3 exec( f i l ename )
4//C h a n g e i n s t a t i c p r e s s u r e b e t w e e n s e c t i o n s 1 a n d 2:
5 C=(((L2d1)/(L2d2) ) ^41) 100;
6 printf ("nnnnRESULTSnnnn")
7 printf ("nnnnChange i n s t a t i c pr es s ur e between the
s e c t i ons 1 and 2:%.3 f percent nnnn",C)
Example 9.01d 9.01-data.sci
66
1//L e n g h o f s i d e o f t h e t e s t s e c t i o n ( i n mm):
2 L=305;
3//F r e e s t e a m s p e e d a t s e c t i o n 1 ( i n m/s e c ):
4 U1=26;
5//D i s p l a c e m e n t t h i c k n e s s a t s e c t i o n 1 ( i n mm):
6 d1=1.5;
7//D i s p l a c m e n t t h i c k n e s s a t s e c t i o n 2 ( i n mm):
8 d2=2.1;
Example 9.04 9.04.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('9.04.sce')
2 f i l ename=pathname+f i l e s e p ( )+'9.04data.s c i'
3 exec( f i l ename )
4//R e y n o l d s n u mb e r:
5 ReL=UL/v
6//FOR TURBULENT FLOW
7//D i s t u r b a n c e t h i c k n e s s ( i n m):
8 dL1=0.382/ReL^0.2L
9//D i s p l a c e m e n t t h i c k n e s s ( i n m):
10 function y=f (n),y=dL1(1n^(1/7) )
11 endfunction
12 dl 1=intg ( 0,1,f )
13//S k i n f r i c t i o n c o e f f i c i e n t:
14 Cf1=0.0594/ReL^0.2
15//Wa l l s h e a r s t r e s s ( i n N/m^ 2 ):
16 tw1=Cf1 0.5dU^2
17//F o r LAMINAR FLOW:
18//D i s t u r b a n c e t h i c k n e s s ( i n m)
19 dL2=5/sqrt (ReL) L
20//D i s p l a c e m e n t t h i c k n e s s ( i n m):
21 dl 2 =0.344dL2
22//S k i n f r i c t i o n c o e f f i c i e n t:
23 Cf2=0.664/sqrt (ReL)
24//Wa l l s h e a r s t r e s s ( i n N/m^ 2 ):
25 tw2=Cf2 0.5dU^2
26//COMPARISON OF VALUES WITH LAMINAR FLOW
27//D i s t u r b a n c e t h i c k n e s s
67
28 D=dL1/dL2
29//D i s p l a c e m e n t t h i c k n e s s
30 DS=dl 1/dl 2
31//Wa l l s h e a r s t r e s s
32 WSS=tw1/tw2
33 printf ("nnnnRESULTSnnnn")
34 printf ("nnnnDi sturbace t hi cknes s:%.3 f mnnnn",dL1)
35 printf ("nnnnDi spl acement t hi cknes s:%.3 f mnnnn",dl 1 )
36 printf ("nnnnWall shear s t r e s s:%f N/m^2nnnn",tw1)
37 printf ("nnnnCOMPARISON WIH LAMINAR FLOWnnnnnn")
38 printf ("nnnn Di sturbance t hi cknes:%.3 f nnnn",D)
39 printf ("nnnnDi spl acement t hi cknes s:%.3 f nnnn",DS)
40 printf ("nnnnWall shear s t r e s s:%.3 f nnnn",WSS)
Example 9.04d 9.04-data.sci
1//V e o c i t y o f f l o w ( i n m/s e c ):
2 U=1;
3//L e n g t h o f f l a t p l a t e ( i n m):
4 L=1;
5//D e n s i t y o f w a t e r ( i n k g/m^ 3 ):
6 d=999;
7//K i n e m a t i c v i s c o s i t y o f w a t e r ( i n m^ 2/s e c ):
8 v=10^6;
Example 9.05 9.05.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('9.05.sce')
2 f i l ename=pathname+f i l e s e p ( )+'9.05data.s c i'
3 exec( f i l ename )
4//S p e e d i n m/s:
5 U=s 60760.305/3600
6//R e y n o l d s n u mb e r:
7 Re=UL/v
8//Dr a g c o e f f i c i e n t:
9 Cd=0.455/log10(Re) ^2.581610/Re
10//Ar e a ( i n m^ 2 ):
11 A=L(W+D)
68
12//Dr a g f o r c e ( i n N )
13 Fd=CdA0.5dU^2
14//P o we r r e q u i r e d t o o v e r c o m e s k i n f r i c t i o n d r a g ( i n W):
15 P=FdU
16 printf ("nnnnRESULTSnnnn")
17 printf ("nnnnDrag f or c e:%f Nnnnn",Fd)
18 printf ("nnnnPower r equi r ed to overcome ski n f r i c t i o n
drag:%.3 f Wnnnn",P)
Example 9.05d 9.05-data.sci
1//L e n g t h o f t h e s u p e r t a n k e r ( i n m):
2 L=360;
3//Wi d t h o f s u p e r t a n k e r ( i n m):
4 W=70;
5//D r a f t o f t h e s u p e r t a n k e r ( i n m):
6 D=50;
7//C r u i s i n g s p e e d i n w a t e r ( i n k n o t s ):
8 s =13;
9//K i n e m a t i c v i s c o s i t y a t 1 0 C
10 v=1.3710^6;
11//D e n s i t y o f s e a w a t e r ( i n k g/m^ 3 ):
12 d=1020;
Example 9.06 9.06.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('9.06.sce')
2 f i l ename=pathname+f i l e s e p ( )+'9.06data.s c i'
3 exec( f i l ename )
4//V e l o c i t y i n m/s e c:
5 V=s 5/18
6//R e y n o l d s n u mb e r:
7 Re=dVD/u
8//V a l u e o f Cd i s o b t a i n e d a s:
9 Cd=0.35;
10//Ar e a ( i n m^ 2 ):
11 A=L^2;
12//Mo me n t a b o u t t h e c h i mn e y b a s e ( i n Nm):
69
13 M0=CdAD/4dV^2
14 printf ("nnnnRESULTSnnnn")
15 printf ("nnnnBending moment at the bottom of the chimney
:%.3 f Nmnnnn",M0)
Example 9.06d 9.06-data.sci
1//D i a m e t e r o f c h i mn e y ( i n m):
2 D=1;
3//H e i g h t o f c h i mn e y ( i n m):
4 L=25;
5//S p e e d o f w i n d ( i n kmph ):
6 s =50;
7//D e n s i t y o f a i r ( i n k g/m^ 3 ):
8 d=1.23;
9//V i s c o s i t y o f a i r ( i n k g/( ms ) ):
10 u=1.7910^5;
11//P r e s s u r e ( i n k Pa ):
12 p=101;
Example 9.07 9.07.sce
1 pathname=g e t
a bs o l ut e
f i l e
pa t h ('9.07.sce')
2 f i l ename=pathname+f i l e s e p ( )+'9.07data.s c i'