P. K. Nag. Engineering Thermodynamics (776119), страница 8
Текст из файла (страница 8)
1D L =length D = diameterL = 1.1* D ;disp ( ”cm” ,D *100 , ” D i a m e t e r o f c y l i n d e r i s ” )disp ( ”cm” ,L *100 , ” Length o f c y l i n d e r i s ” )COP = ( h6 - h5 ) /( h2 - h1 ) ;PI = w *( h2 - h1 ) ;disp ( ”kW” ,PI , ” Power r e q u i r e d t o d r i v e t h e c o m p r e s o ri s ”)disp ( COP , ”COP i s ” )Scilab code Exa 14.5 Calculation on work and COP of two stage refrigeration system10312345678910111213141516171819P2 = 1554.3;P1 = 119.5;Pi = sqrt ( P1 * P2 ) ;h1 = 1404.6; h2 = 1574.3; h3 = 1443.5; h4 = 1628.1;h5 = 371.7; h6 = h5 ; h7 = 181.5;w = 30; // c a p a c i t y o f p l a n tm2_dot = (3.89*30) /( h1 - h7 ) ;m1_dot = m2_dot *(( h2 - h7 ) /( h3 - h6 ) ) ;Wc_dot = m2_dot *( h2 - h1 ) + m1_dot *( h4 - h3 ) ;COP = w *3.89/ Wc_dot ;// s i n g l e s t a g eh1_ = 1404.6; h2_ = 1805.1;h3_ = 371.1; h4_ = h3_ ;m_dot = (3.89*30) /( h1_ - h4_ ) ;Wc = m_dot *( h2_ - h1_ ) ;COP_ = w *3.89/ Wc ;IW = ( Wc - Wc_dot ) / Wc_dot ;ICOP = ( COP - COP_ ) / COP_disp ( ”%” , IW *100 , ” I n c r e a s e i n work o f c o m p r e s s i o n i s ”)20 disp ( ”%” , ICOP *100 , ” I n c r e a s e i n COP f o r 2 s t a g ecompression i s ”)Scilab code Exa 14.6 Estimation of COP of refrigeration12345678910tsat = 120.2+273; hfg = 2201.9;T1 = 120.2+273;T2 = 30+273;Tr = -10+273;COP_max = (( T1 - T2 ) * Tr ) /(( T2 - Tr ) * T1 ) ;ACOP = 0.4* COP_max ;Qe = (20*14000) /3600; // i n KWQg = Qe / ACOP ;x = 0.9;H = x * hfg ;10411 SFR = Qg / H ;12 disp ( ” kg / s ” ,SFR , ” Steam f l o wr a t e r e q u i r e d i s ”)Scilab code Exa 14.7 Calculations on a aircraft cooling system1234567891011121314T1 = 277; T3 = 273+55;rp = 3; // P r e s s u r e r a t i og = 1.4; cp = 1.005;T2s = T1 *( rp ^(( g -1) / g ) ) ;T2 = T1 +( T2s - T1 ) /0.72T4s = T3 /( rp ^(( g -1) / g ) ) ;T34 = 0.78*( T3 - T4s ) ; // T3−T4T4 = T3 - T34 ;COP = ( T1 - T4 ) /(( T2 - T1 ) -( T3 - T4 ) ) ;disp ( COP , ”COP o f t h e r e f r i g e r a t o r i s ” )P = (3*14000) /( COP *3600)disp ( ”kW” ,P , ” D r i v i n g power r e q u i r e d i s ” )m = (3*14000) /( cp *( T1 - T4 ) ) ;disp ( ” kg / s ” ,m /3600 , ” Mass f l o w r a t e i s ” )Scilab code Exa 14.8 Calculations on a vapour compression heat pump1234567891011P1 = 2.4; T1 = 0+273;h1 = 188.9; s1 = 0.7177; v1 = 0.0703;P2 = 9; T2 = 60+273;h2 = 219.37;h2s = 213.27;h3 = 71.93; h4 = h3 ;v1 = 0.0703;A1V1 = 0.6/60;m_dot = A1V1 /0.0703;Wc_dot = m_dot *( h2 - h1 ) ;Q1_dot = m_dot *( h2 - h3 ) ;10512 COP = Q1_dot / Wc_dot ;13 nis = ( h2s - h1 ) /( h2 - h1 ) ;14 disp ( ”kW” , Wc_dot , ” Power i n p u t i s ” )15 disp ( ”kW” , Q1_dot , ” H e a t i n g c a p a c i t y i s ” )16 disp ( COP , ”COP i s ” )17 disp ( ”%” , nis *100 , ” The i s e n t r o p i c c o m p r e s s o refficiencyi s ”)Scilab code Exa 14.9 Calculations on air refrigeration system cycle123456789101112131415T1 = 275; T3 = 310;P1 = 1 ; P2 = 4;T2s = T1 *( P2 / P1 ) ;nc = 0.8;T2 = T1 + ( T2s - T1 ) * nc ;pr = 0.1;P3 = P2 -0.1;P4 = P1 +0.08;PR = P3 / P4 ;disp ( PR , ” P r e s s u r e r a t i o f o r t h e t u r b i n e i s ” )T4s = T3 *(1/ PR ) ^(0.286) ;nt = 0.85;T4 = T3 -( T3 - T4s ) * nt ;COP = ( T1 - T4 ) /(( T2 - T3 ) -( T1 - T4 ) ) ;disp ( COP , ”COP i s ” )106Chapter 15PsychrometricsScilab code Exa 15.1 Calculations on atmospheric air1234567891011121314151617181920Ps = 0.033363; P = 1.0132;W2 = (0.622* Ps ) /( P - Ps ) ;hfg2 = 2439.9; hf2 = 109.1; cpa = 1.005;hg = 2559.9; hw1 = hg ;T2 = 25+273; T1 = 32+273;W1 = ( cpa *( T2 - T1 ) +( W2 * hfg2 ) ) /( hw1 - hf2 ) ;Pw = (( W1 /0.622) * P ) /(1+( W1 /0.622) ) ;disp ( ” kg vap .
/ kg d r y a i r ” ,W1 , ” S p e c i f i c h u m i d i t y i s ” )disp ( ” b a r ” ,Pw , ” P a r t i a l p r e s s u r e o f w a t e r v a p o u r i s ” )disp ( ” d e g r e e ” ,24.1 , ”Dew p o i n t t e m p e r a t u r e i s ” ) //s a t u r a t i o n temperature at 0 . 0 3 barPsat = 0.048; // a t 32 d e g r e efi = Pw / Psat ;disp ( ”%” , fi *100 , ” R e l a t i v e h u m i d i t y i s ” )mu = ( Pw / Ps ) *(( P - Ps ) /( P - Pw ) ) ;disp ( mu , ” D e g r e e o f s a t u r a t i o n i s ” )Pa = P - Pw ;Ra = 0.287; Tab = T1 ;rho_a = ( Pa *100) /( Ra * Tab ) ;disp ( ” kg /m3” , rho_a , ” D e n s i t y o f d r y a i r i s ” )rho_w = W1 * rho_a ;10721 disp ( ” kg /m3” , rho_w , ” D e n s i t y o f w a t e r v a p o u r i s ” )22 ta = 32; tdb = 32; tdp = 24.1;23 h = cpa * ta + W1 *( hg +1.88*( tdb - tdp ) ) ;24 disp ( ” kJ / kg ” ,h , ” E n t h a l p y o f t h e m i x t u r e i s ” )Scilab code Exa 15.2 Calculating the humidity of air water mixture1234567891011Ps = 2.339; P = 100;W2 = (0.622* Ps ) /( P - Ps ) ;hfg2 = 2454.1; hf2 = 83.96; cpa = 1.005;hw1 = 2556.3;T2 = 20; T1 = 30;W1 = ( cpa *( T2 - T1 ) +( W2 * hfg2 ) ) /( hw1 - hf2 ) ;Pw1 = (( W1 /0.622) * P ) /(1+( W1 /0.622) ) ;Ps1 = 4.246;fi = ( Pw1 / Ps1 ) ;disp ( ”%” , fi *100 , ” R e l a t i v e h u m i d i t y i s ” )disp ( ” kg vap .
/ kg d r y a i r ” ,W1 , ” Humidity r a t i o o fi n l e t mixture i s ”)Scilab code Exa 15.3 Calculations on air temperature and mass of water1234567891011Psat = 2.339;fi3 = 0.50;P = 101.3; cp = 1.005;Pw3 = fi3 * Psat ;Pa3 = P - Pw3 ;W3 = 0.622*( Pw3 / Pa3 ) ;Psa1_1 = 0.7156;Pw1 = 0.7156;Pa1 = P - Pw1 ;W1 = 0.622*( Pw1 / Pa1 ) ; W2 = W1 ;T3 = 293; Ra = 0.287; Pa3 = 100.13;10812131415va3 = ( Ra * T3 ) / Pa3 ;SW = ( W3 - W1 ) / va3 ;t3 = 20; tsat = 9.65; hg = 2518; h4 = 10;t2 = ( W3 *( hg +1.884*( t3 - tsat ) ) - W2 *( hg -1.884* tsat ) +cp * t3 - ( W3 - W2 ) * h4 ) / ( cp + W2 *1.884)16 disp ( ” kg m o i s t u r e /m3” ,SW , ” Mass o f s p r a y w a t e rr e q u i r e d i s ”)17 disp ( ” d e g r e e ” ,t2 , ” T e m p e r a t u r e t o which a i r must beheated i s ”)Scilab code Exa 15.4 Calculations on an air conditioning system12345678h1 = 82; h2 = 52; h3 = 47; h4 = 40;W1 = 0.020; W2 = 0.0115; W3 = W2 ;v1 = 0.887;v = 3.33; // amount o f f r e e s i r c i r c u l a t e dG = v / v1 ;CC = ( G *( h1 - h3 ) *3600) /14000; // i n t o n n sR = G *( W1 - W3 ) ;disp ( ” t o n n e s ” ,CC , ” C a p a c i t y o f t h e c o o l i n g c o i l i ntonnes ”)9 disp ( ” kg / s ” ,R , ” Rate o f w a t e r v a p o u r removed i s ” )Scilab code Exa 15.5 Calculation on air mixed with RH12345678W1 = 0.0058; W2 = 0.0187;h1 = 35; h2 = 90;G12 = 1/2; // G12 = G1/G2W3 = ( W2 + G12 * W1 ) /(1+ G12 ) ;h3 = (2/3) * h2 + (1/3) * h1 ;disp ( ” F i n a l c o n d i t i o n o f a i r i s g i v e n by ” )disp ( ” kg vap .
/ kg d r y a i r ” ,W3 , ”W3 = ” )disp ( ” kJ / kg d r y a i r ” ,h3 , ” h3 = ” )109Scilab code Exa 15.7 Calculation on the airconditioning of a hall12345678910h1 = 57; h2 = h1 ;h3 = 42;W1 = 0.0065; W2 = 0.0088; W3 = W2 ;t2 = 34.5; v1 = 0.896;n = 1500; // s e a t i n g c a p a c i t y o f h a l la = 0.3; // amount o f o u t d o o r a i r s u p l i e dG = ( n * a ) /0.896 ; // Amount o f d r y a i r s u p l i e dCC = ( G *( h2 - h3 ) *60) /14000; // i n t o n n sR = G *( W2 - W1 ) *60;disp ( ” t o n n e s ” ,CC , ” C a p a c i t y o f t h e c o o l i n g c o i l i ntonnes ”)11 disp ( ” kg / h ” ,R , ” C a p a c i t y o f h u m i d i f i e r ” )Scilab code Exa 15.8 Calculations on water into a cooling tower1234567891011twb1 = 15.2; twb2 = 26.7; tw3 = 30;h1 = 43; h2 = 83.5; hw = 84; mw = 1.15;W1 = 0.0088; W2 = 0.0213;hw3 = 125.8; hm = 84;G = 1;hw34 = ( G / mw ) *(( h2 - h1 ) -( W2 - W1 ) * hw ) ; // hw3−hw4tw4 = tw3 -( hw34 /4.19) ;A = tw4 - twb1 ;R = tw3 - tw4 ;x = G *( W2 - W1 ) ;disp ( ” d e g r e e ” ,tw4 , ” T e m p e r a t u r e o f w a t e r l e a v i n g t h etower i s ”)12 disp ( ” kg / kg d r y s i r ” ,x , ” F r a c t i o n o f w a t e r e v o p o r a t e di s ”)1101314disp ( ” d e g r e e ” ,R , ” Range o f c o o l i n g w a t e r i s ” )disp ( ” d e g r e e ” ,A , ” Approach o f c o o l i n g w a t e r i s ” )Scilab code Exa 15.9 Calculations on air flow rate into a cooling tower1234567891011121314151617181920212223Psat1 = 0.01705; hg1 = 2528.9; // a t 15 d e g r e ePsat2 = 0.05628; hg2 = 2565.3; // At 35 d e g r e efi1 = 0.55;Pw1 = fi1 * Psat1 ;fi2 = 1;Pw2 = fi2 * Psat2 ;P = 1;W1 = (0.622* Pw1 ) /( P - Pw1 ) ;W2 = (0.622* Pw2 ) /( P - Pw2 ) ;MW = W2 - W1 ;t2 = 35; t1 = 15;m_dot = 2.78;cpa = 1.005;h43 = 35*4.187; // h4−h3h5 = 14*4.187;m_dot_w = ( -( W2 - W1 ) * h5 - W1 * hg1 + W2 * hg2 + cpa *( t2 t1 ) ) /( h43 ) ;R = m_dot / m_dot_w ;MW = ( W2 - W1 ) * R ;RWA = R *(1+ W1 ) ;R = 0.287; T = 288;V_dot = ( RWA * R * T ) /( P *1 e02 ) ; // P r e s s u r e i s i n k i l oPascaldisp ( ” kg / s ” ,MW , ”Make up w a t e r f l o w r a t e i s ” )disp ( ”m3/ s ” , V_dot , ” Volume f l o w r a t e o f a i r i s ” )111Chapter 16Reactive systemsScilab code Exa 16.2 Dissociation calculation on N2O412345678910eps_e = 0.27; P = 1 ;K = (4* eps_e ^2* P ) /(1 - eps_e ^2) ;P1 = 100/760; // i n Paeps_e_1 = sqrt (( K / P1 ) /(4+( K / P1 ) ) ) ;T1 = 318; T2 = 298;R = 8.3143; K1 = 0.664; K2 = 0.141;dH = 2.30* R *(( T1 * T2 ) /( T1 - T2 ) ) *( log ( K1 / K2 ) ) ;disp ( ” atm ” ,K , ”K i s ” )disp ( eps_e_1 , ” e p i s l o n i s ” )disp ( ” kJ / kg mol ” ,dH , ” The h e a t o f r e a c t i o n i s ” )Scilab code Exa 16.3 Determination of gubbs constant and equillibriumfunction1234v1 = 1; v2 = v1 ; v3 = v2 ; v4 = v2 ;e = 0.56; // D e g r e e o f r e a c t i o nP = 1; // DummyT = 1200; R = 8.3143;1125 x1 = (1 - e ) /2; x2 = (1 - e ) /2;6 x3 = e /2; x4 = e /2;7 K = ((( x3 ^ v3 ) *( x4 ^ v4 ) ) /(( x1 ^ v1 ) *( x2 ^ v2 ) ) ) * P ^( v3 + v4 -v1 - v2 ) ; // E q u i l l i b r i u m c o n s t a n t8 dG = -R * T * log ( K ) ;9 disp (K , ” E q u i l l i b r i u m c o n s t a n t i s ” )10 disp ( ” J / gmol ” ,dG , ” Gibbs f u n c t i o n c h a n g ei s ”)Scilab code Exa 16.5 Calculation of equillibrium constant12345Veo = 1.777; // Ve/Voe = 1 - Veo ; // D e g r e e o f d i s s o c i a t i o nP = 0.124; // i n atmK = (4* e ^2* P ) /(1 - e ^2) ;disp ( ” atm ” ,K , ” The v a l u e o f e q u i l l i b r i u m c o n s t a n t i s ”)Scilab code Exa 16.6 Estimation of Cp of H2O dissociation1234v1 = 1; v2 = 0; v3 = 1; v4 = 1/2;dH = 250560; e = 3.2 e -03;R = 8.3143; T = 1900;Cp = (( dH ^2) *(1+ e /2) * e *(1+ e ) ) /( R * T ^2*( v1 + v2 ) *( v3 + v4 ));5 disp ( ” j / gmol K” ,Cp , ”Cp i s ” )Scilab code Exa 16.7 Calculations on combustion of unknown hydrocarbon1 a = 21.89;1132345678y = 18.5;x = 8.9;PC = 100*( x *12) /((8.9*12) +(18.5*1) ) ;PH = 100 - PC ;AFR = ((32* a ) +(3.76* a *28) ) /((12* x ) + y ) ;EAU = (8.8*32) /((21.89*32) -(8.8*32) ) ;disp ( ”%” ,PH , ” Hydrogen ” ,”%” ,PC , ” c a r b o n ” ,” Thecomposition of f u e l i s ”)9 disp ( AFR , ” A i r f u e l r a t i o i s ” )10 disp ( ”%” , EAU *100 , ” P e r c e n t a g e o f e x c e s s a i r u s e d i s ” )Scilab code Exa 16.8 Determination of heat transfer in per kg mol of afuel1 hf_co2 = -393522;2 hf_h20 = -285838;3 hf_ch4 = -74874;4 D = hf_co2 + (2* hf_h20 ) ;5 QCV = hf_ch4 ;6 disp ( ” kJ ” ,D , ” Heat t r a n s f e rp e r kg mol o f f u e l i s ” )Scilab code Exa 16.9 Calculations on a gasoline engine1 // Below v a l u e s a r e t a k e n f r o n t a b l e 1 6 .















