You are on page 1of 41

Scilab Textbook Companion for

Non-conventional Energy Sources


by G. D. Rai1
Created by
Mohammed Touqeer Mohammed Toufique Khan
B.E
Electronics Engineering
Anjuman i islam Kalsekar Technical Campus
College Teacher
None
Cross-Checked by
Chaya Ravindra
June 6, 2016

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 Textbook Companion Project
section at the website http://scilab.in

Book Description
Title: Non-conventional Energy Sources
Author: G. D. Rai
Publisher: Khanna Publishers
Edition: 1
Year: 2010
ISBN: 8174090738

Scilab numbering policy used in this document and the relation to the
above book.
Exa Example (Solved example)
Eqn Equation (Particular equation of the above book)
AP Appendix to Example(Scilab Code that is an Appednix to a particular
Example of the above book)
For example, Exa 3.51 means solved example 3.51 of this book. Sec 2.3 means
a scilab code whose theory is explained in Section 2.3 of the book.

Contents
List of Scilab Codes

2 Solar radiation and its Measurement

3 Solar Energy Collectors

6 Wind Energy

14

7 Energy from Biomass

16

8 Geothermal Energy

18

9 Energy from the Oceans

22

10 Chemical Energy Sources

24

12 Magneto Hydro Dynamic Power Generation

29

13 Thermo Electric Power

30

14 Thermionic Generation

38

List of Scilab Codes


Exa
Exa
Exa
Exa

2.4.1
2.4.2
2.7.1
3.6.1

Local solar time and declination . . . . . . . . . . . .


Angle made by beam radiation . . . . . . . . . . . . .
Average value of Solar radiation on a horizontal surface
Solar altitude angle and Incident angle and Collector
efficiency . . . . . . . . . . . . . . . . . . . . . . . . .
Exa 3.9.1 Useful gain and exit fluid temperature and collection
efficiency . . . . . . . . . . . . . . . . . . . . . . . . .
Exa 6.2.1 Torque and axial thrust . . . . . . . . . . . . . . . . .
Exa 7.15.1 Volume of biogas digester and power available from the
digester . . . . . . . . . . . . . . . . . . . . . . . . . .
Exa 8.5.1 Plant efficiency and Heat rate . . . . . . . . . . . . . .
Exa 8.5.2 Cycle efficiency and Plant Heat Rate . . . . . . . . . .
Exa 9.3.5.1 Energy Generated . . . . . . . . . . . . . . . . . . . .
Exa 9.3.6.1 The Yearly Power Output . . . . . . . . . . . . . . . .
Exa 10.2.8.1Reversible Voltage for Hydrogen oxygen fuel cell . . .
Exa 10.2.8.2Voltage output and efficiency and heat transfer . . . .
Exa 10.2.8.3Voltage output and efficiency and heat transferred . .
Exa 10.2.8.4Gibbs free energy and Entropy change . . . . . . . . .
Exa 10.2.8.5Heat transfer rates . . . . . . . . . . . . . . . . . . . .
Exa 12.6.1 Open circuit voltage and maximum power output . . .
Exa 13.2.1 Peltier heats absorbed and rejected . . . . . . . . . . .
Exa 13.3.2 Thomson heat transferred . . . . . . . . . . . . . . . .
Exa 13.4.1 Carnot Efficiency . . . . . . . . . . . . . . . . . . . . .
Exa 13.4.2 Maximum generator efficiency and Power Output . . .
Exa 13.4.3 Maximum efficiency and Thermocouples in series and
also Heat input and rejected at full Load . . . . . . . .
Exa 14.4.1 Efficiency of the generator and Carnot efficiency . . .

5
6
7
9
11
14
16
18
20
22
23
24
24
25
26
27
29
30
31
31
32
35
38

Chapter 2
Solar radiation and its
Measurement

Scilab code Exa 2.4.1 Local solar time and declination


1
2
3

4
5
6
7
8
9
10
11
12

// Ex2 . 4 . 1 . ; D e t r e m i n e l o c a l s o l a r t i m e and
declination
// The l o c a l s o l a r t i m e=IST 4( s t a n d a r d t i m e l o n g i t u d e
l o n g i t u d e o f l o c a t i o n )+E q u a t i o n o f t i m e
correstion
// IST=12h 30 min ; f o r t h e p u r p o s e o f c a l c u l a t i o n we
a r e w r i t i n g i t a s a=12h , b=29 min 60 s e c ;
a =12;
b =29.60;
// ( s t a n d a r d t i m e l o n g i t u d e l o n g i t u d e o f l o c a t i o n ) =82
d e g r e e 30 min 77 d e g r e e 30 min ;
// f o r t h e p u r p o s e o f c a l c u l a t i o n we a r e w r i t i n g i t
as
STL3 =82.5 -72.5;
// E q u a t i o n o f t i m e c o r r e s t i o n : 1 min 01 s e c
// f o r t h e p u r p o s e o f c a l c u l a t i o n we a r e w r i t i n g i t
as
c =1.01;
5

13

14
15
16
17
18
19
20
21
22

// The l o c a l s o l a r t i m e=IST 4( s t a n d a r d t i m e l o n g i t u d e
l o n g i t u d e o f l o c a t i o n )+E q u a t i o n o f t i m e
correstion
LST =b - STL3 - c ;
printf ( The l o c a l s o l a r t i m e=%f . %f i n h r . min . s e c ,a
, LST ) ;
// D e c l i n a t i o n d e l t a can be o b t a i n by c o o p e r s eqn :
d e l t a = 2 3 . 4 5 s i n ( ( 3 6 0 / 3 6 5 ) (284+ n ) )
n =170; // ( on June 1 9 )
// l e t
a =(360/365) *(284+ n ) ; aa =( a * %pi ) /180;
// t h e r e f o r e
delta =23.45* sin ( aa ) ;
printf ( \n d e l t a=%f d e g r e e , delta ) ;

Scilab code Exa 2.4.2 Angle made by beam radiation


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

// Ex2 . 4 . 2 . ; C a l c u l a t e a n g l r made by beam r a d i a t i o n


with the normal to a f l a t c o l l e c t o r .
gama =0; // s i n c e c o l l e c t o r i s p o i n t i n g due s o u t h .
// For t h i s c a s e we have e q u a t i o n : c o s ( t h e t a t )=c o s
( f i e s ) c o s ( d e l t a ) c o s (w)+s i n ( f i e s ) s i n ( d e l t a )
// w i t h t h e h e l p o f c o o p e r eqn on d e c e m b e r 1 ,
n =335;
// l e t
a =(360/365) *(284+ n ) ; aa =( a * %pi ) /180;
// t h e r e f o r e
delta =23.45* sin ( aa ) ;
printf ( d e l t a=%f d e g r e e , delta ) ;
// Hour a n g l e w c o r r e s p o n d i n g t o 9 . 0 0 h o u r =45 Degreew
w =45; // d e g r e e
// l e t
a = cos (((28.58* %pi ) /180) -((38.58* %pi ) /180) ) * cos ( delta
* %pi *180^ -1) * cos ( w * %pi *180^ -1) ;
b = sin ( delta * %pi *180^ -1) * sin (((28.58* %pi ) /180)
6

16
17
18
19

-((38.58* %pi ) /180) ) ;


// t h e r e f o r e
cos_of_theta_t = a + b ;
theta_t = acosd ( cos_of_theta_t ) ;
printf ( \n t h e t a t=%f D e g r e e , theta_t ) ;

Scilab code Exa 2.7.1 Average value of Solar radiation on a horizontal


surface
1
2
3
4
5
6
7
8
9
10
11

12
13
14
15
16
17
18
19
20
21

// Ex2 . 7 . 1 . ; D e t e r m i n e t h e a v e r a g e v a l u e s o f r a d i a t i o n
on a h o r i z o n t a l s u r f a c e
// D e c l i n a t i o n d e l t a f o r June 2 2 = 2 3 . 5 d e g r e e , s u n r i c e
h o u r a n g l e ws
delta =(23.5* %pi ) /180; // u n i t=r a d i a n s
fie =(10* %pi ) /180;; // u n i t=r a d i a n s
// S u n r i c e h o u r a n g l e ws=a c o s d ( t a n ( f i e ) t a n ( d e l t a ) )
ws = acosd ( - tan ( fie ) * tan ( delta ) ) ;
printf ( S u n r i c e h o u r a n g l e ws=%f D e g r e e , ws ) ;
n =172; //=d a y s o f t h e y e a r ( f o r June 2 2 )
//We have t h e r e l a t i o n f o r A v e r a g e i n s o l a t i o n a t t h e
top o f the atmosphere
//Ho=(24/ %pi ) I s c [ { 1 + 0 . 0 3 3 ( 3 6 0 n / 3 6 5 ) } ( ( c o s ( f i e )
c o s ( d e l t a ) s i n ( ws ) ) +(2 %pi ws / 3 6 0 ) s i n ( f i e ) s i n (
delta ) ) ]
Isc =1353; // S I u n i t=W/m2
ISC =1165; //MKS u n i t=k c a l / h r m2
// l e t
a =24/ %pi ;
aa =(360*172) /365; aaa =( aa * %pi ) /180;
b = cos ( aaa ) ; bb =0.033* b ; bbb =1+ bb ;
c =(10* %pi ) /180; c1 = cos ( c ) ;
cc =(23.5* %pi ) /180; cc1 = cos ( cc ) ;
ccc =(94.39* %pi ) /180; ccc1 = sin ( ccc ) ;
c = c1 * cc1 * ccc1 ;
7

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

d =(2* %pi * ws ) /360;


e =(10* %pi ) /180; e1 = sin ( e ) ;
ee =(23.5* %pi ) /180; ee1 = sin ( ee ) ;
e = e1 * ee1 ;
// t h e r e f o e Ho i n S I u n i t
Ho = a * Isc *( bbb *( c +( d * e ) ) ) ;
printf ( \n S I UNIT>Ho=%f W/m2 , Ho ) ;
Hac = Ho *(0.3+(0.51*0.55) )
printf ( \n S I UNIT>Hac=%f W/m2 day , Hac ) ;
ho = a * ISC *( bbb *( c +( d * e ) ) ) ;
printf ( \n MKS UNIT>Ho=%f k c a l /m2 , ho ) ;
hac = ho *0.58;
printf ( \n MKS UNIT>Hac=%f k c a l /m2 day , hac ) ;
// The v a l u e s a r e a p p r o x i m a t e l y same a s i n t e x t b o o k

Chapter 3
Solar Energy Collectors

Scilab code Exa 3.6.1 Solar altitude angle and Incident angle and Collector efficiency
1

// Ex3 . 6 . 1 . ; c a l c u l a t e : s o l a r a l t i t u d e a n g l r , I n c i d e n t
angle , C o l l e c t o r e f f i c i e n c y

2
3 // S o l a r d e c l i n a t i o n : d e l t a
4 n =1
5 delta =23.45* sin ((360/365) *(284+ n ) ) ;
6 printf ( S o l a r d e c l i n a t i o n d e l t a=%f d e g r e e , delta ) ;
7 fie =22; // d e g r e e
8 // s o l a r h o u r a n g l e ws =0 ,( a t mean o f 1 1 : 3 0 and 1 2 : 3 0 )
9 ws =0;
10 // S o l a r a l t i t u d e a n g l r a l p h a i s g i v e n by
11
12 // a l p h a=a s i n d ( ( ( c o s ( f i e ) c o s ( d e l t a ) c o s ( ws ) ) +( s i n (

f i e ) sin ( delta ) ) )
13 // l e t
14 a = cos ((22* %pi ) /180) * cos (( -23* %pi ) /180) * cos (0) ;
15 b = sin ((22* %pi ) /180) * sin (( -23* %pi ) /180) ;
16 // t h e r e f o r e
17 sin_alpha = a + b ;
18 printf ( \n s i n a p l h a=%f , sin_alpha ) ;

19 alpha = asind ( sin_alpha ) ;


20 printf ( \n a p l h a=%f D e g r e e , alpha ) ;
21 // I n c i d e n t a n g l e
22 theta =(180/2) - alpha ;
23 printf ( \n I n c i d e n t a n g l e=%f D e g r e e , theta ) ;
24 //Rb i s g i v e n by
25 Rb =(( cos (((22* %pi ) /180) -(37* %pi ) /180) * cos (( -23* %pi )

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

/180) * cos (0) ) +( sin (((22* %pi ) /180) -(37* %pi ) /180) *
sin (( -23* %pi ) /180) ) ) / sin_alpha ;
printf ( \n Rb=%f , Rb ) ;
// E f f e c t i v e a b s o r p t a n c e p r o d u c t i s <t . a l p h a >=t . a l p h a
/ 1(1 a l p h a ) pd
pd =0.24; // D i f f u s e r e f l e c t a n c e f o r two g l a s s c o v e r s
// l e t TA=<t . a l p h a >
TA =(0.88*0.90) /(1 -(1 -0.90) * pd ) ;
printf ( \n E f f e c t i v e a b s o r p t a n c e p r o d u c t i s <t . a l p h a
>=%f , TA ) ;
// S o l a r r a d i a t i o n i n t e n s i t y ( c o n s i d e r beam r a d i a t i o n
only )
//Hb=0.5 l y /mm = 0 . 5 c a l /cm2 min
Hb =((0.5*10^4) /10^3) *60; // u n i t=k c a l /m2 h r
printf ( \n Hb=%f k c a l /m2 h r , Hb ) ;
Hb = Hb *1.163; // u n i t=W/m2 h r ;
[ since 1 kcal =
1 . 1 6 3 watt ]
printf ( \n Hb=%f W/m2 h r , Hb ) ;
// S=HbRb< t . a l p h a >
S = Hb * Rb * TA ;
printf ( \n S=%f W/m2 h r ,S ) ;
s = S /1.163;
printf ( \n S=%f k c a l /m2 h r ,s ) ;
// U s e f u l g a i n
// qu=FR( SUL ( T f i Ta ) )
qu =0.810*( s -(6.80*(60 -15) ) )
printf ( \n qu=%f k c a l /m2 h r , qu ) ;
//Qu=FR( SUL ( T f i Ta ) )
Qu =0.810*( S -(7.88*(60 -15) ) )
printf ( \n qu=%f W/m2 h r , Qu ) ;
// C o l l e c t i o n E f f i c i e n c y
: nc =(qu / ( HbRb ) ) 1 0 0 ;
10

51 nc =(28.07/(300* Rb ) ) *100;
52 printf ( \n C o l l e c t i o n E f f i c i e n c y =%f p e r s e n t , nc ) ;
53
54
55 // v a l u e s o f s i n e a l p h a i n t h e t e x t b o o k i s t a k e n

approximate to the r e a l values

Scilab code Exa 3.9.1 Useful gain and exit fluid temperature and collection efficiency
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

// c a l c u l a t e t h e u s e f u l g a i n , e x i t f l u i d t e m p e r a t u r e
and c o l l e c t i o n e f f i c i e n c y
// O p t i c a l p r o p e r t i e s a r e e s t i m a t e d a s
p =0.85;
// (T . a l p h a ) = 0 . 7 7 ; l e t A=(T . a l p h a )
A =0.77
gama =0.94;
Do =0.06;
L =8; // u n i t=meter , / / L=l e n g t h o f c o n c e n t r a t o r
W =2; //W=w i d t h o f c o n c e n t r a t o r i n m e t e r
dco =0.09; // dco=d i a m e t e r o f t r a n s p a a r e n t c o v e r
Ar = %pi * Do * L ; // Ar=a r e a o f t h e r e c e i v e r p i p e
A_alpha =( W - dco ) * L ; // a p e r t u r e a r e a o f t h e
concentration
Cp =0.30; // u n i t=k c a l / kg d e g r e e c a l c i u s
m =400; // u n i t=kg / hr ,m=f l o w r a t e
HbRb =600; // u n i t=k c a l / h r m2
Tfi =150; // d e g r e e c a l c i u s
T_alpha =25; // d e g r e e c a l c i u s
// Heat t r a n s f e r c o e f f i c i e n t from f l u i d i n s i d e t o
surroundings ,
Uo =5.2; // u n i t=k c a l / hrm2
// Heat t r a n s f e r c o e f f i c i e n t from a b s o r b e r c o v e r
s u r f a c e to surroundings ,
UL =6; // u n i t=k c a l / hrm2
11

22
23
24
25
26
27
28
29
30
31

32
33

34
35
36
37
38
39
40
41
42
43
44
45
46
47

48
49

F =( Uo / UL ) ;
// Heat removed f a c t o r FR i s
//FR=((mCp ) / ( ArUL) ) (1 (%e (( ArULF ) / (mCp ) ) ) )
// l e t X=(mCp ) / ( ArUL) ; Y=(%e (( ArULF ) / (mCp ) ) )
X =( m * Cp ) /(1.51* UL *0.86) ;
Y = %e ^( -1/ X ) ;
FR = X *0.86*(1 - Y ) ;
// Absorbed s o l a r e n e r g y i s
S = HbRb * p * gama * A ;
printf ( Area o f t h e r e c e i v e r p i p e Ar= %f =1.51 m2 \
n A a p l h a= %f m2= c o l l e c t i o n e f f i c i e n c y f a c t o r ,
Ar , A_alpha ) ;
printf ( \n v a l u e o f F= %f ,F ) ;
printf ( \n Heat removed f a c t o r FR=%f \n Absorbed
s o l a r e n e r g y i s \n S=%f k c a l / Hr m2 . . . . . ( MKS) ,
FR , S ) ;
// f o r u n i t i n S . I .
, 1 k c a l / Hr m2 = 1 . 1 6 2 9 8 W/m2
s = S *1.16298; // i n W/m2
printf ( \n S=%f W/m 2 . . . . . ( S I ) ,s ) ;
// t h e v a l u e s o f F , FR w i l l be same i n any u n i t , s i n c e
they are f a c t o r s ( d i m e n s i o n l e s s )
// U s e f u l Gain=Qu=A a l p h a FR ( S (( ArUL) / A a l p h a ) (
T f i T a l p h a ) )
// I n MKS u n i t
Qu = A_alpha * FR *( S -((1.51* UL ) / A_alpha ) *( Tfi - T_alpha ) )
printf ( \n u s e f u l g a i n i n (MKS) Qu=%f k c a l / h r , Qu ) ;
// IN S I u n i t
qu = A_alpha * FR *( s -((1.51*6.98) / A_alpha ) *( Tfi - T_alpha )
) //UL=6.98 W/m2 d e g r e e c e l c i u s
printf ( \n u s e f u l g a i n i n ( S I ) Qu=%f Watt , qu ) ;
// t h e e x i t f l u i d t e m p e r a t u r e can be o b t a i n e d from
tci =150; // d e g r e e c e l c i u s
tco = tci +( Qu /( m * Cp ) ) ; // from Qu=mCp( t c o t c ) ; where ,
t c o= c o l l e c t o r f l u i d temp . a t o u t l e t , t c i =F l u i d
i n l e t temp .
n =( Qu /(16* HbRb ) ) *100; // n c o l l e c t o r =Qu/ ( A a l p h a HbRb )
100;
printf ( \n c o l l e c t o r f l u i d temp . a t o u t l e t
t c o=%f
12

d e g r e e c e l c i u s \n n c o l l e c t o r = %f p e r c e n t ,tco , n
);
50
51

// The v a l u e s / r e s u l t s / a n s w e r s i s a p p r o x i m a t e i n t h e
t e x t book t o t h e r e a l c a l c u l a t e d v a l u e

13

Chapter 6
Wind Energy

Scilab code Exa 6.2.1 Torque and axial thrust


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

// Ex . 6 . 2 . 1 .
// For a i r , t h e v a l u e o f g a s c o n s t a n t
R =0.287 // u n i t=k j / kg K
//T=15 i n d e g r e e c a l c i u s
T =15+273; // i n k a l v i n
RT =0.287*10^3*288;
P =1.01325*10^5; // u n i t=Pa ; a t 1 atm
Vi =15; // u n i t=m/ s
gc =1;
D =120; // t u r b i n e d i a m e t e r ; u n i t=m
N =40/60;
// A i r d e n s i t y
p =( P / RT ) ;
printf ( A i r d e n s i t y p=%f kg /M3 ,p ) ;
// 1 ] T o t a l p o w e r= P t o t a l=pA Vi 3 / 2 g c
// power d e n s i t y =P t o t a l /A=p Vi 3 / 2 g c
power_density =(1/(2* gc ) ) *( p * Vi ^3) ;
// 2 ] M a x i m u m p o w e r d e n s i t y=Pmax/A=8p Vi 3 / 2 7 g c
Maximum_power_density =(8/(27* gc ) ) *( p * Vi ^3) ;
printf ( \n power d e n s i t y =P t o t a l /A= %f W/m2 \n
Maximum power d e n s i t y=Pmax/A= %f W/m2 ,
14

21
22
23
24
25
26
27
28
29
30
31
32
33
34

power_density , Maximum_power_density ) ;
// 3 ] Assuming n=35%
n =0.35;
// l e t P/A=x
x = n *( power_density ) ;
printf ( \n P/A=%f W/m2 ,x ) ;
// 4 ] T o t a l power P= power d e n s i t y Area
Total_power_P =724*( %pi /4) *( D ^2) // T o t a l power P=
power d e n s i t y ( %pi / 4 ) D2
printf ( \n T o t a l p o w e r P=%f w a t t=%f10 3 kW ,
Total_power_P , Total_power_P ) ;
// 5 ] Torgue a t maximum e f f i c i e n c y
Tmax =(2/(27* gc ) ) *((1.226* D * Vi * Vi * Vi ) / N ) ; //Tmax
= ( 2 / ( 2 7 g c ) ) ( ( pD Vi Vi Vi ) /N) ;
printf ( \n Torgue a t maximum e f f i c i e n c y =%f Newton ,
Tmax )
// and maximum a x i a l t h u r s t
Fxmax =(3.14/(9* gc ) ) *1.226* D ^2* Vi ^2; // Fxmax=(%pi / ( 9
g c ) ) pD2 Vi 2 ;
printf ( \n maximum a x i a l t h u r s t=%f Newton , Fxmax ) ;

15

Chapter 7
Energy from Biomass

Scilab code Exa 7.15.1 Volume of biogas digester and power available
from the digester
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

// Ex7 . 1 5 . 1 ; c a l c u l a t e volume o f b i o g a s d i g e s t e r and


power a v a i l a b l e from t h e d i g e s t e r
// Mass o f t h e d r y i n p u t
M0 =2*5; //M0=2.5 kg / day 5
pm =50; // u n i t=kg /m3
tr =20; // r e t e n t i o n t i m e i n d a y s
C =0.24; // u n i t=m3 p e r kg ; B i o g a s y e i l d .
n =0.6; // e f f i c i e n c y o f b u r n e r
Hm =28; // u n i t=MJ/m 3 / / c o m b u s t i o n o f methane
Fm =0.8; // methane p r o p o r t i o n a l
// F l u i d volume Vf i s =M0/pm
Vf = M0 / pm ;
printf ( Mass o f t h e d r y i n p u t M0=%f kg / day \n F l u i d
volume Vf=%f m3 / day ,M0 , Vf ) ;
// f o r e x p r e s s i o n Vd=V f t r , t h e d i g e s t e r volume i s
Vd = Vf * tr ;
printf ( \n Vd=%f m3 , Vd ) ;
// volume o f b i o g a s i s Vb=CM0= b i o g a s y i e l d i n p u t
mass o f d r y i n p u t
Vb = C * M0 ;
16

18 printf ( \n volume o f b i o g a s i s Vb=%f m3 / day , Vb ) ;


19 // The Power a v a i l a b l e from t h e d i g e s t e r i s
20 E = n * Hm * Fm * Vb ;
21 printf ( \n The Power a v a i l a b l e from t h e d i g e s t e r =%f
22
23
24
25

Mj/ day ,E ) ;
E = E *0.2728; // u n i t=kWh/ day
printf ( =%f kWh/ day ,E ) ;
E = E *41.8 // u n i t=W( c o n t i n u o u s t h e r m a l )
printf ( =%f W( c o n t i n u o u s t h e r m a l ) ,E ) ;

17

Chapter 8
Geothermal Energy

Scilab code Exa 8.5.1 Plant efficiency and Heat rate


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

// Ex8 . 5 . 1 . ; c a l c u l a t e : steam f l o w r a t e , c o o l i n g w a t e r
f l o w , p l a n t e f f i c i e n c y , Heat r a t e
// E n t h a l p y a t p o i n t 1 a t ( 3 1 kg /cm 2 ) = 6 6 9 . 6 k c a l / kg
//H1=H2=H3 , e n t h a l p y r e m a i n c o n s t a n t d u r i n g
throttling
H1 =669.7; // u n i t= k c a l / kg
H2 =669.7; // u n i t= k c a l / kg
H3 =669.7; // u n i t= k c a l / kg
// At p o i n t 3 ,
P3 =9.55; // u n i t= kg /cm2
// s p e c i f i c volume
vs3 =0.22; // u n i t=m3/ kg
// Entropy
S3 =1.580
T3 =190; // u n i t=d e g r e e C , ( d e g r e e o f s u p e r h e a t =13
d e g r e e C)
// S 4 s a t 0 . 3 4 kg /cm2=S3
// x 4 s = 0 . 8 3 8
// and H 4 s=h s+xL
H4_s =72+(0.838*556)
18

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

printf ( H 4 s=%f k c a l / kg , H4_s )


// I s e n t r o p i c t u r b i n e work=H3H 4 s
ITW = H3 - H4_s ;
printf ( \n I s e n t r o p i c t u r b i n e work=%f k c a l / kg , ITW ) ;
// A c t u a l t u r b i n e work
ATW =0.80* ITW ;
printf ( \n A c t u a l t u r b i n e work=%f k c a l / kg , ATW ) ;
H4 =669.7 - ATW ;
printf ( \n H4=%f k c a l / kg , H4 )
h5_6 =72; // u n i t= k c a l / kg ; ( I g n o r i n g pump work )
// s e n s i b l e h e a t
h7=h5=25 k c a l / kg
h5 =25; // u n i t=k c a l / kg
h7 =25; // u n i t=k c a l / kg
// T u r b i n e steam f l o w
TSF =(250*0.860*10^6) /( ATW *0.9) ;
printf ( \n T u r b i n e steam f l o w=%f kg / h r , TSF ) ;
// l e t
m4 = TSF ;
// T u r b i n e volume f l o w
TVF =( TSF /60) * vs3 ;
printf ( \n T u r b i n e volume f l o w=%f m3/ min , TVF ) ;
// c o o l i n g w a t e r f l o w m7 : m7( h5 6 h7 )=m4( H4h 5 6 )
m7 =(( H4 - h5_6 ) /( h5_6 - h7 ) ) * m4 ;
printf ( \n c o o l i n g w a t e r f l o w m7=%f kg / h r , m7 ) ;
Heat_added = H1 - h5_6 ;
printf ( \n H e a t a d d e d=%f k c a l / kg , Heat_added ) ;
// p l a n t e f f i c i e n c y =( A c t u a l T u r b i n e work nmg ) / Heat
added
//nmg=combined m e c h a n i c a l and e l e c t r i c a l e f f i c i e n c y
o f t u r b i n e g e n e r a t o r
nmg =0.90;
Plant_efficiency =( ATW * nmg ) / Heat_added ;
plant_efficiency = Plant_efficiency *100;
printf ( \n P l a n t E f f i c i e n c y n p l a n t=%f p e r s e n t ,
plant_efficiency ) ;
// P l a n t h e a t r a t e =(860 H e a t a d d e d ) / n e t w o r k
// n e t w o r k = 1 0 5 . 3 6 0 . 9 0
Plant_heat_rate =(860/ Plant_efficiency ) ;
19

54

printf ( \n P l a n t h e a t r a t e=%f k c a l /kWH ,


Plant_heat_rate ) ;

55
56
57

// The v a l u e o f t u r b i n e steam f l o w i s wrong due t o


c a l c u l a t i n g m i s t a k i n t e x t b o o k , due t o which t h e
f u r t h e r v a l u e r e l a t e d w i t h i t i s g i v e n wrong
58 // The v a l u e s a r e c o r r e c t e d i n t h i s program

Scilab code Exa 8.5.2 Cycle efficiency and Plant Heat Rate
1

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

// Ex8 . 5 . 2 . ; c a l c u l a t e : h o t w a t e r f l o w , c o n d e n s e r
c o o l i n g water flow , c y c l e e f f i c i e n c y , plant heat
rate .
H1 =669.6; // u n i t=k c a l / kg
H2 =669.6; // u n i t=k c a l / kg
// p r e s s u r e a t p o i n t 2 , i s 1 0 . 5 kg /cm 2 ; t h u s ,
T2 =195; // u n i t=d e g r e e c e l c i u s ; ( 1 4 d e g r e e c e l c i u s o f
superheat )
s2 =1.567;
vsup =0.27;
x3s =0.832;
H3s =535; // u n i t=k c a l / kg
// I s e n t r o p i c t u r b i n e work
ITW = H2 - H3s ;
printf ( I s e n t r o p i c t u r b i n e work=%f k c a l / kg , ITW ) ;
// A c t u a l t u r b i n e work
ATW =0.65* ITW ;
printf ( \n A c t u a l t u r b i n e work=%f k c a l / kg , ATW ) ;
H3 =669.6 - ATW ;
printf ( \n H3=%f k c a l / kg , H3 )
// h 4 5( i g n o r e bpump work )
h4 =72.4; // u n i t=k c a l / kg
// h6 a t 27 d e g r e e c
h6 =27; // u n i t=k c a l / kg
20

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

// T u r b i n e steam f l o w o r h o t w a t e r f l o w=power o u t p u t /
a c t u a l t u r b i n e work
TSF =(10*10^6*0.86) / ATW ;
printf ( \n T u r b i n e steam f l o w o r h o t w a t e r f l o w=%f
kg / h r , TSF ) ;
// c o n s i d e r c o o l i n g w a t e r f l o w m4 : m3 ( H3h4 )=m4( h4
h6 )
// o r
m4 =((582.11 -72.4) *0.983*10^5) /(72.4 -27) ;
printf ( \n c o o l i n g w a t e r f l o w=%f kg / h r , m4 ) ;
Heat_added = H1 - h4
printf ( \n H e a t a d d e d=%f k c a l / kg , Heat_added ) ;
// p l a n t e f f i c i e n c y =T u r b i n e work / Heat added
Plant_efficiency =( ATW / Heat_added ) ;
plant_efficiency = Plant_efficiency *100;
printf ( \n P l a n t E f f i c i e n c y =%f p e r s e n t ,
plant_efficiency ) ;
// P l a n t h e a t r a t e =860/ P l a n t E f f i c i e n c y
Plant_heat_rate =860/ Plant_efficiency ;
printf ( \n P l a n t h e a t r a t e=%f k c a l /kWh ,
Plant_heat_rate ) ;

// The v a l u e o f m3= 1 4 . 0 3 1 0 5 i s g i v e n wrong i n t h e


t e x t book ; t h e a c t u a l v a l u e i s m3= 1 1 . 0 3 1 0 5

21

Chapter 9
Energy from the Oceans

Scilab code Exa 9.3.5.1 Energy Generated


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

// Ex9 . 3 . 5 . 1 . ; C a l c u l a t e Energy g e n e r a t e d
R =12; // u n i t=m; R i s t h e r a n g e
r =3; // u n i t=m; t h e head b e l o w t u r b i n e s t o p s o p e r a t i n g
time =(44700/2) ;
A =30*10^6;
g =9.80;
p =1025;
// The t o t a l t h e o r e t i c a l work W= i n t e g r a t e ( 1 , w , R , r
);
W =( g * p * A *(( R ^2) -( r ^2) ) ) /2;
printf ( W=%f ,W ) ;
// The a v e r a g e power g e n e r a t e d
Pav = W / time ; // u n i t=w a t t s
printf ( \n The a v e r a g e power g e n e r a t e d=%f w a t t s , Pav
);
pav =( Pav /1000) *3600; // u n i t=kWh
printf ( \n The a v e r a g e power g e n e r a t e d=%f kWh , pav )
// t h e e n e r g y g e n e r a t e d
Energy_generated = pav *0.73
printf ( \n Energy g e n e r a t e d=%f kWh , Energy_generated
);
22

Scilab code Exa 9.3.6.1 The Yearly Power Output


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

// Ex9 . 3 . 6 . 1 ; c a l c u l a t e power i n h . p . a t any i n s t a n t


and t h e y e a r l y power o u t p u t
A =0.5*10^6; // u n i t=m
h0 =8.5; // u n i t=m
t =3*3600 // u n i t=s ; s i n c e t =3 h r
p =1025; // u n i t=kg /m3
h =8; // u n i t=m
n0 =0.70; // e f f i c i e n c y o f t h e g e n e r a t o r ; 7 0%
// volume o f t h e b a s i n=Ah0
volume_of_the_basin = A * h0 ;
// A v e r a g e d i s c h a r g e Q=volume / t i m e p e r i o d
Q =( A * h0 ) / t ;
printf ( volume o f t h e b a s i n=%f m3 \n A v e r a g e
d i s c h a r g e Q=%f m3 / s , volume_of_the_basin , Q ) ;
// power a t any i n s t a n t
P =(( Q * p * h ) /75) * n0 ;
printf ( \n power a t any i n s t a n t P=%f h . p . ,P ) ;
// The t o t a l e n e r g y i n kWh/ t i d a l c y c l e
E = P *0.736*3;
printf ( \n The t o t a l e n e r g y i n kWh/ t i d a l c y c l e E=%f
,E ) ;
// T o t a l number o f t i d a l c y c l e i n a y e a r =705
printf ( \n T o t a l number o f t i d a l c y c l e i n a y e a r =705
);
// T h e r e f o r e T o t a l o u t p u t p e r annum
Total_output_per_annum = E *705;
printf ( \n T o t a l o u t p u t p e r annum=%f kWh/ y e a r ,
Total_output_per_annum ) ;
// The v a l u e o f power o f i n s t a n t i n a t e x t book i s
misprinted .

23

Chapter 10
Chemical Energy Sources

Scilab code Exa 10.2.8.1 Reversible Voltage for Hydrogen oxygen fuel cell
1
2
3
4
5
6
7
8

// Ex10 . 2 . 8 . 1 ; Find R e v e r s i b l e v o l t a g e f o r h y d r o g e n
oxygen f u e l c e l l
del_G = -237.3*10^3; // J o u l e s /gmmole o f H2
// R e v e r s i b l e v o l t a f e E o f a c e l l i s g i v e n by =
d e l W r e v /nF=d e l G /nF
// s i n c e 2 e l e c t r o n s a r e t r a n s f e r r e d p e r m o l e c u l e o f
H2 . t h u s
n =2;
F =96500; // Faraday s c o n s t a n t
E = - del_G /( n * F ) ;
printf ( R e v e r s i b l e v o l t a g e=%f v o l t s ,E ) ;

Scilab code Exa 10.2.8.2 Voltage output and efficiency and heat transfer
1

// Ex10 . 2 . 8 . 2 ; c a l c u l a t e v o l t a g e o u t p u t o f c e l l ,
e f f i c i e n c y , e l e c t r i c work o u t p u t , h e a t t r a n s f e r t o
the surroundings

24

3 // 1 ] v o l t a g e o u t p u t o f c e l l
4 del_G = -237.3*10^3; // J o u l e s /gmmole o f H2
5 n =2;
6 F =96500; // Faraday s c o n s t a n t
7 E = - del_G /( n * F ) ;
8 printf ( E=%f v o l t s ,E ) ;
9 // 2 ] E f f i c i e n c y
10 // nmax=del Wmax/( d e l H ) 25 d e g r e e c e l c u i s = ( d e l G )

T/( d e l H ) 25
11 del_G_at298k = -56690; // u n i t=k c a l / kg mole
12 del_H_at298k = -68317; // u n i t=k c a l / kg mole
13 nmax = del_G_at298k / del_H_at298k ,
14 printf ( \n nmax=%f , nmax ) ;
15 // 3 ] E l e c t r i c work o u t p u t p e r mole
16 F =(96500/4.184) ;
17 del_Wrever =( n * F * E ) ;
18 printf ( \n E l e c t r i c work o u t p u t p e r mole=%f k c a l / kg
19
20
21
22
23

24
25

mole , del_Wrever ) ;
// 4 ] Heat t r a n s f e r t o t h e s u r r o u n d i n g s
// t h e h e a t t r a n s f e r i s Q=T d e l s=d e l H a t 2 9 8 k
del G at298k
Q = del_H_at298k - del_G_at298k ;
printf ( \n The h e a t t r a n s f e r i s Q=%f k c a l / kg mole ,Q
);
// The n e g a t i v e s i g n i n d i c a t e s t h a t t h e h e a t i s
removed from t h e c e l l and t r a n s f e r r e d t o t h e
surrounding
// v a l u e o f E l e c t r i c work o u t p u t p e r mole i s
a p p r o x i m a t e i n t h e t e x t book t o t h e r e a l
calculated value

Scilab code Exa 10.2.8.3 Voltage output and efficiency and heat transferred

25

1 // Ex10 . 2 . 8 . 3 ; The h e a t t r a n s f e r r e d t o t h e s u r r o u n d i n g
2 del_G_at298k = -237191; // u n i t=kJ / kg mole
3 del_H_at298k = -285838; // u n i t=kJ / kg mole
4 ne =2;
5 F =96500; // Faraday s c o n s t a n t
6 E = - del_G_at298k /( ne * F ) ;
7 printf ( E=%f v o l t s ,E ) ;
8 nmax = del_G_at298k / del_H_at298k ,
9 printf ( \n nmax=%f , nmax ) ;
10 nmax = nmax *100;
11 printf ( =%f p e r s e n t , nmax ) ;
12 // E l e c t r i c work o u t p u t p e r mole o f t h e f u l e i s We=
13
14
15
16
17
18
19

20
21

d e l G kJ / kg mole
We = del_G_at298k ; // kJ / kg mole
printf ( \n E l e c t r i c work o u t p u t p e r mole o f t h e f u l e
i s We=%f kJ / kg mole , We ) ;
// s i n c e t h e r e i s 1 mol o s H2O f o r e a c h mole o f f u l e ,
t h e r e i s a l s o a work o u t p u t o f 2 3 7 1 9 1 kJ / kg mole
// Heat t r a n s f e r r e d i s Q=T d e l s=d e l H a t 2 9 8 k
del G at298k
Q = del_H_at298k - del_G_at298k ;
printf ( \n The h e a t t r a n s f e r i s Q=%f kJ / kg mole ,Q ) ;
// The n e g a t i v e s i g n i n d i c a t e s t h a t t h e h e a t i s
removed from t h e c e l l and t r a n s f e r r e d t o t h e
surrounding
// v a l u e o f E l e c t r i c work o u t p u t p e r mole i s
m i s p r i n t e d i n t h e t e x t book .

Scilab code Exa 10.2.8.4 Gibbs free energy and Entropy change
1
2
3
4

// Ex10 . 2 . 8 . 4 ; c a l c u l a t e d e l G , d e l S , d e l H ;
//We have t h e r e l a t i o n d e l G=nFE
// where , d e l G=g i b b s f r e e e n e r g y o f t h e s y s t e m a t 1
26

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

atm and t e m p e r a t u r e (T)


n =1; // numbers o f e l e c t o n s t r a n s f e r r e d p e r m o l e c u l e
of reactant
E =0.0455; // v o l t s ; e .m. f . o f t h e c e l l
F =96500; // Faraday s c o n s t a n t
// l e t X=dE/dT
X =0.000338;
del_G = - n * F * E ;
printf ( d e l G=%f j o u l e s , del_G ) ;
// d e l S = Entropy c h a n g e o f t h e s y s t e m a t
t e m p e r a t u r e T and p r e s s p=1 atm i n t h e c a s e
del_S = n * F *( X ) ; // d e l S=nF ( dE/dT )
printf ( \n d e l S=%f j o u l e s / deg . , del_S ) ;
//And e n t r o p y c h a n g e i s g i v e n by t h e r e l a t i o n d e l H=
nF [ T( dE/dT )E ]
T =298;
del_H = n * F *(( T * X ) -E ) ;
printf ( \n d e l H=%f j o u l e , del_H ) ;

// v a l u e a r e t a k e n a p p r o x i m a t e i n t h e t e x t book t o
the r e a l c a l c u l a t e d value

Scilab code Exa 10.2.8.5 Heat transfer rates


1

// Ex10 . 2 . 8 . 5 ; h e a t t r a n s f e r r a t e would be i n v o l v e d
under t h e s e c i r c u m s t a n c e s

2
3 del_G_at25degree_celcius = -195500; // u n i t=c a l /gm mole
4 del_H_at25degree_celcius = -212800; // u n i t=c a l /gm mole
5 F =(96500/4.184) ; // s i n c e F=96500 c o u l o m b s /gmmole
6 n =8
7 E_at25degree_celcius = - del_G_at25degree_celcius /( n * F )
8

; // J o u l e s / coulomb
printf ( E a t 2 5 d e g r e e c e l c i u s =%f v o l t s = 1 . 0 6 0 v o l t s ,
27

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

E_at25degree_celcius ) ;
//Max . e f f i c i e n c y nmax=del Wmax/( d e l H ) a t 2 5 d e g r e e
c e l c u i s = ( d e l G )T/( d e l H ) 25
nmax = del_G_at25degree_celcius /
del_H_at25degree_celcius ;
printf ( \n nmax=%f , nmax ) ;
// v o l t a g e e f f i c i e n c y nv=on l o a d v o l t a g e / open c i r c u i t
v o l t a g e=O p e r a t i n g v o l t a g e / T h e o r e t i c a l v o l t a g e
Theoretical_voltage =1.060/0.92;
printf ( \n T h e o r e t i c a l v o l t a g e =%f v o l t s ,
Theoretical_voltage ) ;
// power d e v e l o p e d =100 kW=100103 W
power_developed =(100*10^3) *0.86; // u n i t=k c a l / h r ;
s i n c e 1 w a t t=1 j o u l e / s e c =0.86 k c a l / h r
printf ( \n p o w e r d e v e l o p e d=%f k c a l / h r ,
power_developed ) ;
del_G = -195500;
// R e q u i r e d f l o w r a t e o f Methane
R_F_R_O_M =( power_developed *16) / del_G ; // kg / h r ;
// ( methane m o l e s ) =16
printf ( \n f l o w r a t e o f Methane=%f kg / h r , R_F_R_O_M )
;
// Heat t r a n s f e r Q=T 8 d e l s=d e l H+d e l w=d e l H d e l G
Q = del_H_at25degree_celcius - del_G_at25degree_celcius ;
printf ( \n The h e a t t r a n s f e r i s Q=%f k c a l / kg mole ,Q
);

26
27

// The v a l u e a r e a p p r o x i m a t e i n t h e t e x t book t o t h e
real calculated value
28 // v a l u e o f R e q u i r e d f l o w r a t e o f methane i s wrong
i n t h e t e x t book .
29 // v a l u e o f Heat t r a n s f e r i s wrong i n t h e t e x t book
.

28

Chapter 12
Magneto Hydro Dynamic
Power Generation

Scilab code Exa 12.6.1 Open circuit voltage and maximum power output
1
2
3
4
5
6
7
8
9
10
11
12
13
14

// Ex12 . 6 . 1 . ; c a l c u l a t e open c i r c u i t v o l t a g e and


maximum power o u t p u t
B =2; // f l u x d e n s i t y ; u n i t=Wb/m2
u =10^3; // a v e r a g e g a s v e l o c i t y ; u n i t=m/ s e c o n d
d =0.50; // d i s t a n c e b e t w e e n p l a t e s ; u n i t=m
E0 = B * u * d ; // Open c c i r c u i t v o l t a g e
printf ( Open c c i r c u i t v o l t a g e E0=%f V o l t s , E0 ) ;
// G e n e r a t o r r e s i s t a n c e ; Rg=d/ s i g m a A
sigma =10; // G a s e o u s c o n d u c t i v i t y ; u n i t=Mho/m
A =0.25; // P l a t e Area ; u n i t=m2
Rg = d /( sigma * A ) ;
printf ( \n G e n e r a t o r r e s i s t a n c e Rg=%f Ohm , Rg ) ;
//Maximum power
Maximum_power =( E0 ^2) /(4* Rg ) ;
printf ( \n Maximum power=%f w a t t s , Maximum_power ) ;

29

Chapter 13
Thermo Electric Power

Scilab code Exa 13.2.1 Peltier heats absorbed and rejected


1
2
3
4
5
6
7
8
9
10
11

12
13
14
15
16

// Ex13 . 2 . 1 . ; P e l t i e r h e a t s a b s o r b e d and r e j e c t e d
// p e l t i e r c o e f f i c i e n t s a t t h e s e j u n c t i o n s a r e
a p l h a p 1 2= a l p h a s 1 2T
// L e t A=a l p h a s 1 2 a t 373 k =5510 6 v / d e g r e e k and
B=a l p h a s 1 2 a t 273 k =5010 6 v / d e g r e e k
A =(55*10^ -6) ;
B =(50*10^ -6) ;
T1 =373; // k
T2 =273; // k
I =10*10^ -3; // c u r r e n t ; u n i t=Ampere
alpha_p_1_2_at_373k = A * T1 ;
alpha_p_1_2_at_273k = B * T2 ;
printf ( a l p h a p 1 2 a t 3 7 3 k=%f W/amp \n
a l p h a p 1 2 a t 2 7 3 k=%f W/amp , alpha_p_1_2_at_373k
= A * T1 , alpha_p_1_2_at_273k = B * T2 ) ;
// P e l t i e r h e a t s a b s o r n e d and r e j e c t e d t o be
q2_peltier = alpha_p_1_2_at_373k * I ;
q1_peltier = alpha_p_1_2_at_273k * I ;
printf ( \n q 2 p e l t i e r =%f w \n q 1 p e l t i e r =%f W ,
q2_peltier , q1_peltier ) ;
c = q2_peltier - q1_peltier ;
30

printf ( \n I f no o t h e r h e a t t r a n s f e r w e r e i n v o l v e d ,
the d i f f e r e n c e between t h e s e vaues , );
18 printf ( \n %f%f=%f W, would be s u p p l i e d a s e l e c t r i c
power , q2_peltier , q1_peltier , c ) ;
17

Scilab code Exa 13.3.2 Thomson heat transferred


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

// Ex . 1 3 . 3 . 2 . ; Find t h e thomson h e a t t r a n s f e r r e d

// L e t D=d a l p h a s 1 /dT ;
D =5.4*10^ -3; // u n i t=m i c r o V/ d e g r e e k 2
T1 =273; // u n i t=k
T2 =373; // u n i t=k
I =10*10^ -3; // u n i t=A
// Thomson c o e f f i c i e n t sigma , v a r i e s w i t h temp .
// s i g m a 1 o f T=TD ; u n i t=V/ d e g r e e k
// The thomson h e a t i s g i v e n by e q u a t i o n
// q t h=I I n t e g r a t i o n o f s i g m a 1 o f T w . r . t . T
Integration = integrate ( T , T ,T1 , T2 ) ;
qth = I * D * Integration ;
printf ( The THOMSON HEAT=%f m i c r o W , qth ) ;

Scilab code Exa 13.4.1 Carnot Efficiency


1

// Ex13 . 4 . 1 . ; D e t e r m i n e t h e e f f i c i e n c y o f t h e
t h e r m o e l e c t r i c g e n e r a t o r . what w i l l be i t s c a r n o t
efficiency

2
3 TH =600; // d e g r e e k ; / / t e m p e r a t u r e o f t h e h o t

of source
4 TC =300; // d e g r e e k ; / / t e m p e r a t u r e o f t h e s i n k
31

reservior

5 Z =2*(10^ -3) ; // 1/ d e g r e e k ; / / F i g u r e o f m e r i t
6
7
8

9
10
11
12
13
14
15

f o r the

material
M_optimum =(1+(( Z /2) *( TH + TC ) ) ) ^0.5;
printf ( M optimum=%f , M_optimum ) ;
// E f f i c i e n c y o f t h e t h e r m o e l e c t r i c g e n e r a t o r i s n
= ( ( (THTC) /TH) ( ( M optimum 1) / ( M optimum+(TC/TH) )
) 100;
a =(( TH - TC ) / TH ) ;
b =( M_optimum -1) /( M_optimum +( TC / TH ) ) ;
n = a * b *100;
printf ( \n E f f i c i e n c y o f t h e t h e r m o e l e c t r i c
g e n e r a t o r i s n=%f p e r s e n t ,n ) ;
// where a s e f f i c i e n c y o f t h e c a r n o t c y c l e (
r e v e r s i b l e ) nc =((THTC) /TH) 100
nc = a *100;
printf ( \n E f f i c i e n c y o f t h e c a r n o t c y c l e (
r e v e r s i b l e ) nc=%f p e r s e n t , nc ) ;

Scilab code Exa 13.4.2 Maximum generator efficiency and Power Output
1
2
3
4
5
6
7
8
9
10
11
12
13

// Ex13 . 4 . 1 2 . ; C a l c u l a r e maximum g e n e r a t o r e f f i c i e n c y
and t h e e f f i c i e n c y f o r maximum power , power o u t p u t
// s e e d b e c k c o e f f i c i e n t ( a l p h a s ) ; u n i t= v o l t s / d e g r e e
celcius
alpha_s1 = -190*10^ -6; // nt y p e
alpha_s2 =190*10^ -6; // pt y p e
// S p e c i f i c r e s i s t i v i t y ( p ) ; u n i t=Ohmcm
p1 =1.45*10^ -3; // nt y p e
p2 =1.8*10^ -3; // pt y p e
// F i g u r e o f m e r i t ( Z ) ; u n i t=d e g r e e k1
Z1 =2*10^ -3; // nt y p e
Z2 =1.7*10^ -3; // pt y p e

32

14 // c o n d u c t i v i t y ( nt y p e ) ,
15 k1 =( alpha_s1 ^2) /( p1 * Z1 ) ;
16 // s i m i l a r l y
17 k2 =( alpha_s2 ^2) /( p2 * Z2 ) ;
18 printf ( C o n d u c t i v i t y k1=%f W/cm d e g r e e
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

c e l c i u s \n
C o n d u c t i v i t y k2=%f W/cm d e g r e e c e l c i u s ,k1 , k2 ) ;
// Z o p t =(( a l p h a s 1 a l p h a s 2 ) 2 ) / [ ( p1 k1 ) 2+( p2 k2 )
2];
// l e t
a =( alpha_s1 - alpha_s2 )
b =( p1 * k1 )
c =( p2 * k2 )
A = sqrt ( b )
B = sqrt ( c )
C =( A + B ) ;
// / t h e r e f o r e
Z_opt =( a / C ) ^2;
printf ( \n Z o p t=%f d e g r e e k , Z_opt ) ;
// Thermal c o n d u c t a n c e
A1 =2.3; //cm2
A2 =1.303; //cm2
l1 =1.5; //cm
l2 =0.653; //cm
K =(( k1 * A1 ) / l1 ) +(( k2 * A2 ) / l2 )
printf ( \n Thermal c o n d u c t a n c e K=%f W/ d e g r e e c e l c i u s
,K ) ;
//R=R e s i s t a n c e o f t h e g e n e r a t o r=R1+R2
R =(( p1 * l1 ) / A1 ) +(( p2 * l2 ) / A2 ) ;
printf ( \n R e s i s t a n c e o f t h e g e n e r a t o r R=%f ohm ,R ) ;
TH =923; // u n i t=k
TC =323; // u n i t=k
M_opt =(1+(( Z_opt /2) *( TH + TC ) ) ) ^0.5;
printf ( \n M opt=%f ohm , M_opt ) ;
RL = M_opt * R ;
printf ( \n RL=%f ohms , RL ) ;
// Optimum e f f i c i e n c y n o p t = ( ( (THTC) /TH) ( ( M opt 1)
/ ( M opt +(TC/TH) ) ) 1 0 0 ;
aa =(( TH - TC ) / TH ) ;
33

48 // t a k i n g M opt =1.43
49 b =(1.43 -1) /(1.43+( TC / TH ) ) ;
50 n_opt = aa * b *100;
51 printf ( \n Optimum e f f i c i e n c y
52

53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74

n o p t=%f p e r s e n t ,
n_opt ) ;
// e f f i c i e n c y f o r max . power o u t p u t n= (THTC) /TH) m
/ [ ( ( 1 +m) 2/TH) (KR/ a l p h a s 1 2 2 ) +(1+m) (THTC) /2
TH) ]
// E f f i c i e n c y power o u t p u t
//RL=R i . e . m=1
// l e t ab=(1+m) 2/TH ; a c =(KR/ a l p h a s 1 2 2 ) ; ad=(THTC)
/2TH
m =1;
ab =4/ TH ;
ac =1/ Z_opt ;
ad = aa /2;
n_max =[ aa /( ab * ac +2 - ad ) ]*100;
printf ( \n max . power o u t p u t n max %f p e r s e n t , n_max
)
// Power o u t p u t P o p t=I 2RL=a l p h a s 1 2 2 (THTC) RL/ (R
+RL) 2= a l p h a s 1 2 2 (THTC) /(1+ M opt ) 2RL
// l e t a t=a l p h a s 1 2 2 (THTC) ; mi=(1+M opt ) 2RL
at = a * a *( TH - TC ) *( TH - TC ) ;
ml =(1+1.43) *(1+1.43) *2.63*10^ -3
P_opt = at / ml ;
printf ( \n Power o u t p u t P o p t=%f w a t t s , P_opt ) ;
// f o r max . power P max (RL=R)
// P max=a l p h a s 1 2 2 (THTC) RL/ ( r+RL) 2= a l p h a s 1 2 2 (
THTC)RL4RL
P_max = at /(4*1.84*10^ -3) ;
printf ( \n max . power P max=%f w a t t s , P_max ) ;

//Many c a l c u a t i n g m i s t a k a r e t h e r e i n a f o l l o w i n g
example , which i s c o r r e c t e d i n program .

34

Scilab code Exa 13.4.3 Maximum efficiency and Thermocouples in series


and also Heat input and rejected at full Load
1

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

// Ex . 1 3 . 4 . 3 ; maximum e f f i c i e n c y , no . o f t h e r m o c o u p l e
i n s e r i e s , open c k t v o l t a g e , h e a t i /p and r e j e c t a t
f u l l load .
kA =0.02; // u n i t=w a t t /cm d e g r e e k e l v i n
kB =0.03; // u n i t=w a t t /cm d e g r e e k e l v i n
pA =0.01; // u n i t=ohm cm
pB =0.012; // u n i t=ohm cm
TH =1500; // u n i t=d e g r e e k e l v i n
TC =1000; // u n i t=d e g r e e k e l v i n
AA =43.5; // u n i t=cm2
AB =48.6; // u n i t=cm2
LA =0.49; // u n i t=cm
LB =0.49; // u n i t=cm
I =20*48.6; // C u r r e n t d e n s i t y i n t h e e l e m e n t l i m i t e d
to , I =20 amp/cm2
output =100; // u n i t=kW
// alpha SAB a t 1 2 5 0 d e g r e e k e l v i n = 0 . 0 0 1 2 v o l t / d e g r e e
k e l v i n=alpha SA a l p h a S B
alpha_SAB =0.0012; // u n i t=v o l t / d e g r e e k e l v i n
// l e t
b =( pA * kA ) ;
c =( pB * kB ) ;
A = sqrt ( b ) ;
B = sqrt ( c ) ;
C =( A + B ) ;
// f i g u r e o f m e r i t
Z =( alpha_SAB / C ) ^2;
printf ( Z=%f d e g r e e k1 ,Z ) ;
M =(1+(( Z /2) *( TH + TC ) ) ) ^0.5;
printf ( \n M=%f ,M ) ;
35

28 // l e t
29 aa =(( TH - TC ) / TH ) ;
30 bb =( M -1) /( M +( TC / TH ) ) ;
31 // 1 ] MAx. e f f i c i e n c y o f a t h e r m o e l e c t r i c

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58

converter
i s g i v e n by n max =((THTC) /TH) [ (M1) / (M+(TC/TH) )
]100;
n_max = aa * bb *100;
printf ( \n Maximum e f f i c i e n c y n max=%f p e r s e n t ,
n_max ) ;
// 2 ] No . o f t h e r m o c o u p l e i n s e r i e s
V = alpha_SAB *( TH - TC ) ;
printf ( \n V=%f v o l t ,V ) ;
R =(( pA * LA ) / AA ) +(( pB * LB ) / AB ) ; // s i n c e R=RA+RB=((pALA
) /AA) +((pBLB) /AB) ;
printf ( \n R=%f ohm ,R ) ;
VL =V -( R * I ) ;
printf ( \n VL=%f v o l t , VL ) ;
//NTCS= t o t a l v o l t a g e r e q u i r e d / v o l t a g e r e q u i r e d by
one c o u p l e
NTCS =115/ VL ;
printf ( \n No . o f t h e r m o c o u p l e i n s e r i e s =%f , NTCS ) ;
// 3 ] Open c i r c u i t v o l t a g e
OCV = V *309;
printf ( \n Open c i r c u i t v o l t a g e=%f v o l t , OCV )
// 4 ] Heat i n p u t and r e j e c t a t f u l l l o a d .
// Heat i n p u t a t f u l l l o a d .= o u t p u t / e f f i c e n c y
=100/0.091
HIFL = output /( n_max /100) ;
printf ( \n Heat i n p u t a t f u l l l o a d=%f kW , HIFL )
// Heat r e j e c t a t f u l l l o a d . =Heat i n p u t Work o u t p u t
HRFL = HIFL - output ;
printf ( \n Heat r e j e c t a t f u l l l o a d=%f kW , HRFL )

// The v a l u e o f pB i s m i s p r i n t e d
// The v a l u e s a r e t a k e n i n t h e t e x t book i s
approximately equal to c a l c u l a t e d values
36

37

Chapter 14
Thermionic Generation

Scilab code Exa 14.4.1 Efficiency of the generator and Carnot efficiency
1

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

// Ex . 1 4 . 4 . 1 . ; C a l c u l a t e t h e e f f i c i e n c y o f t h e
g e n e r a t o r and a l s o compare w i t h t h e c a r n o t
efficiency
// c a t h o d e work f u n t i o n
flux_c =2.5; // u n i t= v o l t s
// anode work f u n t i o n
flux_a =2; // u n i t= v o l t s
//Temp . o f c a t h o d e
Tc =2000; // u n i t=d e g r e e k
//Temp . o f s u r r o u n d i n g
Ts =1000; // u n i t=d e g r e e k
// p l a s m a p o t e n t a i l d r o p
flux_p =0.1; // u n i t= v o l t s
// Net o u t p u t v o l t a g e
V = flux_c - flux_a - flux_p
printf ( V=%f v o l t ,V ) ;
// c h a r g e o f an e l e c t r o n
e =1.6*10^ -19; // u n i t=coulomb
// b o l t z m a n n c o n s t a n t
k =1.38*10^ -23; // u n i t= j o u l e / d e g r e e k e l v i n
38

20 A =1.20*10^6;
21 // one e l e c t r o n v o l t =1.610 19 j o u l e
22 // The n e t c u r r e n t i n t h e g e n e r a t o r J=J c a t h o d e

J anode
23 // l e t EC=e ( f l u x c / k Tc )
24 EC = %e ^[ -(1.6*10^ -19* flux_c ) /( k * Tc ) ];
25 J_cathode = A *( Tc * Tc ) * EC ; // J c a t h o d e=ATc 2 e ( f l u x c
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

41
42
43
44
45
46
47
48
49

/ k Tc )
printf ( \n J c a t h o d e=%f amp/m2 , J_cathode ) ;
// l e t EA=e ( f l u x c / k Ts )
EA = %e ^[ -(1.6*10^ -19* flux_a ) /( k * Ts ) ];
J_anode = A *( Ts ^2) * EA ; // J c a t h o d e=A Ts 2 e ( f l u x c / k
Ts )
printf ( \n J a n o d e=%f amp/m2 , J_anode ) ;
// The n e t c u r r e n t can be t a k e n =Jc , a s Ja can be
n e g l e c t e d i n c o m p a r i s o n w i t h Jc
J = J_cathode ;
printf ( \n J=%f amp/m2 ,J ) ;
// The h e a t s u p p l i e d t o t h e c a t h o d e Qc/Ac=J ( f l u x c
+((2 k Tc ) / e ) )+s a m e s t i o n o f s i g m a ( Tc4Ts 4 )
// l e t QA=Qc/Ac ; and
a =2.5+((2*1.38*10^ -23*2000) /(1.6*10^ -19) ) ;
b=J*a;
c =(0.2*5.67*(10^ -12) *(10^ -4) *((2000^4) -(1000^4) ) ) ;
// t h e r e f o r e
QA = b + c ; // s i n c e : QA=(J ( 2 . 5 + ( ( 2 ( 1 . 3 8 1 0 2 3 ) 2 0 0 0 )
/ ( 1 . 6 1 0 1 9 ) ) ) ) + ( 0 . 2 5 . 6 7 ( 1 0 1 2 ) (10 4)
( ( 2 0 0 0 4 ) (10004) ) )
printf ( \n The h e a t s u p p l i e d t o t h e c a t h o d e Qc/Ac=%f
w a t t /m2 , QA ) ;
// e f f i c i e n c y o f t h e g e n e r a t o r
ng =(( J * V ) /(7.026*10^6) ) *100;
printf ( \n ng=%f p e r s e n t , ng ) ;
// c a r n o t e f f i c i e n c y t h i s d e v i c e
T1 =2000;
T2 =1000;
T =2000;
nc =(( T1 - T2 ) / T ) *100;
39

50
51
52
53

printf ( \n nc=%f p e r s e n t , nc ) ;

// V a l u e o f The h e a t s u p p l i e d t o t h e c a t h o d e Qc/Ac
i s g i v e n wrong
54 // v a l u e o f c h a r g e e i s t a k e n wrong ; c o r r e c t e d by
g i v i n g v a l u e 1.6 10 19
55 // v a l u e o f J anode i s d i f f e r from c a l c u l a t e d v a l u e .

40

You might also like