P. K. Nag. Engineering Thermodynamics (776119), страница 5
Текст из файла (страница 5)
1 8 7 ∗ ( 1 − ( t i /T) ) ’ , ’T ’ ,ti , tf ) ;UE = Ei /1000 - AE ;w2 = sqrt ( AE *1000*2/ I ) ;N2 = ( w2 *60) /(2* %pi ) ;disp ( N2 , ” The f i n a l RPM o f t h e f l y w h e e l would be ” )Scilab code Exa 8.6 Energy calculations on air123456T1 = 353; T2 = 278;V2 = 2; V1 = 1;P0 = 100; P1 = 500;R = 0.287; cv = 0.718;m = 2;S = integrate ( ’ (m∗ cv ) /T ’ , ’T ’ ,T1 , T2 ) + integrate ( ’ (m∗R) /V ’ , ’V ’ ,V1 , V2 ) ; // S = S1−S27 U = m * cv *( T1 - T2 ) ;8 Wmax = U -( T2 *( - S ) ) ;479 V1_ = ( m * R * T1 ) / P1 ;10 CA = Wmax - P0 *( V1_ ) ; // Change i n a v a i l a b i l i t y11 I = T2 * S ;12 disp ( ” kJ ” , Wmax , ” The maximum work i s ” )13 disp ( ” kJ ” ,CA , ” Change i n a v a i l a b i l i t y i s ” )14 disp ( ” kJ ” ,I , ” I r r e v e r s i b i l i t y i s ” )Scilab code Exa 8.7 Energy calculation of air through a turbine12345678910111213141516P1 = 500; P2 = 100;T1 = 793; T2 = 573;cp = 1.005; T0 = 293; R = 0.287;S21 = ( R * log ( P2 / P1 ) ) -( cp * log ( T2 / T1 ) )CA = cp *( T1 - T2 ) - T0 * S21 ; // Change i n v= a v a i l a b i l i t ydisp ( ” kJ / kg ” ,CA , ” The d e c r e a s e i n a v a i l a b i l i t y i s ” )Wmax = CA ;disp ( ” kJ / kg ” , Wmax , ” The maximum work i s ” )Q = -10;W = cp *( T1 - T2 ) + Q ;I = Wmax - W ;disp ( ” kJ / kg ” ,I , ” The i r r e v e r s i b i l i t y i s ” )// A l t e n a t i v e l ySsystem = -Q / T0 ;Ssurr = - S21 ;I1 = T0 *( Ssystem + Ssurr ) ;Scilab code Exa 8.8 Energy calculation on a air preheater12345T0 = 300;Tg1 = 573; Tg2 = 473;Ta1 = 313;cpg = 1.09; cpa = 1.005;mg = 12.5; ma = 11.15;486 f1 = cpg *( Tg1 - T0 ) - T0 * cpg *( log ( Tg1 / T0 ) ) ;7 f2 = cpg *( Tg2 - T0 ) - T0 * cpg *( log ( Tg2 / T0 ) ) ;8 disp ( ” kJ /Kg r e s p e c t i v e l y ” ,f2 , ” and ” ,f1 , ” The i n i t i a l91011121314151617181920and f i n a l a v a i l b i l i t y o f t h e p r o d u c t s a r e ” )// P a r t ( b )Dfg = f1 - f2 ;Ta2 = Ta1 + ( mg / ma ) *( cpg / cpa ) *( Tg1 - Tg2 ) ;Ifa = cpa *( Ta2 - Ta1 ) - T0 * cpa *( log ( Ta2 / Ta1 ) ) ;I = mg * Dfg - ma * Ifa ;disp ( ”kW” ,I , ” The i r r e v e r s i b i l i t y o f t h e p r o c e s s i s ” )// P a r t ( c )Ta2_ = Ta1 *( %e ^( -( mg / ma ) *( cpg / cpa ) * log ( Tg2 / Tg1 ) ) ) ;Q1 = mg * cpg *( Tg1 - Tg2 ) ;Q2 = ma * cpa *( Ta2_ - Ta1 ) ;W = Q1 - Q2 ;disp ( ”kW” ,W , ” Tota power g e n e r a t e d by t h e h e a t e n g i n e”)Scilab code Exa 8.9 Calculation of rate of energy degradation of gas flowing through a pipe123456789T2 = 1063;T1 = 1073;m = 2; cp = 1.1;I = m * cp *(( T1 - T2 ) - T0 *( log ( T1 / T2 ) ) ) ;disp ( ”kW” ,I , ” The i r r e v e s i b i l i t y r a t e i s ” )// At l o w e r t e m p e r a t u r eT1_ = 353; T2_ = 343;I_ = m * cp *(( T1_ - T2_ ) - T0 *( log ( T1_ / T2_ ) ) ) ;disp ( ”kW” ,I_ , ” The i r r e v e s i b i l i t y r a t e a t l o w e rtemperature i s ”)49Scilab code Exa 8.10 Calculation of rate of energy lossof gas flowing througha pipe1 m = 3; R = 0.287;2 T0 = 300; k = 0.10; // k = dP/P13 Sgen = m * R * k ;4 I = Sgen * T0 ;5 disp ( ”kW” ,I , ” The r a t e o f e n e r g y l o s sbecause of thep r e s s u r e d r o p due t o f r i c t i o n ” )Scilab code Exa 8.11 Energy calculation on mixing of stream of water1234567891011121314151617m1 = 2; // m1 dotm2 = 1;T1 = 90+273;T2 = 30+273;T0 =300;m = m1 + m2 ;x = m1 / m ;t = T2 / T1 ; // Taucp = 4.187;Sgen = m * cp * log (( x + t *(1 - x ) ) /( t ^(1 - x ) ) ) ;I = T0 * Sgen ;disp ( ”kW/K” , Sgen , ” The r a t e o f e n t r o p y g e n e r a t i o n i s ”)disp ( ”kW” ,I , ” The r a t e o f e n e r g y l o s s due t o m i x i n gi s ”)// A l t e r n a t i v e l yT = ( m1 * T1 + m2 * T2 ) /( m1 + m2 ) ; // e u i l i b r i u mtemperatureSgen1 = m1 * cp * log ( T / T1 ) + m2 * cp * log ( T / T2 ) ;I1 = T0 * Sgen1 ;50Scilab code Exa 8.12 Calculations on efficiency of burning of fuelQr = 500; // Heat r e l e a s e i n kWTr = 2000;T0 = 300;// P a r t ( a )Qa = 480; Ta = 1000;n1a = ( Qa / Qr ) ;n2a = n1a *(1 -( T0 / Ta ) ) /(1 -( T0 / Tr ) ) ;disp ( ”PART (A) ” )disp ( ”%” , n1a *100 , ” The f i r s t law e f f i c i e n c y i s ” )disp ( ”%” , n2a *100 , ” The S e c o n d law e f f i c i e n c y i s ” )// P a r t ( b )Qb = 450; Tb = 500;n1b = ( Qb / Qr ) ;n2b = n1b *(1 -( T0 / Tb ) ) /(1 -( T0 / Tr ) ) ;disp ( ”PART (B) ” )disp ( ”%” , n1b *100 , ” The f i r s t law e f f i c i e n c y i s ” )disp ( ”%” , n2b *100 , ” The S e c o n d law e f f i c i e n c y i s ” )// P a r t ( c )Qc = 300; Tc = 320;n1c = ( Qc / Qr ) ;n2c = n1c *(1 -( T0 / Tc ) ) /(1 -( T0 / Tr ) ) ;disp ( ”PART (C) ” )disp ( ”%” , n1c *100 , ” The f i r s t law e f f i c i e n c y i s ” )disp ( ”%” , n2c *100 , ” The S e c o n d law e f f i c i e n c y i s ” )// P a r t ( d )Qd = 450;n1d = ( Qd / Qr ) ;n2a_ = n1d *(1 -( T0 / Ta ) ) /(1 -( T0 / Tr ) ) ;n2b_ = n1d *(1 -( T0 / Tb ) ) /(1 -( T0 / Tr ) ) ;n2c_ = n1d *(1 -( T0 / Tc ) ) /(1 -( T0 / Tr ) ) ;disp ( ” P a r t (D) ” )disp ( ”%” , n1d *100 , ” The f i r s t law e f f i c i e n c y i s ” )disp ( ”%” , n2a_ *100 , ” The S e c o n d law e f f i c i e n c y o f p a r t( a ) i s ”)34 disp ( ”%” , n2b_ *100 , ” The S e c o n d law e f f i c i e n c y o f p a r t( b ) i s ”)1234567891011121314151617181920212223242526272829303132335135disp ( ”%” , n2c_ *100 , ” The S e c o n d law e f f i c i e n c y o f p a r t( c ) i s ”)Scilab code Exa 8.14 Calculation of power and efficiency in a compressor12345cp = 1.005; T2 = 433; T1 = 298;T0 = 298; R = 0.287; P2 = 8; P1 = 1;Q = -100; m = 1;W = Q + m * cp *( T1 - T2 ) ;AF = cp *( T2 - T1 ) - T0 *(( cp * log ( T2 / T1 ) ) -( R * log ( P2 / P1 ) ) ); // AF = a f 2 −a f 16 e = AF / - W ; // e f f i c i e n c y7 disp ( ”kW” ,W , ” The power i n p u t i s ” )8 disp (e , ” The s e c o n d law e f f i c i e n c y o f t h e c o m p r e s s o ri s ”)Scilab code Exa 8.15 Determination of energy of vaccume1234567// S i n c e vaccume h a s z e r o massU = 0; H0 = 0; S = 0;// I f t h e vaccume ha r e d u c e d t o dead s t a t eU0 = 0; H0 = 0 ; S0 = H0 ; V0 = 0;P0 = 100; V = 1;fi = P0 * V ;disp ( ” kJ ” ,fi , ” The e n e r g y o f t h e c o m p l e t e vaccume i s ”)Scilab code Exa 8.16 Calculation of energy produced in chilling processof fish521234567891011m = 1000; T0 = 300; P0 = 1;T1 = 300;T2 = 273 -20; Tf = 273 -2.2;Cb = 1.7; Ca = 3.2;Lh = 235;H12 = m *(( Cb *( Tf - T2 ) ) + Lh +( Ca *( T1 - Tf ) ) ) ;H21 = - H12 ;S12 = m *(( Cb * log ( Tf / T2 ) ) +( Lh / Tf ) +( Ca * log ( T1 / Tf ) ) ) ;S21 = - S12 ;E = H21 - T0 * S21 ;disp ( ” kJ ” ,E , ” Energy p r o d u c e d i s ” )Scilab code Exa 8.17 Thermodynamic calculation on air123456789101112cv = 0.718; T2 = 500; T1 = 300;m = 1; T0 = 300;// Case ( a )Sua = cv * log ( T2 / T1 ) ;Ia = T0 * Sua ;disp ( ” kJ / kg ” ,Ia , ” The i r r e v e r s i b i l i t y i n c a s e a i s ” )// Case ( b )Q = m * cv *( T2 - T1 ) ;T = 600;Sub = Sua -( Q / T ) ;Ib = T0 * Sub ;disp ( ” kJ / kg ” ,Ib , ” The i r r e v e r s i b i l i t y i n c a s e b i s ” )Scilab code Exa 8.18 Energy calculation of steam through turbine1234h1 = 3230.9; s1 = 6.69212; V1 = 160; T1 = 273+400;h2 = 2676.1; s2 = 7.3549; V2 = 100; T2 = 273+100;T0 = 298; W = 540; Tb = 500;Q = ( h1 - h2 ) +(( V1 ^2 - V2 ^2) /2) *1 e -03 - W ;535 I = 151.84 - Q *(0.404) ;6 AF = W + Q *(1 -( T0 / Tb ) ) + I ; // AF = a f 1 −a f 27 n2 = W / AF ;8 disp ( ” kJ / kg ” ,I , ” I r r e v e r s i b i l i t y p e r u n i t mass i s ” )9 disp ( n2 , ” The s e c o n d law e f f i e n c y o f t h e t u r b i n e i s ” )Scilab code Exa 8.19 Availability calculations on a furnace12345678910T0 = 300; T = 1500;Q = -8.5; W = 8.5;// Case ( a )I = Q *(1 - T0 / T ) + W ;R = Q *(1 - T0 / T ) ;disp ( ”kW” ,I , ” and ” ,R , ” Rate o f a v a i l a b i l i t y t r a n s f e rw i t h h e a t and t h e i r r e v e r s i b i l i t y r a t e a r e ” )// Case ( b )T1 = 500;Ib = - Q *(1 - T0 / T ) + Q *(1 - T0 / T1 ) ;disp ( ”kW” ,Ib , ” Rate o f a v a i l a b i l i t y i n c a s e b i s ” )Scilab code Exa 8.20 Energy calculation of air through compressor1234567891011P1 = 1; T1 = 273+30;P2 = 3.5; T2 = 141+273 ; V = 90;T0 = 303;// P a r t ( a )g = 1.4;T2s = T1 *(( P2 / P1 ) ^(( g -1) / g ) ) ;disp ( ” As T2s> T2 s o t h e p r o c e s s must be p o l y t r o p i c ” )// P a r t ( b )p = log ( P2 / P1 ) ; q = log ( T2 / T1 ) ;n = p /( p - q ) ;disp (n , ” The p o l y t r o p i c i n d e x i s ” )5412131415161718192021222324// P a r t ( c )cp = 1.0035; R = 0.287;Wa = cp *( T1 - T2 ) -( V2 ^2/2) *1 e -03 ;Wt = -R * T0 * log ( P2 / P1 ) -( V2 ^2/2) *1 e -03;Nt = Wt / Wa ;disp ( Nt , ” The i s o t h e r m a l e f f i e n c y i s ” )// P a r t ( d )f12 = cp *( T1 - T2 ) + T0 *(( R * log ( P2 / P1 ) ) -( cp * log ( T2 / T1 )) ) - ( V2 ^2/2) *1 e -03 ;I = f12 - Wa ;disp ( ”kW r e s p e c t i v e l y ” ,I , ” and ” ,f12 , ” The minimum worki n p u t and i r r e v e r s i b i l i t y a r e ” )// P a r t ( e )n2 = ( f12 / Wa ) ;disp ( n2 , ” S e c o n d law e f f i c i e n c y i s ” )55Chapter 9Properties of pure substancesScilab code Exa 9.1 Calculations on vapourization of steam// At 1 MPatsat = 179.91;vf = 0.001127;vg = 0.19444;vfg = vg - vf ;sf = 2.1387;sg = 6.5865;sfg = sg - sf ;disp ( ” d e g r e e ” , tsat , ” At 1 Mpa s a t u r a t i o n t e m p e r a t u r ei s ”)10 disp ( ”m3/ kg ” ,vfg , ” Changes i n s p e c i f i c volume i s ” )11 disp ( ” kJ / kg K” ,sfg , ” Change i n e n t r o p y d u r i n gevaporation i s ”)123456789Scilab code Exa 9.3 Finding the entropy and enthalpy of steam1 v = 0.09; vf = 0.001177; vg = 0.09963;2 x = (v - vf ) /( vg - vf ) ;5634567hf = 908.79; hfg = 1890.7;sf = 2.4474; sfg = 3.8935;h = hf +( x * hfg ) ;s = sf +( x * sfg ) ;disp ( ” kJ / kg and kJ / kg K r e s p e c t i v e l y ” ,s , ” and ” ,h , ” Thee n t h a l p y and e n t r o p y og t h e s y s t e m a r e ” )Scilab code Exa 9.4 Finding the entropy and enthalpyand volume of steam12345678910111213// f o r T = 350 d e g r e eT1 = 350; v1 = 0.2003; h1 = 3149.5; s1 = 7.1369;// f o r T = 400 d e g r e eT2 = 400; v2 = 0.2178; h2 = 3257.5; s2 = 7.3026;// I n t e r p o l a t i o n f o r T = 3 8 0 ;T = [ T1 T2 ];v = [ v1 v2 ];h = [ h1 h2 ];s = [ s1 s2 ];v3 = interpln ([ T ; v ] ,380) ;h3 = interpln ([ T ; h ] ,380) ;s3 = interpln ([ T ; s ] ,380) ;disp ( ”m3/ kg r e s p e c t i v e l y ” ,v3 , ” kJ / kg ” ,h3 , ” kJ / kg K” ,s3, ” The e n t r o p y , e n t h a l p y and volume o f stem a t 1 .
4MPa and 380 d e g r e e i s ” )Scilab code Exa 9.5 Calculations of thermodynamics properties of mixture of air and steam12345Psatvf =hf =sf =mf == 3.973 e06 ;0.0012512; vg = 0.05013;1085.36; hfg = 1716.2;2.7927; sfg = 3.2802;9; V = 0.04;5767891011121314151617181920212223Vf = mf * vf ;Vg = V - Vf ;mg = Vg / vg ;m = mf + mg ;x = mg / m ;v = vf + x *( vg - vf ) ;h = hf + x * hfg ;s = sf +( x * sfg ) ;u = h - Psat * v *1 e -03;// a t T = 250uf = 1080.39; ufg = 1522;u_ = uf + x * ufg ;disp ( ”Pa” , Psat , ” The p r e s s u r e i s ” )disp ( ” kg ” ,m , ” The mass i s ” )disp ( ”m3/ kg ” ,v , ” S p e c i f i c volume i s ” )disp ( ” kJ / kg ” ,h , ” E n t h a l p y i s ” )disp ( ” kJ / kg K” ,s , ” The e n t r o p y i s ” )disp ( ” kJ / kg ” ,u , ” The i n t e r a l e n e r g y i s ” )Scilab code Exa 9.6 energy calculation on cooling of steam1234567891011121314// P a r t ( a )vg1_ = 0.8919; T1_ = 120;vg2_ = 0.77076; T2_ = 125;vg_ = [ vg1_ vg2_ ]; T_ = [ T1 T2 ];v1 = 0.7964;h1 = 2967.6;P1 = 0.3 e03 ; // i n KpaT1 = interpln ([ vg_ ; T_ ] , v1 ) ;disp ( ” d e g r e e ” ,T3 , ” The steam become s a t u r a t e d a t ” )// P a r t ( b )vf = 0.001029; vg = 3.407;hf = 334.91; hfg = 2308.8;Psat = 47.39; // I n kPav2 = v1 ;58151617181920x2 = ( v1 - vf ) /( vg - vf ) ;h2 = hf + x2 * hfg ;P2 = Psat ;Q12 = ( h2 - h1 ) + v1 *( P1 - P2 ) ;disp ( x2 , ” The q u a l i t y f a c t o r a t t =80 d e g r e e i s ” )disp ( ” kJ / kg ” ,Q12 , ” The h e a t t r a n s f e r e d p e r kg o fsteam i n c o o l i n g from 250 d e g r e e t o 80 d e g r e e ” )Scilab code Exa 9.7 energy calculation on expansion of steam12345678910// At T = 40 d e g r e ePsat = 7.384 e06 ;sf = 0.5725; sfg = 7.6845;hf = 167.57; hfg = 2406.7;//s1 = 6.9189; h1 = 3037.6;x2 = ( s1 - sf ) / sfg ;h2 = hf +( x2 * hfg ) ;W = h1 - h2 ;disp ( ” kJ /Kg” ,W , ” The i d e a l work o u t p u t o f t h e t u r b i n ei s ”)Scilab code Exa 9.8 Determination of velocity of steam leaving throughsteam12345678w3 = 2.3; w1 = 1.0;w2 = w3 - w1 ;h1 = 2950.0;// At 0 .














