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
1
Book Description Title: Non-conventional Energy Sources Author: G. D. Rai Publisher: Khanna Publishers Edition: 1 Year: 2010 ISBN: 8174090738
1
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.
2
Contents Listt of Scilab Codes Lis
4
2 Sol Solar ar radiati radiation on and its its Measurem Measuremen entt
5
3 Sol Solar ar Ener Energy gy Coll Collect ectors ors
9
6 Wi Wind nd En Ener ergy gy
14
7 En Energ ergy y from from Bio Bioma mass ss
16
8 Ge Geot othe herm rmal al Ene Energy rgy
18
9 En Energ ergy y from from the the Ocean Oceanss
22
10 Chemical Energy Sources
24
12 Magneto Hydro Dynamic Power Generation
29
13 Thermo Electric Power
30
14 Thermionic Generation
38
3
List of Scilab Codes Exa 2.4.1 Exa 2.4.2 Exa 2.7.1 Exa 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.1The 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 . . .
4
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 / / Ex2 . 4 . 1 . ; D e t re m i ne l o c a l
s o l a r t i m e a nd
declination 2 3 / /The l o c a l
s o l a r t im e=IST − 4( s t a n d ar d t im 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 qu at io n o f t im e correstion 4 / / IST=12h 3 0min ; f o r t h e p u rp 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 6 0 s e c ; 5 a=12; 6 b=29.60; 7 / / ( s t a nd a r d t im 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 3 0 min − 7 7 d e g r e e 3 0 min ; 8 / / f o r t h e p ur po se o f c a l c u l a t i o n we a re w r i t i n g i t as 9 STL3=82.5-72.5; 10 // E qu at io n o f t im e c o r r e s t i o n : 1 min 01 s e c 11 / / f o r t h e p ur po se o f c a l c u l a t i o n we a re w r i t i n g
as 12 c = 1 . 0 1 ;
5
it
13 / /The l o c a l
s o l a r t im e=IST − 4( s t a n d ar d t im 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 qu at io n o f t im e correstion
14 L S T = b - S T L 3 - c ; 15 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); 16 // D e c l i n a t i o n d e l t a can be o b ta i n by c oo pe r ’ s eqn :
d e l t a = 23 . 4 5 ∗ s i n ( ( 3 6 0 / 3 6 5 ) ∗ (284+n ) ) 17 n = 1 7 0 ; / / ( o n Ju ne 1 9 ) 18 / / l e t 19 20 21 22
a=(360/365)*(284+n);aa=(a*%pi)/180;
// the ref ore d e l t a = 2 3 . 4 5 * sin ( a a ) ; printf ( ” \ n d e l t a =%f d e g r e e ” , d e l t a ) ;
Scilab code Exa 2.4.2 Angle made by beam radiation
1 / / Ex2 . 4 . 2 . ; C a l c u l a t e
a n g l r made b y beam r a d i a t i o n w i t h t he n o rm a l t o a f l a t c o l l e c t o r . 2 g a m a = 0 ; // s i n c e c o l l e c t o r i s p o i n t in g due s ou th . 3 / / For t h i s c a s e we ha ve e q ua t io 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 ) 4 // w it h t he h e lp o f c o op er eqn on d ecem ber 1 , 5 6 7 8 9 10 11 12 13 14
n=335;
// l et a=(360/365)*(284+n);aa=(a*%pi)/180;
// the ref ore d e l t a = 2 3 . 4 5 * sin ( a a ) ; printf ( ” d e l t a =%f d e g r e e ” , d e l t a ) ;
/ / 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 ou r=45 D egr eew w=45; // deg ree // l et
a = cos ( ( ( 2 8 . 5 8 * % p i ) / 1 8 0 ) - ( ( 3 8 . 58 * % p i ) / 1 8 0 ) ) *cos ( d e l t a * % p i * 1 8 0 ^ - 1 ) * cos ( w * % p i * 1 8 0 ^ - 1 ) ; 15 b = sin ( d e l t a * % p i * 1 8 0 ^ - 1 ) * sin ( ( ( 2 8 . 5 8 * % p i ) / 1 8 0 )
6
-((38.58*%pi)/180)); 16 17 18 19
// the ref ore cos_of_theta_t=a+b; theta_t=acosd(cos_of_theta_t); printf ( ” \ n t h e t a t =%f D eg re e ” , t h e t a _ t ) ;
Scilab code Exa 2.7.1 Average value of Solar radiation on a horizontal
surface 1 / / Ex2 . 7 . 1 . ; D et e rm i ne t h e a v e r a g e v a l u e s o f
rad ia tio n
on a h o r i z o n t a l s u r f a c e 2 3 // Declination delta
f o r June 2 2= 23 .5 d eg re e , s u n r i c e
h ou r a n g l e ws 4 5 6 7 8 9 10 11
12 13 14 15 16 17 18 19 20 21
d e l t a = ( 2 3 . 5 * % p i ) / 1 8 0 ; / / u n i t =r a d i a n s f i e = ( 1 0 * % p i ) / 1 8 0 ; ; / / u n i t =r a d i a n s
/ / S u n r i c e h o ur a n g l e ws=a c o s d (− ta n ( f i e ) ∗ tan ( de l t a ) ) w s = a c o s d ( -tan ( f i e ) * tan ( d e l t a ) ) ; printf ( ” S u n r i c e h ou r a n g l e ws=%f D eg re e ” , w s ) ; n = 1 7 2 ; //=d ay s o f t he y ea r ( f o r June 2 2)
/ /We ha ve t he r e l a t i o n f o r Av e r a g e i n s o l a t i o n a t t he t op o f t he a tm os ph er e //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 ( w s ) ) + (2 ∗ %p i ∗ w s / 3 6 0 ) ∗ s i n ( f i e ) ∗ s i n ( d el ta ) ) ] I s c = 1 3 5 3 ; // SI u n i t=W/mˆ2 I S C = 1 1 6 5 ; //MKS un it=k ca l / hr mˆ2 // l et a=24/%pi; aa=(360*172)/365;aaa=(aa*%pi)/180; b = cos ( a a a ) ; b b = 0 . 0 3 3 * b ; b b b = 1 + b b ; c = ( 1 0 * % p i ) / 1 8 0 ; c 1 =cos ( c ) ; c c = ( 2 3 . 5 * % p i ) / 1 8 0 ; c c 1 =cos ( c c ) ; c c c = ( 9 4 . 3 9 * % p i ) / 1 8 0 ; c c c 1 =sin ( c c c ) ; 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 = ( 1 0 * % p i ) / 1 8 0 ; e 1 =sin ( e ) ; e e = ( 2 3 . 5 * % p i ) / 1 8 0 ; e e 1 =sin ( e e ) ; 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/mˆ2 ” , H o ) ; Hac=Ho*(0.3+(0.51*0.55)) printf ( ” \ n S I UNIT−>Hac=%f W/mˆ2 da y ” , H a c ) ; ho=a*ISC*(bbb*(c+(d*e))); printf ( ” \ n MKS UNIT−>Ho=%f k c a l /mˆ2 ” , h o ) ; hac=ho*0.58; printf ( ” \ n MKS UNIT−>Hac=%f k c a l /mˆ2 day” , h a c ) ;
/ / The v a l u e s a r e a p pr o xi m at el y same a s i n t ex tb o ok
8
Chapter 3 Solar Energy Collectors
Scilab code Exa 3.6.1 Solar altitude angle and Incident angle and Collec-
tor 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 lr , I n c i d e n t a ng le , C o l l e c t o r e f f i c i e n c y
2 3 4 5 6 7 8 9 10 11 12
// S o l ar d e c l i n a t i o n : d e l t a n =1 d e l t a = 2 3 . 4 5 * sin ( ( 3 6 0 / 3 6 5 ) * ( 2 8 4 + n ) ) ; 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 ee ” , d e l t a ) ; fie=22; // deg ree
// s o l a r h ou r a n g l e ws =0 , ( a t mean o f 1 1 : 3 0 and 1 2 : 3 0 ) ws=0;
/ / S o l a r a l t i t u d e a n g l r a lp ha i s g i v en by
// al ph a=asi nd ( ( ( cos ( f i e ) ∗ c o s ( d e l t a ) ∗ c o s ( w s ) ) + ( s i n ( f i e ) ∗ s i n ( d e l t a ) ) ) 13 / / l e t 14 15 16 17 18
a = cos ( ( 2 2 * % p i ) / 1 8 0 ) * cos ( ( - 2 3 * % p i ) / 1 8 0 ) * cos ( 0 ) ; b = sin ( ( 2 2 * % p i ) / 1 8 0 ) * sin ( ( - 2 3 * % p i ) / 1 8 0 ) ;
// the ref ore sin_alpha=a+b; printf ( ” \ n s i n a p l h a =%f ” , s i n _ a l p h a ) ;
9
19 20 21 22 23 24 25
alpha=asind(sin_alpha); printf ( ” \ n a p l h a=%f D e g r ee ” , a l p h a ) ;
// I n c i d e n t a n g l e theta=(180/2)-alpha; printf ( ” \ n I n c i d e n t a n g l e=%f D eg re e ” , t h e t a ) ;
/ /Rb i s g i ve n by
R b = ( ( cos ( ( ( 2 2 * % p i ) / 1 8 0 ) - ( 3 7* % p i ) / 1 8 0 ) *cos ( ( - 2 3 * % p i ) / 1 8 0 ) * cos ( 0 ) ) + ( sin ( ( ( 2 2 * % p i ) / 1 8 0 ) - ( 3 7* % p i ) / 1 8 0 ) * sin ( ( - 2 3 * % p i ) / 1 8 0 ) ) ) / s i n _ a l p h a ; 26 printf ( ” \ n Rb=%f” , R b ) ; 27 / / E f f e c t i v e a b s or p ta n ce p ro du ct i s < t . alph a >=t . alph a
/ 1 −(1 − a l p h a ) ∗ pd 28 p d = 0 . 2 4 ; // 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 ve r s 29 // l e t TA=< t . alp ha > 30 T A = ( 0 . 8 8 * 0 . 9 0 ) / ( 1 - ( 1 - 0 . 9 0 ) * p d ) ; 31 printf ( ” \ n E f f e c t i v e a b so r p t a n ce p ro du ct i s < t . alp ha >=%f” , T A ) ; 32 // 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
onl y ) 33 / / Hb = 0 . 5 l y /mm = 0 . 5 c a l / cm ˆ 2 ∗ mi n 34 H b = ( ( 0 . 5 * 1 0 ^ 4 ) / 1 0 ^ 3 ) * 6 0 ; / / u n i t = k c a l /mˆ 2 h r 35 printf ( ” \ n Hb=%f kc a l /mˆ2 hr ” , H b ) ; 36 H b = H b * 1 . 1 6 3 ; // u n i t=W/mˆ2 h r ; [ since 1 kcal = 1 . 1 6 3 w at t ] 37 printf ( ” \ n Hb=%f W/mˆ2 hr ” , H b ) ; 38 //S=Hb ∗ Rb∗< t . alph a > 39 40 41 42 43 44 45 46 47 48 49 50
S=Hb*Rb*TA; printf ( ” \ n S=%f W/mˆ2 hr ” , S ) ; s=S/1.163; printf ( ” \ n S=% f k c a l /mˆ 2 h r ” , s ) ;
//Useful gain //qu=FR(S−UL ∗ ( Tfi −Ta) ) qu=0.810*(s-(6.80*(60-15))) printf ( ” \ n q u=%f k c a l /mˆ 2 h r ” , q u ) ;
/ /Qu=FR( S−UL ∗ ( Tfi −Ta) ) Qu=0.810*(S-(7.88*(60-15))) printf ( ” \ n qu=%f W/mˆ2 hr ” , Q u ) ;
// C o l l e c t i o n E f f i c i e n c y
: nc =(qu / (Hb ∗ Rb) ) ∗ 1 0 0 ; 10
51 n c = ( 2 8 . 0 7 / ( 3 0 0 * R b ) ) * 1 0 0 ; 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 ” , n c ) ; 53 54 55 // v a l u e s o f ” s i n e a lp ha ” i n t he t ex tb o o k i s t ak en
a pp ro xi ma te t o t he r e a l v a l ue s
Scilab code Exa 3.9.1 Useful gain and exit fluid temperature and collec-
tion efficiency 1 // c a l c u l a t e t he u s e f u l g ai n , e x i t
f l u i d t em pe ra tu re
and c o l l e c t i o n e f f i c i e n c y 2 // O p ti c al p r o p e r t i e s a r e e s t i ma t ed a s 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
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 =m et er , / / 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 id th o f c o n c e n t r a t o r i n m et er d c o = 0 . 0 9 ; // d co=d i a me t e r o f t r a n s p a a r e n t c o v e r A r = % pi * D o *L ; // Ar=a r ea o f t he r e c e i v e r p i pe A _ a l p h a = ( W - d c o ) * L ; // a p e r tu r e a r ea o f t he
19 20 21
concentration C p = 0 . 3 0 ; / / u n i t=k c a l / kg d e g r e e c a l c i u s m = 4 0 0 ; / / u n i t =k g / h r , m= f l o w r a t e H b R b = 6 0 0 ; / / u n i t = k c a l / h r mˆ 2 T f i = 1 5 0 ; // d e gr e e c a l c i u s T _ a l p h a = 2 5 ; // d e g re e c a l c i u s / / Hea t t r a n s f e r c o e f f i c i e n t f ro m f l u i d i n s i d e t o surroundings , U o = 5 . 2 ; / / u n i t = k c a l / h r −mˆ2 / / H ea t t r a n s f e r c o e f f i c i e n t f ro m a b s o r b e r c o v e r s u r f a c e t o s u rr o un d in g s , U L = 6 ; / / u n i t = k c a l / h r −mˆ2 11
22 23 24 25 26 27 28 29 30 31
F=(Uo/UL);
/ / H ea t rem oved f a c t o r FR i s //FR=((m∗ Cp) /( Ar ∗UL) ) ∗ (1 − (%eˆ − ((Ar ∗UL∗ F) /(m∗ Cp) ) ) ) // l e t X=(m∗ Cp) /( Ar ∗UL) ; Y=(%eˆ − ((Ar ∗UL∗ F) /(m∗ Cp) ) ) X=(m*Cp)/(1.51*UL*0.86); Y=%e^(-1/X); FR=X*0.86*(1-Y);
// A bso rb ed s o l a r e ne rg y i s S=HbRb*p*gama*A; printf ( ” Area o f t he r e c e i v e r
p i pe Ar= %f =1 .5 1 mˆ2 \ n A ap lh a= %f mˆ2= 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); 32 printf ( ” \ n v a lu e o f F= %f” , F ) ; 33 printf ( ” \ n H ea t r em ov ed f a c t o r FR=%f \ n A b s or b e d
s o l a r e n e r g y i s \ n S=%f kc al /Hr mˆ2 . . . . . ( MKS) ” , FR,S); 34 35 36 37 38 39 40 41 42 43
// f o r u n i t i n S . I . , 1 k c a l / Hr mˆ2 = 1 . 1 62 9 8 W/mˆ2 s = S * 1 . 1 6 29 8 ; // i n W/mˆ2 printf ( ” \ n S=%f W/m ˆ 2 . . . . . ( S I ) ” , s ) ; // t he v a l u e s o f F , FR w i l l be same i n any u ni t , s i n c e t he y a r e f a c t o r s ( d i m e n s i o n l e s s ) // Us ef ul Gain=Qu=A al pha ∗FR∗ ( S − ((Ar ∗UL ) / A a l p h a ) ∗ ( T f i − T alp ha ) ) / / I n MKS u n i t
Q u = A _ a l p h a * F R * ( S - ( ( 1 . 5 1 * U L ) / A _ a l p h a ) * ( T f i - T _ a l p h a )) printf ( ” \ n u s e f u l g a i n i n (MKS) Qu=%f k c a l / h r ” , Q u ) ;
/ /IN S I u n i t
q u = A _ a l p h a * F R * ( s - ( ( 1 . 5 1 * 6 . 9 8 ) / A _ a l p h a ) * ( T f i - T _ a l p ha ) ) / /UL= 6 .9 8 W/mˆ 2 d e g r e e c e l c i u s 44 printf ( ” \ n u s e f u l g a i n i n ( S I ) Qu=%f Watt ” , q u ) ; 45 / / t he e x i t f l u i d t em p er a tu r e ca n b e o b ta i n ed fro m 46 t c i = 1 5 0 ; // d e gr e e c e l c i u s 47 t c o = t c i + ( Q u / ( m * C p ) ) ; // fr om Qu=mCp( tc o − t c ) ; w he re ,
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 ui d i n l e t temp . 48 n = ( Q u / ( 1 6 * H b R b ) ) * 1 0 0 ; / / n c o l l e c t o r =Qu / ( A a l p h a ∗ HbRb) ∗100; 49 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 co=%f 12
d eg re e c e l c i u s \ n n c o l l e c t o r = %f p e r ce n t ” , t c o , n ); 50 51 / /The v a l u e s / r e s u l t s / a n s w er s i s
a p pr o xi m at e i n t h e t e x t book t o t he r e a l c a l c u l a t e d v al ue
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 he v a lu e o f g as c o n st a n t R = 0 . 2 8 7 / / u n i t =k j / k g K //T=15 i n d e g r e e c a l c i u s T = 1 5 + 2 7 3 ; // i n k a l v i n
RT=0.287*10^3*288; P = 1 . 0 1 3 2 5 * 1 0 ^ 5 ; / / u n i t =Pa ; a t 1 a tm V i = 1 5 ; // u n i t=m/ s gc=1; D = 1 2 0 ; / / 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 k g /Mˆ 3 ” , p ) ;
/ / 1 ] T o t a l p o w e r= P t o t a l =p ∗A∗ V i ˆ 3 / 2 ∗ g c / / p o w er d e n s i t y = P t o t a l /A=p ∗ V i ˆ 3 / 2 ∗ g c power_density=(1/(2*gc))*(p*Vi^3);
// 2 ] Maxi mum pow er d ens ity=Pmax/A=8∗ p ∗ V i ˆ 3 / 2 7 ∗ g c Maximum_power_density=(8/(27*gc))*(p*Vi^3); printf ( ” \ n p o w er d e n s i t y = P t o t a l /A= % f W/mˆ 2 \ n Maximum po wer d e n s i t y=Pmax/A= %f W/mˆ2 ” ,
14
p o w e r _ de n s i t y , M a x i m u m _ p o w e r _ d e n s i t y ) ; 21 22 23 24 25 26 27
// 3 ] Assuming n=35% n=0.35;
// l e t P/A=x x=n*(power_density); printf ( ” \ n P/A=%f W/mˆ2 ” , x ) ;
/ / 4 ] T o t a l p ow er P= p ow er d e n s i t y ∗ Area T o t a l _ p o w e r _ P = 7 2 4 * ( % p i / 4 ) * ( D ^ 2 ) / / T o t a l p o w er P= p ower d e n s i t y ∗ ( % p i / 4 ) ∗Dˆ 2 28 printf ( ” \ n T o t a l p o w e r P =%f w a t t=%f ∗ 10 ˆ − 3 kW” , T o t a l _ po w e r _ P , T o t a l _ p o w e r _ P ) ; 29 / / 5 ] T or g ue a t maximum e f f i c i e n c y 30 T m a x = ( 2 / ( 2 7 * g c ) ) * ( ( 1 . 2 2 6 * D * V i * V i * V i ) / N ) ;//Tmax
= ( 2 / ( 2 7 ∗ gc ) ) ∗ ( ( p ∗D∗ Vi ∗ Vi ∗ Vi ) /N) ; 31 printf ( ” \ n T or gu e a t maximum e f f i c i e n c y =%f Newton ” , Tmax) 32 / / a nd maximum a x i a l t h u r s t 33 F x m a x = ( 3 . 1 4 / ( 9 * g c ) ) * 1 . 2 2 6 * D ^ 2 * V i ^ 2 ; //Fxmax=(%pi/(9 ∗
g c ) ) ∗ p ∗Dˆ 2 ∗ V i ˆ 2 ; 34 printf ( ” \ n maximum a x i a l t h u r s t =%f N ew to n ” , F x m a x ) ;
15
Chapter 7 Energy from Biomass
Scilab code Exa 7.15.1 Volume of biogas digester and power available
from the digester 1 / /Ex7 . 1 5 . 1 ; 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
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 fro m t he d i g e s t e r / / Mass o f t he d ry i n pu t M 0 = 2 * 5 ; //M0=2.5 kg/ day ∗ 5 p m = 5 0 ; // u n i t=kg /mˆ3 t r = 2 0 ; // r e t e n t i o n t im e i n d ay s C = 0 . 2 4 ; / / u n i t =mˆ 3 p e r k g ; 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 ur ne r H m = 2 8 ; // un it=MJ/mˆ3// com bus tio n o f methane F m = 0 . 8 ; // m etha ne p r o p o r t i o n a l / / F l u i d v o l u me V f i s =M0/pm
Vf=M0/pm; printf ( ” Mass o f t h e d ry i n p u t M0=%f kg / d ay \ n F l u id v o l u me V f=% f mˆ 3 / d a y ” , M 0 , V f ) ;
/ / f o r e x p r e s s i o n Vd=V ft r , t h e d i g e s t e r vo lu me i s Vd=Vf*tr; printf ( ” \ n Vd=%f mˆ3 ” , V d ) ;
/ / v ol um e o f b i o g a s i s Vb=C∗M0= b i o g a s y i e l d i n pu t ∗ mass o f dr y i n pu t
17 V b = C * M 0 ;
16
18 19 20 21 22 23 24 25
printf ( ” \ n v ol um e o f b i o g a s
i s Vb=%f mˆ 3 / d ay ” , V b ) ; / /The Power a v a i l a b l e from t he d i g e s t e r i s E=n*Hm*Fm*Vb; printf ( ” \ n The Power a v a i l a b l e fro m t he d i g e s t e r =%f Mj/day” , E ) ; E = E * 0 . 2 7 2 8 ; // u n i t=kWh/da y printf ( ”=%f kWh/d ay ” , E ) ; E = E * 4 1 . 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 / / Ex8 . 5 . 1 . ; c a l c u l a t e : s te am f l o w r a t e , c o o l i n g w a te r
f lo w , p l a n t e f f i c i e n c y , Hea t r a t e 2 3 / / E nt ha lp y a t p o i n t 1 a t ( 3 1 kg /cm ˆ 2) = 66 9. 6 k c a l / kg 4 / / 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 5 6 7 8 9 10 11 12 13 14
throttling H1=669.7; // uni t= kca l /kg H2=669.7; // uni t= kca l /kg H3=669.7; // uni t= kca l /kg / /At p o i n t 3 , P 3 = 9 . 5 5 ; // unit= kg/cmˆ2 // s p e c i f i c volume v s 3 = 0 . 2 2 ; // u n i t=mˆ3/ kg //Entropy
S3=1.580 T 3 = 1 9 0 ; / / 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
degree C) 15 / / S 4 s a t 0 . 3 4 k g /cmˆ2= S3 16 / / x 4 s = 0 . 8 3 8 17 //and H4 s=hs+xL 18 H 4 _ s = 7 2 + ( 0 . 8 3 8 * 5 5 6 )
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
printf ( ” H 4 s=%f k c a l / k g ” , H 4 _ s )
47 48 49 50
/ / I s e n t r o p i c t u r b i n e wo rk=H3−H 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 ” , I T W ) ;
/ / A c t ua l t u r b i n e wo rk
ATW=0.80*ITW; printf ( ” \ n A c tu a l t u r b i n e wo rk=%f k c a l / k g ” , A T W ) ; H4=669.7-ATW; printf ( ” \ n H4=%f k c a l / k g ” , H 4 ) h 5 _ 6 = 7 2 ; / / u n i t = k c a l / k g ; ( I g n o r i n g pump w or k )
/ / s e n s i b l e h e at h7=h5 =25 k c a l / kg h5=25; // un it=kc al /kg h7=25; // un it=kc al /kg / / T u rb i ne s te am f l o w TSF=(250*0.860*10^6)/(ATW*0.9); printf ( ” \ n T u rb i ne s te am f l o w=%f k g / h r ” , T S F ) ;
// l et m4=TSF;
/ / T u r b in e v ol um e f l o w TVF=(TSF/60)*vs3; printf ( ” \ n T u r b i n e v o lu m e f l o w =%f mˆ 3 / m in ” , T V F ) ;
/ / c o o l i n g w a te r f l o w m7 : m7 ( h 5 6 −h7 )=m4( H4− h 5 6 )
m7=((H4-h5_6)/(h5_6-h7))*m4; printf ( ” \ n c o o l i n g w at er f l o w m7=%f kg / h r ” , m 7 ) ; Heat_added=H1-h5_6; printf ( ” \ n H e a t a d d e d=%f k c a l / k g ” , H e a t _ a d d e d ) ;
/ / p l a n t e f f i c i e n c y =( A c tu a l T ur bi ne work ∗ nmg)/Heat added 46 / / nmg=c o m bi n e d m e c h a n i c a l a nd e l e c t r i c a l e f f i c i e n c y o f t u rb i ne − 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 la nt E f f i c i e n c y n p la n t=%f p e r s e n t ” , plant_efficiency);
51 / / P l a n t h e a t r a t e = (8 60 ∗ H e a t a d d e d ) / n e t w o r k 52 / / n e t w o r k = 1 0 5 . 3 6 ∗ 0 . 9 0 53 P l a n t _ h e a t _ r a t e = ( 8 6 0 / P l a n t _ e f f i c i e n c y ) ;
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 lu e o f ” t u r b i n e stea m f l ow ” i s wrong due t o
c a l c u l a t i n g m is ta k i n t ex tb oo k , due t o wh ich t he f u r t h e r v al ue r e l a t e d w i t h i t i s g iv en wrong 58 / /The v a l ue s a re c o r r e c t e d i n t h i s prog ram
Scilab code Exa 8.5.2 Cycle efficiency and Plant Heat Rate
1 / / 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
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
c o o l i n g w a te r f lo w , c y c l e e f f i c i e n c y , p l an t h ea t rate . H1=669.6; // un it=kc al /kg H2=669.6; // un it=kc al /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 hu s , T 2 = 1 9 5 ; // u n it=d e gr e e c e l c i u s ; ( 14 d e g r e e c e l c i u s o f super heat ) s2=1.567; vsup=0.27; x3s=0.832; H3s=535; // un it=kc al /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 ” , I T W ) ; / / A c t ua l t u r b i n e wo rk
ATW=0.65*ITW; printf ( ” \ n A c tu a l t u r b i n e wo rk=%f k c a l / k g ” , A T W ) ; H3=669.6-ATW; printf ( ” \ n H3=%f k c a l / k g ” , H 3 )
/ / h 4 − 5 ( i g n o r e bpump w or k ) h4=72.4; // un it=kc al /kg / /h6 a t 27 d e g r ee c h6=27; // un it=kc al /kg 20
22 / / T u rb in e s tea m f l o w o r h ot w at er f l o w=p ower o u tp ut /
a c t u a l t u r b i n e work 23 T S F = ( 1 0 * 1 0 ^ 6 * 0 . 8 6 ) / A T W ; 24 printf ( ” \ n T ur bi ne s te am f l o w o r h ot w at er f l o w=%f kg/hr” ,TSF); 25 / / c o n s i d e r c o o l i n g w at er f l o w m4 : m3 ∗ ( H3−h4)=m4(h4 −
h6 ) 26 // or 27 28 29 30 31 32 33 34
m4=((582.11-72.4)*0.983*10^5)/(72.4-27); printf ( ” \ n c o o l i n g w at er f l o w=%f k g / hr ” , m 4 ) ; Heat_added=H1-h4 printf ( ” \ n H e a t a d d e d=%f k c a l / k g ” , H e a t _ a d d e d ) ;
/ / p l a n t e f f i c i e n c y = Tu r bi n e wo rk / H ea t a dd ed Plant_efficiency=(ATW/Heat_added); plant_efficiency=Plant_efficiency*100; printf ( ” \ n P la nt E f f i c i e n c y =%f p e r s e n t ” , plant_efficiency);
35 / / P l an t h e at r a t e =860/ P l a nt E f f i c i e n c y 36 P l a n t _ h e a t _ r a t e = 8 6 0 / P l a n t _ e f f i c i e n c y ; 37 printf ( ” \ n P l a n t h e a t r a t e =%f k c a l /kWh” , Plant_heat_rate); 38 39 40 / / The v a l u e o f m3 =1 4 .0 3 ∗ 1 0ˆ 5 i s g i ve n wrong i n t he
t e x t bo ok ; t h e a c t u a l v a l u e i s m3 =1 1. 03 ∗ 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
/ / Ex9 . 3 . 5 . 1 . ; C a l c u l a t e E n er g y g e n e r a t e d R = 1 2 ; / / 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 h ea d b el ow 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 wor k 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 p ow er g e n e r a t e d Pav=W/time;// un it=watts printf ( ” \ n The a v e r a g e p ow er g e n e r a t e d =%f w a t ts ” ,Pav
); 14 p a v = ( P a v / 1 0 0 0 ) * 3 6 0 0 ; // u n i t=kWh 15 printf ( ” \ n The a v e r a g e p o we r g e n e r a t e d =%f kWh” , p a v ) 16 / / t h e e n er g y g e n e r a t ed 17 E n e r g y _ g e n e r a t e d = p a v * 0 . 7 3 18 printf ( ” \ n E n e r g y g e n e r a t e d =% f kWh” , E n e r g y _ g e n e r a t e d );
22
Scilab code Exa 9.3.6.1 The Yearly Power Output
1 / / Ex9 . 3 . 6 . 1 ; c a l c u l a t e p ow er i n h . p . a t a ny i n s t a n t
and t h e y e a r l y p ower o u tp ut A = 0 . 5 * 1 0 ^ 6 ; // u n i t=m h 0 = 8 . 5 ; // un i t=m t = 3 * 3 6 0 0 / / u n i t =s ; s i n c e t =3 h r p = 1 0 2 5 ; // u n i t=kg/mˆ3 h = 8 ; // un i t=m n 0 = 0 . 7 0 ; // e f f i c i e n c y o f t he g e n er a t or ; 7 0% / / v o lu me o f t h e b a s i n =Ah0
2 3 4 5 6 7 8 9 10 11 12
13 14 15 16 17 18
/ / power a t any i n s t a n t
volume_of_the_basin=A*h0;
/ / A ve ra ge d i s c h a r g e Q=v ol um e / t i me p e r i o d Q=(A*h0)/t; printf ( ” v ol um e o f t h e b a s i n =%f mˆ 3 \ n A v er a ge d i s c h a r g e Q=%f mˆ 3 / s ” , v o l u m e _ o f _ t h e _ b a s in , Q ) ; P=((Q*p*h)/75)*n0; printf ( ” \ n p ow er a t a ny i n s t a n t P=%f h . p . ” , P ) ;
/ / The t o t a l e n er 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);
e n er g y i n kWh/ t i d a l c y c l e E=%f ”
19 / / T ot al number o f t i d a l c y c l e i n a y ea r =705 20 printf ( ” \ n T ot al number o f t i d a l c y c l e i n a y ea r =705 ”); 21 / / T h e r e f o r e T o t a l o u t pu t p e r annum 22 T o t a l _ o u t p u t _ p e r _ a n n u m = E * 7 0 5 ; 23 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); 24 25 / / 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
misprinte d .
23
Chapter 10 Chemical Energy Sources
Scilab code Exa 10.2.8.1 Reversible Voltage for Hydrogen oxygen fuel cell
1 / / Ex10 . 2 . 8 . 1 ; F in d R e v e r s i b l e
v o l t a g e f o r h y d ro g e n
o xy ge n f u e l
cell 2 d e l _ G = - 2 3 7 . 3 * 1 0 ^ 3 ; // Jou le s /gm−mo le o f H2 3 // 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 en by = del Wrev/nF=− d e l G / n F 4 / / s i n c e 2 e l e c t r o n s a re t r a n s f e r r e d p er m ol ec ul e o f H2 . t h u s 5 6 7 8
n=2; F = 9 6 5 0 0 ; / / F ar ad ay ’ 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 pu 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 wo rk o u tp ut , h e a t t r a n s f e r t o t he s u r r ou n d i ng s
2
24
3 4 5 6 7 8 9 10
/ / 1 ] v o l t a g e o u tp ut o f c e l l d e l _ G = - 2 3 7 . 3 * 1 0 ^ 3 ; // Jou le s /gm−mo le o f H2
n=2; F = 9 6 5 0 0 ; / / F ar ad ay ’ s c o n s t a n t E=-del_G/(n*F); printf ( ” E=%f v o l t s ” , E ) ;
// 2 ] E f f i c i e n c y //nmax=del Wmax/ − ( d el H ) 2 5 d e g r e e c e l c u i s = −( d e l G ) T/( − d e l H ) 2 5 11 d e l _ G _ a t 2 9 8 k = - 5 6 6 9 0 ; / / u n i t = k c a l / k g m o le 12 d e l _ H _ a t 2 9 8 k = - 6 8 3 1 7 ; / / u n i t = k c a l / k g m o le 13 14 15 16 17 18
n m a x = d e l _ G _ a t 2 9 8 k / d e l _ H _ at 2 9 8 k , printf ( ” \ n nmax=%f” , n m a x ) ;
/ / 3 ] E l e c t r i c work o u tp ut p e r m ol e F=(96500/4.184); del_Wrever=(n*F*E); printf ( ” \ n E l e c t r i c work o u tp u t p e r m ol e=%f k c a l / kg mole”,del_Wrever);
19 // 4 ] Heat t r a n s f e r t o t he s u rr o un d i n g s 20 // t he h ea 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 −
d e l G a t 2 98 k 21 Q = d e l _ H _ a t 2 9 8k - d e l _ G _ a t 2 9 8 k ; 22 printf ( ” \ n The h e at t r a n s f e r i s Q=%f k c a l / kg m ol e ” ,Q ); 23 / / The n e ga t iv e s i g n i n d i c a t e s t ha t t he h ea t i s
removed fro m t he c e l l and t r a n s f e r r e d t o t he surrounding 24 25 // v a l ue o f ” E l e c t r i c work o ut pu t p er mol e” i s
a pp ro xi ma te i n t he t e x t book t o t he r e a l c a l c u l a t e d v al ue
Scilab code Exa 10.2.8.3 Voltage output and efficiency and heat trans-
ferred
25
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/ / 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 d e l _ G _ a t 2 9 8 k = - 2 3 7 1 9 1 ; / / u n i t =k J / k g m o l e d e l _ H _ a t 2 9 8 k = - 2 8 5 8 3 8 ; / / u n i t =k J / k g m o l e
ne=2; F = 9 6 5 0 0 ; / / F ar ad ay ’ s c o n s t a n t E=-del_G_at298k/(ne*F); printf ( ” E=%f v o l t s ” , E ) ; n m a x = d e l _ G _ a t 2 9 8 k / d e l _ H _ at 2 9 8 k , printf ( ” \ n nmax=%f” , n m a x ) ; nmax=nmax*100; printf ( ”=%f p e r s e n t ” , n m a x ) ;
/ / E l e c t r i c work o ut pu t p er mol e o f t he f u l e i s We=− d el G kJ / kg m ol e W e = d e l _ G _ a t 2 9 8 k ; / / k J / kg m ol e printf ( ” \ n E l e c t r i c work o u tp ut p er mole o f t h e f u l e i s We=%f k J / k g m o l e ” , W e ) ; / / s i n c e t h e r e i s 1 mol o s H2O f o r e a ch mole o f f u l e , t h e r e i s a l s o a work o ut pu t o f 2 37 19 1 kJ /kg mole / / Hea t 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 − d e l G a t 2 98 k
17 Q = d e l _ H _ a t 2 9 8k - d e l _ G _ a t 2 9 8 k ; 18 printf ( ” \ n The h e at t r a n s f e r i s Q=%f kJ / kg m ol e ” , Q ) ; 19 / / The n e ga t iv e s i g n i n d i c a t e s t ha t t he h ea t i s
removed fro m t he c e l l and t r a n s f e r r e d t o t he surrounding 20 21 // v a l ue o f ” E l e c t r i c work o ut pu t p er mol e” i s
m i s p ri n t e d i n t he t e x t book .
Scilab code Exa 10.2.8.4 Gibbs free energy and Entropy change
1 / / E x1 0 . 2 . 8 . 4 ; c a l c u l a t e d e l G , d e l S , d e l H ; 2 3 //We ha ve t he r e l a t i o n d el G=−n ∗ F ∗ E 4 // where , d el G=g i b bs f r e e e ne rg y o f t he s ys te m a t 1
26
5
atm a nd 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 er m o l ec u l e o f r e a ct a n t E = 0 . 0 4 5 5 ; / / v o l t s ; e . m. f . o f t h e c e l l F = 9 6 5 0 0 ; / / F ar ad ay ’ s c o n s t a n t // l e t X=dE/dT
6 7 8 9 10 11 12
16 17 18 19 20 21
T=298; del_H=n*F*((T*X)-E); printf ( ” \ n d e l H =%f j o u l e ” , d e l _ H ) ;
X=0.000338; del_G=-n*F*E; printf ( ” d el G =%f j o u l e s ” , d e l _ G ) ;
// d e l S = E ntro py c ha ng e o f t he s ys te m a t t em p er a tu r e T and p r e s s p=1 atm i n t he c a s e 13 d e l _ S = n * F * ( X ) ; / / d e l S =n ∗ F ∗ (dE/dT) 14 printf ( ” \ n d e l S =%f j o u l e s / d eg . ” , d e l _ S ) ; 15 / /And e nt ro py c h a ng e i s g i ve n by t he r e l a t i o n d el H= nF[T(dE/dT)−E ]
/ / v a l ue a r e t ak en a pp ro xi ma te i n t he 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 ue
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 w ou ld b e i n v o l v e d u nd er t h e s e c i r c um s t a n ce s
2 3 4 5 6 7
d e l _ G _ a t 2 5 d e g r e e _ c e l c i u s = - 1 9 5 5 0 0 ; / / u n i t = c a l / gm m o l e d e l _ H _ a t 2 5 d e g r e e _ c e l c i u s = - 2 1 2 8 0 0 ; / / u n i t = c a l / gm m o l e F = ( 9 6 5 0 0 / 4 . 1 8 4 ) ; / / s i n c e F =9 65 00 c o u l o m b s /gm−mole n =8 E _ a t 2 5 d e g r e e _ c e l c i u s = - d e l _ G _ a t 2 5 d e g r e e _ c e l c i u s / ( n *F ) ; / / J o u l e s / c o u l om b 8 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. 06 0 v o l t s ” ,
27
E_at25degree_celcius); 9 // 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 el G )T/( − d e l H ) 2 5
10 n m a x = d e l _ G _ a t 2 5 d e g r e e _ c e l c i u s / del_H_at25degree_celcius; 11 printf ( ” \ n nmax=%f” , n m a x ) ; 12 // 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 er a ti 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 13 T h e o r e t i c a l _ v o l t a g e = 1 . 0 6 0 / 0 . 9 2 ; 14 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); 15 / / p o w er d e v e l o p e d = 10 0 kW= 1 0 0 ∗ 1 0 ˆ 3 W 16 p o w e r _ d e v e l o p e d = ( 1 0 0 * 1 0 ^ 3 ) * 0 . 8 6 ; / / u n i t = k c a l / h r ;
s i n c e 1 w at t=1 j o u l e / s e c = 0. 86 k c a l / h r 17 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); 18 d e l _ G = - 1 9 5 5 0 0 ; 19 / / R eq u ir ed f l o w r a t e o f Methane 20 R _ F _ R _ O _ M = ( p o w e r _ d e v e l o p e d * 1 6 ) / d e l _ G ;/ / k g / h r ; 21 / / ( m et h an e m o l e s ) = 16 22 printf ( ” \ n f l o w r a t e o f Meth an e=%f k g / h r ” , R _ F _ R _ O _ M ) ; 23 / / H ea t 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 24 Q = d e l _ H _ a t 2 5 d e g r e e _ c e l c i u s - d e l _ G _ a t 2 5 d e g r e e _ c e l c i u s ; 25 printf ( ” \ n The h e at t r a n s f e r i s Q=%f k c a l / kg m ol e ” ,Q ); 26 27 / /The v a lu e a r e a pp ro xi ma te i n t he t e x t book t o t he
r e a l c a l c u l a t e d v al ue 28 / / v a l ue o f ” R eq ui re d f l o w r a t e o f methane ” i s wrong i n t he 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 he t e xt book .
28
Chapter 12 Magneto Hydro Dynamic Power Generation
Scilab code Exa 12.6.1 Open circuit voltage and maximum power output
1 / / Ex12 . 6 . 1 . ; c a l c u l a t e o pen c i r c u i t 2 3 4 5 6 7 8 9 10 11 12 13 14
v o l t a g e and
maximum power out put B = 2 ; // f l u x de n s it y ; un it=Wb/mˆ2 u = 1 0 ^ 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 . 5 0 ; / / d i s t a n c e b et we en p l a t e s ; u n i t =m E 0 = 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 ts ” , E 0 ) ; / / 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 s i g m a = 1 0 ; / / 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 . 2 5 ; // Pl at e Area ; un it=mˆ2
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” , R g ) ;
//Maximum po wer Maximum_power=(E0^2)/(4*Rg); printf ( ” \ n Maximum power=%f wat ts ” , M a x i m u m _ p o w e r ) ;
29
Chapter 13 Thermo Electric Power
Scilab code Exa 13.2.1 Peltier heats absorbed and rejected
1 / / Ex13 . 2 . 1 . ; P e l t i e r h e a t s a b s o r be d and r e j e c t e d 2 // pe l ti er c o e f f i c i e n t s at these jun cti ons are
a p l h a p 1 −2 = a l p h a s 1 − 2∗T 3 / / L e t A= a l p h a s 1 −2 a t 3 73 k =55 ∗ 10 ˆ − 6 v / d e g r e e k and B= a l p h a s 1 −2 a t 2 73 k =50∗ 10 ˆ − 6 v / d e g r e e k 4 5 6 7 8 9 10 11
A=(55*10^-6); B=(50*10^-6); T 1 = 3 7 3 ; // k T 2 = 2 7 3 ; // k I = 1 0 * 1 0 ^ - 3 ; // cu rr en t ; uni 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” , a l p h a _ p _ 1 _ 2 _ a t _ 3 7 3 k =A*T1,alpha_p_1_2_at_273k=B*T2);
12 13 14 15
/ / P e l t i e r h e a t s a bs or ne 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); 16 c = q 2 _ p e l t i er - q 1 _ p e l t i e r ;
30
17 printf ( ” \ n I f no o t h er h e at t r a n s f e r w er e i nv ol ve d , t he d i f f e r e n c e b et wee n t h e s e va ues , ” ) ; 18 printf ( ” \ n %f −%f=%f W, w o u l d b e s u p p l i e d a s e l e c t r i c p o w e r ” ,q2_peltier ,q1_peltier ,c);
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 . ; F i nd t h e t ho m so n 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 * 1 0 ^ - 3 ; / / u n i t =m i c r o V/ d e g r e e k ˆ 2 T 1 = 2 7 3 ; // u ni t=k T 2 = 3 7 3 ; // u ni t=k I = 1 0 * 1 0 ^ - 3 ; // un i t=A //Thomson c o e f f i c i e n t sigma , v a r i e s with temp . / / s i g m a 1 o f T=−T∗D ; u n i t =V/ d e g r e e k / /The t ho ms on h e at i s g i v e n by e q u a t i o n //qth=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 I n t e g r a t i o n = i n t e g r a t e( ’ T ’ , ’T ’ , T 1 , T 2 ) ;
qth=I*D*Integration; printf ( ” The THOMSON HEAT=%f m i c r o W” , q t h ) ;
Scilab code Exa 13.4.1 Carnot Efficiency
1 / / Ex13 . 4 . 1 . ; D e te r mi n e t h e e f f i c i e n c y
of the t h e r m o e l e c t r i c g e n er a t o r . what w i l l be i t s c a r n o t efficiency
2 3 T H = 6 0 0 ; // d e g re e k ; / / t em p er at u re o f t he h ot r e s e r v i o r
o f s o ur c e 4 T C = 3 0 0 ; // d e g re e k ; / / t em p er at u re o f t he s i n k 31
5 Z = 2 * ( 1 0 ^ - 3 ) ; // 1 / d e g re e k ; / / F i gu r e o f m e ri t f o r t he
material 6 M_optimum=(1+((Z/2)*(TH+TC)))^0.5; 7 printf ( ” M optimum=%f” , M _ o p t i m u m ) ; 8 / / 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 ra t o r
is n =(((TH−TC) /TH) ∗ ( ( M optimum − 1) / ( M optimum+(TC/TH) ) ) ∗ 1 0 0 ;
9 10 11 12
a=((TH-TC)/TH); b = ( M _ o p t i m um - 1 ) / ( M _ o p t i m u m + ( T C / T H ) ) ; 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 ) ;
13 / / where a s
e f f i c i e n c y o f t h e c a rn ot c y cl e ( r e v e r s i b l e ) nc = ((TH−TC) /TH) ∗ 1 0 0
14 n c = a * 1 0 0 ; 15 printf ( ” \ n E f f i c i e n c y
o f t h e c a rn 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 ” , n c ) ;
Scilab code Exa 13.4.2 Maximum generator efficiency and Power Output
1 / / Ex13 . 4 . 1 2 . ; C a l c u l a r e maximum g e n e r a t o r
a nd t h e e f f i c i e n c y 2 3 // see db eck
efficiency f o r maximum p ower , p ow er o u t pu t
c o e f f i c i e n t ( al ph a s ) ; uni t=vo l t s / de gr ee
celcius 4 5 6 7 8 9 10 11 12 13
a l p h a _ s 1 = - 1 9 0 * 1 0 ^ - 6 ; // n− t y p e a l p h a _ s 2 = 1 9 0 * 1 0 ^ - 6 ; // p− t y p e
r e s i s t i v i t y (p ) ; un i t=Ohm−cm p 1 = 1 . 4 5 * 1 0 ^ - 3 ; // n− t y p e p 2 = 1 . 8 * 1 0 ^ - 3 ; // p− t 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 kˆ −1 Z 1 = 2 * 1 0 ^ - 3 ; // n− t y p e Z 2 = 1 . 7 * 1 0 ^ - 3 ; // p− t y p e // Sp e c i f i c
32
14 15 16 17 18
// c o n d u c t i v i t y ( n− ty pe ) , k1=(alpha_s1^2)/(p1*Z1);
// s i m i l a r l y k2=(alpha_s2^2)/(p2*Z2); printf ( ” C o n d u c t i v i t y k1=%f W/cm d e g r e e
c e l c i u s \n C o n d u c t i v i t y k 2=%f W/cm d e g r e e c e l c i u s ” , k 1 , k 2 ) ; 19 / / Z o p t = ( ( a l p h a s 1 − a l p h a s 2 ) ˆ 2 ) / [ ( p 1 ∗ k 1 ) ˆ 2 + ( p 2 ∗ k2 ) ˆ2]; 20 / / l e t 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
a = ( a l p h a _ s1 - a l p h a _ s 2 ) b=(p1*k1) c=(p2*k2) A = sqrt ( b ) B = sqrt ( c ) C=(A+B);
37 38 39 40 41 42 43 44 45 46
//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
///the ref ore Z_opt=(a/C)^2; printf ( ” \ n Z o p t=%f d e g r e e k ” , Z _ o p t ) ;
/ / T he rm al c o n d u c t a n c e A 1 = 2 . 3 ; //cmˆ2 A 2 = 1 . 3 0 3 ; //cmˆ2 l 1 = 1 . 5 ; //cm l 2 = 0 . 6 5 3 ; //cm
K=((k1*A1)/l1)+((k2*A2)/l2) printf ( ” \ n T he rm al c o n d u c t a n c e K=%f W/ d e g r e e ” ,K);
ce l ci u s
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 ) ; T H = 9 2 3 ; // u ni t=k T C = 3 2 3 ; // u ni t=k M_opt=(1+((Z_opt/2)*(TH+TC)))^0.5; printf ( ” \ n M opt=%f ohm” , M _ o p t ) ; RL=M_opt*R; printf ( ” \ n RL=%f ohms” , R L ) ;
/ / Optimum e f f i c i e n c y n o p t = ( ( (TH−TC) /TH) ∗ (( M opt − 1) / ( M op t +(TC/TH) ) ) ∗ 1 0 0 ;
47 a a = ( ( T H - T C ) / T H ) ;
33
48 49 50 51
/ / t a k i n g M op t = 1. 4 3 b=(1.43-1)/(1.43+(TC/TH)); n_opt=aa*b*100; printf ( ” \ n Optimum e f f i c i e n c y n_opt);
n o p t=%f p e r s e n t ” ,
f o r max . p ower o u tp ut n= (TH−TC) /TH) ∗m / [( (1 +m) ˆ2/TH) ∗ (KR/ a l p h a s 1 2 ˆ2 )+(1+m) −(TH−TC) /2 TH) ] 53 / / E f f i c i e n c y p ower o u tp u t 54 // RL=R i . e . m=1 55 // l e t ab=(1+m) ˆ2/TH; ac =(KR/ a l p h a s 1 2 ˆ2 ) ; ad=(TH−TC) /2TH 52 / / e f f i c i e n c y
56 57 58 59 60 61
m=1; ab=4/TH; ac=1/Z_opt; ad=aa/2; n_max=[aa/(ab*ac+2-ad)]*100; printf ( ” \ n max . p ow er o u tp u t n max %f p e r s e n t ” ,n_max )
62 / / P ow er o u t p u t P o p t= I ˆ 2 ∗ RL=al p ha s 12 ˆ2 (TH−TC) ∗RL/(R
+RL)ˆ2= a lp ha s1 2 ˆ2 (TH−TC) /(1+M opt ) ˆ2 ∗ RL 63 / / l e t a t= a l p h a s 1 2 ˆ 2 ( TH−TC) ; mi=(1+M opt ) ˆ2 ∗ RL 64 65 66 67 68 69
at=a*a*(TH-TC)*(TH-TC); ml=(1+1.43)*(1+1.43)*2.63*10^-3 P_opt=at/ml; printf ( ” \ n Po wer o u t p u t P op t=%f w a t t s ” , P _ o p t ) ;
/ / f o r max . p o w er P ma x ( RL=R ) / / P ma x= a l p h a s 1 2 ˆ 2 ( TH−TC) ∗RL/( r+RL)ˆ2= a lp ha s1 2 ˆ2 ( TH−TC)RL ∗ 4RL
70 P _ m a x = a t / ( 4 * 1 . 8 4 * 1 0 ^ - 3 ) ; 71 printf ( ” \ n max . p o we r P max=%f w a t t s ” , P _ m a x ) ; 72 73 74 / /Many c a l c u a t i n g m is ta k a re t h e r e i n a f o l l o w i n g
e xa mp le , w hi ch i s
c o r r e c t e d i n p ro gr am .
34
Scilab code Exa 13.4.3 Maximum efficiency and Thermocouples in series
and also Heat input and rejected at full Load 1 / / Ex . 1 3 . 4 . 3 ; maximum e f f i c i e n c y , n o .
of ther moc oup le i n s e r i e s , o pen c kt v o lt a g e , h ea t i / p and r e j e c t a t f u l l load .
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
k A = 0 . 0 2 ; / / u n i t =w a tt / cm d e g r e e k e l v i n k B = 0 . 0 3 ; / / u n i t =w a tt / cm d e g r e e k e l v i n p A = 0 . 0 1 ; // u n i t=ohm cm p B = 0 . 0 1 2 ; // u n i t=ohm cm T H = 1 5 0 0 ; / / u n i t =d e g r e e k e l v i n T C = 1 0 0 0 ; / / u n i t =d e g r e e k e l v i n A A = 4 3 . 5 ; // un i t=cmˆ2 A B = 4 8 . 6 ; // un i t=cmˆ2 L A = 0 . 4 9 ; // u n i t=cm L B = 0 . 4 9 ; // u n i t=cm I = 2 0 * 4 8 . 6 ; // C ur re nt d e n s i t y i n t he e le me nt l i m i t e d
to , I =20 amp/cmˆ2 o u t p u t = 1 0 0 ; // u n i t=kW / / al ph a SA B a t 1 25 0 d e g r e e k e l v i n = 0. 00 12 v o l t / d e g r e e k e l v i n =a l ph a S A −a l p h a S B a l p h a _ S A B = 0 . 0 0 1 2 ; / / u n i t =v o l t / d e g r e e k e l v i n // l et
b=(pA*kA); c=(pB*kB); A = sqrt ( b ) ; B = sqrt ( c ) ; C=(A+B);
// f i g u r e o f m er it
Z=(alpha_SAB/C)^2; printf ( ” Z=%f d e g r e e k ˆ−1” , Z ) ; M=(1+((Z/2)*(TH+TC)))^0.5; printf ( ” \ n M=%f” , M ) ;
35
28 29 30 31
// l et aa=((TH-TC)/TH); bb=(M-1)/(M+(TC/TH));
/ / 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 c o n v e r t e r i s g i v e n by n max = ((TH−TC) /TH) ∗ [ (M− 1) / (M+(TC/TH) ) ]∗100;
32 n _ m a x = a a * b b * 1 0 0 ; 33 printf ( ” \ n Maximum e f f i c i e n c y n ma x=%f p e r s e n t ” , n_max); 34 / / 2 ] No . o f t he rm oc ou pl e i n s e r i e s 35 V = a l p h a _ S A B * ( T H - T C ) ; 36 printf ( ” \ n V=%f v o l t ” , V ) ; 37 R = ( ( p A * L A ) / A A ) + ( ( p B * L B ) / A B ) ; // s i n c e R=RA+RB=(( pA∗LA
) /AA) +(( pB∗ LB ) /AB) ; 38 printf ( ” \ n R=%f ohm” , R ) ; 39 V L = V - ( R * I ) ; 40 printf ( ” \ n VL=%f vo l t ” , V L ) ; 41 / /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
o ne c o u p l e 42 43 44 45 46 47 48
NTCS=115/VL; printf ( ” \ n No .
49 50 51 52 53 54 55 56 57 58
HIFL=output/(n_max/100); printf ( ” \ n H ea t i n p u t a t f u l l
o f t he rm oc ou pl e i n s e r i e s =%f” , N T C S ) ; // 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 ” , O C V ) // 4 ] Heat i n pu t and r e j e c t a t f u l l l o ad . / / Hea t i n p u t a t f u l l l o a d .= o u t pu t / e f f i c e n c y =100/0.091 l o a d =%f kW” , H I F L ) / / Hea t r e j e c t a t f u l l l o a d . =Hea t i np ut −Work o u t p u t
HRFL=HIFL-output; printf ( ” \ n H ea t r e j e c t
a t f u l l l o a d=%f kW” , H R F L )
/ /The v a lu e o f ”pB” i s m i s p ri n t ed / / The v a l ue s a re t ak en i n t he t e xt book i s a p p ro xi m a te ly e qu a l t o c a l c u l a t e d v a l ue s 36
37
Chapter 14 Thermionic Generation
Scilab code Exa 14.4.1 Efficiency of the generator and Carnot efficiency
1 / /Ex . 1 4 . 4 . 1 . ; C a l c u l a t e
the ef fi ci en cy of the g e n e r a to r and a l s o co mpa re w it h t he c a rn o t efficiency
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
/ / c a t h o de wo rk f u n t i o n f l u x _ c = 2 . 5 ; / / u n i t =v o l t s / / an od e work f u n t i o n flux_a=2; // unit=vo lt s / /Temp . o f c a t h o d e T c = 2 0 0 0 ; / / 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 T s = 1 0 0 0 ; / / u n i t =d e g r e e k / / pl as ma p o t e n t a i l d ro p f l u x _ p = 0 . 1 ; / / u n i t =v o l t s / / Net o u tp ut v o l t a g e
V=flux_c -flux_a -flux_p printf ( ” V=% f v o l t ” , V ) ;
// c ha rg e o f an e l e c t r o n e = 1 . 6 * 1 0 ^ - 1 9 ; // un it=coulomb / / b o l tz ma n n c o n s t a n t k = 1 . 3 8 * 1 0 ^ - 2 3 ; // 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 . 2 0 * 1 0 ^ 6 ; 21 // o ne e l e c t r o n v o l t =1.6 ∗ 10ˆ − 19 j o u l e 22 / / The n et c u r r e nt i n t he g e n e r a to r J=J ca th od e −
J anode 23 // l e t EC=eˆ( − f l u x c / k ∗ Tc ) 24 E C = % e ^ [ - ( 1 . 6 * 1 0 ^ - 1 9 * f l u x _ c ) / ( k * T c ) ] ; 25 J _ c a t h o d e = A * ( T c * T c ) * E C ; // J ca th od e=A∗ Tcˆ2 ∗ e ˆ( − f l u x c
/ k ∗ Tc ) 26 printf ( ” \ n J c a t h o d e =% f amp /mˆ 2 ” , J _ c a t h o d e ) ; 27 // l e t EA=eˆ( − f l u x c / k ∗ Ts ) 28 E A = % e ^ [ - ( 1 . 6 * 1 0 ^ - 1 9 * f l u x _ a ) / ( k * T s ) ] ; 29 J _ a n o d e = A * ( T s ^ 2 ) * E A ; / / J c a t h o d e =A∗ Tsˆ2 ∗ e ˆ( − f l u x c / k ∗
Ts ) 30 printf ( ” \ n J ano de=%f amp/mˆ2” , J _ a n o d e ) ; 31 / /The n e t c u r r e n t c an be t a ke n =Jc , a s Ja c an be
n e g l e c t e d i n c om pa ri so n w it h Jc 32 J = J _ c a t h o d e ; 33 printf ( ” \ n J=%f amp/mˆ2 ” , J ) ; 34 / /The h e at s u p p l i e d t o t h e c a th o de 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 ma ∗ (Tcˆ4 − T s ˆ 4 ) 35 // l e t QA=Qc/Ac; and 36 37 38 39 40
a=2.5+((2*1.38*10^-23*2000)/(1.6*10^-19)); b=J*a; c = ( 0 . 2 * 5 . 6 7 * ( 1 0 ^ - 1 2 ) * ( 1 0^ - 4 ) * ( ( 2 0 0 0 ^ 4 ) - ( 1 0 00 ^ 4 ) ) ) ;
43 44 45 46 47 48 49
ng=((J*V)/(7.026*10^6))*100; printf ( ” \ n n g=%f p e r s e n t ” , n g ) ;
// the ref ore Q A = 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 ˆ − 19 ) ) ) ) +( 0. 2 ∗ 5 . 6 7 ∗ ( 1 0 ˆ − 1 2 ) ∗ (10ˆ − 4 ) ∗ ( ( 2 0 0 0 ˆ 4 ) − (100 0ˆ4 ) ) ) 41 printf ( ” \ n The h e a t s u p p l i e d t o t h e c a t h od e Qc /Ac=%f watt/mˆ2” , Q A ) ; 42 / / e f f i c i e n c y o f t h e g e n e ra t o r
/ / c ar no 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