diff options
Diffstat (limited to 'Thermodynamics_by_K._M._Gupta/ch9.ipynb')
-rw-r--r-- | Thermodynamics_by_K._M._Gupta/ch9.ipynb | 643 |
1 files changed, 643 insertions, 0 deletions
diff --git a/Thermodynamics_by_K._M._Gupta/ch9.ipynb b/Thermodynamics_by_K._M._Gupta/ch9.ipynb new file mode 100644 index 00000000..fb25cd57 --- /dev/null +++ b/Thermodynamics_by_K._M._Gupta/ch9.ipynb @@ -0,0 +1,643 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9 : Properties of Steam and Thermodynamic Cycles" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1 Page No : 217" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Part (i) : For dry saturated steam at 17.8 bar\n", + "Part (i) : For dry saturated steam at 17.8 bar\n", + "The specific volume in litre/kg is : 0.11536\n", + "The enthalpy in kJ/kg is : 2796.28\n", + "The latent heat in kJ/kg is : 1914.4\n", + "The entropy in kJ/kg K 6.383\n", + "Part (ii) : For superheated steam at 16 bar and 340°C\n", + "The specific volume in m**3/kg is : 0.17114\n", + "The enthalpy in kJ/kg is : 3119.6\n", + "The entropy in kJ/kg K is : 7.0258\n" + ] + } + ], + "source": [ + "import math \n", + "\n", + "# Variables\n", + "print (\"Part (i) : For dry saturated steam at 17.8 bar\")\n", + "p= 17.8;\t\t\t# in bar\n", + "p1= 17.5;\t\t\t# in bar\n", + "p2= 18.0;\t\t\t# in bar\n", + "Vs1= 0.1135;\t\t\t# in litre/kg\n", + "Vs2= 0.1104;\t\t\t# in litre/kg\n", + "Hs1= 2796.1;\t\t\t# in kJ/kg\n", + "Hs2= 2796.4;\t\t\t# in kJ/kg\n", + "L1= 1918;\t\t\t# in kJ/kg\n", + "L2= 1912;\t\t\t# in kJ/kg\n", + "phi_s1= 6.389;\t\t\t# in kJ/kg K\n", + "phi_s2= 6.379;\t\t\t# in kJ/kg K\n", + "\n", + "# Calculations and Results\n", + "Vs= Vs1-(Vs2-Vs1)/(p2-p1)*(p-p1);\t\t\t# in litre/kg\n", + "Hs= Hs1+(Hs2-Hs1)/(p2-p1)*(p-p1);\t\t\t# in kJ/kg\n", + "L= L1- (L1-L2)/(p2-p1)*(p-p1);\t\t\t# in kJ/kg\n", + "phi_s= phi_s1- (phi_s1-phi_s2)/(p2-p1)*(p-p1);\t\t\t# in kJ/kg K\n", + "print (\"Part (i) : For dry saturated steam at 17.8 bar\")\n", + "print \"The specific volume in litre/kg is : \",Vs\n", + "print \"The enthalpy in kJ/kg is : \",Hs\n", + "print \"The latent heat in kJ/kg is : \",L\n", + "print \"The entropy in kJ/kg K\",phi_s\n", + "print (\"Part (ii) : For superheated steam at 16 bar and 340°C\")\n", + "\n", + "T= 340.;\t\t\t# in K\n", + "T1= 300.;\t\t\t# in K\n", + "T2= 350.;\t\t\t# in K\n", + "Vsup1= 0.1585;\t\t\t# in m**3/kg\n", + "Vsup2= 0.1743;\t\t\t# in m**3/kg\n", + "Hsup1= 3030;\t\t\t# in kJ/kg\n", + "Hsup2= 3142;\t\t\t# in kJ/kg\n", + "phi_sup1= 6.877;\t\t\t# in kJ/kg K\n", + "phi_sup2= 7.063;\t\t\t# in kJ/kg K\n", + "Vsup= Vsup1+(Vsup2-Vsup1)/(T2-T1)*(T-T1);\t\t\t# in m**3/kg\n", + "Hsup= Hsup1+(Hsup2-Hsup1)/(T2-T1)*(T-T1);\t\t\t# in kJ/kg\n", + "phi_sup= phi_sup1+(phi_sup2-phi_sup1)/(T2-T1)*(T-T1);\t\t\t# in kJ/kg\n", + "print \"The specific volume in m**3/kg is : \",Vsup\n", + "print \"The enthalpy in kJ/kg is : \",Hsup\n", + "print \"The entropy in kJ/kg K is : \",phi_sup\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.2 Page No : 219" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of x is : 0.941\n", + "Degree of superheat in °C is : 84.42\n" + ] + } + ], + "source": [ + "\n", + "# Variables\n", + "h_sen = 798.43;\t\t\t# in kJ/kg\n", + "L = 1984.3;\t\t\t# in kJ/kg\n", + "H_total_wet = 2665.7;\n", + "\n", + "# Calculations and Results\n", + "# H_total_wet= h_sen+x*L\n", + "x = (H_total_wet - h_sen)/L;\n", + "print \"The value of x is : %.3f\"%x\n", + "\n", + "# Part (b)\n", + "h_total_sup= 2961;\t\t\t# in kJ/kg\n", + "Cps= 2.112;\t\t\t# in kJ/kg\n", + "H_total_dry= 2782.7;\t\t\t# in kJ/kg\n", + "# Let deltaT= T_sup-T_sat\n", + "# h_total_sup = h_sen+L+h_sup = H_total_dry +Cps*deltaT\n", + "deltaT= (h_total_sup-H_total_dry)/Cps;\t\t\t# in °C\n", + "print \"Degree of superheat in °C is : %.2f\"%deltaT\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.3 Page No : 219" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in entropy during throttling process in kJ/kg-K is : 0.42\n", + "in enthalpy during isentropic process in kJ/kg is : 505\n" + ] + } + ], + "source": [ + "\n", + "# Variables\n", + "H2 = 3055;\t\t\t# in kj per kg\n", + "H3 = 2550;\t\t\t# in kj per kg\n", + "fie_1 = 7.15;\t\t\t# kj per kg k\n", + "fie_2 = 7.57;\t\t\t# kj per kg k\n", + "\n", + "# Calculations and Results\n", + "d_fie= fie_2 - fie_1;\t\t\t# in kj per kg k\n", + "print \"Change in entropy during throttling process in kJ/kg-K is :\",d_fie\n", + "\n", + "dH = H2 - H3;\t\t\t# in kj per kg\n", + "print \"in enthalpy during isentropic process in kJ/kg is : \",dH\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.4 Page No : 227" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Part (i) The quantity of heat in case first in kJ is : 3753.0\n", + "Part (ii) The quantity of heat in case second in kJ is : 4170.0\n", + "Part (iii) The quantity of heat in case third in kJ is : 5397.6\n", + "(iv) The quantity of heat in case forth in kJ is : 4950.0\n" + ] + } + ], + "source": [ + "# Exa 9.4\n", + "import math \n", + "\n", + "# Variables\n", + "H_w = 670.4;\t\t\t# in kJ/kg\n", + "L = 2085;\t\t\t# kJ per kg\n", + "T_sat = 158.8;\t\t\t# in degree c\n", + "m = 4;\t\t\t# in kg\n", + "x = 0.5;\n", + "h_sen = 670.4;\t\t\t# in kJ/kg\n", + "\n", + "# Calculations and Results\n", + "H_totalwet = m * ( h_sen + (x *L));\t\t\t# in kJ\n", + "x1 = 0.95\n", + "H_totalwet1 = m *( h_sen + (x1 *L));\t\t\t# in kJ\n", + "Q1 = H_totalwet1 - H_totalwet;\t\t\t# in kJ\n", + "print \"Part (i) The quantity of heat in case first in kJ is : \",Q1\n", + "\n", + "# Part (b)\n", + "x2 = 1;\n", + "H_totaldry = m *( h_sen + (x2 *L));\t\t\t# in kJ\n", + "Q2 = H_totaldry - H_totalwet;\t\t\t# in kJ\n", + "print \"Part (ii) The quantity of heat in case second in kJ is : \",Q2\n", + "\n", + "# Part (c)\n", + "H_totalsup = 3062.3;\t\t\t# in kJ per kg\n", + "H_totalsup = m * H_totalsup;\t\t\t# in kJ\n", + "Q3 = H_totalsup - H_totalwet;\t\t\t# in kJ\n", + "print \"Part (iii) The quantity of heat in case third in kJ is : \",Q3\n", + "\n", + "# Part (d)\n", + "H_totalsup = 2950.4;\t\t\t# in kj per kg\n", + "H_totalsup = m * H_totalsup;\t\t\t# in kj\n", + "Q4 = H_totalsup - H_totalwet;\t\t\t# in kj\n", + "print \"(iv) The quantity of heat in case forth in kJ is : \",Q4\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.5 Page No : 228" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Isentropic efficiency in % is : 38.29\n", + "Turbine work is in kJ/kg is : 294.1\n" + ] + } + ], + "source": [ + "\n", + "# Variables\n", + "p1 = 2.5; \t\t\t# Mpa\n", + "p1 = p1 * 10**6;\t\t\t# in pa\n", + "p1 = p1 * 10**-5;\t\t\t# in bar\n", + "p2 = 10;\t\t \t# in kpa\n", + "p2 = p2 * 10**3;\t\t\t# in pa\n", + "p2 = p2 * 10**-5;\t\t\t# in bar\n", + "H1 = 2878;\t\t \t# in kJ/kg at 25 bar and 250°C\n", + "H2 = 2583.9;\t\t \t# in kJ/kg at 0.1 bar for dry saturated steam\n", + "AHD= H1-H2;\t\t\t # actual heat drop in kJ/kg\n", + "H2_desh = 2110;\t\t\t # in kj per kg\n", + "\n", + "# Calculations and Results\n", + "IHD = H1 - H2_desh;\t\t\t# Isentropic heat drop in kJ/ kg\n", + "Eta_Isentropic = (AHD/IHD) * 100;\t\t\t# in %\n", + "print \"Isentropic efficiency in %% is : %.2f\"%Eta_Isentropic\n", + "\n", + "# H1 + v1**2/2 + g*z1 + Q = H2 + v2**2/2 + g*z2 + W\n", + "W = H1 - H2;\t\t\t# in kJ/kg (as v1=v2, z1= z2 and Q=0)\n", + "print \"Turbine work is in kJ/kg is :\",W\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.6 Page No : 231" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Dryness fraction of steam is : 0.97\n", + "Maximum dryness fraction of steam is : 0.951\n" + ] + } + ], + "source": [ + "\n", + "# Variables\n", + "p1 = 11;\t\t\t# in bar\n", + "p2 = 1.2;\t\t\t# in bar\n", + "H_w1 = 781.1;\t\t\t#in kJ/kg\n", + "L1 = 2000;\t\t\t# in kJ/kg\n", + "t1 = 120;\t\t\t# in degree c\n", + "t1 = t1 + 273;\t\t\t# in K\n", + "t2 = 104.81;\t\t\t# in degree c\n", + "t2 = t2 + 273;\t\t\t# in K\n", + "H_dry2 = 2683.4;\t\t\t# in kJ/kg\n", + "C_p = 2.607;\t\t\t# in kJ/kgK\n", + "\n", + "# Calculations and Results\n", + "# From Hw1+x*L1 = H_dry2+Cp*(t1-t2)\n", + "x = (H_dry2 + (C_p * (t1 - t2)) - H_w1) / L1;\n", + "print \"Dryness fraction of steam is : %.2f\"%x\n", + "\n", + "x1 = (H_dry2 - H_w1)/L1;\n", + "print \"Maximum dryness fraction of steam is : %.3f\"%x1\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.7 Page No : 234" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The dryness fraction for sample steam is : 0.875\n" + ] + } + ], + "source": [ + "\n", + "# Variables\n", + "W = 21.; \t\t\t# in kg\n", + "w_wp = 2.;\t\t\t# in kg\n", + "h1 = 781.15;\t\t\t# in kJ/kg\n", + "L1 = 1998.5;\t\t\t# in kJ/kg\n", + "m = 2.;\t \t\t# in kg\n", + "h2 = 420.5;\t\t\t# in kJ/kg\n", + "L = 2255.9;\t\t\t# in kJ/kg\n", + "t_sat = 100.4;\t\t\t# in degree c\n", + "t1 = 110.;\t\t\t# in degree c\n", + "C_ps = 2.;\t\t\t# in kJ/kgK\n", + "\n", + "# Calculations\n", + "x1 = W / (W + w_wp);\n", + "x2 = (h2 + L + m * (t1-t_sat) - h1)/ L1;\n", + "x = x1 * x2;\n", + "\n", + "# Results\n", + "print \"The dryness fraction for sample steam is : %.3f\"%x\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.8 Page No : 235" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Heat transfered per kg in kJ/kg is : 22.58\n" + ] + } + ], + "source": [ + "\n", + "# Variables\n", + "h_sen = 417.4;\t\t\t# in kJ/kg\n", + "h_totaldry = 2675.4;\t\t\t# in kJ/kg\n", + "L = 2258;\t\t\t# in kJ/kg\n", + "v = 5;\t\t\t# in m**3\n", + "v_v = 4.95;\t\t\t# in m**3\n", + "\n", + "# Calculations\n", + "x = v_v/v;\n", + "Q = h_totaldry -(h_sen +x*L);\t\t\t# in kJ/kg\n", + "\n", + "# Results\n", + "print \"Heat transfered per kg in kJ/kg is : \",Q\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.9 Page No : 235" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The work done during evaporation in kJ/kg is : 182.55\n", + "Internal latent heat in kJ/kg is : 1710.24\n", + "Internal energy in kJ/kg is : 2472.85\n" + ] + } + ], + "source": [ + "\n", + "# Variables\n", + "m = 1; \t\t\t# in kg\n", + "p = 10;\t\t \t# in bar\n", + "p = p * 10**2;\t\t\t# in kpa\n", + "x = 0.94;\n", + "h_sen = 762.61;\t\t\t# in kJ/kg\n", + "L = 2013.6;\t\t\t # in kJ/kg\n", + "v_s = 0.1942;\t\t\t# in m**3 per kg\n", + "\n", + "# Calculations and Results\n", + "w_ext = p * x * v_s * m;\t\t\t# in kJ/kg\n", + "print \"The work done during evaporation in kJ/kg is : %.2f\"%w_ext\n", + "\n", + "# Part (b)\n", + "L_internal = (x * L) - w_ext;\t\t\t# in kJ/kg\n", + "print \"Internal latent heat in kJ/kg is : %.2f\"%L_internal\n", + "\n", + "# Part (c)\n", + "U_wet = h_sen+x*L-p*x*v_s;\t\t\t# in kJ/kg\n", + "print \"Internal energy in kJ/kg is : %.2f\"%U_wet\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.10 Page No : 236" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy of wet steam in kJ/kg-K is : 4.063\n", + "Entropy of dry and saturated steam in kJ/kg-K is : 4.952\n", + "Entropy at 200°C in kJ/kg-K is : 5.053\n" + ] + } + ], + "source": [ + "import math \n", + "\n", + "# Variables\n", + "T_sat = 179.88;\t\t\t# in degree c\n", + "T_sat = T_sat + 273;\t\t\t# in k\n", + "T_sup = 200;\t\t\t# in degree c\n", + "T_sup = T_sup + 273;\t\t\t# in k\n", + "L = 2013.6; \t\t\t# in kJ/kg\n", + "C_ps = 2.326;\n", + "C_pw = 1;\n", + "x = 0.8;\n", + "\n", + "# Calculations and Results\n", + "phi_wet = C_pw *math.log(T_sat/273) + ( (x * L)/T_sat);\t\t\t# in kJ/kg-K\n", + "print \"Entropy of wet steam in kJ/kg-K is : %.3f\"%phi_wet\n", + "\n", + "# Part (b)\n", + "phi_dry =C_pw * math.log(T_sat/273)+L/T_sat;\t\t \t# in kJ/kg\n", + "print \"Entropy of dry and saturated steam in kJ/kg-K is : %.3f\"%phi_dry\n", + "\n", + "# Part (c)\n", + "phi_sup = phi_dry+C_ps *math.log(T_sup/T_sat);\t\t\t # in kJ/kg\n", + "print \"Entropy at 200°C in kJ/kg-K is : %.3f\"%phi_sup\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.11 Page No : 236" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The internal energy in % is : 93.21\n", + "The volume of superheated steam in m**3/kg is : 0.1739\n", + "Change in internal energy in kJ is : 291.3\n" + ] + } + ], + "source": [ + "\n", + "# Variables\n", + "m = 1;\t\t\t # in kg\n", + "x = 0.9;\n", + "p = 1;\t \t\t# N/mm**2\n", + "p = p * 10**1;\t\t\t# in bar\n", + "p = p * 10**2;\t\t\t# in kPa\n", + "h_sen = 762.61;\t\t# in kJ/kg\n", + "L = 2013.6;\t\t\t # in kJ/kg\n", + "v_s = 0.1944;\t\t\t# in m**3 per kg\n", + "\n", + "# Calculations and Results\n", + "H_totalwet = h_sen + x*L;\t\t\t# in kJ/kg\n", + "U_wet = H_totalwet - (p * x * v_s);\t\t\t# in kJ/kg\n", + "I = U_wet / H_totalwet;\t\t\t# internal energy as a fraction of total heat\n", + "I = I * 10**2;\t\t\t# in %\n", + "print \"The internal energy in %% is : %.2f\"%I\n", + "\n", + "# Part (b)\n", + "v_s = 0.1542;\t \t\t# in m**3/kg\n", + "h_sen = 815;\t \t\t# in kJ/kg\n", + "L = 1972; \t \t\t# in kJ/kg\n", + "H_totaldry = 2787;\t\t\t# in kJ/kg\n", + "C_ps = 2.199;\n", + "t_sup = 250;\t\t \t# in °C\n", + "t_sup = t_sup + 273;\t\t# in K\n", + "t_sat = 190.74;\t\t\t # in °C\n", + "t_sat = t_sat + 273;\t\t# in K\n", + "p1 = 13 * 10**2;\t\t\t# in kPa\n", + "v_ssup = v_s*t_sup/t_sat;\t\t\t# in m**3/kg\n", + "print \"The volume of superheated steam in m**3/kg is : %.4f\"%v_ssup\n", + "\n", + "# Part (c)\n", + "t_sat = t_sat - 273;\t\t\t# in °C\n", + "t_sup = t_sup - 273;\t\t\t# in °C\n", + "U_sup =h_sen+L+C_ps*(t_sup-t_sat)-p1*v_ssup;\t\t\t# in kJ\n", + "del_U = U_sup - U_wet;\t\t\t# in kJ\n", + "print \"Change in internal energy in kJ is : %.1f\"%del_U\n", + "\n", + "\n", + "# rounding off error" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.12 Page No : 238" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the dryness fraction of steam is : 0.8954\n" + ] + } + ], + "source": [ + "\n", + "# Variables\n", + "m = 0.5;\t\t\t# in kg\n", + "M = 6.6;\t\t\t# in kg\n", + "x1 = M / (M+m);\n", + "h_dry = 2683;\t\t\t#in kJ/kg\n", + "C_p = 2.1;\n", + "h_sen = 814.5;\t\t\t#in kJ/kg\n", + "L = 1973;\t\t\t# in kJ/kg\n", + "t_sup = 120;\t\t\t# in °C\n", + "t_sat = 104.8;\t\t\t# in °C\n", + "\n", + "# Calculations\n", + "x2 =(h_dry+C_p*(t_sup - t_sat)-h_sen)/ L;\n", + "x = x2 * x1;\n", + "\n", + "# Results\n", + "print \"the dryness fraction of steam is : %.4f\"%x\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |