diff options
author | kinitrupti | 2017-05-12 18:53:46 +0530 |
---|---|---|
committer | kinitrupti | 2017-05-12 18:53:46 +0530 |
commit | 6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d (patch) | |
tree | 22789c9dbe468dae6697dcd12d8e97de4bcf94a2 /Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra | |
parent | d36fc3b8f88cc3108ffff6151e376b619b9abb01 (diff) | |
download | Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.tar.gz Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.tar.bz2 Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.zip |
Removed duplicates
Diffstat (limited to 'Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra')
23 files changed, 16823 insertions, 0 deletions
diff --git a/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/Chapter_1.ipynb b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/Chapter_1.ipynb new file mode 100755 index 00000000..d0854801 --- /dev/null +++ b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/Chapter_1.ipynb @@ -0,0 +1,433 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6ba3160044fd56988f5c5098ab622aa22c3eae2ec5a701c2274f1da18b060ff5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h1>Chapter 1: Temperature<h1>" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 1.1, Page Number: 53<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "c=-40.0 #Temp in degree Celcius\n", + "\n", + "#calculations\n", + "k=c+273\n", + "F=((9.0/5.0)*c)+32.0\n", + "R=((9.0/5.0)*c)+492.0\n", + "\n", + "#Result\n", + "print('\\nK=%d\u00b0K' %k)\n", + "print('\\nF=%d\u00b0F' %F)\n", + "print('\\nR=%d\u00b0R' %R)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "K=233\u00b0K\n", + "\n", + "F=-40\u00b0F\n", + "\n", + "R=420\u00b0R" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3> Example 1.2, Page Number: 53<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#varable Declaration\n", + "span=1000.0 #given value of span in \u00b0C\n", + "accuracy=1.0/100.0 #1% accuracy\n", + "\n", + "#calculations\n", + "err=span*accuracy\n", + "max_scale=1200.0\n", + "Range_instr=max_scale+span\n", + "meter_reading=700.0\n", + "per_of_err=(err/meter_reading)*100.0\n", + "\n", + "#result\n", + "print('(a)\\nAs error can be either positive or negative') \n", + "print('\\n the probable error at any point on the scale =\u00b1 %d\u00b0C'%err)\n", + "print('\\n(b)\\nRange of the Instrument = %d\u00b0C'%Range_instr)\n", + "print('\\n(c)\\nPercentage of Error = \u00b1 %.2f%% '%per_of_err)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "As error can be either positive or negative\n", + "\n", + " the probable error at any point on the scale =\u00b1 10\u00b0C\n", + "\n", + "(b)\n", + "Range of the Instrument = 2200\u00b0C\n", + "\n", + "(c)\n", + "Percentage of Error = \u00b1 1.43% " + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 1.3, Page Number: 54<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "resi_per_leg=5.0 # lead wire resistance per leg in Ohm\n", + "temp_coeff=0.385 # Temperature coefficient of Pt 100 RTD in ohms/\u00b0C\n", + "\n", + "#calculation\n", + "R_due_to_leadwires=2*resi_per_leg\n", + "err=R_due_to_leadwires/temp_coeff\n", + "err =round(err,0)\n", + "temp_obj=200.0\n", + "temp_measured=temp_obj+err\n", + "per_of_err=((temp_measured-temp_obj)/temp_obj)*100.0\n", + "\n", + "#Result\n", + "print('(a)\\nThe contribution of 10 ohms lead wire resistance')\n", + "print('to the measurement error = %d\u00b0C' %err)\n", + "print('\\n(b)\\nPercentage of Error = %d%%' %per_of_err)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "The contribution of 10 ohms lead wire resistance\n", + "to the measurement error = 26\u00b0C\n", + "\n", + "(b)\n", + "Percentage of Error = 13%" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 1.4, Page Number: 54<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "temp=2.022 #Millivolt corresponds to reference junction temp 50\u00b0C\n", + "millivolt_cor=37.325 #Millivolt corresponds to reference junction temp 900\u00b0C\n", + "\n", + "#calculation\n", + "op=millivolt_cor-temp\n", + "\n", + "#result\n", + "print('Millivolt output available = % .3f' %op)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Millivolt output available = 35.303" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 1.5, Page Number: 54<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "millivolt_cor=2.585 #Millivolt corresponds to reference junction temp 50\u00b0C\n", + "pot_reading=30.511 #reading on pot\n", + "\n", + "#calculation\n", + "corrected_millivolt=pot_reading+millivolt_cor\n", + "\n", + "#result\n", + "print('Temperature correspond to %.3f mV from the table = 600\u00b0C' %corrected_millivolt)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature correspond to 33.096 mV from the table = 600\u00b0C" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 1.6, Page Number: 54<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable Declarion\n", + "ref_jun=100.0 #reference junction temp.\n", + "mV_100=0.645 #voltage at 100\u00b0C\n", + "mV_1000=9.585 #voltage at 1000\u00b0C\n", + "mV_1200=11.947 #voltage at 1200\u00b0C\n", + "\n", + "#calculation\n", + "op1=mV_1000-mV_100\n", + "op2=mV_1200-mV_100\n", + "\n", + "#result\n", + "print('Millivolt to be fed checking 1000 C = %.3f mV'%op1)\n", + "print('\\nMillivolt to be fed checking 1200 C = %.3f mV'%op2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Millivolt to be fed checking 1000 C = 8.940 mV\n", + "\n", + "Millivolt to be fed checking 1200 C = 11.302 mV" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 1.7, page Number: 55<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#variable declaration\n", + "E_rec_pyro=0.95*0.85 #Energy received by pyrometer\n", + "\n", + "#calculation\n", + "T=1100.0/E_rec_pyro\n", + " \n", + "#result\n", + "print('Pyrometer reading T = %.2f\u00b0C'%T)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pyrometer reading T = 1362.23\u00b0C" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 1.8, Page Number: 55<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#(a)\n", + "\n", + "#variable declaration\n", + "hot1_mV=41.29 # Millivolt corresponds to hot junction temp \n", + "cold1_mV=2.022 # Millivolt corresponds to cold junction temp \n", + "\n", + "#calculation\n", + "op1=hot1_mV-cold1_mV\n", + "\n", + "#(b)\n", + "\n", + "#variable declaration\n", + "hot2_mV=33.096 #Millivolt corresponds to hot junction temp \n", + "cold2_mV=2.585 #Millivolt corresponds to cold junction temp \n", + "#calculation\n", + "op2=hot2_mV-cold2_mV\n", + "\n", + "#(c)\n", + "\n", + "#variable declaration\n", + "hot3_mV=11.947 #Millivolt corresponds to hot junction temp \n", + "cold3_mV=0.299 #Millivolt corresponds to cold junction temp \n", + "#calculation\n", + "op3=hot3_mV-cold3_mV\n", + "\n", + "#result\n", + "print('(a)\\nOutput Millivolt = %.3f'%op1)\n", + "print('\\n(b)\\nOutput Millivolt = %.3f'%op2)\n", + "print('\\n(c)\\nAs the wrongly formed thermocouples at J1 and J2 will always oppose')\n", + "print('the main millivolt output, the net output will be lower than normal value.')\n", + "print('Output mV<%.3f'%op3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Output Millivolt = 39.268\n", + "\n", + "(b)\n", + "Output Millivolt = 30.511\n", + "\n", + "(c)\n", + "As the wrongly formed thermocouples at J1 and J2 will always oppose\n", + "the main millivolt output, the net output will be lower than normal value.\n", + "Output mV<11.648" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 1.9, Page Number: 56<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "Rl_ind=250.0 #load resistor for indicator\n", + "Rl_rec=250.0 #load resistor for recorder\n", + "load_allowable=600.0 #allowable load with load independency\n", + "\n", + "#calculation\n", + "load_connected= Rl_ind+Rl_rec\n", + "max_load_controller=load_allowable-load_connected\n", + "op_cont=600.0\n", + "total=Rl_ind+Rl_rec+load_allowable\n", + "extra_load=total-op_cont\n", + "\n", + "#result\n", + "print('(a)\\nThe max load to the controller = %d ohms'%max_load_controller)\n", + "print('\\n(b)\\nExtra Load = %d ohms'%extra_load)\n", + "print('\\nAdditional Power Supply voltage required = 10 V')\n", + "print('\\nMinimum Power Supply Voltage = 34 ')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "The max load to the controller = 100 ohms\n", + "\n", + "(b)\n", + "Extra Load = 500 ohms\n", + "\n", + "Additional Power Supply voltage required = 10 V\n", + "\n", + "Minimum Power Supply Voltage = 34 " + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/Chapter_2.ipynb b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/Chapter_2.ipynb new file mode 100755 index 00000000..58fb16b3 --- /dev/null +++ b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/Chapter_2.ipynb @@ -0,0 +1,627 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:71218a03a9605d3f7a7341594baa7c6aaf03b045951699482ae5c6da5c0be5f7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h1>Chapter 2: Pressure<h1>" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 2.1, Page Number: 116<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "\n", + "x=10000.0*10.0 #equivalnt to 10kg/cm^2\n", + "\n", + "#result\n", + "print('(a)\\n 10kg/cm^2 = %.0f mmWG' %x)\n", + "\n", + "#(b)\n", + "\n", + "#variable declaration\n", + "onemm_Hg=13.546 #pressure of 1 mm Hg\n", + "\n", + "#calculation\n", + "y=10.0**5/onemm_Hg\n", + "y=y/10.0**3\n", + "\n", + "#result\n", + "print('\\n(b)\\n10kg/cm^2 = 10^5 mmWG = %.2f * 10^3 mmHg' %y)\n", + "\n", + "#(c)\n", + "\n", + "#variable declaration\n", + "onebar=1.03 # 1 Bar presssure in kg/cm^2\n", + "#calculation\n", + "z=10.0/onebar\n", + "\n", + "#result\n", + "print('\\n(c)\\n10kg/cm^2 = %.2f bars' %z)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + " 10kg/cm^2 = 100000 mmWG\n", + "\n", + "(b)\n", + "10kg/cm^2 = 10^5 mmWG = 7.38 * 10^3 mmHg\n", + "\n", + "(c)\n", + "10kg/cm^2 = 9.71 bars" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 2.2, Page Number: 116<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#(a)\n", + "\n", + "#variable Declaration\n", + "gamm=1000.0 # density of water\n", + "d=35.0 # depth of water \n", + "dens_Hg=13.546 # density of Hg\n", + "\n", + "#calculation\n", + "press_in_kg_cm=gamm*d*10**-4\n", + "press_in_mmHg=gamm*d/dens_Hg\n", + "press_in_mmHg=press_in_mmHg/10**3\n", + "\n", + "#result\n", + "print('(a)\\nThe pressure at depth of %d meters in a water tank=%.1f kg/cm^2 = %.2f*10^3 mmHg'%(d, press_in_kg_cm, press_in_mmHg))\n", + "\n", + "#(b)\n", + "\n", + "#varible declaration\n", + "press_atm=1.03 #atmospheric pressure\n", + "\n", + "#calculation\n", + "abspress=press_in_kg_cm+press_atm\n", + "abspress_mmHg=press_in_mmHg*1000.0+760.0\n", + "abspress_mmHg=abspress_mmHg/1000.0\n", + "\n", + "#result\n", + "print('\\n(b)\\nAbsolute Pressure= %.2f kg/cm^2 Abs = %.2f*10^3 mmHg Abs'%(abspress, abspress_mmHg))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "The pressure at depth of 35 meters in a water tank=3.5 kg/cm^2 = 2.58*10^3 mmHg\n", + "\n", + "(b)\n", + "Absolute Pressure= 4.53 kg/cm^2 Abs = 3.34*10^3 mmHg Abs" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 2.3, Page Number:116<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#varible declaration\n", + "egp=260.0 # equivalent gauge pressure\n", + "\n", + "#calculation\n", + "abspress=760.0-egp\n", + "\n", + "#result\n", + "print('Absolute Presssure = %d mmHg' %abspress)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Absolute Presssure = 500 mmHg" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 2.4,Page Number:117<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#(a)\n", + "\n", + "#variable declaration\n", + "p_diff=500.0 #pressure difference in mmHg\n", + "\n", + "#calculations\n", + "pdiff=p_diff*13.546/10000\n", + "\n", + "#Result\n", + "print('(a)\\np1-p2 = %.3f kg/cm^2' %pdiff)\n", + "\n", + "\n", + "#(b)\n", + "\n", + "#variable declaration\n", + "p1=6770.0 # Gauge pressure in mmWG\n", + "p_atm=10300.0 # atmospheric pressure \n", + "\n", + "#calculation\n", + "abs_p1=p1+p_atm\n", + "\n", + "#result\n", + "print('\\n(b)If p2 is open to atmosphere:\\nAbsolute Pressure P1 = %d mmWG abs.' %abs_p1)\n", + "\n", + "#(c)\n", + "\n", + "#variable declaration\n", + "P1=500.0 #mmHg absolute pressure\n", + "\n", + "#calculations\n", + "P1_gauge=P1-760.0\n", + "\n", + "#result\n", + "print('\\n(c)If p2 is evacuated and sealed:\\np1= %d mmHg gauge Pressure' %P1_gauge)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "p1-p2 = 0.677 kg/cm^2\n", + "\n", + "(b)If p2 is open to atmosphere:\n", + "Absolute Pressure P1 = 17070 mmWG abs.\n", + "\n", + "(c)If p2 is evacuated and sealed:\n", + "p1= -260 mmHg gauge Pressure" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 2.5, Page Number: 117<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "spe_grav_water=1.0 # specific gravity of water\n", + "\n", + "#calculation\n", + "spe_grav_X=spe_grav_water*100.0/50.0\n", + "wt_dens_water=1000.0\n", + "wt_dens_X=wt_dens_water*2.0\n", + "\n", + "#result\n", + "print('Weight Density of X = %d kg/m^3' %wt_dens_X)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Weight Density of X = 2000 kg/m^3" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 2.6, Page Number: 117<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "A=1.0/20.0 # Area ratio\n", + "p_diff=1500.0 # pressure difference in mmWG\n", + "\n", + "#result\n", + "print('(a)\\nAs Delta_h=A2/A1*h << h and normally negligible for well type manometer')\n", + "print('hence, p1-p2 = h = %d =111 mmHg' %p_diff)\n", + "print('\\n(b)\\nh measured above the oriinal reference will be half of H, i.e. 111/2=55.5 mmHg')\n", + "print('(Since area of both legs are same)')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "As Delta_h=A2/A1*h << h and normally negligible for well type manometer\n", + "hence, p1-p2 = h = 1500 =111 mmHg\n", + "\n", + "(b)\n", + "h measured above the oriinal reference will be half of H, i.e. 111/2=55.5 mmHg\n", + "(Since area of both legs are same)" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 2.7, Page Number: 119<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "print('1 kg/cm^2 = 10 mWG\\n')\n", + "\n", + "#(a)\n", + "\n", + "#variable declaration\n", + "press=10+2 #pressure read by the gauge\n", + "\n", + "#result\n", + "print('\\n(a)Bourdon Gauge is mounted 20 meters below water line:')\n", + "print('\\nPressure read by the Gauge = %d kg/cm^2'%press)\n", + "\n", + "\n", + "#(b)\n", + "\n", + "#variable declaration\n", + "press2=10-3 #pressure read by the gauge\n", + "\n", + "#result\n", + "print('\\n\\n(b)Bourdon Gauge is located 30 meters above the water line:')\n", + "print('\\nPressure read by the Gauge = %d kg/cm^2'%press2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1 kg/cm^2 = 10 mWG\n", + "\n", + "\n", + "(a)Bourdon Gauge is mounted 20 meters below water line:\n", + "\n", + "Pressure read by the Gauge = 12 kg/cm^2\n", + "\n", + "\n", + "(b)Bourdon Gauge is located 30 meters above the water line:\n", + "\n", + "Pressure read by the Gauge = 7 kg/cm^2" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 2.8, Page Number: 120<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#Variable declaration\n", + "dens_water=1000.0 # water Density\n", + "h1=125.0 # height1 mm\n", + "h2=250.0 # height2 mm\n", + "d2=h1*dens_water/h2\n", + "\n", + "#result\n", + "\n", + "#a\n", + "print('(a)\\nDensity of Liquid = %d kg/m^3' %d2)\n", + "print('\\nSpecific Density of the liquid = %.1f' %(h1/h2))\n", + "\n", + "#(b)\n", + "print('\\n\\n(b)\\nIf Values of water and liquid interchanged:\\n')\n", + "d3=h2*dens_water/h1\n", + "print('\\nDensity of Liquid = %d kg/m^3' %d3)\n", + "print('\\nSpecific Density of the liquid = %.1f' %(h2/h1))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Density of Liquid = 500 kg/m^3\n", + "\n", + "Specific Density of the liquid = 0.5\n", + "\n", + "\n", + "(b)\n", + "If Values of water and liquid interchanged:\n", + "\n", + "\n", + "Density of Liquid = 2000 kg/m^3\n", + "\n", + "Specific Density of the liquid = 2.0" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 2.9, Page Number: 120<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "#variable Declaration\n", + "R=120.0 #resistance\n", + "l=122.0 #length\n", + "a=0.1 #area\n", + "R1=140.0 #resistance in ohm\n", + "\n", + "#calculation\n", + "rho=R*a/l\n", + "l1=math.sqrt(R1*a*l/rho)\n", + "l1=round(l1,0)\n", + "\n", + "#Result\n", + "print('Length l1 = %d meters' %l1)\n", + "A1=a*l/l1\n", + "print('\\nArea A1 = %.4f mm^2' %A1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Length l1 = 132 meters\n", + "\n", + "Area A1 = 0.0924 mm^2" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 2.10, Page Number: 121<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "c=0.57 #Constant\n", + "\n", + "#(a)\n", + "\n", + "#variable declaration\n", + "d=0.1 #distance between plates\n", + "di1=100.0 #Dielectric constant\n", + "di2=1000.0 #Dielectric constant\n", + "\n", + "#calculation\n", + "c1=c*di1*10.0/d\n", + "c1=round(c1,0)\n", + "\n", + "#result\n", + "print('(a)\\nC1=%d pf' %c1)\n", + "\n", + "\n", + "#(b)\n", + "\n", + "#calculation\n", + "c2=c*di2*10/d\n", + "\n", + "#result\n", + "print('\\n(b)\\nC2=%d pf' %c2)\n", + "\n", + "\n", + "#(c)\n", + "\n", + "#calculation\n", + "ds=0.09\n", + "c11=c*di1*10/ds\n", + "c12=c*di2*10/ds\n", + "\n", + "#result\n", + "print('\\n(c)\\nC1 = %.1f pf\\nC2 = %d pf'%(c11,c12))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "C1=5700 pf\n", + "\n", + "(b)\n", + "C2=57000 pf\n", + "\n", + "(c)\n", + "C1 = 6333.3 pf\n", + "C2 = 63333 pf" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 2.11, Page Number: 121<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable Declaration\n", + "A=1.0 #area\n", + "p1=10.0 #pressure\n", + "\n", + "#calculation\n", + "W1=A*p1\n", + "\n", + "#Result\n", + "print('W1 = %d kg' %W1)\n", + "print('\\nWith the 4 standard weights of 10kg, 20kg, 30kg and 40kg')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "W1 = 10 kg\n", + "\n", + "With the 4 standard weights of 10kg, 20kg, 30kg and 40kg" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 2.12, Page Number: 122<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#varable declaration\n", + "p1=10**-2 #pressure in torr\n", + "h1=20.0 #height in mm\n", + "\n", + "#xalculation\n", + "K=p1/h1**2\n", + "p2=K*30**2\n", + "p2=p2*100.0\n", + "\n", + "#Result\n", + "print('The unknown pressure p2 = %.2f * 10^-2 torr' %p2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The unknown pressure p2 = 2.25 * 10^-2 torr" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/Chapter_3.ipynb b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/Chapter_3.ipynb new file mode 100755 index 00000000..b7ff3a1a --- /dev/null +++ b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/Chapter_3.ipynb @@ -0,0 +1,413 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:40aab97a0942d997de9cd8ee539182af9fd67e045ac34df8f9ba65083df3fe50" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h1>Chapter_3: Force Torque and Velocity<h1>" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 3.1, Page Number: 163<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "m1=20 #mass of the body in Kg \n", + "a=5 #acceleration in m/s^2\n", + "\n", + "#calculation\n", + "F=m1*a\n", + "\n", + "#result\n", + "print('F = %d Newtons'%F)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "F = 100 Newtons" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 3.2, Page Number: 163<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "m1=50 #mass of the body in Kg \n", + "g1=9.8 #acceleration due to gravity\n", + "\n", + "#calculation\n", + "W2=m1*g1\n", + "\n", + "#result\n", + "print('W = %d Newtons = %d kgf' %(W2,m1))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "W = 490 Newtons = 50 kgf" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 3.3, Page Number: 164<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "wt_material=2500.0 #weight of 1 m^3 material\n", + "wt_water=1000.0 #weight of 1 m^3 water\n", + "\n", + "#calculation\n", + "spe_grav=wt_material/wt_water\n", + "\n", + "#result\n", + "print('Specific gravity of the material = %.1f' %spe_grav)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific gravity of the material = 2.5" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 3.4, Page Number: 164<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "#variable declaration\n", + "L=20.0 # length in cm\n", + "W=2000.0 # Weight of mass in gm \n", + "db=0.02 # length in cm \n", + "Wb=100.0 # Weight of mass in gm \n", + "dG=0.5 # length in cm\n", + "\n", + "#calculation\n", + "S=L/(2*W*db+Wb*dG)\n", + "fi=0.2\n", + "DeltaW=fi*math.pi/(180*S)\n", + "\n", + "#result\n", + "print('S = %.3f rad/g' %S)\n", + "print('\\nDeltaW = %.3f g' %DeltaW)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "S = 0.154 rad/g\n", + "\n", + "DeltaW = 0.023 g" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 3.5, Page Number: 164<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "#variable declaration\n", + "hp=746.0 # horse power\n", + "P=5*hp # Saft power in Watts\n", + "N=1500.0 # speed in rpm\n", + "\n", + "#calculation\n", + "n=N/60.0\n", + "T=P*60/(2*math.pi*n)\n", + "\n", + "#result\n", + "print('T = %.0f Newton meters' %(math.ceil(T)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "T = 1425 Newton meters" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 3.6, Page Number: 165<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "ch_l=0.075 #change in length\n", + "orig_l=50.0 #Original length\n", + "\n", + "#calculation\n", + "S=ch_l/orig_l\n", + "E=9.66*10**5\n", + "stress=E*S\n", + "area=1.5\n", + "f=stress*area\n", + "\n", + "#result\n", + "print('Strain = %.4f cm/cm\\nStress =%d kg/cm^2\\nForce = %.1f kg'%(S,stress,f))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Strain = 0.0015 cm/cm\n", + "Stress =1449 kg/cm^2\n", + "Force = 2173.5 kg" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 3.7, Page Number: 165<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "#(a)\n", + "\n", + "#variable declaration\n", + "R1=120.0 # resistance in Ohm\n", + "R2=120.0 # resistance in Ohm\n", + "R3=120.0 # resistance in Ohm\n", + "R4=120.0 # resistance in Ohm\n", + "Rg=100.0 # resistance in Ohm\n", + "\n", + "#calculation\n", + "C=(R1*R2*R4)+(R1*R3*R4)+(R1*R2*R3)+(R2*R3*R4)+(Rg*(R1+R4)*(R2+R3))\n", + "C=C/(10**7)\n", + "\n", + "#result\n", + "print('(a)\\nC=%.3f*10^7' %C)\n", + "E=10\n", + "F=(E*R3*R1*2*10**3)/(C*10**7)\n", + "print('\\nF = %.1f *10^3 A/mm = %.1f mA/mm'%(F,F))\n", + "\n", + "#(b)\n", + "\n", + "#calculation\n", + "Fe=2*10**-4\n", + "E=10\n", + "DeltaE=Fe*E/(4+4*10**-4)\n", + "DeltaE=DeltaE*10**3\n", + "\n", + "#Result\n", + "print('\\n(b)\\nDeltaEg=%.1f mV' %DeltaE)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "C=1.267*10^7\n", + "\n", + "F = 22.7 *10^3 A/mm = 22.7 mA/mm\n", + "\n", + "(b)\n", + "DeltaEg=0.5 mV" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 3.8, PAge Number: 167<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#(a)\n", + "import math\n", + "\n", + "#variable Declaration\n", + "r1=2500.0 # Highest flasing rate \n", + "r2=1500.0 # next Highest flasing rate \n", + "\n", + "#calculation\n", + "n=(r1*r2)/(r1-r2)\n", + "\n", + "#result\n", + "print('(a)\\nn = %d rpm'%n)\n", + "\n", + "#(b)\n", + "\n", + "#variable declaration\n", + "N=5.0 # Fift time syncronization for same speed\n", + "\n", + "#calculation\n", + "r5=n*r1/((r1*(N-1))+n)\n", + "r5=math.ceil(r5)\n", + "\n", + "#result\n", + "print('\\n(b)\\nr5=%d Flashes/Minute' %r5)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "n = 3750 rpm\n", + "\n", + "(b)\n", + "r5=682 Flashes/Minute" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 3.9, Page Number: 167<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "rpm=1500.0 #rotation in rpm\n", + "f=200.0 #frequency\n", + "\n", + "#calculation\n", + "N=60*f/rpm\n", + "\n", + "#result\n", + "print('No of teeth on the wheel\\nN=%d' %N)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No of teeth on the wheel\n", + "N=8" + ] + } + ], + "prompt_number": 14 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/Chapter_4.ipynb b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/Chapter_4.ipynb new file mode 100755 index 00000000..3b3b8ccb --- /dev/null +++ b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/Chapter_4.ipynb @@ -0,0 +1,577 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8e99bc6fbce377831d9d5264a85c645ae2d9072f899aca1128c61ad0649fa729" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h1>Chapter 4: Acceleration Vibration and Density<h1>" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 4.1, Page Number:209 <h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "#(a)\n", + "\n", + "#variable Declaration\n", + "k=50.0 #Spring constant \n", + "m=0.005 # mass in kg\n", + "\n", + "#calculation\n", + "wn=math.sqrt(k/m)\n", + "\n", + "#result\n", + "print('(a)\\nNatural frequency(wn)= %d rad/s' %wn)\n", + "\n", + "\n", + "#(b)\n", + "\n", + "#calculation\n", + "Cc=2*(m*k)**(0.5)\n", + "\n", + "#result\n", + "print('\\n(b)\\nCc=%d' %Cc)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Natural frequency(wn)= 100 rad/s\n", + "\n", + "(b)\n", + "Cc=1" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 4.2, Page Number:209<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#(a)\n", + "import math\n", + "\n", + "#variable Declaration\n", + "Cc=1.0 # damping ratio \n", + "C=0.7*Cc # Critical damping ratio \n", + "m=0.005 # mass\n", + "k=50.0 # spring constant\n", + "\n", + "#calculation\n", + "w=math.sqrt((k/m)-(C/(2*m))**2)\n", + "\n", + "#result\n", + "print('(a)\\nw=%.1f rad/s' %w)\n", + "\n", + "#(b)\n", + "\n", + "#variable Declaration\n", + "w1=250.0 # angular velocity\n", + "\n", + "#calculation\n", + "theta=C*w1/(k-m*w1**2)\n", + "print('\\ntheta=%f' %theta)\n", + "fi=math.atan(-theta)\n", + "fi=fi*180.0/math.pi\n", + "\n", + "#result\n", + "print('\\nfi = %d\u00b0'%fi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "w=71.4 rad/s\n", + "\n", + "theta=-0.666667\n", + "\n", + "fi = 33\u00b0" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 4.3, PAge Number: 210<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#variable Declaration\n", + "m=0.005 # mass \n", + "c=0.7 # damping ratio\n", + "\n", + "#calculation\n", + "y=-math.log(0.01)\n", + "t=y*2*m/c\n", + "\n", + "#result\n", + "print('t=%.4f Secs' %t)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "t=0.0658 Secs" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 4.4, Page Number:210<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable Declaration\n", + "rg1=1200.0 #resistance in Ohm\n", + "rg2=1200.0 #resistance in Ohm\n", + "rg3=1200.0 #resistance in Ohm\n", + "rg4=1200.0 #resistance in Ohm\n", + "\n", + "#calculation\n", + "D1=rg1*5.0/100.0\n", + "D2=rg2*5.0/100.0\n", + "D3=rg3*5.0/100.0\n", + "D4=rg4*5.0/100.0\n", + "E=12.0\n", + "v=E*(((rg1+D1)/(rg1+D1+rg2-D2))-((rg4-D4)/(rg3+D3+rg4-D4)))\n", + "v=v*1000.0\n", + "\n", + "#result\n", + "print('V0=%d mV' %v)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V0=600 mV" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 4.5, Page Number:211<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "g=0.06 # voltage sensitivity\n", + "\n", + "#calculation\n", + "t=2.5*10**-3\n", + "p=20*9.8*10**4\n", + "E=g*t*p\n", + "\n", + "#Result\n", + "print('E=%d V' %E)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "E=294 V" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 4.6, Page Number: 211<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#resistance in Ohm\n", + "c0=25.0 # capacitance in pF\n", + "x0=0.5 # distance between plates\n", + "x1=0.05 # steady state displacement \n", + "\n", + "#calculations\n", + "c1=c0*x0/(x0-x1)\n", + "c2=c0*x0/(x0+x1)\n", + "\n", + "#result\n", + "print('C1=%.2f pF\\nC2=%.2f pF'%(c1,c2))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C1=27.78 pF\n", + "C2=22.73 pF" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 4.7, Page Number: 211<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#(a)\n", + "\n", + "sg_at_60=1.02\n", + "\n", + "#calculation\n", + "API=(141.5/sg_at_60)-131.5\n", + "\n", + "#result\n", + "print('(a)\\nDegrees API = %.2f\u00b0API' %API)\n", + "\n", + "#(b)\n", + "\n", + "#calculation\n", + "Be=145-145/sg_at_60\n", + "\n", + "#result\n", + "print('\\n(b)\\nDegrees Baume(heavy) = %.1f\u00b0Be' %Be)\n", + "\n", + "\n", + "#(c)\n", + "\n", + "#calculation\n", + "Bk=(sg_at_60-1)*1000\n", + "\n", + "#result\n", + "print('\\n(c)\\nDegrees Barkometer = %d\u00b0Bk' %Bk)\n", + "\n", + "#(d)\n", + "\n", + "#calculation\n", + "Q=(sg_at_60-1)*1000\n", + "\n", + "#result\n", + "print('\\n(c)\\nDegrees Quevenne = %d\u00b0Q' %Q)\n", + "\n", + "#(e)\n", + "\n", + "#calculation\n", + "Tw=200*(sg_at_60-1.0)\n", + "\n", + "#result\n", + "print('\\n(d)\\nDegrees Twaddel = %d\u00b0Tw' %Tw)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Degrees API = 7.23\u00b0API\n", + "\n", + "(b)\n", + "Degrees Baume(heavy) = 2.8\u00b0Be\n", + "\n", + "(c)\n", + "Degrees Barkometer = 20\u00b0Bk\n", + "\n", + "(c)\n", + "Degrees Quevenne = 20\u00b0Q\n", + "\n", + "(d)\n", + "Degrees Twaddel = 4\u00b0Tw" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 4.8, Page NUmber: 212<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "#variable Declaration\n", + "T=0.5 # Torque Tube Force\n", + "sg1=1.02 # Maximum spe.gravity to be measured\n", + "sg2=0.98 # Minimum spe.gravity to be measured\n", + "wt=1000*10**-6\n", + "\n", + "#calculation\n", + "v=T/((sg1-sg2)*wt)\n", + "v=math.ceil(v)\n", + "\n", + "#result\n", + "print('V=%d cm^3' %v)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V=12500 cm^3" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 4.9, Page Number: 212<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "#variavle declaration\n", + "sg1=0.85 # Maximum spe.gravity to be measured\n", + "sg2=0.8 # Minimum spe.gravity to be measured\n", + "span=150.0 # D/P cell span\n", + "\n", + "\n", + "#a\n", + "\n", + "#calculation\n", + "H=span/(sg1-sg2)\n", + "\n", + "#result\n", + "print('(a)\\nH=%d mm = %dm' %(H,H/1000))\n", + "\n", + "#b\n", + "\n", + "#calculation\n", + "span_min=1500.0\n", + "span2=span_min*(sg1-sg2)\n", + "span2=math.ceil(span2)\n", + "\n", + "#result\n", + "print('\\n(b)\\nD/P span = %d mm' %span2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "H=3000 mm = 3m\n", + "\n", + "(b)\n", + "D/P span = 75 mm" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 4.10, Page Number:212<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#variable declaration\n", + "Ww=12-2 # Width of water\n", + "dw=1000.0 # density of water\n", + "\n", + "#calculation\n", + "v=Ww/dw\n", + "dx=(10-2)/v\n", + "sg=dx/dw \n", + "\n", + "#result\n", + "print('Specific Gravity of X =%.1f' %sg)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific Gravity of X =0.8" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 4.11, PAge Number: 213<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#(a)\n", + "\n", + "#variable declaration\n", + "wt=1.5 # weight of object\n", + " \n", + "#calculation\n", + "v_obj=2.0/1000\n", + "dx=wt/v_obj\n", + "sg=dx/1000\n", + "\n", + "#result\n", + "print('(a)\\nSpecific Gravity = %.2f' %sg)\n", + "\n", + "#(b)\n", + "\n", + "sgl=0.8 # specific grav of liquid\n", + "dens=800.0 # density\n", + "\n", + "#calculation\n", + "W1=dens*v_obj-wt\n", + "\n", + "#result\n", + "print('\\n(b)\\nW1 = %.1f kg' %W1)\n", + "\n", + "\n", + "#(c)\n", + "\n", + "#variable declaration\n", + "sg2=1.2 # spe. grav.\n", + "dens2=1200.0 # density\n", + "\n", + "#calculation\n", + "W2=dens2*v_obj-wt\n", + "\n", + "#result\n", + "print('\\n(c)\\nW2 = %.1f kg' %W2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Specific Gravity = 0.75\n", + "\n", + "(b)\n", + "W1 = 0.1 kg\n", + "\n", + "(c)\n", + "W2 = 0.9 kg" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/Chapter_5.ipynb b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/Chapter_5.ipynb new file mode 100755 index 00000000..e24a4f35 --- /dev/null +++ b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/Chapter_5.ipynb @@ -0,0 +1,918 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:981874370471c716824dfdef461e37258f322dfc13d6037062140fc3ad5e0ae2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h1>Chapter 5: Flow <h1>" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5.1, Page Number: 310<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "#(i)\n", + "\n", + "#variable declaration\n", + "d=75.0*10**-3 # diameter of pipe\n", + "a=math.pi*d**2/4 # area of cross section of pipe\n", + "v=760.0*10**-3 # flow velocity\n", + "\n", + "#calculation\n", + "Q=v*a\n", + "Q=Q*10**3\n", + "print('(i)\\nVolume Flow Rate Q=%.3f *10^-3 m^3/sec' %Q)\n", + "rho=1000.0\n", + "W=rho*Q*10**-3\n", + "\n", + "#result\n", + "print('\\n(ii)\\nMass Flow rate W=%.3f kg/sec' %W)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)\n", + "Volume Flow Rate Q=3.358 *10^-3 m^3/sec\n", + "\n", + "(ii)\n", + "Mass Flow rate W=3.358 kg/sec" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5.2, page Number:310<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "#variable declaration\n", + "D=40.0 # Diameter of pipe\n", + "d=20.0 # Diameter of Orifice\n", + "mr=15.0 # Manometer reading\n", + "\n", + "#calculation\n", + "h=(13.6-1)*15.0*10.0\n", + "B=d/D\n", + "M=1/math.sqrt(1-(B**4))\n", + "Cd=0.5999\n", + "x=math.sqrt(2*9.8*h*(10**-3))\n", + "Q=x*Cd*M*(math.pi*((20*(10**-3))**2))/4\n", + "Q=Q*3600.0\n", + "\n", + "#result\n", + "print('Volumetric flow rate Q= %.4f m^3/hr' %Q)\n", + "#Answer slightly deviates from answer given in the book because of pi value.\n", + "#if pi=3.14, then answer is same as in textbook " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volumetric flow rate Q= 4.2649 m^3/hr" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5.3, Page Number: 310<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "#variable declaration\n", + "Re=10.0**5 # Reynolds number\n", + "D=40.0*10**-3 # Diameter of pipe \n", + "v=10**-6 # Kinematic viscosity in m^2/sec\n", + "\n", + "#calculation\n", + "V1=Re*v/D\n", + "A1=(math.pi*(40.0*10**-3)**2)/4\n", + "A2=(math.pi*(20.0*10**-3)**2)/4\n", + "V2=V1*A1/A2\n", + "\n", + "#result\n", + "print('V2=%.1f m/sec' %V2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V2=10.0 m/sec" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5.4, Page Number: 311<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "#variable declaration\n", + "Cd=0.61 # discharge coefficient\n", + "D=40.0*10**-3 # Diameter of pipe\n", + "d=20.0*10**-3 # Diameter of Orifice \n", + "\n", + "#calculation\n", + "M=1/math.sqrt(1-(d/D)**4)\n", + "V2=10.0\n", + "rho=1000.0\n", + "g=9.8\n", + "X=V2*math.sqrt(rho/(2*g))/(Cd*M)\n", + "p_diff=X**2\n", + "p_diff=math.floor(p_diff/100)\n", + "p_diff=p_diff/100.0\n", + "\n", + "\n", + "#result\n", + "print('P1-P2 = %.2f kg/cm^2'%p_diff)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "P1-P2 = 1.28 kg/cm^2" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5.5, Page Number: 312<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "#variable declaration\n", + "Cd=0.6 # discharge coefficient\n", + "D=150.0*10**-3 # Diameter of pipe\n", + "d=75.0*10**-3 # Diameter of Orifice \n", + "p=250.0 # pressure recorded\n", + "g=9.8 # acceleration due to gravity\n", + "rho=1000.0 # Water density \n", + "s=75.0*10**-3 # venturi tube size\n", + "\n", + "#(a)\n", + "\n", + "#calculation\n", + "Q=Cd*math.pi*s**2*math.sqrt(2*g*p/rho)/(4*math.sqrt(1-(d/D)**4)) \n", + "\n", + "#result\n", + "print('(a) For orifice plate\\nQ=%f m^3/sec = %.3f litres/sec'%(Q,Q*1000))\n", + "\n", + "#calculation\n", + "Cd1=0.99\n", + "Q2=Cd1*math.pi*s**2*math.sqrt(2*g*p/rho)/(4*math.sqrt(1-(d/D)**4))\n", + "\n", + "#result\n", + "print('\\n\\n(b)For venturi tube\\nQ=%f m^3/sec = %.2f litres/sec'%(Q2,Q2*1000))\n", + "#Answer slightly deviates from answer given in the book because of pi value.\n", + "#if pi=3.14, then answer is same as in textbook " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) For orifice plate\n", + "Q=0.006060 m^3/sec = 6.060 litres/sec\n", + "\n", + "\n", + "(b)For venturi tube\n", + "Q=0.009999 m^3/sec = 10.00 litres/sec" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5.6, Page Number: 312<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "#(i)\n", + "\n", + "#variable declaration\n", + "V=0.02 # volumetric flow rate\n", + "d=10*10**-2 # Diameter of pipe\n", + "\n", + "#calculation\n", + "A=math.pi*d**2/4\n", + "v=V/A\n", + "rho=1000.0\n", + "Re=rho*v*d/10**-3\n", + "Re=Re/100000.0\n", + "\n", + "#result\n", + "print('(i)\\nReynolds number(Re) = %.3f * 10^5'%Re)\n", + "\n", + "#(ii)\n", + "\n", + "#variable declaration\n", + "Cd=0.98 # discharge coefficient \n", + "D=20*10**-2 # Diameter of pipe \n", + "d=10*10**-2 # Diameter of orifice\n", + "\n", + "#calculation\n", + "M=1/math.sqrt(1-(d/D)**4)\n", + "a2=math.pi*d**2/4\n", + "Q=0.02\n", + "g=9.8\n", + "X=Q*math.sqrt(rho)/(M*Cd*a2*math.sqrt(2*g))\n", + "p_diff=math.ceil(X**2)\n", + "\n", + "#result\n", + "print('\\n(ii)\\nPressur_difference = %d kg/m^2 = %.4f kg/cm^2'%(p_diff,p_diff/10000))\n", + "#Answer slightly deviates from answer given in the book because of pi value.\n", + "#if pi=3.14, then answer is same as in textbook " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)\n", + "Reynolds number(Re) = 2.546 * 10^5\n", + "\n", + "(ii)\n", + "Pressur_difference = 323 kg/m^2 = 0.0323 kg/cm^2" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5.7, Page Number: 313<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "\n", + "\n", + "#variable declaration\n", + "g=9.81 #acceleration due to gravity\n", + "h=20.0 #height\n", + "\n", + "#calculation\n", + "v=math.sqrt(2*g*h)\n", + "d=300.0*10**-3\n", + "A=(math.pi*d**2)/4\n", + "A=math.floor(A*1000)\n", + "A=A/1000.0\n", + "Q=A*v\n", + "\n", + "#result\n", + "print('Q = %.3f m^3/sec'%Q)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q = 1.387 m^3/sec" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5.8, Page Number:313<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "#variable declaration\n", + "Cd=0.6 # coefficient of discharge \n", + "g=9.8 #acceleration due to gravity\n", + "h=400*10**-3 #height\n", + "\n", + "#calculation\n", + "V=Cd*math.sqrt(2*g*h)\n", + "\n", + "#result\n", + "print('V = %.2f m/sec' %V)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V = 1.68 m/sec" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5.9, Page Number: 314<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "#variable declaration\n", + "Cd=0.98 # coefficient of discharge\n", + "g=9.8 #acceleration due to gravity\n", + "h=900.0*10**-3 #height\n", + "\n", + "#calculation\n", + "V=Cd*math.sqrt(2*g*h)\n", + "V=math.floor(V*100)\n", + "V=(V/100.0)\n", + "\n", + "#result\n", + "print('V = %.2f m/sec' %V)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V = 4.11 m/sec" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5.10, Page Number:314<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "del_p=20*10**3 #Pa\n", + "dens_water=1000 #kg/m^3\n", + "dens_air=1.29 #kg/m^3\n", + "\n", + "#calculations\n", + "\n", + "#(i)When flowing fluid is water\n", + "v=math.sqrt(2*del_p/dens_water)\n", + "\n", + "#(ii)When flowing fluid is air\n", + "v1=math.sqrt(2*del_p/dens_air)\n", + "\n", + "#result\n", + "print('\\n(i)When flowing fluid is water\\n\\tV=%.3f m/sec'%v)\n", + "print('\\n(ii)When flowing fluid is air\\n\\tV=%.0f m/sec'%v1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "(i)When flowing fluid is water\n", + "\tV=6.325 m/sec\n", + "\n", + "(ii)When flowing fluid is air\n", + "\tV=176 m/sec" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5.11, Page Number: 314<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "# variable declaration\n", + "dens=1026.0 # density of see water\n", + "p=25.0*10**3 # pressure difference in manometer \n", + "\n", + "#calculation\n", + "V=math.sqrt(2*p/dens)\n", + "\n", + "#result\n", + "print('V=%.2f m/sec =%.3f km/hr'%(V,V*18/5))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V=6.98 m/sec =25.131 km/hr" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5.12, Page Number: 314<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# variable declaration\n", + "dens=1.29 # air density at height \n", + "\n", + "#calculation\n", + "p=12.5*1000\n", + "V=math.sqrt(2*p/dens)\n", + "\n", + "\n", + "#result\n", + "print('V=%.2f m/sec =%.2f km/hr'%(V,V*18/5))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V=139.21 m/sec =501.16 km/hr" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5.13, Page Number: 315<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "#variable declaration\n", + "Cd=0.6 # discharge coefficient\n", + "Dp=0.05 # inside diameter of metering tube \n", + "Df=0.035 # diameter of rotameter \n", + "g=9.8 # acceleration due to gravity\n", + "rho_f=3.9*10**3 # density of cylindrical float\n", + "rho=1000.0 # water density \n", + "Vf=3.36*10**-5 # volume of the float\n", + "\n", + "#calculation\n", + "Q=Cd*((Dp**2-Df**2)/Df)*math.sqrt(math.pi*g*Vf*(rho_f-rho)/(2*rho))\n", + "Q=Q*10000.0\n", + "\n", + "#result\n", + "print('Volumetric flow Q=%.4f *10^-4 m^3/sec' %Q)\n", + "#Answer slightly deviates from answer given in the book because of pi value.\n", + "#if pi=3.14, then answer is same as in textbook " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volumetric flow Q=8.4652 *10^-4 m^3/sec" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5.14, Page number: 315<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "# variable declaration\n", + "Cd=1 # discharge coefficient\n", + "Dp=0.018 # inside diameter of metering tube \n", + "Df=0.015 # diameter of rotameter \n", + "g=9.81 # acceleration due to gravity\n", + "rho_f=2.7 # density of cylindrical float\n", + "rho=0.8 # water density \n", + "Vf=520.0*10**-9 # volume of the float\n", + "\n", + "#case 1\n", + "\n", + "#caculation\n", + "Qmin=Cd*((Dp**2-Df**2)/Df)*math.sqrt(math.pi*g*Vf*(rho_f-rho)/(2*rho))\n", + "Qmin=Qmin*100000.0\n", + "\n", + "#result\n", + "print('Case 1: When float is at the bottom\\n Volumetric flow Qmin=%.3f *10^-5 m^3/sec'%Qmin)\n", + "\n", + "#case 2\n", + "\n", + "#calculation\n", + "Dp2=0.0617\n", + "Qmax=Cd*((Dp2**2-Df**2)/Df)*math.sqrt(math.pi*g*Vf*(rho_f-rho)/(2*rho))\n", + "Qmax=Qmax*100000\n", + "\n", + "#result\n", + "print('\\n\\nCase 2: When float is at the bottom\\n Volumetric flow Qmax=%.2f *10^-5 m^3/sec'%Qmax)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Case 1: When float is at the bottom\n", + " Volumetric flow Qmin=2.879 *10^-5 m^3/sec\n", + "\n", + "\n", + "Case 2: When float is at the bottom\n", + " Volumetric flow Qmax=104.17 *10^-5 m^3/sec" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5.15, Page Number:316<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# variable declaration\n", + "W=165.0 # weight of material on section of length\n", + "R=328.0 # Conveyor speed m/min\n", + "L=16.0 # Length of weighting platform in m\n", + "\n", + "#calculation\n", + "Q=W*R/L\n", + "\n", + "#result\n", + "print('Flow Rate Q=%.2f kg/min =%.1f kg/hour'%(Q,Q/60))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flow Rate Q=3382.50 kg/min =56.4 kg/hour" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5.16, Page Number:316<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "#variable declaration\n", + "f=100.0 # beat frequency\n", + "d=300.0*10**-3 # Sound path\n", + "a=45.0 #angle between transmeter and receiver in degrees\n", + "\n", + "#calculation\n", + "a_rad=45.0*math.pi/180.0\n", + "v=f*d/(2*math.cos(a_rad))\n", + "\n", + "#Result\n", + "print('Fluid Velocity V=%.1f m/sec'%v)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fluid Velocity V=21.2 m/sec" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5.17, Page Number: 316<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# variable declaration\n", + "r=150.0 # speed of rotation\n", + "v=120.0 # volume trapped between gears and casting\n", + "\n", + "#clculation\n", + "Q=4.0*v*r\n", + "\n", + "#result\n", + "print('Volume flow rate Q=%d cm^3/min = %d litres/min'%(Q,Q/1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volume flow rate Q=72000 cm^3/min = 72 litres/min" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5.18, Page Number: 317<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "# variable declaration\n", + "Q=2500.0 # Quantitty flow rate\n", + "d=2.75 # inner diameter\n", + "\n", + "#calculation\n", + "a=(math.pi*d**2)/4\n", + "v=Q/(60*a)\n", + "B=60.0\n", + "e=B*d*10**-2*v*10**-2\n", + "\n", + "#result\n", + "print('Induced emf e =%.4f V=%.1f mV'%(e,e*1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Induced emf e =0.1157 V=115.7 mV" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5.19, Pae Number:317<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# variable declaration\n", + "e=0.2*10**-3 # voltage of electromagnetic flow meter\n", + "B=0.08 # Flux density\n", + "l=10.0*10**-2 # Diameter of pipe\n", + "\n", + "#calculation\n", + "v=e/(B*l)\n", + "\n", + "#result\n", + "print('V = %.3f m/sec = %.2f cm/sec'%(v,v*100))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V = 0.025 m/sec = 2.50 cm/sec" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5.20, Page Number: 317<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# variable declaration\n", + "ei=0.15*10**-3 # peak value\n", + "em=2*ei # p-p amplifier output \n", + "B=0.1 # flux density\n", + "l=60.0*10**-3 # diameter of the pipe\n", + "\n", + "#calculation\n", + "v=em/(B*l)\n", + "\n", + "#result\n", + "print('Velocity of flow V = %.2f m/sec = %.1f cm/sec'%(v,v*100))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity of flow V = 0.05 m/sec = 5.0 cm/sec" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/Chapter_6.ipynb b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/Chapter_6.ipynb new file mode 100755 index 00000000..bdc5920d --- /dev/null +++ b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/Chapter_6.ipynb @@ -0,0 +1,558 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6148d2be2796832e7d2e9cefcc5c361a4c9dc07b22c355b627a74bd914199046" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h1>Chapter 6: Level<h1>" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 6.1,Page Number:370<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#(a)\n", + "\n", + "# variable declaration\n", + "p=1.5 # pressure applied\n", + "a=4.0 # mA corresponds to 0 kg/cm^2\n", + "b=20.0 # mA corresponds to 2 kg/cm^2\n", + "\n", + "#calculation\n", + "wh=(((b-a)/2)*p)+a\n", + "\n", + "#result\n", + "print('(a)just at the bottom level of the tank')\n", + "print('Water head applied to the transmitter =%d mA'%wh)\n", + "\n", + "#(b)\n", + "\n", + "#calculation\n", + "wh2=(((b-a)/2)*p)+2*a\n", + "\n", + "#result\n", + "print('\\n\\n(b)5m below the bottom of the tank')\n", + "print('Water head applied to the transmitter =%d mA' %wh2)\n", + "\n", + "#(c)\n", + "\n", + "#calculation\n", + "wh3=(((b-a)/2)*p)\n", + "\n", + "#result\n", + "print('\\n\\n(c)5m above the bottom of the tank')\n", + "print('Water head applied to the transmitter =%d mA'%wh3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)just at the bottom level of the tank\n", + "Water head applied to the transmitter =16 mA\n", + "\n", + "\n", + "(b)5m below the bottom of the tank\n", + "Water head applied to the transmitter =20 mA\n", + "\n", + "\n", + "(c)5m above the bottom of the tank\n", + "Water head applied to the transmitter =12 mA" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 6.2, Page Number:371<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#(a)\n", + "\n", + "#variable declaration\n", + "b=20.0 # Maximum output\n", + "a=4.0 # minimum output \n", + "op=16.0 # output in mA\n", + "\n", + "#calculation\n", + "p=(op-a)*2/(b-a)\n", + "p_h=p*10.0\n", + "h=p_h-2-5\n", + "\n", + "#result\n", + "print('(a)\\nh = %dm'%h)\n", + "\n", + "#(b)\n", + "\n", + "#variable declaration\n", + "p1=1 # pressure applied\n", + "\n", + "#calculation\n", + "t_op=((b-a)/2)*p1+4\n", + "\n", + "#result\n", + "print('\\n(b)\\nTransmitter output =%d mA'%t_op)\n", + "\n", + "#(c)\n", + "\n", + "#variable declaration\n", + "p2=0.5 # applied pressure\n", + "\n", + "#calculation\n", + "t_op1=((b-a)/2)*p2+4\n", + "\n", + "#result\n", + "print('\\n(c)\\nTransmitter output =%d mA'%t_op1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "h = 8m\n", + "\n", + "(b)\n", + "Transmitter output =12 mA\n", + "\n", + "(c)\n", + "Transmitter output =8 mA" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 6.3, Page Number: 372<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#(a)\n", + "\n", + "#variable declaration\n", + "b=20.0 # Maximum output\n", + "a=4.0 # minimum output\n", + "op=16.0 # actual output \n", + "wt_l1=25.0 # water level (i)\n", + "\n", + "#calculation\n", + "t_op=((b-a)/100)*(100-75)+4\n", + "\n", + "#result\n", + "print('(a)\\nWater level=+25cm\\nTransmitter output = %d mA' %t_op)\n", + "\n", + "#(b)\n", + "\n", + "#calculation\n", + "wt_l2=-25.0 # water level (ii)\n", + "t_op2=((b-a)/100)*(100-25)+4\n", + "\n", + "#result\n", + "print('\\n(b)\\nWater level=-25cm\\nTransmitter output = %d mA' %t_op2)\n", + "\n", + "#(c)\n", + "\n", + "#Variable declaration\n", + "t_op3=12.0 # Transmitter output \n", + "\n", + "#calculation\n", + "H=(100.0/(b-a))*(12-4) \n", + "\n", + "#result\n", + "print('\\n(c)\\nHead Applied = %d cm\\nLevel corresponding to 50 cm head =0 cm' %H)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Water level=+25cm\n", + "Transmitter output = 8 mA\n", + "\n", + "(b)\n", + "Water level=-25cm\n", + "Transmitter output = 16 mA\n", + "\n", + "(c)\n", + "Head Applied = 50 cm\n", + "Level corresponding to 50 cm head =0 cm" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 6.4, Page Number: 373<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#(a)\n", + "\n", + "#variable declaration\n", + "a=5.0*10**-4 #area\n", + "l=8.0 #length\n", + "dens=6.0*1000.0 #density\n", + "\n", + "#calculation\n", + "w=a*l*dens\n", + "\n", + "#result\n", + "print('(a)\\nWeight of the displacer if weighed in air = %d kg'%w)\n", + "\n", + "\n", + "#(i)\n", + "\n", + "#variable declaration\n", + "sbr1=23.0 # spring balance reading\n", + "\n", + "#calculation\n", + "wloss1=w-sbr1\n", + "L1=wloss1/(1000.0*a)\n", + "\n", + "#result\n", + "print('\\n(i)\\tL1=%dm'%L1)\n", + "\n", + "\n", + "#(ii)\n", + "\n", + "#variable declaration\n", + "sbr2=22.0 # spring balance reading\n", + "\n", + "#calculation\n", + "wloss2=w-sbr2\n", + "L2=wloss2/(1000.0*a)\n", + "\n", + "#result\n", + "print('\\n(ii)\\tL2=%dm'%L2)\n", + "\n", + "#(iii)\n", + "\n", + "#variable declaration\n", + "sbr3=21.0 # spring balance reading\n", + "\n", + "#calculation\n", + "wloss3=w-sbr3\n", + "L3=wloss3/(1000.0*a)\n", + "\n", + "#result\n", + "print('\\n(iii)\\tL3=%dm'%L3)\n", + "\n", + "#(b)\n", + "\n", + "#variable declaration\n", + "level=8.0 # level wen tank is full \n", + "\n", + "#calculation\n", + "wt=a*level*1000.0\n", + "spring=w-wt\n", + "\n", + "#result\n", + "print('\\n(b):when the tank is full\\nSpring Balance reading = %d kg'%spring)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Weight of the displacer if weighed in air = 24 kg\n", + "\n", + "(i)\tL1=2m\n", + "\n", + "(ii)\tL2=4m\n", + "\n", + "(iii)\tL3=6m\n", + "\n", + "(b):when the tank is full\n", + "Spring Balance reading = 20 kg" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 6.5, Page Number: 374<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "rho=1000.0 # density of water \n", + "v=3.0 # displaced volume of water \n", + "\n", + "#calculation\n", + "Bw=rho*v\n", + "\n", + "#Result\n", + "print('Buoyance Force(Bw) = %d kg'%Bw)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Buoyance Force(Bw) = 3000 kg" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 6.6, Page Number: 374<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "rho=1000.0 # density of water\n", + "Bw=5000.0 # Buoyancy Force\n", + "\n", + "#calculation\n", + "v=Bw/rho\n", + "\n", + "#result\n", + "print('V = %d m^3' %v)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V = 5 m^3" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 6.7, Page Number: 374<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "rho=1000.0 # density of water\n", + "h=10.0 # height of liquid\n", + "\n", + "#calculation\n", + "P=rho*h\n", + "\n", + "#result\n", + "print('P = %d kg/m^2 = %d kg/cm^2 '%(P,P/10000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "P = 10000 kg/m^2 = 1 kg/cm^2 " + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 6.8, Page Number: 374<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "rho=1000.0 # density of water\n", + "h=15.0 # height of liquid \n", + "ex_p=1.0 # External pressure on liquid\n", + "\n", + "#calculation\n", + "P=(rho*h/10000.0)+ex_p\n", + "\n", + "#result\n", + "print('P = %.1f kg/cm^2' %P)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "P = 2.5 kg/cm^2" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 6.9, Page Number:374<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "rho=1000.0 # density of water\n", + "ex_p=0.5*10**4 # External pressure on liquid \n", + "P=1.6*10**4 #(rho*h/10000)+ex_p\n", + "\n", + "#calculation\n", + "h=(P-ex_p)/1000.0\n", + "\n", + "#result\n", + "print('h = %d m' %h)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "h = 11 m" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 6.10, Page Number:375<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "c2=100.0*10**-6 # capacitance in capacitance probe\n", + "r1=10.0*10**3 # value of resistor in bride\n", + "r2=100.0*10**3 # value of resistor in bride\n", + "r3=50.0*10**3 # value of resistor in bride\n", + "\n", + "#calculation\n", + "Cx=r1*c2/r3\n", + "Cx=Cx*10**6\n", + "\n", + "#result\n", + "print('Cx = %d microFarad'%Cx)\n", + "c=5.0\n", + "\n", + "#calculation\n", + "l=Cx/c\n", + "\n", + "#result\n", + "print('\\nLevel on the probe = %dm'%l)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cx = 20 microFarad\n", + "\n", + "Level on the probe = 4m" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/Chapter_7.ipynb b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/Chapter_7.ipynb new file mode 100755 index 00000000..4a5cfd38 --- /dev/null +++ b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/Chapter_7.ipynb @@ -0,0 +1,594 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:7398e89d85008e2cdad3036771199a6877abb82c38f4bdc25b1a999f38a5b0fa" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h1>Chapter 7: Velocity Humidity and Moisture<h1>" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 7.1, Page NUmber: 436<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "f=2*9.8*10**5 # Force in Dynes\n", + "A=100.0 # area in cm^2\n", + "V=20.0 # velocity in m/sec\n", + "l=10.0 # length in cm\n", + "\n", + "#calculation\n", + "mu=(f/A)/(V/l)\n", + "mu=mu/1000.0\n", + "\n", + "#result\n", + "print('The absolute viscosity mu = %.1f*10^5 centipoises'%mu)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The absolute viscosity mu = 9.8*10^5 centipoises" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 7.2, Page Number:437<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#(a)\n", + "\n", + "#variable declaration\n", + "v=10.0 # absolute viscosity\n", + "\n", + "#calculation\n", + "F=1/v\n", + "\n", + "#result\n", + "print('(a)\\nFluidity = %.1f rhe'%F)\n", + "\n", + "#(b)\n", + "\n", + "#variable declaration\n", + "mu=10.0 # absolute viscosity\n", + "rho=0.8 # density in m/cm^3\n", + "\n", + "#calculation\n", + "ve=mu/rho\n", + "\n", + "#result\n", + "print('\\n(b)\\nKinematic viscosity (v)= %.1f cm^2/sec'%ve)\n", + "\n", + "\n", + "#(c)\n", + "\n", + "#variable declaration\n", + "ab=1000.0 # absolute viscosity \n", + "abwt=1.002 # absolute viscosity of water at 20 deree celcius\n", + "\n", + "#calculation\n", + "rv=ab/abwt\n", + "\n", + "#result\n", + "print('\\n(c)\\nRelative viscosity = %d centipoises'%rv)\n", + "\n", + "#(d)\n", + "\n", + "#variable declaration\n", + "PAS=10.0\n", + "\n", + "#Result\n", + "print('\\n(c)\\nAbsolute viscosity = 1000 centipoises =10 poises = 1PAS')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Fluidity = 0.1 rhe\n", + "\n", + "(b)\n", + "Kinematic viscosity (v)= 12.5 cm^2/sec\n", + "\n", + "(c)\n", + "Relative viscosity = 998 centipoises\n", + "\n", + "(c)\n", + "Absolute viscosity = 1000 centipoises =10 poises = 1PAS" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 7.3, Page Number: 438<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "#b)\n", + "\n", + "#variable declaration\n", + "R=0.5 # radius\n", + "L=5 # length\n", + "p_diff=800.0 # pressure difference\n", + "V=10.0 # volume\n", + "\n", + "#calculation\n", + "mu=(math.pi*R**4)*p_diff/(8*V*L)\n", + "\n", + "#result\n", + "print('(b)\\nmu=%.4f poise =%.2f centipoise'%(mu,mu*100))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(b)\n", + "mu=0.3927 poise =39.27 centipoise" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 7.4, Page Number: 439<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "#(a)\n", + "\n", + "#variable declaration\n", + "g=980.0 # acceleration due to gravity\n", + "h=4 # Height\n", + "R=0.5 # radius\n", + "V=10.0 # volume \n", + "l=5.0 # length \n", + "t=1.0\n", + "\n", + "#calculation\n", + "v=(math.pi*g*h*t*R**4)/(8*l*V)\n", + "\n", + "#result\n", + "print('(a)\\n v = %.2f stokes'%v)\n", + "\n", + "#calculation\n", + "mu=0.3925\n", + "rho=mu/v\n", + "\n", + "#result\n", + "print('\\n(b)\\n Density of the fluid rho = %.3f gm/cm^3'%rho)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + " v = 1.92 stokes\n", + "\n", + "(b)\n", + " Density of the fluid rho = 0.204 gm/cm^3" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 7.5, Page Number: 440<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#variable declaration\n", + "\n", + "#(a)\n", + "A=0.226 # value of A as per equation\n", + "B=195.0 # value of B as per equation\n", + "t=60.0 # Efflux time\n", + "\n", + "#calcullation\n", + "v=A*t-B/t\n", + "A1=0.220\n", + "B1=135.0\n", + "t1=140.0\n", + "v1=A1*t1-B1/t1\n", + "\n", + "#result\n", + "print('(a) Fluid X\\n v = %.2f centipoises'%v)\n", + "print('\\n(b)Fluid Y\\n v = %.1f centipoises'%v1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Fluid X\n", + " v = 10.31 centipoises\n", + "\n", + "(b)Fluid Y\n", + " v = 29.8 centipoises" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 7.6, Page Number: 441<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "#variable declaration\n", + "t=12.0 # time interval of falling ball in sec \n", + "Rsb=7.0 # Specific gravity of ball\n", + "Rsf=1.12 # Specific gravity of fluid\n", + "B=1.5 # Ball constant in centipoises\n", + "\n", + "#calculation\n", + "mu=t*(Rsb-Rsf)*B\n", + "\n", + "#result\n", + "print('mu= %.2f centipoises = %d centipoises(approx)'%(mu,math.ceil(mu)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mu= 105.84 centipoises = 106 centipoises(approx)" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 7.7, Page Number: 441<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#(a)\n", + "\n", + "#variable declaration\n", + "B=45.0 # dry bulb temperature\n", + "W=25.0 # wet bulb temperature\n", + "\n", + "#result\n", + "print('\\n(b)\\nPsychromatic differential : %d\u00b0C'%(B-W))\n", + "print('\\n Relative humidity is 80%% corresponding to')\n", + "print(' \\ntemperature 45\u00b0C and psychromatic differential 20\u00b0C')\n", + "\n", + "#(b)\n", + "\n", + "#variable declaration\n", + "B1=30.0 # dry bulb temperature\n", + "W1=27.0 # wet bulb temperature\n", + "\n", + "#result\n", + "print('\\n(b)\\nPsychromatic differential : %d\u00b0C'%(B1-W1))\n", + "print('\\n Relative humidity is 80%% corresponding to')\n", + "print(' \\ntemperature 30\u00b0C and psychromatic differential 3\u00b0C')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "(b)\n", + "Psychromatic differential : 20\u00b0C\n", + "\n", + " Relative humidity is 80%% corresponding to\n", + " \n", + "temperature 45\u00b0C and psychromatic differential 20\u00b0C\n", + "\n", + "(b)\n", + "Psychromatic differential : 3\u00b0C\n", + "\n", + " Relative humidity is 80%% corresponding to\n", + " \n", + "temperature 30\u00b0C and psychromatic differential 3\u00b0C" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 7.8, Page Number: 441<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "D=80.0 # intersection point of DB temperature\n", + "W=66.5 # intersection point of WB temperature\n", + "\n", + "#Result\n", + "\n", + "#(a)\n", + "print('(a)\\nThe intersection point of DB temperature 80\u00b0F and WB temperature 66.5\u00b0F')\n", + "print(' \\nlines on the relative humidity curve for 50%.\\n RH = 50%')\n", + "\n", + "#(b)\n", + "print('\\n(b)\\nFrom the point of intersection of the dry and wet bulb curves, move left')\n", + "print(' \\nhorizontally to the dew point temperature curve where it meets at 60\u00b0F')\n", + "print('\\nDew Point = 60\u00b0F')\n", + "\n", + "#(c)\n", + "print('\\n(c)\\nFrom the point of intersection of the dry and wet bulb curves,')\n", + "print('\\nhorizontally to the right to the moisture content plot where it meets at 76.')\n", + "print('\\nMoisture Content : 76 grains of water per pound of dry air.')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "The intersection point of DB temperature 80\u00b0F and WB temperature 66.5\u00b0F\n", + " \n", + "lines on the relative humidity curve for 50%.\n", + " RH = 50%\n", + "\n", + "(b)\n", + "From the point of intersection of the dry and wet bulb curves, move left\n", + " \n", + "horizontally to the dew point temperature curve where it meets at 60\u00b0F\n", + "\n", + "Dew Point = 60\u00b0F\n", + "\n", + "(c)\n", + "From the point of intersection of the dry and wet bulb curves,\n", + "\n", + "horizontally to the right to the moisture content plot where it meets at 76.\n", + "\n", + "Moisture Content : 76 grains of water per pound of dry air." + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 7.9, Page Number: 442<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "wt_vap=500.0 # Amount of water vapour present\n", + "wt_vap_to_sat=1500.0 # Amount of water vapour added to saturate\n", + "\n", + "#calculation\n", + "total=wt_vap+wt_vap_to_sat\n", + "Rh=(wt_vap/total)*100\n", + "\n", + "#result\n", + "print('RH = %d%%'%Rh)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RH = 25%" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 7.10, Page Number: 442<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "pv=30.0 # partial pressure of water vapour\n", + "ps=60.0 # Saturation partial pressure \n", + "\n", + "#calculations\n", + "Rh=(pv/ps)*100\n", + "\n", + "#Result\n", + "print('%%RH = %d%%'%Rh)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "%RH = 50%" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 7.11, Page Number: 442<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "i1=250.0 # ionazation current \n", + "i2=350.0 # ionazation current \n", + "\n", + "#calculation\n", + "m=(i2-i1)*100/i1\n", + "\n", + "#result\n", + "print('%% increase in moisture content = %d%%'%m)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "% increase in moisture content = 40%" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 7.12, Page Number: 443<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaraton\n", + "i2=150.0 # wet weight\n", + "i1=125.0 # dry weight\n", + "\n", + "#calculation\n", + "m=(i2-i1)*100/i1\n", + "\n", + "#result\n", + "print('Moisture percentage = %d%%'%m)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Moisture percentage = 20%" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/Chapter_8.ipynb b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/Chapter_8.ipynb new file mode 100755 index 00000000..45717557 --- /dev/null +++ b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/Chapter_8.ipynb @@ -0,0 +1,507 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d75e4cfd03813a2ebb58ae96e012a8b8020f7dffa90e8d93acabe5330e357932" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h1>Chapter 8:Fundamentals of measuring instruments <h1>" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 8.1, Page Number: 507<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable declaration\n", + "fi=10.0*10**-6 # fi-flux\n", + "inch=2.54*10**-2 # length\n", + "A=inch**2 # area\n", + "\n", + "#calculation\n", + "B =fi/A\n", + "\n", + "#Result\n", + "print('Flux Density B= %.1f mT'%(B*1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flux Density B= 15.5 mT" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 8.2, Page Number: 508<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable Declaration\n", + "i=10*10**-3 # current in A\n", + "R=1000.0 # resistance in ohm\n", + "P=(i**2)*R # Power\n", + "err_R=10.0 # Error in Resistance measurement\n", + "err_I=(2.0/100)*25*100/10 # Error in current measurement\n", + "\n", + "#calculation\n", + "err_I2=2*err_I\n", + "err_p=err_I2+err_R\n", + "\n", + "#Result\n", + "print('%% error in I^2 = \u00b1 %d%%\\n%% error in Power = \u00b1 %d%%'%(err_I2,err_p))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "% error in I^2 = \u00b1 10%\n", + "% error in Power = \u00b1 20%" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 8.3, Page Number: 508<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#variable Declaration\n", + "i1=37.0 # current in branch 1 \n", + "i2=42.0 # current in branch 2\n", + "i3=13.0 # current in branch 3\n", + "i4=6.7 # current in branch 4\n", + "\n", + "#Calculation\n", + "Imax=(i1+i2)+(i1+i2)*(3.0/100)+(i3+i4)+(i3+i4)*(1.0/100)\n", + "Imin=(i1+i2)-(i1+i2)*(3.0/100)+(i3+i4)-(i3+i4)*(1.0/100)\n", + "\n", + "#result\n", + "print('Maximum level of total supply current = %.3f mA'%Imax)\n", + "print('\\nMinimum level of total supply current = %.3f mA'%Imin)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum level of total supply current = 101.267 mA\n", + "\n", + "Minimum level of total supply current = 96.133 mA" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 8.4, Page Number:508<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "#(a)\n", + "\n", + "#variable declaration\n", + "T=200.0 # intermediate temperature \n", + "T0=300.0 # final temperature \n", + "Ti=70.0 # initial temperature \n", + "t=3.0 # time in seconds \n", + "\n", + "#calculation\n", + "x=(T-T0)/(Ti-T0)\n", + "tow=-t/math.log(x)\n", + "\n", + "#result\n", + "print('(a)\\nTime constant tow=%.1f s'%tow)\n", + "\n", + "\n", + "#(b)\n", + "\n", + "#variable declaration\n", + "t1=5.0 # time in seconds \n", + "#calculation\n", + "T5=T0+((Ti-T0)*math.e**(-t1/tow))\n", + "\n", + "#result\n", + "print('\\n(b)\\nTemperature after 5 seconds T5 = %.2f\u00b0C'%T5)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Time constant tow=3.6 s\n", + "\n", + "(b)\n", + "Temperature after 5 seconds T5 = 242.61\u00b0C" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 8.5, Page Number:<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "#variable declaration\n", + "w=9.0 # excitation frequency\n", + "wn=6.0 # natural frequency\n", + "dr=0.6 # damping ratio\n", + "\n", + "#calculations\n", + "\n", + "x=w/wn\n", + "Ar=1/math.sqrt(((1-(x)**2)**2)+(2*dr*x)**2)\n", + "err=(1-Ar)*100\n", + "\n", + "#Result\n", + "print('A=%.3f'%Ar)\n", + "print('\\nError = %.2f%%'%err)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "A=0.456\n", + "\n", + "Error = 54.37%" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 8.6, PAge Number: 510<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#variable Declaration\n", + "t=2.0 # output to be calculated after t seconds\n", + "\n", + "#calculation\n", + "y=1-math.e**(-(t-1.5)/0.5)\n", + "\n", + "#result\n", + "print('y(t)at t=2 will be y(t)=%.3f'%y)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "y(t)at t=2 will be y(t)=0.632" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 8.7, Page Number: 510<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "#variable declaration\n", + "\n", + "#Temperature Readings\n", + "x1=98.5 # Reading 1\n", + "x2=99.0 # Reading 2\n", + "x3=99.5 # Reading 3 \n", + "x4=100.0 # Reading 4\n", + "x5=100.5 # Reading 5\n", + "x6=101.0 # Reading 6\n", + "x7=101.5 # Reading 7\n", + "# Frequency\n", + "f1=4.0 # Reading 1\n", + "f2=13.0 # Reading 2\n", + "f3=19.0 # Reading 3\n", + "f4=35.0 # Reading 4\n", + "f5=17.0 # Reading 5\n", + "f6=10.0 # Reading 6\n", + "f7=2.0 # Reading 7\n", + "\n", + "#(i) Arithmatic Mean\n", + "\n", + "#calculation\n", + "x_bar=((x1*f1)+(x2*f2)+(x3*f3)+(x4*f4)+(x5*f5)+(x6*f6)+(x7*f7))/(f1+f2+f3+f4+f5+f6+f7)\n", + "\n", + "#result\n", + "print('(i)\\n\\tArithmatic Mean = %.2f\u00b0C'%x_bar)\n", + "\n", + "#(ii) Average Deviation\n", + "\n", + "#calculation\n", + "D=(abs(x1-x_bar)*f1)+(abs(x2-x_bar)*f2)+(abs(x3-x_bar)*f3)+(abs(x4-x_bar)*f4)\n", + "D=D+(abs(x5-x_bar)*f5)+(abs(x6-x_bar)*f6)+(abs(x7-x_bar)*f7)\n", + "D=D/(f1+f2+f3+f4+f5+f6+f7)\n", + "\n", + "#result\n", + "print('\\n(ii)\\n\\tAverage Deviation =%.4f\u00b0C'%D)\n", + "\n", + "#Standard deviation\n", + "\n", + "#Calculation\n", + "sigma=((x1-x_bar)**2*f1)+((x2-x_bar)**2*f2)+((x3-x_bar)**2*f3)+((x4-x_bar)**2*f4)\n", + "sigma=sigma+((x5-x_bar)**2*f5)+((x6-x_bar)**2*f6)+((x7-x_bar)**2*f7)\n", + "sigma=math.sqrt(sigma)\n", + "sigma=sigma/math.sqrt(f1+f2+f3+f4+f5+f6+f7)\n", + "\n", + "#result\n", + "print('\\n(iii)\\n\\tStandard deviation = %.3f\u00b0C'%sigma)\n", + "\n", + "#variance\n", + "\n", + "#result\n", + "print('\\n(iv)\\n\\tVariance = %.4f\u00b0C'%(sigma**2))\n", + "\n", + "#Probable Error\n", + "\n", + "#result\n", + "print('\\n(v)\\n\\tProbable Error= %.4f\u00b0C'%(0.6745*sigma))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)\n", + "\tArithmatic Mean = 99.93\u00b0C\n", + "\n", + "(ii)\n", + "\tAverage Deviation =0.5196\u00b0C\n", + "\n", + "(iii)\n", + "\tStandard deviation = 0.671\u00b0C\n", + "\n", + "(iv)\n", + "\tVariance = 0.4501\u00b0C\n", + "\n", + "(v)\n", + "\tProbable Error= 0.4525\u00b0C" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 8.8, Page Number: 511<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "#variable Declaration\n", + "wn=math.sqrt(3.0) # natural frequency of osscilation\n", + "\n", + "#Calculation\n", + "x=3.2/(2*wn)\n", + "\n", + "#Result\n", + "print('Damping coefficient = %.3f\\nNatural frequency of Oscillation = %.3f'%(x,wn))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Damping coefficient = 0.924\n", + "Natural frequency of Oscillation = 1.732" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 8.9, Page Number: 512<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "#variable declaration\n", + "w=100.0 # natural frequency of osscilation\n", + "\n", + "#calculation\n", + "fi=-math.atan(0.1*w)-math.atan(0.5*w)\n", + "A=1/(math.sqrt(1+(0.1*w)**2)*(math.sqrt(1+(0.5*w)**2)))\n", + "A=1*1000.0/math.ceil(1000*A)\n", + "err=(1-1.0/A)*100\n", + "\n", + "#Result\n", + "print('A=K/%d\\n%% error = %.1f%%\\nfi = %.2f\u00b0'%(A,err,fi*180/math.pi))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "A=K/500\n", + "% error = 99.8%\n", + "fi = -173.14\u00b0" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 8.10, Page Number: 512<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#calculations\n", + "R=0.15*10/50 # Temperature gradient\n", + "K=1.0 # constant\n", + "tow=15.0 # time constant \n", + "\n", + "#Calculations\n", + "deg=K*R*tow\n", + "\n", + "#(i)\n", + "a=15-deg\n", + "\n", + "#(ii)\n", + "alt_red=deg*50.0/0.15\n", + "h=5000-alt_red\n", + "\n", + "#result\n", + "print('(i)The actual temperature when instrument reads 15\u00b0C is %.2f\u00b0C'%a)\n", + "print('\\n The true temperature at 5000 metres = %.2f '%a)\n", + "print('\\n(ii)\\nThe true altitude at which 15\u00b0C occurs is %d metres'%h)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)The actual temperature when instrument reads 15\u00b0C is 14.55\u00b0C\n", + "\n", + " The true temperature at 5000 metres = 14.55 \n", + "\n", + "(ii)\n", + "The true altitude at which 15\u00b0C occurs is 4850 metres" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/README.txt b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/README.txt new file mode 100755 index 00000000..2f922759 --- /dev/null +++ b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/README.txt @@ -0,0 +1,10 @@ +Contributed By: Laxman Sole +Course: btech +College/Institute/Organization: Vishwakarma Institute of Technology, Pune +Department/Designation: Electronics Engineering +Book Title: Industrial Instrumentation +Author: K. Krishnaswamy And S. Vijayachitra +Publisher: New Age International Publishers, New Delhi +Year of publication: 2010 +Isbn: 9788122427509 +Edition: 2nd
\ No newline at end of file diff --git a/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/ch2.ipynb b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/ch2.ipynb new file mode 100755 index 00000000..0f54145a --- /dev/null +++ b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/ch2.ipynb @@ -0,0 +1,942 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3203164807ce532b672553754629f11a0a0db0c197fd3e21e75a10e9e0cb2a95" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Basic Concepts Of Thermodynamicsm" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.1 Page no : 41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "rho_Hg = 13596.; \t\t\t#kg/m**3\n", + "g = 9.806; \t\t\t#m/s**2\n", + "h = 0.76; \t\t\t#m\n", + "\n", + "# Calculations and Results\n", + "P = rho_Hg*g*h/1000; \t\t\t#kPa\n", + "\n", + "\n", + "h1 = 0.80; \t\t\t#m\n", + "P1 = h1/h*P;\n", + "print \"(i) Pressure of 80 cm of Hg %.3f kPa\"%P1\n", + "\n", + "\n", + "print (\"(ii) 30 cm Hg vacuum\")\n", + "H2 = 0.30; \t\t\t#cm Hg vacuum\n", + "h2 = h-H2; \t\t\t#cm of Hg absolute\n", + "\n", + "P2 = h2/h*P;\n", + "print \"Pressure due to 46 cm of Hg %.3f kPa\"%P2\n", + "\n", + "rho_H2O = 1000; \t\t\t#kg/m**3\n", + "h3 = 1.35; \t\t\t#m\n", + "P3 = rho_H2O*g*h3/1000;\n", + "print \"(iii) Pressure due to 1.35 m H2O gauge %.3f kPa\"%(P3)\n", + "\n", + "\n", + "P4 = 4.2*10**2;\n", + "print \"(iv) 4.2 bar %.3f kPa\"%(P4),\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Pressure of 80 cm of Hg 106.658 kPa\n", + "(ii) 30 cm Hg vacuum\n", + "Pressure due to 46 cm of Hg 61.328 kPa\n", + "(iii) Pressure due to 1.35 m H2O gauge 13.238 kPa\n", + "(iv) 4.2 bar 420.000 kPa\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.2 page no : 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "d = 0.1; \t\t\t#m\n", + "F = 1000.; \t\t\t#N\n", + "\n", + "# Calculations\n", + "A = math.pi/4*d**2; \t\t\t#m**2\n", + "P = F/A/10**3;\n", + "\n", + "# Results\n", + "print \"Pressure on the piston = %.3f kN/m**2\"%(P),\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure on the piston = 127.324 kN/m**2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.3 page no : 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "SG = 0.9;\n", + "h = 1.2; \t\t\t#m\n", + "g = 9.81; \t\t\t#m/s**2\n", + "rho_w = 1000.; \t\t\t#kg/m**3\n", + "\n", + "# Calculations\n", + "rho = SG*rho_w; \t\t\t#kg/m**3\n", + "P = rho*g*h/10**3;\n", + "\n", + "# Results\n", + "print \"Gauge pressure P = %.3f kN/m**2\"%(P)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gauge pressure P = 10.595 kN/m**2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.4 page no : 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Vacuum_recorded = 740.; \t\t\t#mm of Hg\n", + "Barometric_reading = 760.; \t\t\t#mm of Hg\n", + "\n", + "# Calculations\n", + "Absolute_pressure = (Barometric_reading-Vacuum_recorded)*133.4;\n", + "\n", + "# Results\n", + "print \"Absolute pressure in the condenser = %.3f Pa\"%(Absolute_pressure),\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Absolute pressure in the condenser = 2668.000 Pa\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.5 page no : 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "d = 0.5; \t\t\t#m\n", + "h = 0.75; \t\t\t#m\n", + "m = 4.; \t\t\t#kg\n", + "Manometer_reading = 620.; \t\t\t#mm of Hg above atmosphere\n", + "Barometer_reading = 760.; \t\t\t#mm of Hg\n", + "V = math.pi/4*d**2*h; \t\t\t#m**3\n", + "print (\"(i) Total pressure in the vessel\")\n", + "\n", + "# Calculations and Results\n", + "P = (Barometer_reading+Manometer_reading)*133.4/10**5; \t\t\t#bar\n", + "print \"P = %.3f bar\"%(P)\n", + "\n", + "print (\"(ii) Specific volume and density\")\n", + "SV = V/m; \n", + "print \"Specific volume = %.3f m**3/kg\"%(SV)\n", + "\n", + "D = m/V;\n", + "print \"Density = %.3f kg/m**3\"%(D),\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Total pressure in the vessel\n", + "P = 1.841 bar\n", + "(ii) Specific volume and density\n", + "Specific volume = 0.037 m**3/kg\n", + "Density = 27.162 kg/m**3\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.6 page no : 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "h0 = .761; \t\t\t#m\n", + "h = .55; \t\t\t#m\n", + "g = 9.79; \t\t\t#m/s**2\n", + "rho = 13640.; \t\t\t#kg/m**3\n", + "\n", + "# Calculations\n", + "P = rho*g*(h0+h); \t\t\t#N/m**2\n", + "\n", + "# Results\n", + "print \"Gas pressure = %.3f bar\"%(P/10**5),\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gas pressure = 1.751 bar\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.7 page no : 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "h_H2O = 34.; \t\t\t#mm of Hg\n", + "g = 9.81; \t\t\t#m/s**2\n", + "rho = 13600.; \t\t\t#kg/m**3\n", + "P_Hg = 97.5; \t\t\t#mm of Hg\n", + "P_atm = 760.; \t\t\t#mm of Hg\n", + "\n", + "# Calculations\n", + "P_H2O = h_H2O/13.6; \t\t\t#mm of Hg\n", + "Pabs = rho*g*(P_Hg+P_atm-P_H2O)/10**8; \t\t\t#bar\n", + "\n", + "# Results\n", + "print \"absolute pressure = %.3f bar\"%(Pabs)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "absolute pressure = 1.141 bar\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.8 page no : 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "SG = 0.8;\n", + "rho_H2O = 1000.; \t\t\t#kg/m**3\n", + "g = 9.81; \t\t\t#ms**2\n", + "h = 0.17; \t\t\t#m\n", + "Patm = 1.01325; \t\t\t#bar\n", + "\n", + "# Calculations\n", + "rho = SG*rho_H2O; \t\t\t#kg/m**3\n", + "P_liq = rho*g*h/10**5; \t\t\t#bar\n", + "P_gas = Patm - P_liq;\n", + "\n", + "# Results\n", + "print \"gas pressure = %.3f bar\"%(P_gas),\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "gas pressure = 1.000 bar\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.9 page no : 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "d = 0.2; \t\t\t#m\n", + "g = 9.81; \t\t\t#m/s**2\n", + "h = 0.117; \t\t\t#m\n", + "rho = 13600.; \t\t\t#kg/m**3\n", + "\n", + "# Calculations\n", + "p = rho*g*h;\n", + "m = (p*math.pi/4*d**2)/g;\n", + "\n", + "# Results\n", + "print \"mass = %.3f kg\"%(m),\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mass = 49.989 kg\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.10 page no : 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "v = 800.; \t\t\t#m/s\n", + "g = 9.; \t\t\t#m/s**2\n", + "F = 3600.; \t\t\t#N\n", + "\n", + "# Calculations\n", + "m = F/g;\n", + "KE = 1./2*m*v**2./10**6;\n", + "\n", + "# Results\n", + "print \"Kinetic Energy = %.3f MJ\"%(KE),\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Kinetic Energy = 128.000 MJ\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.11 page no : 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "m = 6.; \t\t\t#kg\n", + "T1 = 25.; \t\t\t#0C\n", + "T2 = 125.; \t\t\t#0C\n", + "\n", + "print (\"(i) Heat transferred\")\n", + "\n", + "# Calculations and Results\n", + "def f18(T): \n", + "\t return m*(0.4+0.004*T)\n", + "\n", + "Q = quad(f18,T1,T2)[0]\n", + "\n", + "print \"heat tranferred = %.3f kJ\"%(Q)\n", + "\n", + "print (\"(ii) Mean specific heat of the gas\")\n", + "c_n = Q/m/(T2-T1);\n", + "print \"Mean specific heat = %.3f kJ/kg.0C\"%(c_n),\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Heat transferred\n", + "heat tranferred = 420.000 kJ\n", + "(ii) Mean specific heat of the gas\n", + "Mean specific heat = 0.700 kJ/kg.0C\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.12 page no : 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "from numpy import *\n", + "# Variables\n", + "Ice_point = 0.;\n", + "Steam_point = 100.;\n", + "\n", + "# Calculations\n", + "P = [[math.log(1.5),1],[math.log(7.5),1]];\n", + "Q = [0,100];\n", + "X = linalg.inv(P)*Q;\n", + "\n", + "a = X[0,1];\n", + "b = X[1,1];\n", + "p = 3.5;\n", + "t = a*math.log(p)+b;\n", + "\n", + "# Results\n", + "print (\"The value of temperature is given by %.3f\")%(t),(\"\u00b0C\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of temperature is given by 52.646 \u00b0C\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.13 page no : 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "def func(t): \n", + "\t return 0.20*t-5*10**(-4)*t**2\n", + "# Variables # Calculations\n", + "t1 = 0; \t\t\t#0C\n", + "e1 = func(t1);\n", + "t2 = 100; \t\t\t#0C\n", + "e2 = func(t2);\n", + "t3 = 70; \t\t\t#0C\n", + "e3 = func(t3);\n", + "t = e3*(t2-t1)/e2-e1;\n", + "\n", + "# Results\n", + "print \"thermocouple will read\",t,\"\u00b0C\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thermocouple will read 77.0 \u00b0C\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.15 page no : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "p = 101.325; \t\t#kPa\n", + "V2 = 0.6; \t\t\t#m**3\n", + "V1 = 0; \t\t\t#m**3\n", + "\n", + "# Calculations\n", + "W = p*(V2-V1);\n", + "\n", + "# Results\n", + "print (\"work done by atmosphere = \"),(-W),\"kJ\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "work done by atmosphere = -60.795 kJ\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.16 page no : 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from scipy import integrate\n", + "\n", + "# Variables\n", + "#p = 1.013*10**5; \t#N/m**2\n", + "p = lambda x: 1.013*10**5\n", + "V1 = 1.5; \t\t\t#m**3\n", + "V2 = 0; \t\t\t#m**3\n", + "\n", + "# Calculations\n", + "integ, err = integrate.quad(p,V1,V2)\n", + "\n", + "# Results\n", + "print (\"W = \"),(integ/10**3),\"kJ\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "W = -151.95 kJ\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.17 page no : 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "T = 1.25; \t\t\t#N.m\n", + "N = 9500.;\n", + "p = 101.3; \t\t\t#kPa\n", + "d = 0.65; \t\t\t#m\n", + "L = 0.6; \t\t\t#m\n", + "\n", + "# Calculations\n", + "W1 = 2*math.pi*N*T/1000; \t#kJ\n", + "A = math.pi/4*d**2; #m**2\n", + "W2 = p*A*L; \t\t#kJ\n", + "Wnet = (-W1)+W2;\n", + "\n", + "# Results\n", + "print \"The net work transfer for the system = %.3f\"%(Wnet),\"kJ\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The net work transfer for the system = -54.444 kJ\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.18 page no : 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "A = 45.*10**(-4); \t #m**2\n", + "P = 0.9*10**5; \t\t #N/m**2\n", + "Patm = 1.013*10**5; #N/m**2\n", + "L = 0.05; \t\t\t #m\n", + "\n", + "# Calculations\n", + "dV = 300.*10**(-6); \t\t\t#m**3\n", + "W = P*A*L-Patm*dV;\n", + "\n", + "# Results\n", + "print (\"net work done = \"),(W),\"J\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "net work done = -10.14 J\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.19 page no : 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "p1 = 1.5; \t\t\t#bar\n", + "p2 = 7.5; \t\t\t#bar\n", + "V1 = 3/p1;\n", + "V2 = 3/p2;\n", + "\n", + "# Calculations\n", + "def f19( V): \n", + "\t return 3./V*10**2\n", + "\n", + "W = quad(f19, V1, V2)[0]\n", + "\n", + "# Results\n", + "print \"Work done = %.3f\"%(W),\"kJ\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done = -482.831 kJ\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.20 page no : 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "\n", + "# Variables\n", + "W = 150; \t\t\t#kJ\n", + "V1 = 0.6; \t\t\t#m**3\n", + "\n", + "# Calculations and Results\n", + "V2 = (8-math.sqrt(64-4*2*2.58))/4; \t\t\t#m**3\n", + "print (\"Final volume = %.3f\")%V2,\"m**3\"\n", + "\n", + "p2 = 8-4*V2;\n", + "print \"Final pressure = %.2f\"%p2,\"bar\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final volume = 0.354 m**3\n", + "Final pressure = 6.58 bar\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.21 page no : 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "p1 = 3.*10**5; \t\t\t#Pa\n", + "v1 = 0.18; \t\t\t#m**3/kg\n", + "p2 = 0.6*10**5; \t\t\t#Pa\n", + "\n", + "# Calculations\n", + "C = p1*v1**2;\n", + "v2 = math.sqrt(C/p2);\n", + "\n", + "def f17( v): \n", + " return C/v**2\n", + "\n", + "W = quad(f17, v1,v2)[0]\n", + "\n", + "# Results\n", + "print (\"Work done = %d\")%(W),(\"Nm/kg\")\n", + "\n", + "# Note : output would be differ as rounding error is there. v2 has rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done = 29850 Nm/kg\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.22 page no : 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "m = 1.; \t\t\t#kg\n", + "p1 = 20.*10**5; \t#Pa\n", + "V1 = 0.05; \t\t\t#m**3\n", + "\n", + "# Calculations\n", + "V2 = 2*V1;\n", + "p2 = p1*(V1/V2)**2;\n", + "C = p1*V1**2;\n", + "V3 = V1;\n", + "\n", + "def f20( V): \n", + "\t return C/V**2\n", + "\n", + "W_12 = quad(f20, V1,V2)[0]\n", + "W_23 = p2*(V2-V3);\n", + "W_net = W_12-W_23;\n", + "\n", + "# Results\n", + "print (\"Net work done = \"),(W_net),(\"Nm\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Net work done = 25000.0 Nm\n" + ] + } + ], + "prompt_number": 26 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/ch3.ipynb b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/ch3.ipynb new file mode 100755 index 00000000..e1873694 --- /dev/null +++ b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/ch3.ipynb @@ -0,0 +1,1427 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ab490015435e8f1ac3990217bb57911661595e73c3c831b703cdf5b3388c40c5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Properties of Pure Substances" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.1 page no : 76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "m_s = 50. \t\t\t#kg\n", + "m_w = 1.5; \t\t\t#kg\n", + "\n", + "# Calculations\n", + "x = m_s/(m_s+m_w);\n", + "\n", + "# Results\n", + "print (\"dryness fraction = %.3f\")%(x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "dryness fraction = 0.971\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.2 page no : 76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 0.6; \t\t\t#m**3\n", + "m = 3.0; \t\t\t#kg\n", + "p = 5.; \t\t\t#bar\n", + "v = V/m;\n", + "\n", + "# At 5 bar: From steam tables\n", + "v_g = 0.375; \t\t\t#m**3/kg\n", + "v_f = 0.00109; \t\t\t#m**3/kg\n", + "\n", + "# Calculations\n", + "v_fg = v_g - v_f;\n", + "x = 1-((v_g - v)/v_fg);\n", + "\n", + "# Results\n", + "print (\"(i) Mass and volume of liquid\")\n", + "m_liq = m*(1-x);\n", + "print (\"mass of liquid = %.3f\")%(m_liq),(\"kg\")\n", + "V_liq = m_liq*v_f;\n", + "print (\"volume of liquid = %.3f\")%(V_liq),(\"m**3\")\n", + "\n", + "print (\"(ii) Mass and volume of vapour\")\n", + "m_vap = m*x;\n", + "print (\"mass of vapour = %.3f\")%(m_vap),(\"kg\")\n", + "V_vap = m_vap*v_g;\n", + "print (\"volume of vapour = %.3f\")%(V_vap),(\"m**3\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Mass and volume of liquid\n", + "mass of liquid = 1.404 kg\n", + "volume of liquid = 0.002 m**3\n", + "(ii) Mass and volume of vapour\n", + "mass of vapour = 1.596 kg\n", + "volume of vapour = 0.598 m**3\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.3 page no : 76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "V = 0.05; \t\t\t#m**3\n", + "m_f = 10.; \t\t\t#kg\n", + "# From steam tables corresponding to 245 0C\n", + "p_sat = 36.5; \t\t\t#bar\n", + "v_f = 0.001239; \t\t\t#m**3/kg\n", + "v_g = 0.0546; \t\t\t#m**3/kg\n", + "h_f = 1061.4; \t\t\t#kJ/kg\n", + "h_fg = 1740.2; \t\t\t#kJ/kg\n", + "s_f = 2.7474; \t\t\t#kJ/kg.K\n", + "s_fg = 3.3585; \t\t\t#kJ/kg.K\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) The pressure = \"),(p_sat),(\"bar\")\n", + "\n", + "print (\"(ii) The mass\")\n", + "V_f = m_f*v_f;\n", + "V_g = V - V_f;\n", + "m_g = V_g/v_g;\n", + "m = m_f+m_g;\n", + "print (\"The total mass of mixture = %.3f\")%(m),(\"kg\")\n", + "\n", + "print (\"(iii) The specific volume\")\n", + "v_fg = v_g-v_f;\n", + "x = m_g/(m_g+ m_f);\n", + "v = v_f+x*v_fg;\n", + "print (\"specific volume = %.3f\")%(v),(\"m**3/kg\")\n", + "\n", + "print (\"(iv)The specific enthalpy\")\n", + "h = h_f+x*h_fg;\n", + "print (\"specific enthalpy = %.3f\")%(h),(\"kJ/kg\")\n", + "\n", + "print (\"(v)The specific entropy\")\n", + "s = s_f+x*s_fg;\n", + "print (\"specific entropy = %.3f\")%(s),(\"kJ/kg.K\")\n", + "\n", + "print (\"(vi)The specific internal enegy\")\n", + "u = h-(p_sat*v*10**2); \t\t\t#kJ/kg\n", + "print (\"specific internal energy = %.3f\")%(u),(\"kJ/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The pressure = 36.5 bar\n", + "(ii) The mass\n", + "The total mass of mixture = 10.689 kg\n", + "(iii) The specific volume\n", + "specific volume = 0.005 m**3/kg\n", + "(iv)The specific enthalpy\n", + "specific enthalpy = 1173.545 kJ/kg\n", + "(v)The specific entropy\n", + "specific entropy = 2.964 kJ/kg.K\n", + "(vi)The specific internal enegy\n", + "specific internal energy = 1156.471 kJ/kg\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.4 page no : 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "m_w = 2.; \t\t\t#kg\n", + "t_w = 25.; \t\t\t#0C\n", + "p = 5.; \t\t\t#bar\n", + "x = 0.9;\n", + "c_pw = 4.18;\n", + "# at 5 bar; from steam tables\n", + "h_f = 640.1; \t\t\t#kJ/kg\n", + "h_fg = 2107.4; \t\t\t#kJ/kg\n", + "\n", + "# Calculations and Results\n", + "h = h_f+x*h_fg;\n", + "\n", + "Qw = c_pw*(t_w-0);\n", + "print (\"Sensible heat associated with 1kg of water, Qw = %.3f\")%(Qw),(\"kJ\")\n", + "\n", + "Q = h-Qw;\n", + "print (\"Net quantity of heat to be supplies per kg of water, Q = %.3f\")%(Q),(\"kJ\")\n", + "\n", + "Q_total = m_w*Q;\n", + "print (\"Total amount of heat supplied, Q_total = \"),(Q_total),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sensible heat associated with 1kg of water, Qw = 104.500 kJ\n", + "Net quantity of heat to be supplies per kg of water, Q = 2432.260 kJ\n", + "Total amount of heat supplied, Q_total = 4864.52 kJ\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.5 page no : 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "m = 4.4; \t\t\t#kg\n", + "p = 6.; \t\t\t#bar\n", + "t_sup = 250.; \t\t\t#0C\n", + "t_w = 30.; \t\t\t#0C\n", + "c_ps = 2.2; \t\t\t#kJ/kg\n", + "c_pw = 4.18;\n", + "# At 6 bar, 250 0C; From steam tables\n", + "t_s = 158.8; \t\t\t#0C\n", + "h_f = 670.4; \t\t\t#kJ/kg\n", + "h_fg = 2085; \t\t\t#kJ/kg\n", + "\n", + "# Calculations and Results\n", + "h_sup = h_f+h_fg+ c_ps*(t_sup-t_s);\n", + "\n", + "Qw = c_pw*(t_w-0);\n", + "print (\"Amount of heat added per kg of water, Qw = \"),(Qw)\n", + "\n", + "Q = h_sup-Qw;\n", + "print (\"Net amount of heat required to be supplied per kg, Q = \"),(Q)\n", + "\n", + "Q_total = m*Q;\n", + "print (\"Total amount of heat required, Q_total = \"),(Q_total),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amount of heat added per kg of water, Qw = 125.4\n", + "Net amount of heat required to be supplied per kg, Q = 2830.64\n", + "Total amount of heat required, Q_total = 12454.816 kJ\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.6 page no : 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "v = 0.15; \t\t\t#m**3\n", + "p = 4.; \t\t\t#bar\n", + "x = 0.8;\n", + "# At 4 bar: From steam tables\n", + "v_g = 0.462; \t\t\t#m**3/kg\n", + "h_f = 604.7; \t\t\t#kJ/kg\n", + "h_fg = 2133.; \t\t\t#kJ/kg\n", + "\n", + "# Calculations and Results\n", + "density = 1/x/v_g;\n", + "\n", + "m = v*density;\n", + "print (\"mass of 0.15 m**3 steam, m = %.3f\")%(m),(\"kg\")\n", + "\n", + "Q = density*(h_f+x*h_fg);\n", + "print (\"Total heat of 1 m3 of steam which has a mass of 2.7056 kg, Q = %.3f\")%(Q),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mass of 0.15 m**3 steam, m = 0.406 kg\n", + "Total heat of 1 m3 of steam which has a mass of 2.7056 kg, Q = 6252.976 kJ\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.7 page no : 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "m = 1000.; \t\t\t#kJ/kg.K\n", + "p = 16.; \t\t\t#bar\n", + "x = 0.9;\n", + "T_sup = 653.; \t\t\t#K\n", + "T_w = 30.; \t\t\t#0C\n", + "c_ps = 2.2; \t\t\t#kJ/kg\n", + "c_pw = 4.18;\n", + "# At 16 bar:From steam tables\n", + "T_s = 474.4; \t\t\t#K\n", + "h_f = 858.6; \t\t\t#kJ/kg\n", + "h_fg = 1933.2; \t\t\t#kJ/kg\n", + "\n", + "# Calculations and Results\n", + "H = m*((h_f+x*h_fg)-c_pw*(T_w-0));\n", + "print (\"(i) Heat supplied to feed water per hour to produce wet steam is given by\"),(H),(\"kJ\")\n", + "\n", + "Q = m*((1-x)*h_fg+c_ps*(T_sup-T_s));\n", + "print (\"(ii) Heat absorbed by superheater per hour, Q = \"),(Q),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Heat supplied to feed water per hour to produce wet steam is given by 2473080.0 kJ\n", + "(ii) Heat absorbed by superheater per hour, Q = 586240.0 kJ\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.8 page no : 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "print (\"(i) at 0.75 bar, between 100\u00b0C and 150\u00b0C\")\n", + "\n", + "# Variables\n", + "# At 100 \u00b0C\n", + "T1 = 100.; \t\t\t#\u00b0C\n", + "h_sup1 = 2679.4; \t\t\t#kJ/kg\n", + "# At 150 \u00b0C\n", + "T2 = 150.; \t\t\t#\u00b0C\n", + "h_sup2 = 2778.2; \t\t\t#kJ/kg\n", + "\n", + "# Calculations and Results\n", + "c_ps = (h_sup2-h_sup1)/(T2-T1);\n", + "print (\"mean specific heat = \"),(c_ps)\n", + "\n", + "print (\"(ii) at 0.5 bar, between 300\u00b0C and 400\u00b0C\")\n", + "T1 = 300; \t\t\t#\u00b0C\n", + "h_sup1 = 3075.5; \t#kJ/kg\n", + "T2 = 400; \t\t\t#\u00b0C\n", + "h_sup2 = 3278.9; \t#kJ/kg\n", + "\n", + "c_ps = (h_sup2-h_sup1)/(T2-T1);\n", + "print (\"mean specific heat c_ps = \"),(c_ps)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) at 0.75 bar, between 100\u00b0C and 150\u00b0C\n", + "mean specific heat = 1.976\n", + "(ii) at 0.5 bar, between 300\u00b0C and 400\u00b0C\n", + "mean specific heat c_ps = 2.034\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.9 page no : 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "m = 1.5; \t\t\t#kg\n", + "p = 5.; \t\t\t#bar\n", + "x1 = 1.;\n", + "x2 = 0.6;\n", + "p1 = 5.*10**5; \t\t\t#N/m\n", + "# At 5 bar: From steam tables\n", + "t_s = 151.8; \t\t\t#0C\n", + "h_f = 640.1; \t\t\t#kJ/kg\n", + "h_fg = 2107.4; \t\t\t#kJ/kg\n", + "v_g = 0.375; \t\t\t#m**3/kg\n", + "v_g1 = 0.375*10**(-3);\n", + "\n", + "# Calculations and Results\n", + "h1 = h_f+h_fg;\n", + "V = m*v_g;\n", + "u1 = h1-p1*v_g1;\n", + "v_g2 = V/m/x2; \t\t\t#m**3/kg\n", + "\n", + "# From steam table corresponding to 0.625 m**3/kg\n", + "p2 = 2.9; \t\t\t#bar\n", + "print (\"Pressure at new state = \"),(p2),(\"bar\")\n", + "\n", + "t_s = 132.4; \t\t\t#0C\n", + "print (\"Temperature at new state = \"),(t_s),(\"\u00b0C\")\n", + "h_f2 = 556.5; \t\t\t#kJ/kg\n", + "h_fg2 = 2166.6; \t\t\t#kJ/kg\n", + "u2 = (h_f2+x2*h_fg2)-p2*x2*v_g2*10**2;\n", + "\n", + "Q = u2-u1; \t\t\t#heat transferred at consmath.tant volume per kg\n", + "\n", + "Q_total = m*Q;\n", + "print (\"Total heat transfered,Q_total = \"),(Q_total),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure at new state = 2.9 bar\n", + "Temperature at new state = 132.4 \u00b0C\n", + "Total heat transfered,Q_total = -1218.435 kJ\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.10 page no : 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "V = 0.9; \t\t\t#m**3\n", + "p1 = 8.; \t\t\t#bar\n", + "x1 = 0.9;\n", + "p2 = 4.; \t\t\t#bar\n", + "p3 = 3.; \t\t\t#bar\n", + "v_g1 = 0.24; \t\t#m**3/kg\n", + "\n", + "print (\"(i) The mass of steam blown off :\")\n", + "m1 = V/x1/v_g1;\n", + "h_f1 = 720.9; \t\t\t#kJ/kg\n", + "h_fg1 = 2046.5; \t\t#kJ/kg\n", + "h_f2 = 604.7; \t\t\t#kJ/kg\n", + "h_fg2 = 2133; \t\t\t#kJ/kg\n", + "v_g2 = 0.462; \t\t\t#m**3/kg\n", + "\n", + "# Calculations and Results\n", + "h1 = h_f1+x1*h_fg1; \t\t\t#The enthalpy of steam before blowing off\n", + "h2 = h1;\n", + "x2 = (h1-h_f2)/h_fg2;\n", + "m2 = x1/(x2*v_g2);\n", + "\n", + "m = m1-m2;\n", + "print (\"Mass of steam blown off = %.3f\")%(m),(\"kg\")\n", + "\n", + "print (\"(ii) Dryness fraction of steam in the vessel after cooling\")\n", + "v_g3 = 0.606; \t\t\t#m**3/kg\n", + "x3 = x2*v_g2/v_g3;\n", + "print (\"dryness fraction = %.4f\")%(x3)\n", + "x3 = 0.699\n", + "\n", + "print (\"(iii) Heat lost during cooling\")\n", + "h_f3 = 561.4; \t\t\t #kJ/kg\n", + "h_fg3 = 2163.2; \t\t\t#kJ/kg\n", + "h3 = h_f3+x3*h_fg3;\n", + "u2 = h2-p2*x2*v_g2*10**2; \t\t\t#kJ/kg\n", + "u3 = h3-p3*x3*v_g3*10**2; \t\t\t#kJ/kg\n", + "Q = m*(u3-u2);\n", + "print (\"Heat lost during cooling = %.3f\")%(-Q),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The mass of steam blown off :\n", + "Mass of steam blown off = 2.045 kg\n", + "(ii) Dryness fraction of steam in the vessel after cooling\n", + "dryness fraction = 0.6998\n", + "(iii) Heat lost during cooling\n", + "Heat lost during cooling = 913.322 kJ\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.11 page no : 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "p = 8*10**5; \t\t\t#Pa\n", + "x = 0.8; \n", + "v_g = 0.240; \t\t\t#m**3/kg\n", + "h_fg = 2046.5; \t\t\t#kJ/kg\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) External work done during evaporation\")\n", + "W = p*x*v_g/10**3; \t\t\t#kJ\n", + "print (\"W = \"),(W),(\"kJ\")\n", + "\n", + "print (\"(ii) Internal latent heat\")\n", + "Q = x*h_fg-W;\n", + "print (\"Q = \"),(Q),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) External work done during evaporation\n", + "W = 153.6 kJ\n", + "(ii) Internal latent heat\n", + "Q = 1483.6 kJ\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.12 page no : 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "p1 = 10; \t\t\t#bar\n", + "import math \n", + "p2 = 10; \t\t\t#bar\n", + "x1 = 0.85;\n", + "V1 = 0.15; \t\t\t#m**3\n", + "t_sup2 = 300; \t\t\t#0C\n", + "t_sup1 = 179.9; \t\t\t#0C\n", + "c_ps = 2.2; \t\t\t#kJ/kg.K\n", + "v_g1 = 0.194; \t\t\t#m**3/kg\n", + "m = V1/(x1*v_g1);\n", + "h_fg1 = 2013.6; \t\t\t#kJ/kg\n", + "Q = (1-x1)*h_fg1+c_ps*(t_sup2-t_sup1);\n", + "Q_total = m*Q;\n", + "\n", + "print (\"Total heat supplied = %.3f\")%(Q_total),(\"kJ\")\n", + "\n", + "v_sup2 = v_g1*(t_sup2+273)/(t_sup1+273)\n", + "W = p1*(v_sup2 - (x1*v_g1))*10**2;\n", + "Percentage = W/Q*100;\n", + "\n", + "print (\"Percentage of total heat supplied = %.3f\")%(Percentage),(\"%\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total heat supplied = 515.094 kJ\n", + "Percentage of total heat supplied = 14.224 %\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.13 page no : 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "p = 18.; \t\t\t#bar\n", + "x = 0.85;\n", + "h_f = 884.6; \t\t\t#kJ/kg\n", + "h_fg = 1910.3; \t\t\t#kJ/kg\n", + "v_g = 0.110; \t\t\t#m**3/kg\n", + "u_f = 883.; \t\t\t#kJ/kg\n", + "u_g = 2598.; \t\t\t#kJ/kg\n", + "\n", + "# Calculations and Results\n", + "v = x*v_g;\n", + "print (\"Specific volume of wet steam = \"),(v),(\"m**3/kg\")\n", + "\n", + "h = h_f+x*h_fg;\n", + "print (\"Specific enthalpy of wet steam = \"),(h),(\"kJ/kg\")\n", + "u = (1-x)*u_f+ x*u_g;\n", + "print (\"Specific internal energy of wet steam = \"),(u),(\"kJ/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific volume of wet steam = 0.0935 m**3/kg\n", + "Specific enthalpy of wet steam = 2508.355 kJ/kg\n", + "Specific internal energy of wet steam = 2340.75 kJ/kg\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.14 page no : 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "p = 7.; \t\t\t#bar\n", + "h = 2550.; \t\t\t#kJ/kg\n", + "h_f = 697.1; \t\t\t#kJ/kg\n", + "h_fg = 2064.9; \t\t\t#kJ/kg\n", + "v_g = 0.273; \t\t\t#m**3/kg\n", + "u_f = 696.; \t\t\t#kJ/kg\n", + "u_g = 2573.; \t\t\t#kJ/kg\n", + "\n", + "# Calculations and Results\n", + "x = (h-h_f)/h_fg;\n", + "print (\"(i) Dryness fraction = %.3f\")%(x)\n", + "\n", + "v = x*v_g;\n", + "print (\"(ii) Specific volume of wet steam = %.3f\")%(v),(\"m**3/kg\")\n", + "\n", + "u = (1-x)*u_f+ x*u_g;\n", + "print (\"(iii) Specific internal energy of wet steam = %.3f\")%(u),(\"kJ/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Dryness fraction = 0.897\n", + "(ii) Specific volume of wet steam = 0.245 m**3/kg\n", + "(iii) Specific internal energy of wet steam = 2380.291 kJ/kg\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.15 page no : 84" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "p = 120.; \t\t\t#bar\n", + "v = 0.01721; \t\t\t#m**3/kg\n", + "\n", + "T = 350.; \t\t\t#\u00b0C\n", + "print (\"Temperature = \"), (T),(\"\u00b0C\")\n", + "\n", + "h = 2847.7; \t\t\t#kJ/kg\n", + "print (\"specific enthalpy = \"), (h),(\"kJ/kg\")\n", + "\n", + "u = h-p*v*10**2; \t\t\t#kJ/kg\n", + "print (\"Internal energy = \"), (u),(\"kJ/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature = 350.0 \u00b0C\n", + "specific enthalpy = 2847.7 kJ/kg\n", + "Internal energy = 2641.18 kJ/kg\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.16 page no : 84" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "p = 140.; \t\t\t#bar\n", + "h = 3001.9; \t\t\t#kJ/kg\n", + "T = 400; \t\t\t#0C\n", + "\n", + "# Calculations and Results\n", + "print (\"Temperature = \"),(T), (\"\u00b0C\")\n", + "\n", + "v = 0.01722; \t\t\t#m**3/kg\n", + "print (\"The specific volume %.3f\")%(v), (\"m**3/kg\")\n", + "\n", + "u = h-p*v*10**2;\n", + "print (\"specific internal energy = \"),(u),(\"kJ/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature = 400 \u00b0C\n", + "The specific volume 0.017 m**3/kg\n", + "specific internal energy = 2760.82 kJ/kg\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.17 page no : 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# At 10 bar: From steam table for superheated steam\n", + "\n", + "# Variables\n", + "h_sup = 3051.2; \t\t\t#kJ/kg\n", + "T_sup = 573; \t\t\t#K\n", + "T_s = 452.9; \t\t\t#K\n", + "v_g = 0.194; \t\t\t#m**3/kg\n", + "v_sup = v_g*T_sup/T_s;\n", + "p = 10.; \t\t\t#bar\n", + "\n", + "# Calculations and Results\n", + "u1 = h_sup-p*v_sup*10**2; \t\t\t#kJ/kg\n", + "print (\"Internal energy of superheated steam at 10 bar = %.3f\")%(u1), (\"kJ/kg\")\n", + "\n", + "# At 1.4 bar: From steam tables\n", + "p = 1.4; \t\t\t#bar\n", + "h_f = 458.4; \t\t\t#kJ/kg\n", + "h_fg = 2231.9; \t\t\t#kJ/kg\n", + "v_g = 1.236; \t\t\t#m**3/kg\n", + "x = 0.8;\n", + "h = h_f+x*h_fg;\n", + "u2 = h-p*x*v_g*10**2; \t\t\t#kJ\n", + "du = u2-u1;\n", + "print (\"Change in internal energy = %.3f\")%(du),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Internal energy of superheated steam at 10 bar = 2805.755 kJ/kg\n", + "Change in internal energy = -700.267 kJ\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.18 page no : 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "m = 1.; \t\t\t#kg\n", + "p = 20.; \t\t\t#bar\n", + "T_sup = 400.; \t\t\t#0C\n", + "x = 0.9;\n", + "c_ps = 2.3; \t\t\t#kJ/kg.K\n", + "\n", + "print (\"(i) Internal energy of 1 kg of superheated steam\")\n", + "# At 20 bar: From steam tables\n", + "T_s = 212.4; \t\t\t#0C\n", + "h_f = 908.6; \t\t\t#kJ/kg\n", + "h_fg = 1888.6; \t\t\t#kJ/kg\n", + "v_g = 0.0995; \t\t\t#m**3/kg\n", + "\n", + "# Calculations and Results\n", + "h_sup = h_f+h_fg+c_ps*(T_sup-T_s);\n", + "v_sup = v_g*(T_sup+273)/(T_s+273);\n", + "u = h_sup-p*v_sup*10**2;\n", + "print (\"Internal energy = %.3f\")%(u),(\"kJ/kg\")\n", + "\n", + "print (\"(ii) Internal energy of 1 kg of wet steam\")\n", + "h = h_f+x*h_fg;\n", + "u = h-p*x*v_g*10**2;\n", + "print (\"Internal energy = %.3f\")%(u),(\"kJ/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Internal energy of 1 kg of superheated steam\n", + "Internal energy = 2952.769 kJ/kg\n", + "(ii) Internal energy of 1 kg of wet steam\n", + "Internal energy = 2429.240 kJ/kg\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.19 page no : 86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "h_g1 = 2797.2; \t\t\t#kJ/kg\n", + "c_ps = 2.25;\n", + "T_sup = 350.; \t\t\t#0C\n", + "T_s = 212.4; \t\t\t#0C\n", + "\n", + "# Calculations\n", + "h1 = h_g1+c_ps*(T_sup-T_s);\n", + "h_f2 = 908.6; \t\t\t#kJ/kg\n", + "h_fg2 = 1888.6; \t\t\t#kJ/kg\n", + "\n", + "# Main:20 bar, 250 0C\n", + "T_sup = 250.; \t\t\t#0C\n", + "Q = 2*(h_g1+c_ps*(T_sup-T_s));\n", + "x2 = (Q-h1-h_f2)/h_fg2;\n", + "\n", + "# Results\n", + "print (\"Quality of steam %.3f\")%(x2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quality of steam 0.926\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.20 page no : 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "# Variables\n", + "m = 1.; \t\t\t#kg\n", + "p = 6.; \t\t\t#bar\n", + "x = 0.8;\n", + "T_s = 473.; \t\t\t#K\n", + "h_fg = 2085.; \t\t\t#kJ/kg\n", + "c_pw = 4.18;\n", + "\n", + "# Calculations\n", + "s_wet = c_pw*math.log(T_s/273)+x*h_fg/T_s;\n", + "\n", + "# Results\n", + "print (\"Entropy of wet steam = %.3f\")%(s_wet),(\"kJ/kg.K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Entropy of wet steam = 5.824 kJ/kg.K\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.21 page no : 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "p1 = 10.; \t\t\t#bar\n", + "t_sup = 400.; \t\t#0C\n", + "p2 = 0.2; \t\t\t#bar\n", + "x2 = 0.9;\n", + "h_sup = 3263.9; \t\t\t#kJ/kg\n", + "s_sup = 7.465; \t\t\t#kJ/kg\n", + "h1 = 3263.9; \t\t\t#kJ/kg\n", + "s1 = s_sup;\n", + "h_f2 = 251.5; \t\t\t#kJ/kg\n", + "h_fg2 = 2358.4; \t\t#kJ/kg\n", + "s_f2 = 0.8321; \t\t\t#kJ/kg.K\n", + "s_g2 = 7.9094; \t\t\t#kJ/kg.K\n", + "\n", + "# Calculations and Results\n", + "s_fg2 = s_g2-s_f2;\n", + "h2 = h_f2+x2*h_fg2;\n", + "s2 = s_f2+x2*s_fg2;\n", + "\n", + "print (\"(i) Drop in enthalpy\")\n", + "dh = h1-h2;\n", + "print (\"Drop in enthalpy = %.3f\")%(dh),(\"kJ/kg\")\n", + "\n", + "print (\"(ii) Change in entropy\")\n", + "ds = s1-s2;\n", + "print (\"Change in entropy = %.3f\")%(ds),(\"kJ/kg.K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Drop in enthalpy\n", + "Drop in enthalpy = 889.840 kJ/kg\n", + "(ii) Change in entropy\n", + "Change in entropy = 0.263 kJ/kg.K\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.22 page no : 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "m = 1.; \t\t \t #kg\n", + "p = 12.; \t\t \t#bar\n", + "T_sup = 523.; \t\t\t#K\n", + "c_ps = 2.1; \t\t\t#kJ/kg.K\n", + "T_s = 461.; \t\t\t#K\n", + "h_fg = 1984.3; \t\t\t#kJ/kg\n", + "c_pw = 4.18;\n", + "\n", + "# Calculations\n", + "s_sup = c_pw*math.log(T_s/273)+h_fg/T_s+c_ps*math.log(T_sup/T_s);\n", + "\n", + "# Results\n", + "print (\"Entropy = %.3f\")%(s_sup),(\"kJ/kg.K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Entropy = 6.759 kJ/kg.K\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.23 page no : 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "m = 3.; \t\t\t#kg\n", + "v1 = 0.75; \t\t\t#m**3/kg\n", + "v2 = 1.2363; \t\t\t#m**3/kg\n", + "x = v1/v2;\n", + "h_f = 458.4; \t\t\t#kJ/kg\n", + "h_fg = 2231.9; \t\t\t#kJ/kg\n", + "h_s = m*(h_f+x*h_fg); \t\t\t#kJ\n", + "v_sup = 1.55; \t\t\t#m**3/kg\n", + "p = 2; \t\t\t#bar\n", + "t_s = 120.2; \t\t\t#0C\n", + "t_sup = 400; \t\t\t#0C\n", + "h = 3276.6; \t\t\t#kJ/kg\n", + "U = 1708.; \t\t\t#kJ/kg\n", + "\n", + "# Calculations and Results\n", + "Degree = t_sup-t_s;\n", + "h_sup = m*h;\n", + "\n", + "Q_added = h_sup - h_s;\n", + "print (\"Heat added = %.3f\")%(Q_added),(\"kJ\")\n", + "\n", + "U_s = m*U;\n", + "U_sup = m*(h-p*v_sup*10**2);\n", + "dU = U_sup - U_s;\n", + "W = Q_added - dU;\n", + "print (\"work done = %.3f\")%(W),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat added = 4392.661 kJ\n", + "work done = 616.861 kJ\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.24 page no : 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "p = 5.; \t\t\t#bar\n", + "m = 50.; \t\t\t#kg\n", + "T1 = 20.; \t\t\t#0C\n", + "m_s = 3.; \t\t\t#kg\n", + "T2 = 40.; \t\t\t#0C\n", + "m_eq = 1.5; \t\t\t#kg\n", + "h_f = 640.1; \t\t\t#kJ/kg\n", + "h_fg = 2107.4; \t\t\t#kJ/kg\n", + "c_pw = 4.18;\n", + "\n", + "# Calculations\n", + "m_w = m+m_eq;\n", + "x = ((m_w*c_pw*(T2-T1))/m_s + c_pw*T2 - h_f)/h_fg;\n", + "\n", + "# Results\n", + "print (\"Dryness fraction of steam %.3f\")%(x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dryness fraction of steam 0.457\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.25 page no : 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "p = 1.1; \t\t\t#bar\n", + "x = 0.95;\n", + "c_pw = 4.18;\n", + "m1 = 90.; \t\t\t#kg\n", + "m2 = 5.25; \t\t\t#kg\n", + "T1 = 25.; \t\t\t#0C\n", + "T2 = 40.; \t\t\t#0C\n", + "\n", + "# Calculations\n", + "m = m1+m2;\n", + "h_f = 428.8; \t\t\t#kJ/kg\n", + "h_fg = 2250.8; \t\t\t#kJ/kg\n", + "m_s = (m*c_pw*(T2-T1))/((h_f + x*h_fg) - c_pw*T2)\n", + "\n", + "# Results\n", + "print (\"Mass of steam condensed = %.3f\")%(m_s),(\"kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass of steam condensed = 2.489 kg\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.26 page no : 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "p1 = 8.; \t\t\t#bar\n", + "p2 = 1.; \t\t\t#bar\n", + "T_sup2 = 115.; \t\t#0C\n", + "T_s2 = 99.6; \t\t#0C\n", + "h_f1 = 720.9; \t\t#kJ/kg\n", + "h_fg1 = 2046.5; \t#kJ/kg\n", + "h_f2 = 417.5; \t\t#kJ/kg\n", + "h_fg2 = 2257.9; \t#kJ/kg\n", + "c_ps = 2.1;\n", + "\n", + "# Calculations\n", + "x1 = (h_f2+h_fg2+c_ps*(T_sup2-T_s2)-h_f1)/h_fg1;\n", + "\n", + "# Results\n", + "print (\"Dryness fraction of the steam in the main = %.3f\")%(x1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dryness fraction of the steam in the main = 0.971\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.27 page no : 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "m_w = 2.; \t\t\t#kg\n", + "m_s = 20.5; \t\t#kg\n", + "t_sup = 110.; \t\t#0C\n", + "p1 = 12.; \t\t\t#bar\n", + "p3 = 1.; \t\t\t#bar\n", + "p2 = p1;\n", + "h_f2 = 798.4; \t\t#kJ/kg\n", + "h_fg2 = 1984.3; \t#kJ/kg\n", + "T_s = 99.6; \t\t#0C\n", + "h_f3 = 417.5; \t\t#kJ/kg\n", + "h_fg3 = 2257.9; \t#kJ/kg\n", + "T_sup = 110.; \t\t#0C\n", + "c_ps = 2.; \t\t\t#kJ/kg.K\n", + "\n", + "# Calculations\n", + "x2 = (h_f3+h_fg3 + c_ps*(T_sup-T_s) - h_f2)/h_fg2;\n", + "x1 = x2*m_s/(m_w+m_s);\n", + "\n", + "# Results\n", + "print (\"Quality of steam supplied = %.3f\")%(x1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quality of steam supplied = 0.871\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.28 page no : 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "p1 = 15.; \t\t\t#bar\n", + "p2 = p1;\n", + "p3 = 1.; \t\t\t#bar\n", + "t_sup3 = 150.; \t\t#0C\n", + "m_w = 0.5; \t\t\t#kg/min\n", + "m_s = 10.; \t\t\t#kg/min\n", + "h_f2 = 844.7; \t\t#kJ/kg\n", + "h_fg2 = 1945.2; \t#kJ/kg\n", + "h_sup3 = 2776.4; \t#kJ/kg\n", + "\n", + "# Calculations\n", + "x2 = (h_sup3 - h_f2)/h_fg2;\n", + "x1 = x2*m_s/(m_s + m_w);\n", + "\n", + "\n", + "# Results\n", + "print (\"Quality of steam supplied = %.3f\")%(x1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quality of steam supplied = 0.946\n" + ] + } + ], + "prompt_number": 30 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/ch4.ipynb b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/ch4.ipynb new file mode 100755 index 00000000..3982cfe4 --- /dev/null +++ b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/ch4.ipynb @@ -0,0 +1,3335 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:75cc662b83a20e10c962bb4b327ffefb7e8b88ef4b321db4fa8f1bf933a9eccf" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : First Law of Thermodynamics" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.1 page no : 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#\n", + "# Variables\n", + "Q = -50.; \t\t\t#kJ/kg\n", + "W = -100.; \t\t\t#kJ/kg\n", + "\n", + "# Calculations\n", + "dU = Q-W;\n", + "\n", + "# Results\n", + "print (\"gain in internal energy = \"),(dU),(\"kJ/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "gain in internal energy = 50.0 kJ/kg\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.2 page no : 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "u1 = 450.; \t\t\t#kJ/kg\n", + "u2 = 220; \t\t\t#kJ/kg\n", + "W = 120; \t\t\t#kJ/kg\n", + "\n", + "# Calculations\n", + "Q = (u2-u1) + W;\n", + "\n", + "# Results\n", + "print (\"Heat rejected by air = \"),(-Q),(\"kJ/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat rejected by air = 110.0 kJ/kg\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.3 page no : 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "m = 0.3; \t\t\t#kg\n", + "cv = 0.75; \t\t\t#kJ/kg.K\n", + "T1 = 313.; \t\t\t#K\n", + "T2 = 433.; \t\t\t#K\n", + "W = -30.; \t\t\t#kJ\n", + "\n", + "# Calculations\n", + "dU = m*cv*(T2-T1);\n", + "Q = dU + W;\n", + "\n", + "# Results\n", + "print (\"Heat rejected during the process = \"),(-Q),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat rejected during the process = 3.0 kJ\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.4 page no : 120" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "p1 = 105.; \t\t\t#kPa\n", + "V1 = 0.4; \t\t\t#m**3\n", + "p2 = p1;\n", + "V2 = 0.20; \t\t\t#m**3\n", + "Q = -42.5; \t\t\t#kJ\n", + "\n", + "# Calculations\n", + "W = p1*(V2-V1);\n", + "dU = Q-W;\n", + "\n", + "# Results\n", + "print (\"change in internal energy = \"),(dU),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "change in internal energy = -21.5 kJ\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.6 Page no :121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Variables\n", + "p1 = 10.**5 # Pa\n", + "T1 = 25 + 273 # K\n", + "p2 = 5 * 10**5 # Pa\n", + "T2 = T1 \n", + "\n", + "# Calculations and Result\n", + "print \"(i) For isothermal process :\"\n", + "W12 = -p1 * (1.8)* math.log(p1/p2)\n", + "print \"Work done on the air = %.3e kJ/kg.\"%W12\n", + "\n", + "print \"(ii) Since temperature is constant,\"\n", + "print \"u2 \u2013 u1 = 0\"\n", + "print \"Change in internal energy = zero.\"\n", + "\n", + "print \"(iii) Again,\"\n", + "Q12 = 0 + W12\n", + "print \"Heat rejected = %.3e kJ/kg.\"%Q12\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) For isothermal process :\n", + "Work done on the air = 2.897e+05 kJ/kg.\n", + "(ii) Since temperature is constant,\n", + "u2 \u2013 u1 = 0\n", + "Change in internal energy = zero.\n", + "(iii) Again,\n", + "Heat rejected = 2.897e+05 kJ/kg.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.7 page no : 122" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "\n", + "# Variables\n", + "W_12 = -82.; \t\t\t#kJ\n", + "Q_12 = -45.; \t\t\t#kJ\n", + "dU_12 = Q_12 - W_12;\n", + "W_21 = 100.; \t\t\t#kJ\n", + "dU_21 = -dU_12;\n", + "\n", + "# Calculations\n", + "Q_21 = dU_21 + W_21;\n", + "\n", + "# Results\n", + "print (\"Heat added to the system = \"),(Q_21),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat added to the system = 63.0 kJ\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.8 page no : 123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Q2 = 9000.; \t\t\t#kJ\n", + "Q1 = 3000.; \t\t\t#kJ\n", + "Q = Q1-Q2; \n", + "W = 0;\n", + "\n", + "# Calculations\n", + "dU = W-Q;\n", + "\n", + "# Results\n", + "print (\"Work done = \"),(W)\n", + "\n", + "print (\"Change in internal energy = \"),(dU),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done = 0\n", + "Change in internal energy = 6000.0 kJ\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.9 page no : 124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "m = 20.; \t\t\t#kg\n", + "g = 9.81; \t\t\t#m/s**2\n", + "z2 = 0.;\n", + "z1 = 15.;\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) When the stone is about to enter the water\")\n", + "Q = 0\n", + "W = 0\n", + "dU = 0\n", + "PE = m*g*(z2-z1)\n", + "KE = -PE\n", + "print \"\u2206 PE = %.3f\"%KE,\"J\"\n", + "\n", + "print (\"(ii) When the stone dips into the math.tank and comes to rest\")\n", + "Q = 0\n", + "W = 0\n", + "KE = 0\n", + "PE = m*g*(z2-z1)\n", + "dU = -PE\n", + "print \"\u2206U = %.3f\"%dU\n", + "\n", + "print (\"(iii) When the water and stone come to their initial temperature\")\n", + "W = 0\n", + "KE = 0\n", + "Q = -dU\n", + "print \"Q = %.3f\"%Q\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) When the stone is about to enter the water\n", + "\u2206 PE = 2943.000 J\n", + "(ii) When the stone dips into the math.tank and comes to rest\n", + "\u2206U = 2943.000\n", + "(iii) When the water and stone come to their initial temperature\n", + "Q = -2943.000\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.10 page no : 125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "Q_lqm = 168.; \t\t\t#kJ\n", + "W_lqm = 64.; \t\t\t#kJ\n", + "dU_lm = Q_lqm - W_lqm;\n", + "W_lnm = 21.; \t\t\t#kJ\n", + "W_ml = -42.; \t\t\t#kJ\n", + "\n", + "# Calculations and Results\n", + "Q_lnm = dU_lm + W_lnm;\n", + "print (\"(i)Q_lnm = \"),(Q_lnm), (\"kJ\")\n", + "\n", + "Q_ml = W_ml - dU_lm;\n", + "print (\"(ii)Q_ml = \"),(Q_ml),(\"kJ\")\n", + "\n", + "W_ln = 21.; \t\t\t#kJ\n", + "dU_ln = 84.; \t\t\t#kJ\n", + "Q_ln = dU_ln + W_ln;\n", + "Q_nm = Q_lnm-Q_ln;\n", + "print (\"(iii)Q_nm = \"), (Q_nm), (\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)Q_lnm = 125.0 kJ\n", + "(ii)Q_ml = -146.0 kJ\n", + "(iii)Q_nm = 20.0 kJ\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.11 page no : 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "T1 = 55.; \t\t\t#0C\n", + "T2 = 95.; \t\t\t#0C\n", + "\n", + "# Calculations\n", + "def f1( T): \n", + "\t return 200\n", + "W = quad(f1, T1, T2)[0]\n", + "\n", + "\n", + "def f2( T): \n", + "\t return 160\n", + "Q = quad(f2, T1, T2)[0]\n", + "dU = Q-W;\n", + "\n", + "# Results\n", + "print (\"change in internal energy = \"),(dU/10**3),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "change in internal energy = -1.6 kJ\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.12 page no : 127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "Q = -340.; \t\t\t#kJ\n", + "n = 200.; \t\t\t#cycles/min\n", + "\n", + "#For Process 1-2\n", + "W_12 = 4340.; \t\t\t#kJ/min\n", + "Q_12 = 0.;\n", + "\n", + "# Calculations and Results\n", + "dE_12 = Q_12-W_12;\n", + "print (\"dE_12 = \"),(dE_12),(\"kJ/min\")\n", + "\n", + "#For process 2-3\n", + "Q_23 = 42000.; \t\t\t#kJ/min\n", + "W_23 = 0;\n", + "\n", + "dE_23 = Q_23-W_23;\n", + "print (\"dE_23 = \"),(dE_23),(\"kJ/min\")\n", + "\n", + "#For process 3-4\n", + "Q_34 = -4200.; \t\t\t#kJ/min\n", + "dE_34 = -73200.; \t\t\t#kJ/min\n", + "\n", + "W_34 = Q_34-dE_34;\n", + "print (\"W_34 = \"), (W_34), (\"kJ/min\")\n", + "\n", + "#For process 4-1\n", + "Q_41 = Q*n-Q_12-Q_23-Q_34;\n", + "print (\"Q_41 = \"), (Q_41), (\"kJ/min\")\n", + "\n", + "dE_41 = 0-dE_12-dE_23-dE_34;\n", + "print (\"dE_41 = \"), (dE_41), (\"kJ/min\")\n", + "\n", + "W_41 = Q_41-dE_41;\n", + "print (\"W_41 = \"), (W_41), (\"kJ/min\")\n", + "\n", + "print \"Since sum(Q) = sum(W), \"\n", + "print \"Rate of work output = -68000 KJ/min\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "dE_12 = -4340.0 kJ/min\n", + "dE_23 = 42000.0 kJ/min\n", + "W_34 = 69000.0 kJ/min\n", + "Q_41 = -105800.0 kJ/min\n", + "dE_41 = 35540.0 kJ/min\n", + "W_41 = -141340.0 kJ/min\n", + "Since sum(Q) = sum(W), \n", + "Rate of work output = -68000 KJ/min\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.13 page no : 128" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P = 1200.; \t\t\t#kW\n", + "Qin = 3360.; \t\t\t#kJ/kg\n", + "Qout = 2520.; \t\t\t#kJ/kg\n", + "F = 6.; \t\t\t#kW\n", + "\n", + "# Calculations\n", + "dQ = Qin - Qout;\n", + "dW = P-F; \t\t\t#kJ/s\n", + "m = dW/dQ;\n", + "\n", + "# Results\n", + "print (\"Steam flow round the cycle %.3f\")%(m), (\"kg/s\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Steam flow round the cycle 1.421 kg/s\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.14 page no : 129" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "dT = 25.; \t\t\t#0C\n", + "Q = 30.; \t\t\t#kJ\n", + "cv = 1.2; \t\t\t#kJ/kg.0C\n", + "m = 2.5; \t\t\t#kg\n", + "\n", + "# Calculations\n", + "dU = m*cv*dT;\n", + "\n", + "# Results\n", + "print (\"change in internal energy = \"),(dU), (\"kJ\")\n", + "\n", + "W = Q - dU;\n", + "print (\"Work done = \"),(W),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "change in internal energy = 75.0 kJ\n", + "Work done = -45.0 kJ\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.15 page no : 129" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Q = 50.; \t\t\t#kJ\n", + "dV = 0.14; \t\t\t#m**3\n", + "p = 1.2*10**5; \t\t#N/m**2\n", + "m = 90.; \t\t\t#kg\n", + "d = 5.5; \t\t\t#m\n", + "g = 9.8; \t\t\t#m/s**2\n", + "W_adb = -110.; \t#kJ\n", + "Wnet = m*g*d/1000; \t#kJ\n", + "\n", + "# Calculations and Results\n", + "W = p*dV/1000 + Wnet; \t\t\t#kJ\n", + "dE = Q-W;\n", + "print (\"(i)Change in internal energy %.3f kJ\")%(dE)\n", + "\n", + "Q = 0;\n", + "dE = -W_adb;\n", + "print (\"(ii) Adiabatic process %.3f kJ\")%(dE)\n", + "\n", + "\n", + "Q = 50.; \t\t\t#kJ\n", + "dE = Q - (W_adb+W);\n", + "print (\"(iii)Change in internal energy %.3f kJ\")%(dE)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)Change in internal energy 28.349 kJ\n", + "(ii) Adiabatic process 110.000 kJ\n", + "(iii)Change in internal energy 138.349 kJ\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.16 page no : 130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "V1 = 0.15; \t\t\t#m**3\n", + "V2 = 0.05; \t\t\t#m**3\n", + "Q = -45.; \t\t\t#kJ\n", + "p1 = (5./V1+1.5)*10**5; \t\t\t#N/m**2\n", + "p2 = (5./V2+1.5)*10**5; \t\t\t#N/m**2\n", + "\n", + "# Calculations\n", + "def f0( V): \n", + "\t return (5/V+1.5)*10**2\n", + "\n", + "W = quad(f0, V1, V2)[0]\n", + "\n", + "dU = Q-W;\n", + "print (\"(i)Change in internal energy = %.3f kJ\")%(dU)\n", + "\n", + "dH = (dU*10**3+(p2*V2-p1*V1))/10**3;\n", + "print (\"(ii) Change in enthalpy = %.3f kJ\")%(dH)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)Change in internal energy = 519.306 kJ\n", + "(ii) Change in enthalpy = 504.306 kJ\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.17 page no : 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "V1 = 0.25; \t\t\t#m**3\n", + "p1 = 500.; \t\t\t#kPa\n", + "p2 = 100.; \t\t\t#kPa\n", + "\n", + "# Calculations and Results\n", + "V2 = V1*(p1/p2)**(1/1.25)\n", + "n = 1.25\n", + "dU = 3.64*(p2*V2 - p1*V1)\n", + "\n", + "print (\"(i) If the expansion is quasi-static\")\n", + "W = (p1*V1-p2*V2)/(n-1);\n", + "Q = dU+W\n", + "print (\"Heat transfered = %.3f\")%(Q),(\"kJ\")\n", + "\n", + "print (\"(ii) In another process\")\n", + "Q = 32; \t\t\t#kJ\n", + "W = Q-dU;\n", + "print (\"Work done = %.3f\")%(W),(\"kJ\")\n", + "\n", + "print (\"(iii)The difference\")\n", + "print (\" The work in (ii) is not equal to \u222b p dV math.since the process is not quasi-static.\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) If the expansion is quasi-static\n", + "Heat transfered = 12.385 kJ\n", + "(ii) In another process\n", + "Work done = 157.225 kJ\n", + "(iii)The difference\n", + " The work in (ii) is not equal to \u222b p dV math.since the process is not quasi-static.\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.18 page no : 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "v1 = 0.3; \t\t\t#m**3/kg\n", + "T1 = 20.; \t\t\t#0C\n", + "v2 = 0.55; \t\t\t#m**3/kg\n", + "T2 = 260; \t\t\t#0C\n", + "p = 1.6*10**5; \t\t\t#Pa\n", + "\n", + "print (\"(i)Heat added per kg = \")\n", + "\n", + "# Calculations and Results\n", + "def f5( T): \n", + "\t return 1.5 + 75/(T+45)\n", + "\n", + "Q = quad(f5, T1,T2)[0]\n", + "\n", + "print (\"Q = %.3f\")%(Q), (\"kJ/kg\")\n", + "\n", + "\n", + "print (\"(ii)The work done per kg of fluid\")\n", + "W = p*(v2-v1)/1000; \t\t\t#kJ/kg\n", + "print (\"W = %.3f\")%(W),(\"kJ/kg\")\n", + "\n", + "\n", + "print (\"(iii)Change in internal energy\")\n", + "dU = Q-W;\n", + "print (\"dU = %.3f\")%(dU),(\"kJ/kg\")\n", + "\n", + "\n", + "print (\"(iv)Change in enthalpy\")\n", + "dH = Q;\n", + "print (\"dH = %.3f\")%(dH),(\"kJ/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)Heat added per kg = \n", + "Q = 475.944 kJ/kg\n", + "(ii)The work done per kg of fluid\n", + "W = 40.000 kJ/kg\n", + "(iii)Change in internal energy\n", + "dU = 435.944 kJ/kg\n", + "(iv)Change in enthalpy\n", + "dH = 475.944 kJ/kg\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.19 page no : 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "m = 1.; \t\t\t#kg\n", + "du = -42000.; \t\t\t#J\n", + "cp = 840.; \t\t\t#J/kg.0C\n", + "cv = 600.; \t\t\t#J/kg.0C\n", + "\n", + "# Calculations\n", + "dT = du/m/cv;\n", + "Q = m*cp*dT;\n", + "W = (Q-du)/10**3;\n", + "\n", + "# Results\n", + "print (\"Work done = \"),(W),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done = -16.8 kJ\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + " Example 4.20 page no : 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "from numpy import *\n", + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "p1 = 190.; \t\t\t#kPa\n", + "V1 = 0.035; \t\t\t#m**3\n", + "p2 = 420.; \t\t\t#kPa\n", + "V2 = 0.07; \t\t\t#m**3\n", + "dU = 3.6*(p2*V2-p1*V1);\n", + "p = [[1,0.035],[1,0.07]]\n", + "q = [190,420];\n", + "#X = linalg.inv(p)*q;\n", + "X = linalg.solve(p,q)\n", + "a = X[0]\n", + "b = X[1]\n", + "\n", + "# Calculations\n", + "def f4( V): \n", + "\t return a+b*V\n", + "\n", + "W = quad(f4, V1, V2)[0]\n", + "\n", + "# Results\n", + "print (\"Work done by the system = \"),(W),(\"kJ\")\n", + "\n", + "\n", + "Q = dU+W;\n", + "print (\"Heat transfer into the system = \"),(Q),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done by the system = 10.675 kJ\n", + "Heat transfer into the system = 92.575 kJ\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.21 page no : 134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Qv = 90.; \t\t\t#kJ\n", + "Qp = -95; \t\t\t#kJ\n", + "W = -18; \t\t\t#kJ\n", + "U_l = 105; \t\t\t#kJ\n", + "W_lm = 0;\n", + "Q_lm = 90;\n", + "\n", + "# Calculations\n", + "U_m = U_l+90;\n", + "dU_mn = Qp-W;\n", + "U_n = U_m+dU_mn;\n", + "dQ = Qv+Qp;\n", + "dW = dQ;\n", + "W_nl = dW-W;\n", + "\n", + "# Results\n", + "print (\"W_nl(in kJ) = \"),(W_nl)\n", + "\n", + "print (\"U_l in kJ = \"),(U_l)\n", + "\n", + "print (\"U_m in kJ = \"),(U_m)\n", + "print (\"U_n in kJ\"), (U_n)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "W_nl(in kJ) = 13.0\n", + "U_l in kJ = 105\n", + "U_m in kJ = 195\n", + "U_n in kJ 118\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.23 page no : 136" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "V1 = 0.2; \t\t\t#m**3\n", + "p1 = 4.*10**5; \t\t#N/m**2\n", + "T1 = 403.; \t\t\t#K\n", + "p2 = 1.02*10**5; \t#N/m**2\n", + "dH = 72.5; \t\t\t#kJ\n", + "Q_23 = dH;\n", + "cp = 1.; \t\t\t#kJ/kg\n", + "cv = 0.714; \t\t#kJ/kg\n", + "y = 1.4;\n", + "\n", + "# Calculations\n", + "V2 = round(V1*(p1/p2)**(1/y),2);\n", + "T2 = round(T1*((p2/p1)**((y-1)/y)),1);\n", + "R = (cp-cv)*1000; \t\t\t#J/kg.K\n", + "m = round(p1*V1/R/T1,3);\n", + "T3 = round(Q_23/(m*cp) +T2);\n", + "V3 = 0.732 # round(V2*T3/T2,2);\n", + "W_12 = (p1*V1 - p2*V2)/(y-1);\n", + "W_23 = p2*(V3-V2);\n", + "W_123 = W_12+W_23;\n", + "\n", + "# Results\n", + "print (\"Total work done = %.3f\")%(W_123),(\"J\")\n", + "\n", + "print (\"(ii) Index of expansion, n\")\n", + "p3 = p2;\n", + "n = (p1*V1-p3*V3)/W_123 + 1;\n", + "print (\"value of index = %.3f\")%(n)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total work done = 85454.000 J\n", + "(ii) Index of expansion, n\n", + "value of index = 1.062\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.25 page no : 139" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "d = 0.15; \t\t\t#m\n", + "T = 303.; \t\t\t#K\n", + "p = 3.*10**5; \t\t#N/m**2\n", + "l = 0.085; \t\t\t#m\n", + "Q = -4000.; \t\t#J\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) Workdone by the system\")\n", + "dv = math.pi/4*d**2*l;\n", + "W = p*dv;\n", + "print (\"W = %.3f\")%(W/10**3),(\"kJ\")\n", + "\n", + "print (\"(ii) Decrease in internal energy of the system\")\n", + "dU = (Q-W)/10**3;\n", + "print (\"Decrease in internal energy = %.3f\")%(-dU),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Workdone by the system\n", + "W = 0.451 kJ\n", + "(ii) Decrease in internal energy of the system\n", + "Decrease in internal energy = 4.451 kJ\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.27 page no : 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Variables\n", + "y = 1.4\n", + "R = 294.2; \t\t\t#J/kg.0C\n", + "p1 = 1.*10**5; \t\t#N/m**2\n", + "T1 = 353.; \t\t\t#K\n", + "V1 = 0.45; \t\t\t#m**3\n", + "V2 = 0.13; \t\t\t#m**3\n", + "p2 = 5.*10**5; \t\t#N/m**2\n", + "\n", + "# Calculations and Results\n", + "cv = R/(y-1);\n", + "print (\"(i) The mass of gas\")\n", + "m = p1*V1/R/T1;\n", + "print (\"m = %.3f\")%(m),(\"kg\")\n", + "\n", + "print (\"(ii) The value of index \u2018n\u2019 for compression\")\n", + "n = math.log(p2/p1)/math.log(V1/V2);\n", + "print (\"n = %.3f\")%(n)\n", + "\n", + "print (\"(iii) The increase in internal energy of the gas\")\n", + "T2 = T1*(V1/V2)**(n-1);\n", + "dU = m*cv*(T2-T1)/10**3;\n", + "print (\"dU = %.3f\")%(dU),(\"kJ\")\n", + "\n", + "print (\"(iv) The heat received or rejected by the gas during compression.\")\n", + "W = m*R*(T1-T2)/(n-1)/10**3;\n", + "Q = dU+W;\n", + "print (\"Q = %.3f\")%(Q),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The mass of gas\n", + "m = 0.433 kg\n", + "(ii) The value of index \u2018n\u2019 for compression\n", + "n = 1.296\n", + "(iii) The increase in internal energy of the gas\n", + "dU = 50.000 kJ\n", + "(iv) The heat received or rejected by the gas during compression.\n", + "Q = -17.535 kJ\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.28 page no : 141" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "p1 = 1.02*10**5; \t#Pa\n", + "T1 = 295.; \t\t\t#K\n", + "V1 = 0.015; \t\t#m**3\n", + "p2 = 6.8*10**5; \t#Pa\n", + "y = 1.4;\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) Final temperature\")\n", + "T2 = T1*(p2/p1)**((y-1)/y);\n", + "t2 = T2-273; \n", + "print (\"t2 = %.3f\")%(t2),(\"\u00b0C\")\n", + "\n", + "\n", + "print (\"(ii) Final volume :\")\n", + "V2 = V1*(p1/p2)**(1/y);\n", + "print (\"V2 = %.3f\")%(V2),(\"m**3\")\n", + "\n", + "\n", + "print (\"(iii)Work done\")\n", + "R = 287;\n", + "m = p1*V1/R/T1;\n", + "W = m*R*(T1-T2)/(y-1)/10**3;\n", + "print (\"W = %.3f\")%(W),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Final temperature\n", + "t2 = 234.253 \u00b0C\n", + "(ii) Final volume :\n", + "V2 = 0.004 m**3\n", + "(iii)Work done\n", + "W = -2.752 kJ\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.29 page no : 142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "from numpy import *\n", + "import math\n", + "\n", + "# Variables\n", + "m = 0.44; \t\t\t#kg\n", + "T1 = 453.; \t\t\t#K\n", + "ratio = 3.; \t\t#ratio = V2/V1\n", + "T2 = 288.; \t\t\t#K\n", + "W_12 = 52.5; \t\t#kJ\n", + "\n", + "# Calculations\n", + "y = math.log(T2/T1)/ math.log(1/ratio) + 1;\n", + "R = W_12*(y-1)/m/(T1-T2);\n", + "M = [[1,-1],[1,-y]];\n", + "N = [R,0];\n", + "X = linalg.inv(M)*N;\n", + "cp = X[0][0];\n", + "cv = X[1][0];\n", + "\n", + "# Results\n", + "print (\"cp = %.3f\")%(cp),(\"kJ/kg.K\")\n", + "\n", + "print (\"cv = %.3f\")%(cv),(\"kJ/kg.K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "cp = 1.021 kJ/kg.K\n", + "cv = 0.723 kJ/kg.K\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.30 page no : 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "n = 1.3;\n", + "m = 1; \t\t\t#kg\n", + "p1 = 1.1; \t\t\t#bar\n", + "T1 = 300.; \t\t\t#K\n", + "p2 = 6.6; \t\t\t#bar\n", + "R0 = 8314.;\n", + "M = 30.;\n", + "cp = 1.75; \t\t\t#kJ/kg.K\n", + "\n", + "\n", + "# Calculations\n", + "R = R0/M/1000; \t\t\t#kJ/kg.K\n", + "cv = cp - R;\n", + "y = cp/cv;\n", + "T2 = T1 *(p2/p1)**((n-1)/n);\n", + "W = R*(T1-T2)/(n-1);\n", + "Q = ((y-n)/(y-1))*W;\n", + "\n", + "# Results\n", + "print (\"Heat supplied = %.3f\")%(Q),(\"kJ/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat supplied = 84.352 kJ/kg\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.31 page no : 144" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Variables\n", + "cp = 14.3; \t\t\t#kJ/kg.K\n", + "cv = 10.2; \t\t\t#kJ/kg.K\n", + "V1 = 0.1; \t\t\t#m**3\n", + "T1 = 300.; \t\t\t#K\n", + "p1 = 1.; \t\t\t#bar\n", + "p2 = 8.; \t\t\t#bar\n", + "y = cp/cv;\n", + "R = cp-cv;\n", + "V2 = V1*(p1/p2)**(1/y);\n", + "V3 = V2;\n", + "T2 = T1*(p2/p1)**((y-1)/y);\n", + "p3 = p1*V1/V3;\n", + "T3 = 300.; \t\t\t#K\n", + "\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) Pressure at the end of consmath.tant volume cooling = %.3f\")%(p3),(\"bar\")\n", + "\n", + "print (\"(ii) Change in internal energy during consmath.tant volume process\")\n", + "m = p1*V1/R/T1*10**2; \t\t\t#kg\n", + "\n", + "dU_23 = m*cv*(T3-T2);\n", + "print (\"dU_23 = %.3f\")%(dU_23),(\"kJ\")\n", + "\n", + "print (\"(iii) Net work done and heat transferred during the cycle\")\n", + "W_12 = m*R*(T1-T2)/(y-1);\n", + "W_23 = 0;\n", + "W_31 = p3*V3*math.log(V1/V3)*10**2; \t\t\t#kJ\n", + "Wnet = W_12+W_23+W_31;\n", + "print (\"Net work done = %.3f\")%(Wnet),(\"kJ\")\n", + "Qnet = Wnet;\n", + "print (\"Heat transferred during the complete cycle = %.3f\")%(Qnet),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Pressure at the end of consmath.tant volume cooling = 4.407 bar\n", + "(ii) Change in internal energy during consmath.tant volume process\n", + "dU_23 = -20.281 kJ\n", + "(iii) Net work done and heat transferred during the cycle\n", + "Net work done = -5.449 kJ\n", + "Heat transferred during the complete cycle = -5.449 kJ\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.32 page no : 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Variables\n", + "V1 = 0.15; \t\t\t#m**3\n", + "p1 = 15.; \t\t\t#bar\n", + "T1 = 550.; \t\t\t#K\n", + "T2 = T1;\n", + "r = 4.; \t\t\t#r = V2/V1\n", + "V2 = r*V1;\n", + "T3 = 290.; \t\t\t#K\n", + "\n", + "# Calculations\n", + "p2 = p1*V1/V2;\n", + "W_12 = p1*V1*math.log(V2/V1)*10**2; \t\t\t#kJ\n", + "V3 = V2;\n", + "p3 = p2*T3/T2;\n", + "W_23 = 0;\n", + "n = math.log(p1/p3)/math.log(V3/V1);\n", + "W_31 = (p3*V3-p1*V1)/(n-1)*10**2; \t\t\t#kJ\n", + "\n", + "# Results\n", + "\n", + "Wnet = W_12+W_23+W_31\n", + "print (\"net work done = %.3f\")%Wnet , (\"kJ\")\n", + "\n", + "Qnet = Wnet;\n", + "print (\"Heat transferred during the cycle = %.3f\")%(Qnet),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "net work done = 81.537 kJ\n", + "Heat transferred during the cycle = 81.537 kJ\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.33 page no : 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "%matplotlib inline\n", + "\n", + "import math \n", + "from scipy.integrate import quad \n", + "from matplotlib.pyplot import *\n", + "from numpy import *\n", + "\n", + "# Variables\n", + "m = 1; \t\t\t#kg\n", + "p1 = 5; \t\t\t#bar\n", + "V1 = 0.02; \t\t\t#m**3\n", + "V2 = 0.08; \t\t\t#m**3\n", + "p2 = 1.5; \t\t\t#bar\n", + "\n", + "\n", + "# Calculations and Results\n", + "def f(V):\n", + " return a+b*V;\n", + "\n", + "A = [[1,0.02],[1,0.08]]\n", + "B = [5,1.5];\n", + "#X = linalg.inv(A)*B;\n", + "X = linalg.solve(A,B)\n", + "a = X[0]\n", + "b = X[1]\n", + "\n", + "print (\"(i) p-V diagram\")\n", + "\n", + "V = linspace(0.02,0.08,80);\n", + "p = a+b*V;\n", + "plot(V,p,'b')\n", + "\n", + "V = [0.0667 ,0.08];\n", + "p = [1.5 ,1.5];\n", + "plot(V,p,'g')\n", + "\n", + "V = linspace(0.02,0.0667,447)\n", + "def fa(V):\n", + " return 0.1/V;\n", + "f = fa(V)\n", + "plot(V,f,'r')\n", + "suptitle(\"p-V diagram\")\n", + "\n", + "V = [0.0667, 0.0667];\n", + "p = [1.5, 0];\n", + "plot(V,p,'--')\n", + "xlabel(\"V(m)**3\")\n", + "ylabel(\"P(bar)\")\n", + "text(.04,4,'Reversible Expansion')\n", + "text(0.04,2.3,\"pV = C\")\n", + "text(0.07,1.2,\"p = C\")\n", + "\n", + "print (\"(ii) Work done and heat transfer\")\n", + "\n", + "\n", + "def f7(V): \n", + "\t return (a+b*V)*10**2\n", + "\n", + "W_12 = quad(f7,V1,V2)[0]\n", + "\n", + "print (\"Work done by the system = \"),(W_12), (\"kJ\")\n", + "\n", + "p3 = p2;\n", + "V3 = round(p1*V1/p3,4);\n", + "W_23 = p2*(V3-V2)*10**2; \t\t\t#kJ\n", + "\n", + "W_31 = round(p3*V3*math.log(V1/V3)*10**2,2); \t\t\t#kJ\n", + "print (\"Work done on the system = %.3f\")% (W_31), (\"kJ\")\n", + "\n", + "W_net = W_12+W_23+W_31;\n", + "print (\"Net work done = %.3f\")% (W_net), (\"kJ\")\n", + "\n", + "Q_net = W_net;\n", + "print (\"Heat transferred during the complete cycle = %.3f\")% (Q_net),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "(i) p-V diagram" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "(ii) Work done and heat transfer" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Work done by the system = 19.5 kJ\n", + "Work done on the system = -12.050 kJ\n", + "Net work done = 5.455 kJ\n", + "Heat transferred during the complete cycle = 5.455 kJ\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX8AAAEhCAYAAACXwKDgAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVNX6B/DvAJoX1ATvlxwzQIEBRhBFCaG0vJGaKGFp\nZmqWdEHNS+ZBs/KG59hRT1iW2qmOmubxkpqmB7VEUQFFTVFzTNT8eUURU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Nn\nxMTEYNGiRQBQ5nt6QgiMGTMGfn5+GD16tNl/HkQPwmEfshtubm4IDg7Gpk2bAMiyvdHR0bh06RKc\nnZ1Rq1Ytw7ZHjx7F2rVrsX//fkyZMgX169fHgQMHEB4ejmXLlhm202q1SE5OxqFDh5CYmIghQ4bg\nmWeewdSpU8t8T++VV15B06ZNcfjwYYwYMcJsPwOiimLwJ7sSExODFStWAABWrlyJmJgY6HQ6NG3a\n1LCNSqVCREQEatSogQYNGuDRRx9Fr169AAAajaZYxcRmzZpBp9PB398f8+fPh5ubG/r27YsZM2aU\n+Z7e0qVLceHCBfj5+eGjjz4y09ETVRyDP9mV5557Dtu3b0daWhpyc3Oh1WoBlK5//sgjjxj+7eTk\nZPjayckJhYWFhu8JIYrVWI+Pjy/VZlnv6ff1wgsvWOU6uEQM/mRXXF1dERERgVdeecWwUlOrVq3w\nxx9/GLZ50DRXye9dvHgRarW6Un3Q6XSGfa1fvx4ajaZSnycyBwZ/sjsxMTHIyMgwrEXbpEkTw5qm\ngBz2KXo1X/LfRb9OS0tDSEhIhdsWQmDw4MGGVM+LFy+We2dAZEnM9iGHMG3aNLRr1w7R0dEV/kxm\nZibGjx+P9evXK9gzIsvglT85hDFjxmD58uWV+kxiYiImTJigUI+ILItX/kREDohX/kREDojBn4jI\nATH4ExE5IAZ/IiIHxOBPROSAGPyJiBzQ/wNTN0khb0PDfQAAAABJRU5ErkJggg==\n", + "text": [ + "<matplotlib.figure.Figure at 0x1dbbbd0>" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.34 page no : 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "\n", + "# Variables\n", + "cv = 0.71; \t\t\t#kJ/kg.K\n", + "R = 0.287; \t\t\t#kJ/kg.K\n", + "d = 8.; \t\t\t#cm\n", + "l = 3.5; \t\t\t#cm\n", + "S = 150.; \t\t\t#N/cm\n", + "p1 = 30.; \t\t\t#N/cm\n", + "V1 = 45.; \t\t\t#cm**3\n", + "T1 = 293.; \t\t\t#K\n", + "cv = 0.71; \t\t\t#kJ/kg.K\n", + "R = 0.287; \t\t\t#kJ/kg.K\n", + "\n", + "# Calculations\n", + "A = math.pi/4*d**2;\n", + "C = p1-S/A**2*V1;\n", + "dV = l*A;\n", + "V2 = V1+dV;\n", + "p2 = S/A**2*V2 + C;\n", + "\n", + "def f3( p): \n", + "\t return A**2/S*p/100\n", + "\n", + "W = quad(f3, p1, p2)[0]\n", + "\n", + "T2 = p2*V2*T1/p1/V1;\n", + "m = p1*V1/R/T1/10**5; \t\t\t#kg\n", + "dU = m*cv*(T2-T1);\n", + "Q_12 = dU + W*10**(-3);\n", + "\n", + "# Results\n", + "print (\"Amount of heat added to the system = %.3f\")% (Q_12), (\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amount of heat added to the system = 0.250 kJ\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.35 page no : 164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "r = 10.; \t\t\t#kg/min\n", + "p1 = 1.5*10**5; \t\t\t#N/m**2\n", + "rho1 = 26.; \t\t\t#kg/m**3\n", + "C1 = 110.; \t\t\t#m/s\n", + "u1 = 910.; \t\t\t#kJ/kg\n", + "p2 = 5.5*10**5; \t\t\t#N/m**2\n", + "rho2 = 5.5; \t\t\t#kg/m**3\n", + "C2 = 190.; \t\t\t#m/s\n", + "u2 = 710.; \t\t\t#kJ/kg\n", + "Q = 55.; \t\t\t#kJ/s\n", + "h = 55.; \t\t\t#m\n", + "g = 9.81; \t\t\t#m/s**2\n", + "v2 = 1/rho2;\n", + "v1 = 1/rho1;\n", + "\n", + "# Calculations and Results\n", + "\n", + "dh = u2-u1+ (p2*v2-p1*v1)/10**3;\n", + "print (\"(i) Change in enthalpy %.3f\")%(dh), (\"kJ/kg\")\n", + "\n", + "print (\"(ii) Work done during the process (W).\")\n", + "\n", + "Q = 330.; \t\t\t#kJ/kg\n", + "KE = (C2**2-C1**2)/2/10**3; \t\t\t#kJ\n", + "PE = g*h/10**3; \t\t\t#kJ\n", + "W = -Q-KE-PE-dh;\n", + "print (\"Work done = %.3f\")%(W),(\"kJ\")\n", + "\n", + "\n", + "P = W*10/60.;\n", + "print (\"Work done per second = %.3f\")%(P),(\"kW\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Change in enthalpy -105.769 kJ/kg\n", + "(ii) Work done during the process (W).\n", + "Work done = -236.770 kJ\n", + "Work done per second = -39.462 kW\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.36 page no : 166" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "\n", + "import math \n", + "\n", + "m = 15.; \t\t\t#kg/s\n", + "v = 0.45; \t\t\t#m**3/kg\n", + "P = 12000.; \t\t#kW\n", + "W = P/m; \t\t\t#kJ/kg\n", + "h1 = 1260.; \t\t#kJ/kg\n", + "h2 = 400.; \t\t\t#kJ/kg\n", + "C1 = 50.; \t\t\t#m/s\n", + "C2 = 110.; \t\t\t#m/s\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) Heat rejected = \"),\n", + "Q = h2-h1+(C2**2-C1**2)/2/10**3 +W;\n", + "Qnet = m*Q;\n", + "print (\"Qnet = %.3f\")%(-Qnet),(\"kW\")\n", + "\n", + "print (\"(ii) Inlet area\")\n", + "A = v*m/C1;\n", + "print (\"A = %.3f\")%(A),(\"m**2\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Heat rejected = Qnet = 828.000 kW\n", + "(ii) Inlet area\n", + "A = 0.135 m**2\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.37 page no : 167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "m = 0.5; \t\t\t#kg/s\n", + "C1 = 6.; \t\t\t#m/s\n", + "C2 = 5.; \t\t\t#m/s\n", + "p1 = 1.; \t\t\t#bar\n", + "p2 = 7.; \t\t\t#bar\n", + "v1 = 0.85; \t\t\t#m**3/kg\n", + "v2 = 0.16; \t\t\t#m**3/kg\n", + "du = 90.; \t\t\t#kJ/kg\n", + "Q = -120.; \t\t\t#kJ/kg\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) Power required to drive the compressor\")\n", + "W = -du+(C1**2-C2**2)/2/1000 + (p1*v1 - p2*v2)*10**2 + Q;\n", + "Power = m*W; \n", + "print (\"Power = %.3f\")%(-Power),(\"kW\")\n", + "\n", + "\n", + "print (\"(ii) Inlet and outlet pipe cross-sectional areas\")\n", + "A1 = m*v1/C1;\n", + "A2 = m*v2/C2;\n", + "print (\"Inlet crosssectional area = %.3f\")% (A1), (\"m**2\")\n", + "\n", + "print (\"Outlet crossectional area = %.3f\")%(A2), (\"m**2\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Power required to drive the compressor\n", + "Power = 118.497 kW\n", + "(ii) Inlet and outlet pipe cross-sectional areas\n", + "Inlet crosssectional area = 0.071 m**2\n", + "Outlet crossectional area = 0.016 m**2\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.38 page no : 168" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "h1 = 800.; \t\t\t#kJ/kg\n", + "C1 = 5.; \t\t\t#m/s\n", + "h2 = 2520.; \t\t\t#kJ/kg\n", + "C2 = 50.; \t\t\t#m/s\n", + "dZ = 4.; \t\t\t#m\n", + "g = 9.81; \t\t\t#m/s**2\n", + "Q = 2180.; \t\t\t#kJ/kg\n", + "\n", + "# Calculations\n", + "W = h1-h2+(C1**2 - C2**2)/2/1000 +dZ*g/1000+Q;\n", + "\n", + "# Results\n", + "print (\"Power developed = %.3f\")%(W), (\"kW\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power developed = 458.802 kW\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.39 page no : 169" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "g = 9.8; \t\t\t#m/s**2\n", + "m = 4500./3600; \t#kg/s\n", + "C1 = 2800./60; \t\t#m/s\n", + "Z1 = 5.5; \t\t\t#m\n", + "h1 = 2800.; \t\t#kJ/g\n", + "C2 = 5600./60; \t\t#m/s\n", + "Z2 = 1.5; \t\t\t#m\n", + "h2 = 2300.; \t\t#kJ/kg\n", + "Q = -16000./3600; \t#kJ/s\n", + "\n", + "# Calculations\n", + "W = Q-m*((h1-h2) + (C2**2 - C1**2)/2/1000 + (Z2-Z1)*g/1000);\n", + "\n", + "# Results\n", + "print (\"Power output of the turbine = %.3f\")% (-W),(\"kW\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power output of the turbine = 633.479 kW\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.40 page no : 170" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "p1 = 6.87; \t\t\t#bar\n", + "C1 = 50.; \t\t\t#m/s\n", + "p2 = 1.37; \t\t\t#bar\n", + "C2 = 500.; \t\t\t#m/s\n", + "print (\"From steam table corresponding to p1\")\n", + "h1 = 2850.; \t\t\t#kJ/kg\n", + "\n", + "# Calculations\n", + "h2 = h1 - (C2**2-C1**2)/2/1000;\n", + "\n", + "# Results\n", + "print (\"Final enthalpy of steam = \"), (h2),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "From steam table corresponding to p1\n", + "Final enthalpy of steam = 2726.25 kJ\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.41 page no : 171" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "m = 220./60; \t\t\t#kg/s\n", + "C1 = 320.; \t\t\t#m/s\n", + "p1 = 6*10.**5; \t\t\t#N/m**2\n", + "u1 = 2000.*10**3; \t\t\t#J/kg\n", + "v1 = 0.36; \t\t\t#m**3/kg\n", + "C2 = 140.; \t\t\t#m/s\n", + "p2 = 1.2*10**5; \t\t\t#N/m**2\n", + "u2 = 1400.*10**3; \t\t\t#J/kg\n", + "v2 = 1.3; \t\t\t#m**3/kg\n", + "Q = 100*10.**3; \t\t\t#J/s\n", + "\n", + "# Calculations\n", + "W = (m*((u1-u2)+ (p1*v1 - p2*v2) + (C1**2-C2**2)/2) -Q)/10**6;\n", + "\n", + "# Results\n", + "print (\"power capacity of the system = %.3f\")% (W),(\"MW\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power capacity of the system = 2.472 MW\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.42 page no : 172" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "p1 = 7.5*10**5; \t\t\t#N/m**2\n", + "C1 = 140.; \t\t\t#m/s\n", + "h1 = 950.*10**3; \t\t\t#J/kg\n", + "p2 = 2*10.**5; \t\t\t#N/m**2\n", + "C2 = 280.; \t\t\t#m/s\n", + "h2 = 650.*10**3; \t\t\t#J/kg\n", + "m = 5.; \t\t\t#kg/s\n", + "\n", + "# Calculations\n", + "W = (h1-h2)+(C1**2-C2**2)/2\n", + "Power = m*W/1000;\n", + "\n", + "# Results\n", + "print (\"Power capacity of turbine = \"), (Power), (\"kW\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power capacity of turbine = 1353.0 kW\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.43 page no : 173" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "C1 = 12.; \t\t\t#m/s\n", + "p1 = 1.*10**5; \t\t\t#N/m**2\n", + "v1 = 0.5; \t\t\t#m**3/kg\n", + "C2 = 90.; \t\t\t#m/s\n", + "p2 = 8.*10**5; \t\t\t#N/m**2\n", + "v2 = 0.14; \t\t\t#m**3/kg\n", + "dh = 150.; \t\t\t#kJ/kg\n", + "Q = -11.67; \t\t\t#kJ/s\n", + "m = 0.2; \t\t\t#kg/s\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) Motor power required to drive the compressor\")\n", + "W = m*(-dh + (C1**2-C2**2)/2/1000) +Q;\n", + "print (\"Power = %.3f\")% (-W), (\"kW\")\n", + "\n", + "\n", + "print (\"(ii)Ratio of inlet to outlet pipi diameter\")\n", + "ratio = math.sqrt(C2/C1*v1/v2);\n", + "print (\"ratio = %.3f\")% (ratio)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Motor power required to drive the compressor\n", + "Power = 42.466 kW\n", + "(ii)Ratio of inlet to outlet pipi diameter\n", + "ratio = 5.175\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.44 page no : 175" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "W = -175.; \t\t\t #kJ/kg\n", + "dh = 70.; \t\t \t#kJ/kg\n", + "Q_water = -92.; \t\t\t#kJ/kg\n", + "\n", + "# Calculations\n", + "Q = dh+W;\n", + "Q_atm = Q-Q_water;\n", + "\n", + "# Results\n", + "print (\"Heat transferred to the atmosphere = \"),(-Q_atm), (\"kJ/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat transferred to the atmosphere = 13.0 kJ/kg\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.45 page no : 176" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Variables\n", + "h1 = 2800.*10**3; \t\t\t#J/kg\n", + "C1 = 50.; \t\t\t#m/s\n", + "A1 = 900.*10**(-4); \t\t\t#m**2\n", + "v1 = 0.187; \t\t\t#m**3/kg\n", + "h2 = 2600.*10**3; \t\t\t#J/kg\n", + "v2 = 0.498; \t\t\t#m**3/kJ\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) Velocity at exit of the nozzle\")\n", + "C2 = math.sqrt(2*((h1-h2) + C1**2/2));\n", + "\n", + "print (\"C2 = %.3f\")% (C2),(\"m/s\")\n", + "\n", + "\n", + "print (\"(ii) Mass flow rate\")\n", + "m = A1*C1/v1;\n", + "print (\"m = %.3f\")% (m), (\"kg/s\")\n", + "\n", + "\n", + "print (\"(iii) Area at the exit\")\n", + "A2 = m*v2/C2*10**4;\n", + "print (\"A2 = %.3f\")%(A2), (\"cm**2\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Velocity at exit of the nozzle\n", + "C2 = 634.429 m/s\n", + "(ii) Mass flow rate\n", + "m = 24.064 kg/s\n", + "(iii) Area at the exit\n", + "A2 = 188.894 cm**2\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.46 page no : 177" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "h1 = 240.; \t\t\t#kJ/kg\n", + "h2 = 192.; \t\t\t#kJ/kg\n", + "dZ = 20.; \t\t\t#m\n", + "g = 9.81; \t\t\t#m/s**2\n", + "\n", + "# Calculations\n", + "Q = (h2-h1)+dZ*g/1000;\n", + "\n", + "# Results\n", + "print (\"heat transfer = %.3f\")% (-Q), (\"kJ/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "heat transfer = 47.804 kJ/kg\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.47 page no : 178" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "p1 = 2.; \t\t\t#bar\n", + "C1 = 300.; \t\t\t#m/s\n", + "Q = 0.;\n", + "h1 = 915.*10**3; \t\t\t#J/kg\n", + "h2 = 800.*10**3; \t\t\t#J/kg\n", + "\n", + "# Calculations\n", + "C2 = math.sqrt(2*(h1-h2 + C1**2/2));\n", + "\n", + "# Results\n", + "print (\"Relative velocity of gas leaving the pipe = %.3f\")% (C2), (\"m/s\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Relative velocity of gas leaving the pipe = 565.685 m/s\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.48 page no : 179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "mw = 50; \t\t\t#kg/s\n", + "p1 = 10.**5; \t\t\t#N/m**2\n", + "p2 = 4.2*10**5; \t\t\t#N/m**2\n", + "h = 10.7; \t\t\t#m\n", + "d1 = 0.2; \t\t\t#m\n", + "d2 = 0.1; \t\t\t#m\n", + "v1 = 1./1000;\n", + "v2 = 1./1000;\n", + "g = 9.81; \t\t\t#m/s**2\n", + "\n", + "# Calculations\n", + "C1 = mw*4/math.pi/d1**2*v1;\n", + "C2 = mw*4/math.pi/d2**2*v2;\n", + "W = mw*((p1*v1-p2*v2) + (g*(0-h))+(C1**2-C2**2)/2)/10**3;\n", + "\n", + "# Results\n", + "print (\"Capacity of electric motor %.3f\")%(-W), (\"kW\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Capacity of electric motor 22.198 kW\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + " Example 4.49 page no : 180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "Ca = 250.; \t\t\t#m/s\n", + "t = -14.; \t\t\t#0C\n", + "ha = 250.; \t\t\t#kJ/kg\n", + "hg = 900.; \t\t\t#kJ/kg\n", + "ratio = 0.0180;\n", + "Ef = 45.*10**3; \t\t\t#kJ/kg\n", + "Q = -21.; \t\t\t#kJ/kg\n", + "ma = 1.; \t\t\t#kg\n", + "mg = 1.018; \t\t\t#kg\n", + "mf = 0.018; \t\t\t#kg\n", + "\n", + "#Calculations\n", + "Eg = 0.06*mf/mg*Ef;\n", + "Cg = math.sqrt(2000*((ma*(ha+Ca**2/2/1000) + mf*Ef + Q)/mg -hg-Eg));\n", + "\n", + "# Results\n", + "print (\"velocity of exhaust gas jet = %.3f\")%(Cg),(\"m/s\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "velocity of exhaust gas jet = 455.160 m/s\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.50 page no : 181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "t1 = 20.; \t\t\t#0C\n", + "C1 = 40.; \t\t\t#m/s\n", + "t2 = 820.; \t\t\t#0C\n", + "C2 = 40.; \t\t\t#m/s\n", + "t3 = 620.; \t\t\t#0C\n", + "C3 = 55.; \t\t\t#m/s\n", + "t4 = 510.; \t\t\t#0C\n", + "m = 2.5; \t\t\t#kg/s\n", + "cp = 1.005; \t\t\t#kJ/kg.0C\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) Heat exchanger\")\n", + "Q_12 = m*cp*(t2-t1);\n", + "print (\"rate of heat transfer = \"),(Q_12), (\"kJ/s\")\n", + "\n", + "print (\"(ii) Turbine\")\n", + "W_23 = m*((cp*(t2-t3))+(C2**2-C3**2)/2/1000);\n", + "print (\"Power output of turbine = %.3f\")%(W_23), (\"kW\")\n", + "\n", + "print (\"(iii) Nozzle\")\n", + "C4 = math.sqrt(2*1000*(cp*(t3-t4)+C3**2/2/1000));\n", + "print (\"Velocity at exit from the nozzle = %.3f\")%(C4), (\"m/s\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Heat exchanger\n", + "rate of heat transfer = 2010.0 kJ/s\n", + "(ii) Turbine\n", + "Power output of turbine = 500.719 kW\n", + "(iii) Nozzle\n", + "Velocity at exit from the nozzle = 473.418 m/s\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.51 page no : 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "V = 0.028; \t\t\t#m**3\n", + "p1 = 80.; \t\t\t#bar\n", + "t = 350.; \t\t\t#0C\n", + "p2 = 50.; \t\t\t#bar\n", + "v1 = 0.02995; \t\t\t#m**3/kg\n", + "h1 = 2987.3; \t\t\t#kJ/kg\n", + "v2 = 0.02995; \t\t\t#m**3/kg\n", + "vg2 = 0.0394; \t\t\t#m**3/kg\n", + "uf2 = 1149.; \t\t\t#kJ/kg\n", + "ug2 = 2597.; \t\t\t#kJ/kg\n", + "\n", + "# Calculations and Results\n", + "m = V/v1;\n", + "u1 = h1 - (p1*v1*10**2); \t\t\t#kJ/kg\n", + "\n", + "print (\"(i) State of steam after cooling\")\n", + "x2 = v2/vg2;\n", + "print (\"dryness fraction = %.3f\")%(x2)\n", + "\n", + "\n", + "print (\"(ii) Heat rejected by the steam\")\n", + "u2 = (1-x2)*uf2 + x2*ug2;\n", + "Q = m*(u2-u1);\n", + "print (\"Heat rejected = %.3f\")% (-Q), (\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) State of steam after cooling\n", + "dryness fraction = 0.760\n", + "(ii) Heat rejected by the steam\n", + "Heat rejected = 465.575 kJ\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.52 page no : 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "m = 0.08; \t\t\t#kg\n", + "p = 2.*10**5; \t\t\t#Pa\n", + "V = 0.10528; \t\t\t#m**3\n", + "h1 = 2706.3; \t\t\t#kJ/kg\n", + "h2 = 3071.8; \t\t\t#kJ/kg\n", + "v1 = 0.885; \t\t\t#m**3/kg\n", + "\n", + "# Calculations and Results\n", + "v2 = V/m; \t\t\t#m**3/kg\n", + "\n", + "print (\"(i) Heat supplied\")\n", + "Q = m*(h2-h1);\n", + "print (\"Q = \"),(Q), (\"kJ\")\n", + "\n", + "\n", + "W = p*(v2-v1);\n", + "W_total = m*W/10**3;\n", + "print (\"(ii)Total work done = \"), (W_total), (\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Heat supplied\n", + "Q = 29.24 kJ\n", + "(ii)Total work done = 6.896 kJ\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.53 page no : 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from numpy import *\n", + "from matplotlib.pyplot import *\n", + "\n", + "# Variables\n", + "m = 1.; \t\t\t#kg\n", + "p = 8.; \t\t\t#bar\n", + "s1 = 6.55; \t\t\t#kJ/kg.K\n", + "T = 200.; \t\t\t#0C\n", + "s_f1 = 2.0457; \t\t\t#kJ/kg.K\n", + "s_fg1 = 4.6139; \t\t\t#kJ/kg.K\n", + "h_f1 = 720.9; \t\t\t#kJ/kg\n", + "h_fg1 = 2046.5; \t\t\t#kJ/kg\n", + "h2 = 2839.3; \t\t\t#kJ/kg\n", + "\n", + "# Calculations and Results\n", + "x1 = (s1-s_f1)/s_fg1;\n", + "h1 = h_f1+x1*h_fg1;\n", + "Q = h2-h1;\n", + "print (\"Heat supplied = %.3f\")%(Q), (\"kJ/kg\")\n", + "\n", + "# For T-s diagram\n", + "\n", + "s = linspace(0,.10,10);\n", + "T = (-(s-5)**2+298);\n", + "plot(s,T)\n", + "\n", + "T = [295.44 ,295.44];\n", + "s = [6.6 ,3.45];\n", + "plot(s,T,'g')\n", + "\n", + "s = [6.6 ,7];\n", + "T = [295.44, 300];\n", + "plot(s,T,'g')\n", + "\n", + "s = [6.55 ,6.55];\n", + "T = [270 ,295.44];\n", + "plot(s,T,'r')\n", + "\n", + "s = [6.6, 6.6];\n", + "T = [270 ,295.44];\n", + "plot(s,T,'--r')\n", + "\n", + "s = [6.66, 6.66];\n", + "T = [270, 295.44];\n", + "plot(s,T,'r')\n", + "\n", + "\t\t\t#The area in red represents the heat flow and it goes upto x-axis\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat supplied = 120.513 kJ/kg\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 50, + "text": [ + "[<matplotlib.lines.Line2D at 0x3e9d150>]" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAD9CAYAAABDaefJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGRdJREFUeJzt3XtQVHee9/FPM5BdDUadioKC9RBBIg2DtBfUlE6aicZY\nUQIFMcEoJuKkjFoWSayxsjUbr6tmRs3gjNZqKjqZdSuglY2YxBh0FUWTDGbo5HEgG3nWJtPgJTEz\nOOCtEc7zh5teGRUa7At95v2q6iq6+5zz+56U+XD8nd/5ajEMwxAAwBTCgl0AAMB3CHUAMBFCHQBM\nhFAHABMh1AHARAh1ADCRDkP96tWrGjt2rNLS0mS1WvXKK69Ikv785z9r8uTJSkxM1KOPPqrGxkbP\nPmvXrtWwYcM0fPhwlZWV+bd6AEA7ls7WqV++fFm9e/fW9evXNWHCBK1fv1579+7V/fffr5/97Gd6\n7bXX9Je//EXr1q1TTU2NZs6cqRMnTqihoUGTJk3SqVOnFBbGXwgAIBA6TdvevXtLktxut1pbW9W/\nf3/t3btXc+bMkSTNmTNHe/bskSSVlpYqLy9PERERiouLU0JCgiorK/1YPgDgZp2Geltbm9LS0hQV\nFaWMjAwlJyfr/PnzioqKkiRFRUXp/PnzkqQzZ84oNjbWs29sbKwaGhr8VDoA4G+Fd7ZBWFiYPv/8\nc128eFFTpkzR4cOH231vsVhksVjuuP/tvutoewDAnXXW2cXrye6+ffvq8ccf1x/+8AdFRUXp3Llz\nkqSzZ89q4MCBkqSYmBi5XC7PPvX19YqJibljYaH6WrZsWdBr+HusnfqD/6L+wL++vfSt7v/F/ar5\npsarrO4w1C9cuOBZ2XLlyhUdOHBANptNmZmZeuuttyRJb731lrKysiRJmZmZKi4ultvtltPpVG1t\nrdLT070qBABw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unRJZWVl\n+tGPfhTkqrwTHR2tIUOG6NSpU5JuzEsnJycHuaque/vtt29ZRn47nT5R6ivh4eH6zW9+oylTpqi1\ntVUFBQVKSkoK1PA+kZeXpyNHjui7777TkCFDtHLlSj333HPBLssrHT1zEArOnj2rOXPmqK2tTW1t\nbZo9e7YeeeSRYJfVbaE2HXn+/HllZ2dLujGd8cwzz+jRRx8NclXe+/Wvf61nnnlGbrdb8fHx2rFj\nR7BL6pJLly7p4MGDXt3LCMo/kgEA8I/QvA0PALgtQh0ATIRQBwATIdQBwEQIdQAwEUIdAEzk/wOv\n7sf4EZKFzwAAAABJRU5ErkJggg==\n", + "text": [ + "<matplotlib.figure.Figure at 0x319ff90>" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.54 page no : 192" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "p1 = 7.*10**5; \t\t\t#Pa\n", + "p2 = 1.5*10**5; \t\t\t#Pa\n", + "Q = 420.; \t\t\t#kJ/kg\n", + "uf = 696.; \t\t\t#kJ/kg\n", + "x = 0.95;\n", + "ug = 2573.; \t\t\t#kJ/kg\n", + "u_f2 = 2580.; \t\t\t#kJ/kg\n", + "u_g2 = 2856.; \t\t\t#kJ/kg\n", + "x2 = 15./50;\n", + "h_f1 = 697.1; \t\t\t#kJ/kg\n", + "h_fg1 = 2064.9; \t\t\t#kJ.kg\n", + "h_f2 = 2772.6; \t\t\t#kJ/kg\n", + "h_g2 = 2872.9; \t\t\t#kJ/kg\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) Change of internal energy\")\n", + "u1 = (1-x)*uf + x*ug;\n", + "u2 = 2602.8; \t\t\t#kJ/kg\n", + "du = u2-u1;\n", + "print (\"du = \"),(du), (\"kJ/kg\")\n", + "\n", + "print (\"(ii) Change in enthalpy\")\n", + "h1 = h_f1+x*h_fg1;\n", + "h2 = h_f2+x2*(h_g2-h_f2);\n", + "dh = h2-h1;\n", + "print (\"dh = \"), (dh), (\"kJ/kg\")\n", + "\n", + "print (\"(iii) Work done \")\n", + "W = Q-du;\n", + "print (\"W = \"), (W), (\"kJ/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Change of internal energy\n", + "du = 123.65 kJ/kg\n", + "(ii) Change in enthalpy\n", + "dh = 143.935 kJ/kg\n", + "(iii) Work done \n", + "W = 296.35 kJ/kg\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.55 page no : 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "\n", + "p1 = 5.5*10**5; \t\t\t#Pa\n", + "x1 = 1.;\n", + "p2 = 0.75*10**5; \t\t\t#Pa\n", + "v1 = 0.3427; \t\t\t#m**3/kg\n", + "v2 = p1*v1/p2;\n", + "\n", + "# Since v2 > vg (at 0.75 bar), therefore, the steam is superheated at state 2.\n", + "u2 = 2567.25; \t\t\t#kJ/kg\n", + "u1 = 2565.; \t\t\t#kJ/kg\n", + "\n", + "# Calculations and Results\n", + "du = u2-u1; \t\t\t#kJ/kg\n", + "C = p1*v1;\n", + "\n", + "print (\"Work done \"),\n", + "\n", + "def f6( v): \n", + "\t return C/v\n", + "\n", + "W = quad(f6, v1,v2)[0]\n", + "\n", + "print (\"W =\"),(W), (\"N-m/kg\")\n", + "\n", + "\n", + "\n", + "Q = du+W/10**3;\n", + "\n", + "print (\"Heat supplied = %.3f\")%(Q),(\"kJ/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done W = 375543.199592 N-m/kg\n", + "Heat supplied = 377.793 kJ/kg\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.56 page no : 195" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "p1 = 100.; \t\t\t#bar\n", + "p2 = 10.; \t\t\t#bar\n", + "s1 = 5.619; \t\t\t#kJ/kg.K\n", + "T = 584.; \t\t\t#K\n", + "s2 = 7.163; \t\t\t#kJ/kg.K\n", + "u1 = 2545.; \t\t\t#kJ/kg\n", + "u2 = 2811.8; \t\t\t#kJ/kg\n", + "\n", + "# Calculations and Results\n", + "print (\"(i)Heat supplied \")\n", + "Q = T*(s2-s1);\n", + "print (\"Q = \"),(Q),(\"kJ/kg\")\n", + "\n", + "print (\"(ii) Work done\")\n", + "W = Q-(u2-u1);\n", + "print (\"W = \"), (W), (\"kJ/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)Heat supplied \n", + "Q = 901.696 kJ/kg\n", + "(ii) Work done\n", + "W = 634.896 kJ/kg\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.57 page no : 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "m = 1.; \t\t\t#kg\n", + "p1 = 120.*10**5; \t#N/m**2\n", + "t1 = 400.; \t\t\t#0C\n", + "p2 = 38.; \t\t\t#bar\n", + "h1 = 3051.3; \t\t#kJ/kg\n", + "v1 = 0.02108; \t\t#m**3/kg\n", + "\n", + "# Calculations\n", + "u1 = h1-p1*v1/10**3; \t#kJ/kg\n", + "u2 = 2602; \t\t\t #kJ/kg\n", + "\n", + "# Results\n", + "W = u1-u2; \n", + "print (\"Work done = %.3f\")%(W),(\"kJ/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done = 196.340 kJ/kg\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.58 page no : 201 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "p1 = 7.*10**5; \t\t\t#N/m**2\n", + "x1 = 0.98;\n", + "p2 = 0.34*10**5; \t\t#N/m**2\n", + "vg = 0.273; \t\t\t#m**3/kg\n", + "n = 1.1;\n", + "v_g2 = 4.65; \t\t\t#m**3/kg\n", + "u_f1 = 696.; \t\t\t#kJ/kg\n", + "u_g1 = 2573.; \t\t\t#kJ/kg\n", + "u_f2 = 302.; \t\t\t#kJ/kg\n", + "u_g2 = 2472.; \t\t\t#kJ/kg\n", + "\n", + "# Calculations and Results\n", + "v1 = x1*vg;\n", + "v2 = v1*(p1/p2)**(1/n);\n", + "x2 = v2/v_g2;\n", + "\n", + "\n", + "print (\"(i) Work done by the steam during the process\")\n", + "W = (p1*v1-p2*v2)/(n-1)/10**3; \t\t\t#kJ/kg\n", + "print (\"W = %.3f\")%(W), (\"kJ/kg\")\n", + "\n", + "\n", + "print (\"(ii) Heat transferred\")\n", + "u1 = (1-x1)*u_f1+x1*u_g1;\n", + "u2 = (1-x2)*u_f2+x2*u_g2;\n", + "Q = u2-u1 + W;\n", + "print (\"Q = %.3f\")%(Q), (\"kJ/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Work done by the steam during the process\n", + "W = 450.232 kJ/kg\n", + "(ii) Heat transferred\n", + "Q = 169.289 kJ/kg\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.59 page no : 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "p1 = 15.; \t\t\t#bar\n", + "t1 = 350.; \t\t\t#0C\n", + "C1 = 60.; \t\t\t#m/s\n", + "p2 = 1.2; \t\t\t#bar\n", + "C2 = 180.; \t\t\t#m/s\n", + "s1 = 7.102; \t\t\t#kJ/kg\n", + "s_f2 = 1.3609; \t\t\t#kJ/kg\n", + "s_g2 = 7.2884; \t\t\t#kJ/kg\n", + "h_f2 = 439.4; \t\t\t#kJ/kg\n", + "h_fg2 = 2241.1; \t\t\t#kJ/kg\n", + "h1 = 3147.5; \t\t\t#kJ/kg\n", + "\n", + "# Calculations\n", + "x2 = (s1 - s_f2)/(s_g2-s_f2);\n", + "h2 = h_f2+x2*h_fg2;\n", + "W = (h1-h2) + (C1**2 - C2**2)/2/1000;\n", + "\n", + "# Results\n", + "print (\"Work done = %.3f\")%(W),(\"kJ/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done = 523.075 kJ/kg\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.60 page no : 204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "p1 = 10.; \t\t\t#bar\n", + "t1 = 200.; \t\t\t#0C\n", + "C1 = 60.; \t\t\t#m/s**2\n", + "c2 = 650.; \t\t\t#m/s\n", + "p2 = 1.5; \t\t\t#bar\n", + "h1 = 2827.9; \t\t\t#kJ/kg\n", + "h_f2 = 467.1; \t\t\t#kJ/kg\n", + "h2 = 2618.45; \t\t\t#kJ/kg\n", + "h_g2 = 2693.4; \t\t\t#kJ/kg\n", + "\n", + "# Calculations\n", + "x2 = (h2-h_f2)/(h_g2-h_f2);\n", + "\n", + "# Results\n", + "print (\"quality of steam leaving the nozzle = %.3f\")%(x2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "quality of steam leaving the nozzle = 0.966\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.61 page no : 206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "h1 = 2776.4; \t\t\t#kJ/kg\n", + "h2 = h1;\n", + "h_f1 = 884.6; \t\t\t#kJ/kg\n", + "h_fg1 = 1910.3; \t\t#kJ/kg\n", + "\n", + "# Calculations\n", + "x1 = (h1-h_f1)/h_fg1;\n", + "\n", + "# Results\n", + "print (\"Initial dryness fraction = %.3f\")%(x1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Initial dryness fraction = 0.990\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.62 page no : 207" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "p1 = 10.; \t\t\t#bar\n", + "x1 = 0.9; \t\t\t#bar\n", + "p2 = 2.; \t\t\t#bar\n", + "\n", + "# Calculations\n", + "# Umath.sing Mollier chart, we get\n", + "x2 = 0.94;\n", + "\n", + "# Results\n", + "print (\"x2 = \"),(x2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "x2 = 0.94\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.63 Page no :208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "\n", + "import math \n", + "print (\"(a)From steam tables\")\n", + "\n", + "# Variables\n", + "p1 = 15*10**5; \t\t\t#Pa\n", + "p2 = 7.5*10**5; \t\t\t#Pa\n", + "h_f1 = 844.7; \t\t\t#kJ/kg\n", + "ts1 = 198.3; \t\t\t#0C\n", + "s_f1 = 2.3145; \t\t\t#kJ/kg.K\n", + "s_g1 = 6.4406; \t\t\t#kJ/kg.K\n", + "v_g1 = 0.132; \t\t\t#m**3/kg\n", + "h_fg1 = 1945.2; \t\t\t#kJ/kg\n", + "x1 = 0.95;\n", + "h_f2 = 709.3; \t\t\t#kJ/kg\n", + "h_fg2 = 2055.55; \t\t\t#kJ/kg\n", + "s_f2 = 2.0195; \t\t\t#kJ/kg\n", + "s_g2 = 6.6816; \t\t\t#kJ/kg.K\n", + "v_g2 = 0.255; \t\t\t#m**3/kg\n", + "x2 = 0.9;\n", + "x3 = 1;\n", + "s_f3 = 0.521; \t\t\t#kJ/kg K\n", + "s_g3 = 8.330; \t\t\t#kJ/kg K\n", + "\n", + "# Calculations\n", + "h2 = h_f2+x2*h_fg2;\n", + "h1 = h_f1 + x1*h_fg1;\n", + "s1 = s_f1 + x1*(s_g1-s_f1);\n", + "s2 = s1;\n", + "ds_12 = s2-s1;\n", + "\n", + "s3 = s_f3+x3*(s_g3-s_f3);\n", + "ds_23 = s3-s2;\n", + "\n", + "ds = 709.3 + 0.9 * 2055.55\n", + "\n", + "# Results\n", + "print (\"(i) Change in entropy = %.3f\")% (ds), (\"kJ/kg K\")\n", + "\n", + "h3 = h2;\n", + "\n", + "dh = h2-h1;\n", + "print (\"(ii) Change in enthalpy %.2f\")%(dh), (\"kJ/kg\")\n", + "\n", + "\n", + "print (\"(iii) Change in internal energy\"),\n", + "u1 = h1-p1*x1*v_g1/10**3;\n", + "u2 = h2-p2*x2*v_g2/10**3;\n", + "du = u2-u1;\n", + "print (\"du = %.3f\")% (du), (\"kJ/kg\")\n", + "\n", + "\n", + "\t\t\t# Only the expansion of steam from point 1 to 2 (i.e., isentropic expansion) is reversible because of unresisted flow whereas the expansion from point 2 to point 3 (i.e., throttling expansion) is irreversible because of frictional resismath.tance to flow. Increase of entropy also shows that expansion from point 2 to point 3 is irreversible.\n", + "\n", + "\n", + "print (\"(b) Using Mollier chart\")\n", + "h1 = 2692; \t\t\t#kJ/kg\n", + "h2 = 2560; \t\t\t#kJ/kg\n", + "s1 = 6.23; \t\t\t#kJ/kg K\n", + "s2 = s1;\n", + "s3 = 8.3; \t\t\t#kJ/kg K\n", + "\n", + "ds = s3-s1;\n", + "print (\"(i) Change in entropy = %.3f\")%(ds), (\"kJ/kg K\")\n", + "\n", + "\n", + "dh = h2-h1;\n", + "print (\"(ii) Change in enthalpy = %.3f\")%(dh),(\"kJ/kg\")\n", + "\n", + "u3=u2-u1\n", + "print (\"(iii) Change in internal energy =%.3f\")%(u3),(\"kJ/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)From steam tables\n", + "(i) Change in entropy = 2559.295 kJ/kg K\n", + "(ii) Change in enthalpy -133.35 kJ/kg\n", + "(iii) Change in internal energy du = -117.370 kJ/kg\n", + "(b) Using Mollier chart\n", + "(i) Change in entropy = 2.070 kJ/kg K\n", + "(ii) Change in enthalpy = -132.000 kJ/kg\n", + "(iii) Change in internal energy =-117.370 kJ/kg\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.64 Page no :212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V1 = 5.5; \t\t\t#m**3\n", + "p1 = 16.*10**5; \t\t\t#Pa\n", + "T1 = 315.; \t\t\t#K\n", + "V2 = V1;\n", + "p2 = 12.*10**5; \t\t\t#Pa\n", + "R = 0.287*10**3;\n", + "y = 1.4;\n", + "\n", + "# Calculations\n", + "m1 = p1*V1/R/T1;\n", + "T2 = T1*(p2/p1)**((y-1)/y);\n", + "m2 = p2*V2/R/T2;\n", + "\n", + "# Results\n", + "m = m1-m2;\n", + "print (\"Mass of air which left the receiver = %.3f\")% (m), (\"kg\")\n", + "\n", + "# Note : Rounding error is there." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass of air which left the receiver = 18.081 kg\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.65 Page no :213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "cp = 1.; \t\t\t#kJ/kg.K\n", + "cv = 0.711; \t\t\t#kJ/kg.K\n", + "V1 = 1.6; \t\t\t#m**3\n", + "V2 = V1;\n", + "p1 = 5.*10**5; \t\t\t#Pa\n", + "T1 = 373.; \t\t\t#K\n", + "p2 = 1.*10**5; \t\t\t#Pa\n", + "R = 287.;\n", + "y = 1.4;\n", + "\n", + "# Calculations\n", + "m1 = round(p1*V1/R/T1,2);\n", + "T2 = round(T1*(p2/p1)**((y-1)/y),2);\n", + "m2 = round(p2*V2/R/T2,3);\n", + "KE = (m1*cv*T1)-(m2*cv*T2)-(m1-m2)*cp*T2;\n", + "\n", + "# Results\n", + "print \"Kinetic energy of discharge air = %.3f\"% (KE), (\"kJ\")\n", + "print (\"This is the exact answer when using proper value of cv\")\n", + "\n", + "# Book answer is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Kinetic energy of discharge air = 382.910 kJ\n", + "This is the exact answer when using proper value of cv\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.66 Page no :214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#For oxygen\n", + "import math \n", + "\n", + "# Variables\n", + "cpa = 0.88; \t\t\t#kJ/kg K\n", + "Ra = 0.24; \t\t\t#kJ/kg K\n", + "V1a = 0.035; \t\t\t#m**3\n", + "p1a = 4.5; \t\t\t#bar\n", + "T1a = 333.; \t\t\t#K\n", + "V2a = 0.07; \t\t\t#m**3\n", + "\n", + "#For methane\n", + "V1b = 0.07; \t\t\t#m**3\n", + "V2b = 0.035; \t\t\t#m**3\n", + "p1b = 4.5; \t\t\t#bar\n", + "T1b = 261; \t\t\t#K\n", + "cpb = 1.92; \t\t\t#kJ/kg K\n", + "Rb = 0.496; \t\t\t#kJ/kg K\n", + "\n", + "# Calculations and Results\n", + "yb = cpb/(cpb-Rb); \t\t\t#for methane\n", + "cva = cpa-Ra; \t\t\t#for oxygen\n", + "\n", + "print (\"(i) Final state condition\")\n", + "\n", + "p2b = p1b*(V1b/V2b)**yb;\n", + "print (\"p2 for methane = %.3f\")% (p2b), (\"bar\")\n", + "\n", + "T2b = p2b*V2b*T1b/p1b/V1b;\n", + "print (\"T2 for methane = %.3f\")% (T2b), (\"K\")\n", + "\n", + "p2a = p2b;\n", + "\n", + "T2a = p2a*V2a/p1a/V1a*T1a;\n", + "print (\"T2 for oxygen = %.3f\")% (T2a), (\"K\")\n", + "\n", + "Wb = (p1b*V1b - p2b*V2b)/(yb-1)*100; \t\t\t#kJ\n", + "\n", + "print (\"(ii)The piston will be in virtual equilibrium and hence zero work is effected by the piston.\")\n", + "\n", + "Wa = -Wb;\n", + "\n", + "ma = p1a*V1a/Ra/T1a*10**2;\n", + "\n", + "Q = ma*cva*(T2a-T1a) + Wa;\n", + "print \"(iii) Heat transferred to oxygen = %.3f\"% (Q), (\"kJ\")\n", + "\n", + "# Rouding error is there." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Final state condition\n", + "p2 for methane = 11.458 bar\n", + "T2 for methane = 332.272 K\n", + "T2 for oxygen = 1695.733 K\n", + "(ii)The piston will be in virtual equilibrium and hence zero work is effected by the piston.\n", + "(iii) Heat transferred to oxygen = 196.572 kJ\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/ch5.ipynb b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/ch5.ipynb new file mode 100755 index 00000000..fc1f0115 --- /dev/null +++ b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/ch5.ipynb @@ -0,0 +1,2600 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:12efbfeaa3ed3ebbe140abe577bbac08dcae30fc36caa52e184adf21fd445870" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Chapter 5 : Second Law of Thermodynamics and Entropy" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.1 Page no : 237" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "Q1 = 1500./60; \t\t#kJ/s\n", + "W = 8.2; \t\t\t#kW\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) Thermal efficiency\")\n", + "n = W/Q1;\n", + "print (\"n = \"),(n)\n", + "\n", + "print (\"(ii) Rate of heat rejection\")\n", + "Q2 = Q1-W; \n", + "print (\"Q2 = \"),(Q2), (\"kW\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Thermal efficiency\n", + "n = 0.328\n", + "(ii) Rate of heat rejection\n", + "Q2 = 16.8 kW\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.2 Page no : 238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Q_12 = 30.; \t\t#kJ\n", + "W_12 = 60; \t\t\t#kJ\n", + "\n", + "# Calculations\n", + "dU_12 = Q_12-W_12;\n", + "Q_21 = 0;\n", + "W_21 = Q_21+dU_12;\n", + "\n", + "# Results\n", + "print (\"W_21 = \"),(W_21)\n", + "print (\"Thus 30 kJ work has to be done on the system to restore it to original state, by adiabatic process.\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "W_21 = -30.0\n", + "Thus 30 kJ work has to be done on the system to restore it to original state, by adiabatic process.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.3 Page no : 239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Q2 = 12000.; \t\t\t#kJ/h\n", + "W = 0.75*60*60; \t\t#kJ/h\n", + "\n", + "# Calculations and Results\n", + "COP = Q2/W;\n", + "print (\"Coefficient of performance %.3f\")%(COP)\n", + "\n", + "Q1 = Q2+W;\n", + "print (\"heat transfer rate = %.3f\")%(Q1), (\"kJ/h\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coefficient of performance 4.444\n", + "heat transfer rate = 14700.000 kJ/h\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.4 Page no : 239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "T2 = 261.; \t\t\t#K\n", + "T1 = 308.; \t\t\t#K\n", + "Q2 = 2.; \t\t\t#kJ/s\n", + "\n", + "# Calculations\n", + "Q1 = Q2*(T1/T2);\n", + "W = Q1-Q2;\n", + "\n", + "# Results\n", + "print (\"Least power required to pump the heat continuosly %.3f\")%(W),(\"kW\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Least power required to pump the heat continuosly 0.360 kW\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.5 Page no :239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "\n", + "# Variables\n", + "Q1 = 2*10**5; \t\t\t#kJ/h\n", + "W = 3*10**4; \t\t\t#kJ/h\n", + "\n", + "# Calculations and Results\n", + "Q2 = Q1-W;\n", + "print (\"Heat abstracted from outside = \"),(Q2), (\"kJ/h\")\n", + "\n", + "\n", + "COP_hp = Q1/(Q1-Q2);\n", + "print (\"Co-efficient of performance = %.2f\")%(COP_hp)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat abstracted from outside = 170000 kJ/h\n", + "Co-efficient of performance = 6.00\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.6 Page no : 240" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "T1 = 2373; \t\t\t#K\n", + "T2 = 288.; \t\t\t#K\n", + "\n", + "# Calculations\n", + "n_max = 1-T2/T1;\n", + "\n", + "# Results\n", + "print (\"Highest possible theoritical efficiency = %.3f\")% (n_max*100), (\"%\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Highest possible theoritical efficiency = 87.863 %\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.7 Page no : 240" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "T1 = 523.; \t\t\t#K\n", + "T2 = 258.; \t\t\t#K\n", + "Q1 = 90.; \t\t\t#kJ\n", + "\n", + "# Calculations and Results\n", + "n = 1-T2/T1;\n", + "print (\"(i) Efficiency of the system %.3f\")%(n*100), (\"%\")\n", + "\n", + "W = n*Q1;\n", + "print (\"(ii) The net work transfer\"),(\"W = %.3f\")%(W),(\"kJ\")\n", + " \n", + "Q2 = Q1-W;\n", + "print (\"(iii) Heat rejected to the math.sink\"),(\"Q2 = %.3f\")%(Q2),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Efficiency of the system 50.669 %\n", + "(ii) The net work transfer W = 45.602 kJ\n", + "(iii) Heat rejected to the math.sink Q2 = 44.398 kJ\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.8 Page no : 241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "T1 = 1023.; \t\t#K\n", + "T2 = 298.; \t\t\t#K\n", + "\n", + "# Calculations\n", + "n_carnot = 1-T2/T1;\n", + "W = 75*1000*60*60;\n", + "Q = 3.9*74500*1000;\n", + "n_thermal = W/Q;\n", + "\n", + "# Results\n", + "print (\"n_carnot = %.3f\")%(n_carnot)\n", + "\n", + "print (\"n_thermal = %.3f\")%(n_thermal)\n", + "\n", + "print (\"Since \u03b7thermal > \u03b7carnot, therefore claim of the inventor is not valid (or possible)\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "n_carnot = 0.709\n", + "n_thermal = 0.929\n", + "Since \u03b7thermal > \u03b7carnot, therefore claim of the inventor is not valid (or possible)\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.9 Page no : 241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T1 = 1273.; \t\t#K\n", + "T2 = 313.; \t\t\t#K\n", + "n_max = 1-T2/T1;\n", + "Wnet = 1.;\n", + "\n", + "# Calculations\n", + "Q1 = Wnet/n_max;\n", + "Q2 = Q1-Wnet;\n", + "\n", + "# Results\n", + "print (\"the least rate of heat rejection = %.3f\")%(Q2), (\"kW\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the least rate of heat rejection = 0.326 kW\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.10 Page no : 242" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "one_ton_of_refrigeration = 210.; \t\t\t#kJ/min\n", + "Cooling_required = 40*(one_ton_of_refrigeration); \t\t\t#kJ/min\n", + "T1 = 303.; \t\t\t#K\n", + "T2 = 238.; \t\t\t#K\n", + "\n", + "# Calculations\n", + "COP_refrigerator = T2/(T1-T2);\n", + "COP_actual = 0.20*COP_refrigerator;\n", + "W = Cooling_required/COP_actual/60;\n", + "\n", + "# Results\n", + "print (\"power required = %.1f\")% (W), (\"kW\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power required = 191.2 kW\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.11 Page no : 242" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "E = 12000.; \t\t#kJ/min\n", + "T2 = 308.; \t\t\t#K\n", + "# Source 1\n", + "T1 = 593.; \t\t\t#K\n", + "\n", + "# Calculations\n", + "n1 = 1-T2/T1;\n", + "# Source 2\n", + "T1 = 343.; \t\t\t#K\n", + "n2 = 1-T2/T1;\n", + "W1 = E*n1;\n", + "\n", + "# Results\n", + "print (\"W1 = %.3f\")% (W1),(\"kJ/min\")\n", + "\n", + "W2 = E*n2;\n", + "print (\"W2 = %.3f\")% (W2),(\"kJ/min\")\n", + "\n", + "print (\"Thus, choose source 2.\")\n", + "print (\"The source 2 is selected even though efficiency in this case is lower, because the criterion for selection is the larger output.\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "W1 = 5767.285 kJ/min\n", + "W2 = 1224.490 kJ/min\n", + "Thus, choose source 2.\n", + "The source 2 is selected even though efficiency in this case is lower, because the criterion for selection is the larger output.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + " Example 5.12 Page no : 243" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "\n", + "# Variables\n", + "T1 = 973.; \t\t\t#K\n", + "T2 = 323.; \t\t\t#K\n", + "T3 = 248.; \t\t\t#K\n", + "\n", + "Q1 = 2500.; \t\t\t#kJ\n", + "W = 400.; \t\t\t#kJ\n", + "\n", + "# Calculations and Results\n", + "n_max = 1-T2/T1;\n", + "W1 = n_max*Q1;\n", + "COP_max = T3/(T2-T3);\n", + "W2 = W1-W;\n", + "Q4 = COP_max*W2;\n", + "COP1 = round(Q4/W2,3);\n", + "Q3 = Q4+W2;\n", + "Q2 = Q1-W1;\n", + "print (\"Heat rejection to the 50\u00b0C reservoir = %.3f\")%(Q2+Q3), (\"kJ\")\n", + "\n", + "\n", + "n = 0.45*n_max;\n", + "W1 = n*Q1;\n", + "W2 = W1-W;\n", + "COP2 = 0.45*COP1;\n", + "Q4 = W2*COP2;\n", + "Q3 = Q4+W2;\n", + "Q2 = Q1-W1;\n", + "\n", + "print (\"Heat rejected to 50\u00b0C reservoir = %.3f\")% (Q2+Q3), (\"kJ\")\n", + "\n", + "# Note : Answers are slightly different then book because of Rounding Error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat rejection to the 50\u00b0C reservoir = 6299.773 kJ\n", + "Heat rejected to 50\u00b0C reservoir = 2623.147 kJ\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.13 Page no : 244" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T1 = 298.; \t\t\t#K\n", + "T2 = 273.; \t\t\t#K\n", + "Q1 = 24.; \t\t\t#kJ/s\n", + "T3 = 653.; \t\t\t#K\n", + "\n", + "# Calculations and Results\n", + "COP = T1/(T1-T2);\n", + "print (\"(i) determine COP and work input required\")\n", + "\n", + "print (\"Coefficient of performance = \"),(COP)\n", + "\n", + "COP_ref = T2/(T1-T2);\n", + "W = Q1/COP_ref;\n", + "print (\"Work input required = %.3f\")%(W),(\"kW\")\n", + "\n", + " \n", + "Q4 = T1*W/(T3-T1);\n", + "Q3 = Q4+W;\n", + "Q2 = Q1+W;\n", + "COP = Q1/Q3;\n", + "print (\"(ii)Determine overall COP of the system \"),(\"COP = %.3f\")%(COP)\n", + "\n", + "COP_overall = (Q2+Q4)/Q3;\n", + "print (\"Overall COP = %.3f\")%(COP_overall)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) determine COP and work input required\n", + "Coefficient of performance = 11.92\n", + "Work input required = 2.198 kW\n", + "(ii)Determine overall COP of the system COP = 5.937\n", + "Overall COP = 6.937\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.14 Page no : 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "T_e1 = 493.; \t\t\t#K\n", + "T_e2 = 298.; \t\t\t#K\n", + "T_p1 = 298.; \t\t\t#K\n", + "T_p2 = 273.; \t\t\t#K\n", + "Amt = 15.; \t\t \t#tonnes produced per day\n", + "h = 334.5; \t\t\t #kJ/kg\n", + "Q_abs = 44500.; \t\t#kJ/kg\n", + "\n", + "# Calculations and Results\n", + "Q_p2 = Amt*10**3*h/24/60;\n", + "COP_hp = T_p2/(T_p1-T_p2);\n", + "W = Q_p2/COP_hp/60;\n", + "print (\"(i)Power developed by the engine = %.3f\")%(W),(\"kW\")\n", + "\n", + "print (\"(ii) Fuel consumed per hour\")\n", + "n_carnot = 1-(T_e2/T_e1);\n", + "Q_e1 = W/n_carnot*3600; \t\t\t#kJ/h\n", + "fuel_consumed = Q_e1/Q_abs;\n", + "print (\"Quantity of fuel consumed/hour = %.3f\")%(fuel_consumed),(\"kg/h\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)Power developed by the engine = 5.318 kW\n", + "(ii) Fuel consumed per hour\n", + "Quantity of fuel consumed/hour = 1.088 kg/h\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.15 Page no : 247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "T1 = 550.; \t\t\t#K\n", + "T3 = 350.; \t\t\t#K\n", + "\n", + "# Calculations\n", + "T2 = (T1+T3)/2;\n", + "\n", + "# Results\n", + "print (\"Intermediate temperature = \"), (T2),(\"K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Intermediate temperature = 450.0 K\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.16 Page no : 247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T1 = 600.; \t\t\t#K\n", + "T2 = 300.; \t\t\t#K\n", + "\n", + "# Calculations and Results\n", + "T3 = 2*T1/(T1/T2+1);\n", + "print (\"(i) When Q1 = Q2\"),(\"T3 = \"),(T3),(\"K\")\n", + "\n", + "\n", + "print (\"(ii) Efficiency of Carnot engine and COP of carnot refrigerator\")\n", + "n = (T1-T3)/T1; \t\t\t#carnot engine\n", + "COP = T2/(T3-T2); \t\t\t#refrigerator\n", + "\n", + "print (\"Efficiency of carnot engine = %.3f\")% (n)\n", + "\n", + "print (\"COP of carnot refrigerator = \"), (COP)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) When Q1 = Q2 T3 = 400.0 K\n", + "(ii) Efficiency of Carnot engine and COP of carnot refrigerator\n", + "Efficiency of carnot engine = 0.333\n", + "COP of carnot refrigerator = 3.0\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.17 Page no : 249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T3 = 278.; \t\t\t#K\n", + "T2 = 350.; \t\t\t#K\n", + "T4 = T2;\n", + "T1 = 1350.; \t\t\t#K\n", + "\n", + "# Calculations\n", + "Q1 = 100/(((T4/T1)*(T1-T2)/(T4-T3))+T2/T1) \t#Q4+Q2 = 100; Q4 = Q1*((T4/T1)*(T1-T2)/(T4-T3)); Q2 = T2/T1*Q1;\n", + "\n", + "# Results\n", + "print (\"Q1 = %.3f\")%(Q1),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q1 = 25.906 kJ\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.18 Page no : 250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Q1 = 300.; \t\t\t#kJ/s\n", + "T1 = 290.; \t\t\t#0C\n", + "T2 = 8.5; \t\t\t#0C\n", + "\n", + "# Calculations and Results\n", + "print (\"let \u03a3dQ/T = A\")\n", + "\n", + "print (\"(i) 215 kJ/s are rejected\")\n", + "Q2 = 215.; \t\t\t#kJ/s\n", + "A = Q1/(T1+273) - Q2/(T2+273)\n", + "print (\"Since, A<0, Cycle is irreversible.\")\n", + "\n", + "\n", + "print (\"(ii) 150 kJ/s are rejected\")\n", + "Q2 = 150; \t\t\t#kJ/s\n", + "A = Q1/(T1+273) - Q2/(T2+273)\n", + "print (\"Since A = 0, cycle is reversible\")\n", + "\n", + "\n", + "print (\"(iii) 75 kJ/s are rejected.\")\n", + "Q2 = 75; \t\t\t#kJ/s\n", + "A = Q1/(T1+273) - Q2/(T2+273)\n", + "print (\"Since A>0, cycle is impossible\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "let \u03a3dQ/T = A\n", + "(i) 215 kJ/s are rejected\n", + "Since, A<0, Cycle is irreversible.\n", + "(ii) 150 kJ/s are rejected\n", + "Since A = 0, cycle is reversible\n", + "(iii) 75 kJ/s are rejected.\n", + "Since A>0, cycle is impossible\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.19 Page no : 251" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "P1 = 0.124*10**5; \t\t\t#N/m**2\n", + "T1 = 433; \t\t\t#K\n", + "T2 = 323; \t\t\t#K\n", + "h_f1 = 687; \t\t\t#kJ/kg\n", + "h2 = 2760; \t\t\t#kJ/kg\n", + "h3 = 2160; \t\t\t#kJ/kg\n", + "h_f4 = 209; \t\t\t#kJ/kg\n", + "\n", + "# Calculations and Results\n", + "Q1 = h2-h_f1;\n", + "Q2 = h_f4-h3;\n", + "print (\"Let A = \u03a3dQ/T\")\n", + "A = Q1/T1+Q2/T2;\n", + "print (A)\n", + "print (\"A<0. Hence classius inequality is verified\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Let A = \u03a3dQ/T\n", + "-3\n", + "A<0. Hence classius inequality is verified\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.20 Page no :251" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "T1 = 437.; \t\t\t#K\n", + "T2 = 324.; \t \t\t#K\n", + "h2 = 2760.; \t\t\t#kJ/kg\n", + "h1 = 690.; \t\t \t#kJ/kg\n", + "h3 = 2360.; \t\t\t#kJ/kg\n", + "h4 = 450.; \t\t\t #kJkg\n", + "\n", + "# Calculations\n", + "Q1 = h2-h1;\n", + "Q2 = h4-h3;\n", + "\n", + "# Results\n", + "print (\"Let A = \u03a3dQ/T\")\n", + "A = Q1/T1 + Q2/T2;\n", + "print \"%.3f\"%(A)\n", + "print (\"Since A<0, Classius inequality is verified\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Let A = \u03a3dQ/T\n", + "-1.158\n", + "Since A<0, Classius inequality is verified\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.21 Page no : 266" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "T0 = 273.; \t\t\t#K\n", + "T1 = 673.; \t\t\t#K\n", + "T2 = 298.; \t\t\t#K\n", + "m_w = 10.; \t\t\t#kg\n", + "T3 = 323.; \t\t\t#K\n", + "c_pw = 4186.; \t\t#kJ/kg.K\n", + "\n", + "# Calculations and Results\n", + "print (\"Let C = mi*cpi\")\n", + "C = m_w*c_pw*(T3-T2)/(T1-T3);\n", + "S_iT1 = C*math.log(T1/T0); \t\t\t# Entropy of iron at 673 K\n", + "S_wT2 = m_w*c_pw*math.log(T2/T0); \t#Entropy of water at 298 K\n", + "S_iT3 = C*math.log(T3/T0); \t\t\t#Entropy of iron at 323 K\n", + "S_wT3 = m_w*c_pw*math.log(T3/T0); \t#Entropy of water at 323 K\n", + "\n", + "dS_i = S_iT3 - S_iT1;\n", + "dS_w = S_wT3 - S_wT2; \n", + "dS_net = dS_i + dS_w\n", + "\n", + "print (\"Since dS>0, process is irreversible\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Let C = mi*cpi\n", + "Since dS>0, process is irreversible\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.23 Page no : 267" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "T1 = 293.; \t\t\t#K\n", + "V1 = 0.025; \t\t\t#m**3\n", + "V3 = V1;\n", + "p1 = 1.05*10**5; \t\t\t#N/m**2\n", + "p2 = 4.5*10**5; \t\t\t#N/m**2\n", + "R = 0.287*10**3; \n", + "cv = 0.718;\n", + "cp = 1.005;\n", + "T3 = 293.; \t\t\t#K\n", + "\n", + "# Calculations and Results\n", + "m = p1*V1/R/T1;\n", + "T2 = p2/p1*T1;\n", + "Q_12 = m*cv*(T2-T1);\n", + "Q_23 = m*cp*(T3-T2)\n", + "\n", + "Q_net = Q_12+Q_23;\n", + "print (\"Net heat flow = \"),(Q_net), (\"kJ\")\n", + "\n", + "\n", + "dS_32 = m*cp*math.log(T2/T1);\n", + "dS_12 = m*cv*math.log(T2/T1);\n", + "dS_31 = dS_32 - dS_12;\n", + "print (\"Decrease in entropy = %.3f\")% (dS_31), (\"kJ/K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Net heat flow = -8.625 kJ\n", + "Decrease in entropy = 0.013 kJ/K\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.24 Page no : 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "%matplotlib inline\n", + "\n", + "from matplotlib.pyplot import *\n", + "from numpy import *\n", + "import math \n", + "\n", + "# Variables\n", + "p1 = 1.05*10**5; \t#N/m**2\n", + "V1 = 0.04; \t\t\t#m**3\n", + "T1 = 288.; \t\t\t#K\n", + "p2 = 4.8*10**5;\n", + "T2 = T1;\n", + "R0 = 8314.;\n", + "M = 28.;\n", + "\n", + "# Calculations and Results\n", + "R = R0/M;\n", + "m = p1*V1/R/T1;\n", + "dS = m*R*math.log(p1/p2)\n", + "print (\"Decrease in entropy = %.3f\")% (-dS), (\"J/K\")\n", + "\n", + "\n", + "print \n", + "Q = T1*(-dS);\n", + "print (\"(ii)Heat rejected = \"),(\"Q = %.3f\")%(Q),(\"J\")\n", + "\n", + "\n", + "W = Q;\n", + "print (\"Work done = %.3f\")% (W), (\"J\")\n", + "\n", + "V2 = p1*V1/p2;\n", + "v1 = V1/m; \t\t\t#specific volume\n", + "v2 = V2/m; \t\t\t#specific volume\n", + "\n", + "v = linspace(v2,0.8081571,64);\n", + "\n", + "\n", + "def f(v):\n", + " return p1*v1/v\n", + "plot(v,f(v))\n", + "\n", + "p = []\n", + "for i in range(len(v)):\n", + " p.append(p1)\n", + "plot(v,p,'--')\n", + "\n", + "p = [0 ,p2]\n", + "v = [v2 ,v2]\n", + "plot(v,p,'--')\n", + "\n", + "p = [0 ,p1]\n", + "v = [v1 ,v1]\n", + "plot(v,p,'--')\n", + "\n", + "T = [288, 288]\n", + "s = [10 ,(10-dS)]\n", + "plot(s,T)\n", + "\n", + "s = [10 ,10]\n", + "T = [0 ,288]\n", + "plot(s,T,'--')\n", + "\n", + "s = [(10-dS), (10-dS)]\n", + "T = [0 ,288]\n", + "plot(s,T,'--')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "Decrease in entropy = 22.164 J/K\n", + "\n", + "(ii)Heat rejected = Q = 6383.268 J\n", + "Work done = 6383.268 J\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 13, + "text": [ + "[<matplotlib.lines.Line2D at 0x2c3da90>]" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEACAYAAABCl1qQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHfdJREFUeJzt3W9MVHe+P/D3zOhW7WivBQYtw5WWtgrHGZnVatTa0ApB\nIMX+sYG0sInuJv3tXQrbB31w22wZ2m39bdst16ybjblZrC7t3frbYtwUOpHdltjU24mirtrNvdla\nhTljlQGkjFL+OZ/fA2UWVBiwnB7m6/uVzAPPzJm8zxkzb77nz3csIiIgIiIah9XsAERENP2xLIiI\nKCaWBRERxcSyICKimFgWRE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cHlcsXF/h8reygUir5mQvt+6s+7f38aGxtF\n0zTJyMiQ119/3ew4k/LVV1+J2+2WZcuWyX333Se/+MUvzI40rpKSElm4cKHMnDlTnE6n1NbWSmdn\np+Tk5IjL5ZLc3Fy5cOGC2THHdG3+3//+91JaWiput1uWLFkieXl5ouu62THH9Omnn4rFYpFly5ZJ\nVlaWZGVlyUcffRQ3n8GN8jc2NsbNZ3D8+HHJysqSZcuWyeLFi6W6ulpEJC72/1jZJ7vveVMeERHF\nFLeHoYiI6PvDsiAiophYFkREFBPLgoiIYmJZEBFRTCwLIiKKiWVBREQxsSyIiCim/w93T0cbP4g9\nZgAAAABJRU5ErkJggg==\n", + "text": [ + "<matplotlib.figure.Figure at 0x2124290>" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.25 Page no : 270" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "R = 287.; \t\t\t#kJ/kg.K\n", + "dU = 0;\n", + "W = 0;\n", + "Q = dU+W;\n", + "\n", + "# Calculations\n", + "dS = R*math.log(2); \t\t\t#v2/v1 = 2\n", + "\n", + "# Results\n", + "print (\"Change in entropy = %.3f\")%(dS),(\"kJ/kg.K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in entropy = 198.933 kJ/kg.K\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.26 Page no : 271" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "m = 0.04; \t\t\t#kg\n", + "p1 = 1*10.**5; \t\t\t#N/m**2\n", + "T1 = 293.; \t\t\t#K\n", + "p2 = 9*10.**5; \t\t\t#N/m**2\n", + "V2 = 0.003; \t\t\t#m**3\n", + "cp = 0.88; \t\t\t#kJ/kg.K\n", + "R0 = 8314.;\n", + "M = 44.;\n", + "\n", + "# Calculations\n", + "R = R0/M;\n", + "T2 = p2*V2/m/R;\n", + "ds_2A = R/10**3*math.log(p2/p1);\n", + "ds_1A = cp*math.log(T2/T1);\n", + "ds_21 = ds_2A - ds_1A;\n", + "dS_21 = m*ds_21;\n", + "\n", + "# Results\n", + "print (\"Decrease in entropy = %.3f\")% (dS_21),(\"kJ/K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Decrease in entropy = 0.010 kJ/K\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.27 Page no : 272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "p1 = 7.*10**5; \t\t\t#N/m**2\n", + "T1 = 873.; \t\t\t#K\n", + "p2 = 1.05*10**5; \t\t\t#N/M62\n", + "n = 1.25;\n", + "m = 1.; \t\t\t#kg\n", + "R = 0.287;\n", + "cp = 1.005;\n", + "\n", + "# Calculations\n", + "T2 = T1*(p2/p1)**((n-1)/n);\n", + "\n", + "# At constant temperature from 1 to A\n", + "ds_1A = R*math.log(p1/p2);\n", + "# At constant pressure from A to 2\n", + "ds_2A = cp*math.log(T1/T2);\n", + "ds_12 = ds_1A - ds_2A;\n", + "\n", + "# Results\n", + "print (\"Increase in entropy = %.3f\")% (ds_12), (\"kJ/kg.K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Increase in entropy = 0.163 kJ/kg.K\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.28 Page no : 274" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "p1 = 7*10**5; \t\t#Pa\n", + "T1 = 733.; \t\t\t#K\n", + "p2 = 1.012*10**5; \t#Pa\n", + "T2a = 433.; \t\t#K\n", + "y = 1.4;\n", + "cp = 1.005;\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) To prove that the process is irreversible\")\n", + "T2 = T1*(p2/p1)**((y-1)/y);\n", + "print (\"T2 = %.3f\")% (T2)\n", + "print (\"But the actual temperature is 433K at th epressure of 1.012 bar, Hence the process is irreversible. Proved.\")\n", + "\n", + "\n", + "print (\"(ii) Change of entropy per kg of air\")\n", + "ds = cp*math.log(T2a/T2);\n", + "print (\"Increase of entropy = %.3f\")% (ds), (\"kJ/kg.K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) To prove that the process is irreversible\n", + "T2 = 421.820\n", + "But the actual temperature is 433K at th epressure of 1.012 bar, Hence the process is irreversible. Proved.\n", + "(ii) Change of entropy per kg of air\n", + "Increase of entropy = 0.026 kJ/kg.K\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.29 Page no : 275" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "V1 = 0.3; \t\t\t#m**3\n", + "p1 = 4*10**5; \t\t#N/m**2\n", + "V2 = 0.08; \t\t\t#m**3\n", + "n = 1.25; \n", + "\n", + "# Calculations and Results\n", + "p2 = p1*(V1/V2)**n;\n", + "\n", + "dH = n*(p2*V2-p1*V1)/(n-1)/10**3;\n", + "print (\"(i) Change in enthalpy\"), (\"dH = %.3f\")% (dH), (\"kJ\")\n", + "\n", + "dU = dH-(p2*V2 - p1*V1)/10**3;\n", + "print (\"(ii) Change in internal energy\"),(\"dU = %.3f\")% (dU), (\"kJ\")\n", + "\n", + "dS = 0;\n", + "print (\"(iii) Change in entropy\"),(\"dS\"), (dS)\n", + "\n", + "Q = 0;\n", + "print (\"(iv)Heat transfer\"),(\"Q = \"), (Q)\n", + "\n", + "W = Q-dU;\n", + "print (\"(v) Work transfer\"),(\"W = %.3f\")%(W),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Change in enthalpy dH = 234.947 kJ\n", + "(ii) Change in internal energy dU = 187.958 kJ\n", + "(iii) Change in entropy dS 0\n", + "(iv)Heat transfer Q = 0\n", + "(v) Work transfer W = -187.958 kJ\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.30 Page no : 277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "m = 20.; \t\t\t#kg\n", + "p1 = 4.*10**5; \t\t\t#Pa\n", + "p2 = 8.*10**5; \t\t\t#Pa\n", + "V1 = 4.; \t\t\t#m**3\n", + "V2 = V1;\n", + "cp = 1.04; \t\t\t#kJ/kg.K\n", + "cv = 0.7432; \t\t\t#kJ/kg.K\n", + "R = cp-cv;\n", + "T1 = p1*V1/R/1000.; \t\t\t#kg.K; T = mass*temperature\n", + "T2 = p2*V2/R/1000.; \t\t\t#kg.K\n", + "\n", + "# Calculations and Results\n", + "dU = cv*(T2-T1);\n", + "print (\"(i) Change in internal energy\"),(\"dU = %.3f\")% (dU), (\"kJ\")\n", + "\n", + "Q = 0;\n", + "W = Q-dU;\n", + "print (\"(ii) Work done\"),(\"W %.3f\")% (W), (\"kJ\")\n", + "\n", + "print (\"(iii) Heat transferred = \"), (Q)\n", + "\n", + "dS = m*cv*math.log(T2/T1);\n", + "print (\"(iv) Change in entropy = %.3f\")%(dS), (\"kJ/K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Change in internal energy dU = 4006.469 kJ\n", + "(ii) Work done W -4006.469 kJ\n", + "(iii) Heat transferred = 0\n", + "(iv) Change in entropy = 10.303 kJ/K\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.31 Page no : 278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "from matplotlib.pyplot import *\n", + "%matplotlib inline\n", + "\n", + "# Variables\n", + "V1 = 5.; \t\t\t#m**3\n", + "p1 = 2.*10**5; \t\t\t#Pa\n", + "T1 = 300.; \t\t\t#K\n", + "p2 = 6.*10**5; \t\t\t#Pa\n", + "p3 = 2.*10**5; \t\t\t#Pa\n", + "R = 287.;\n", + "n = 1.3;\n", + "y = 1.4;\n", + "\n", + "# Calculations and Results\n", + "m = p1*V1/R/T1;\n", + "T2 = T1*(p2/p1)**((n-1)/n);\n", + "T3 = T2*(p3/p2)**((y-1)/y);\n", + "W_12 = m*R*(T1-T2)/(n-1)/1000; \t\t\t#polytropic compression\n", + "W_23 = m*R*(T2-T3)/(y-1)/1000; \t\t\t#Adiabatic expansion\n", + "\n", + "\n", + "W_net = W_12+W_23;\n", + "print (\"Net work done on the air = %.3f\")%(-W_net), (\"kJ\")\n", + "\n", + "T = [T1, 310, 320, 330, 340, 350, 360, 370, 380, T2];\n", + "def f(T):\n", + " return (y-n)/(y-1)/(1-n)*R/10**3*math.log(T);\n", + "\n", + "s = [f(T1), f(310), f(320), f(330), f(340), f(350), f(360), f(370), f(380), f(T2)]\n", + "\n", + "plot(s,T)\n", + "\n", + "T = [T2, T3];\n", + "s = [f(T2), f(T2)];\n", + "plot(s,T,'r')\n", + "\n", + "# Answers are slightly diffferent because of rounding error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "Net work done on the air = 94.023 kJ\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "WARNING: pylab import has clobbered these variables: ['f', 'draw_if_interactive']\n", + "`%pylab --no-import-all` prevents importing * from pylab and numpy\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 9, + "text": [ + "[<matplotlib.lines.Line2D at 0x2aa0d90>]" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAD9CAYAAABazssqAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X1c1fX9//HHITBklWkqLpjRAsWDF2AK2s8KFbQ0SavR\ncPllX21bdrWcadLF0iyhtLVso75u+c22vpHuQqw5B83O7MphGrVJBRWbgMY3S+hC7Ajn/fvjnXy1\nlAvh8OFwnvfb7dzCcz6f83lCel583pcuY4xBRESCUojTAURExDkqAiIiQUxFQEQkiKkIiIgEMRUB\nEZEgpiIgIhLE2lQEmpqaSEpKYsaMGQB8/PHHpKenM2TIEKZMmUJdXV3zsbm5ucTFxREfH09RUZF/\nUouISKdoUxF4+OGHcbvduFwuAPLy8khPT6e8vJzJkyeTl5cHQFlZGc888wxlZWVs2bKF66+/Hp/P\n57/0IiLSIa0WgerqajZv3sy1117LkXllmzZtIjs7G4Ds7Gw2btwIQGFhIVlZWYSFhRETE0NsbCwl\nJSV+jC8iIh3RahFYsGABK1euJCTk/w6tra0lMjISgMjISGprawHYu3cv0dHRzcdFR0dTU1PT2ZlF\nRKSThLb04nPPPcfAgQNJSkrC4/Ec9xiXy9XcTHSi19vynIiItK6zV/pp8U7glVdeYdOmTZx77rlk\nZWWxdetW5syZQ2RkJB988AEA+/btY+DAgQBERUVRVVXVfH51dTVRUVHHfW9jTMA+7r77bsczKL/z\nOYItu/I7//CHFovAihUrqKqqorKykoKCAiZNmsRvfvMbMjIyWLduHQDr1q1j5syZAGRkZFBQUIDX\n66WyspKKigqSk5P9ElxERDquxeagrzrSjLNkyRIyMzN5/PHHiYmJYf369QC43W4yMzNxu92EhoaS\nn5+vph8RkW7MZfx1j9HSRV0uv93adAWPx0Nqaq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MZx48aZXbt2BVR+Y4z5/ve/b/7rv/6rS3N3Rnav\n12uuueYaM3z4cDN69GjzwgsvtHpNlzFaw0FEJFgF5rAQERHpFCoCIiJBTEVARCSIqQiIiAQxFQER\nkSCmIiAiEsT+P3S/G55r8UZJAAAAAElFTkSuQmCC\n", + "text": [ + "<matplotlib.figure.Figure at 0x2aa0bd0>" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.32 Page no : 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "V1 = 0.004; \t\t\t#m**3\n", + "p1 = 1.*10**5; \t\t\t#Pa\n", + "T1 = 300.; \t\t\t#K\n", + "T2 = 400.; \t\t\t#K\n", + "y = 1.4;\n", + "M = 28.;\n", + "R0 = 8.314;\n", + "R = R0/M;\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) The heat supplied\")\n", + "m = p1*V1/R/1000/T1; \t\t\t#kg\n", + "cv = R/(y-1);\n", + "Q = m*cv*(T2-T1);\n", + "print (\"Q %.3f\")%(Q), (\"kJ\")\n", + "\n", + "print (\"(ii) The entropy change\")\n", + "dS = m*cv*math.log(T2/T1);\n", + "print (\"dS = %.8f\")%(dS), (\"kJ/kg.K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The heat supplied\n", + "Q 0.333 kJ\n", + "(ii) The entropy change\n", + "dS = 0.00095894 kJ/kg.K\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.33 Page no : 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "V1 = 0.05; \t\t\t#m**3\n", + "p1 = 1.*10**5; \t\t\t#Pa\n", + "T1 = 280.; \t\t\t#K\n", + "p2 = 5.*10**5; \t\t\t#Pa\n", + "\n", + "# Calculations\n", + "print (\"(i) Change in entropy\")\n", + "R0 = 8.314;\n", + "M = 28.;\n", + "R = R0/M;\n", + "m = p1*V1/R/T1/1000;\n", + "dS = m*R*math.log(p1/p2);\n", + "\n", + "# Results\n", + "print (\"dS = %.3f\")%(dS), (\"kJ/K\")\n", + "\n", + "print (\"(ii)Work done\")\n", + "Q = T1*dS;\n", + "print (\"Q = %.3f\")%(Q),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Change in entropy\n", + "dS = -0.029 kJ/K\n", + "(ii)Work done\n", + "Q = -8.047 kJ\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.34 Page no : 280" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "R = 0.287; \t\t\t#kJ/kg.K\n", + "m = 1.; \t\t\t#kg\n", + "p1 = 8.*10**5; \t\t\t#Pa\n", + "p2 = 1.6*10**5; \t\t\t#Pa\n", + "T1 = 380.; \t\t\t#K\n", + "n = 1.2;\n", + "y = 1.4;\n", + "\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) Final specific volume and temperature\")\n", + "v1 = R*T1/p1*10**3; \t\t\t#m**3/kg\n", + "v2 = v1*(p1/p2)**(1/n);\n", + "T2 = T1*(p2/p1)**((n-1)/n);\n", + "\n", + "print (\"v2 = %.3f\")%(v2), (\"m**3/kg\")\n", + "print (\"T2 = %.3f\")% (T2),(\"K\")\n", + "\n", + "print (\"(ii) Change of internal energy, work done and heat interaction\")\n", + "dU = R/(y-1)*(T2-T1);\n", + "print (\"dU = %.3f\")%(dU), (\"kJ/kg\")\n", + "\n", + "W = R*(T1-T2)/(n-1);\n", + "print (\"W = %.3f\")%(W), (\"kJ/kg\")\n", + "\n", + "Q = dU + W;\n", + "print (\"Q = %.3f\")%(Q),(\"kJ/kg\")\n", + "\n", + "print (\"(iii) Change in entropy\")\n", + "dS = R/(y-1)*math.log(T2/T1) + R*math.log(v2/v1)\n", + "print (\"dS = %.3f\")%(dS),(\"kJ/kg.K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Final specific volume and temperature\n", + "v2 = 0.521 m**3/kg\n", + "T2 = 290.595 K\n", + "(ii) Change of internal energy, work done and heat interaction\n", + "dU = -64.148 kJ/kg\n", + "W = 128.296 kJ/kg\n", + "Q = 64.148 kJ/kg\n", + "(iii) Change in entropy\n", + "dS = 0.192 kJ/kg.K\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.35 Page no : 281" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "%matplotlib inline\n", + "import math\n", + "from matplotlib.pyplot import *\n", + "\n", + "# Variables\n", + "y = 1.4;\n", + "cv = 0.718; \t\t#kJ/kg.K\n", + "m = 1.; \t\t\t #kg\n", + "T1 = 290.; \t\t\t#K\n", + "n = 1.3;\n", + "r = 16.;\n", + "y = 1.4;\n", + "\n", + "# Calculations and Results\n", + "T2 = T1*(r)**(n-1);\n", + "\n", + "print (\"(a)\")\n", + "\n", + "T = [T1, 300, 310, 320, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450, 460, 470, 480, 490, 500, 510, 520, 530, 540, 550, 560, 570, 580, 590, 600, 610, 620, 630, 640, 650, 660, T2];\n", + "def f(T):\n", + " return (y-n)*cv/(1-n)/10**3*math.log(T);\n", + "\n", + "s = [f(T1),f(300),f(310),f(320),f(330),f(340),f(350),f(360),f(370),f(380),f(390),f(400),f(410),f(420),f(430),f(440),f(450),f(460),f(470),f(480),f(490),f(500),f(510),f(520),f(530),f(540),f(550),f(560),f(570),f(580),f(590),f(600),f(610),f(620),f(630),f(640),f(650),f(660), f(T2)];\n", + "plot(s,T)\n", + "\n", + "T = [0, T2];\n", + "s = [f(T2), f(T2)];\n", + "plot(s,T,'r--')\n", + "\n", + "T = [0 ,T1];\n", + "s = [f(T1),f(T1)];\n", + "plot(s,T,'r--')\n", + "\n", + "T = [T1 ,T2];\n", + "s = [f(T1), f(T2)];\n", + "plot(s,T,'r--' )\n", + "suptitle(\"T-S diagram\")\n", + "xlabel(\"S\")\n", + "ylabel(\"T\")\n", + "text(-0.00150,400,\"pV**n = C\")\n", + "\n", + "print (\"(b)Entropy change\")\n", + "dS = cv*((n-y)/(n-1))*math.log(T2/T1);\n", + "print (\"dS = %.3f\")%(dS), (\"kJ/kg.K\")\n", + "print (\"There is decrease in entropy\")\n", + "\n", + "Q = cv*((y-n)/(n-1))*(T1-T2);\n", + "Tmean = (T1+T2)/2;\n", + "dS_app = Q/Tmean;\n", + "\n", + "error = ((-dS) - (-dS_app))/(-dS) * 100;\n", + "print (\"age error = %.3f\")%(error), (\"%\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "(a)\n", + "(b)Entropy change" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "dS = -0.199 kJ/kg.K\n", + "There is decrease in entropy\n", + "age error = 5.393 %\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZoAAAEhCAYAAABGC2bVAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlclXX6//EXoOZeJqAFpg2NCwiKC2aSkUUYLpNtYknN\npJXNaJk538rKJX/ptJjaMqMz7VGJpdUk5pglTVai4orlGqaHRj1K7hoC9++Pjx4lNUHOfc4N5/18\nPHgEh/vc93Xujufic9/X5/oEWZZlISIiYpNgfwcgIiLVmxKNiIjYSolGRERspUQjIiK2UqIRERFb\nKdGIiIitavg7AJHK2r17N9de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Oy8/PL1NpFSjvi/Kci0B5Xxz/N7Jjxw6rU6dOVrt27ayWLVtaQ4cOtYqLiy3L\nOrf3hSZsioiIrRzVvVlERKofJRoREbGVEo2IiNhKiUZERGylRCMiIrZSohEREVsp0Yh4wRNPPEGr\nVq1o164d7dq1Iycnx98hiTiGo1bYFKmKsrOz+fzzz8nLy6NmzZrs27ePQ4cO+TssEcdQohGpJLfb\nTVhYGDVr1gSgYcOGNGzY0M9RiTiHOgOIVNK+ffvo1q0bxcXFJCUlcfPNN3PNNdf4OywRx9A9GpFK\natiwIStXruTll1+mSZMmDBw4kFdeecXfYYk4hkY0Il42a9YsXnnlFT799FN/hyLiCBrRiFTSxo0b\nyyyUtWLFijIrHYoEOhUDiFTS/v37+fOf/8zBgwcpLi7msssu06UzkZPo0pmIiNhKl85ERMRWSjQi\nImIrJRoREbGVEo2IiNhKiUZERGylRCMiIrZSohEREVsp0YiIiK3+P0qnzwUjczFJAAAAAElFTkSu\nQmCC\n", + "text": [ + "<matplotlib.figure.Figure at 0x3b860d0>" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.36 Page no : 282" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from matplotlib.pyplot import *\n", + "from numpy import *\n", + "# Variables\n", + "cp = 1.005; \t\t\t#kJ/kg.K\n", + "R = 0.287; \t\t\t#kJ/kg.K\n", + "V1 = 1.2; \t\t\t#m**3\n", + "p1 = 1.*10**5; \t\t\t#Pa\n", + "p2 = p1;\n", + "T1 = 300.; \t\t\t#K\n", + "T2 = 600.; \t\t\t#K\n", + "T3 = T1;\n", + "p1 = 1.*10**5; \t\t\t#Pa\n", + "cv = cp-R;\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) The net heat flow\")\n", + "m = p1*V1/R/1000/T1; \t\t\t#kg\n", + "Q = m*R*(T2-T1);\n", + "print (\"Q = \"), (Q), (\"kJ\")\n", + "\n", + "print (\"(ii) The overall change in entropy\")\n", + "dS_12 = m*cp*math.log(T2/T1);\n", + "dS_23 = m*(cp-R)*math.log(T3/T2); \t\t\t#cv = cp-R\n", + "dS_overall = dS_12+dS_23;\n", + "print (\"Overall change in entropy = %.3f\")%(dS_overall),(\"kJ/K\")\n", + "\n", + "s = linspace(math.sqrt(300),math.sqrt(600),100);\n", + "T = s**2;\n", + "plot(s,T)\n", + "\n", + "s = linspace(22.18,math.sqrt(600),100)\n", + "T = 10*(s-16.725)**2;\n", + "plot(s,T,'r')\n", + "\n", + "s = [17, 25];\n", + "T = [600, 600];\n", + "plot(s,T,'--')\n", + "\n", + "s = [17 ,25];\n", + "T = [300 ,300];\n", + "plot(s,T,'--')\n", + "\n", + "suptitle(\"T-s diagram \")\n", + "xlabel(\"S\")\n", + "ylabel(\"T\")\n", + "text(24,400,\"v = C\")\n", + "text(20,450,\"p = C\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The net heat flow\n", + "Q = 120.0 kJ\n", + "(ii) The overall change in entropy\n", + "Overall change in entropy = 0.277 kJ/K\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 2, + "text": [ + "<matplotlib.text.Text at 0x4787450>" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEhCAYAAACUW2yNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtY1GXex/E3kJaVtilixRC6msppdMRDJvZgaRZqG64H\nTLSezVbL8tyaVopRUpl5yopKtzXsSUsqV9C1VNQOiiIqmOEhLAZDCUJRNATu549bZ8UBE5nhN8D3\ndV1cwfCbHx9J5zv32U0ppRBCCCEu4m50ACGEEK5HioMQQgg7UhyEEELYkeIghBDCjhQHIYQQdqQ4\nCCGEsHON0QGEqK68vDx69+4NQE5ODh4eHjRv3hw3Nze2b99OgwYNqnzPDz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z/99JNq165dDacq79KMe/fuVV5eXqply5aqZcuW6pprrlG+vr7q\n2LFjLpXzUhcvPq6MS485VOarr77Cz8+P2267zegolfL19WXz5s0AbNy4kVatWhmcyN6FGSpKKWbP\nns2oUaMMTqSzPPbYY/j7+zNx4kTb42FhYcTFxQEQFxdHWFiYURGBynNeeo3RKsu5bt06XnvtNVav\nXs11111nYEKtspyZmZm2z7/44otys+1qWkUZg4KCOHbsGJmZmWRmZmIymdi1a5dtka+r5AS9+PiC\nVatWERAQ8Ic3clkRERHq1ltvVQ0bNlQmk0ktXbpUKaXUo48+qmJjYw1O918XcjZo0MCW85tvvlEd\nOnRQ/v7+ymKxqO3bt7tUxiVLlqj58+er9u3bq8DAQDVt2jRD812wdetW5ebmpjp06KA6duyoOnbs\nqNauXavy8vJU7969VVBQkOrTp4/hfc8V5UxMTFSfffaZMplM6rrrrlMtWrRQ999/v0vmbNOmjbr9\n9tttjz3xxBMumTM8PFyZzWbl5+enwsLC1NGjR10u48VatWpl+JhDZTkjIyOV2WxW7du3V3379lVW\nq/Wy95FFcEIIIezUym4lIYQQziXFQQghhB0pDkIIIexIcRBCCGFHioMQQgg7UhyEEELYkeIghAO8\n8MILtGvXjg4dOtChQwe2b99udCQhqsWpJ8EJUR8kJSWxYcMG0tPTadCgASdPnqSoqMjoWEJUixQH\nIaopNzeX5s2b2460bdKkCU2aNDE4lRDVIyukhaimkydP0qNHD0pKSggNDWXQoEHce++9RscSolpk\nzEGIamrSpAm7d+9m8eLFtGjRgsjISN5//32jYwlRLdJyEMLBVq1axfvvv8/atWuNjiLEVZOWgxDV\ndPDgQY4cOWL7OjU1FR8fH+MCCeEAMiAtRDUVFhby5JNPcvr0aUpKSmjTpo10K4laT7qVhBBC2JFu\nJSGEEHakOAghhLAjxUEIIYQdKQ5CCCHsSHEQQghhR4qDEEIIO1IchBBC2JHiIIQQws7/A7QEHj3e\nWXM+AAAAAElFTkSuQmCC\n", + "text": [ + "<matplotlib.figure.Figure at 0x46d17d0>" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.37 Page no : 283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "from matplotlib.pyplot import *\n", + "\n", + "# Variables\n", + "cv = 0.718; \t\t\t#kJ/kg.K\n", + "R = 0.287 \t\t\t#kJ/kg.K\n", + "p1 = 1.*10**5; \t\t\t#Pa\n", + "T1 = 300. \t\t\t#K\n", + "V1 = 0.018; \t\t\t#m**3\n", + "p2 = 5.*10**5 \t\t\t#Pa\n", + "T3 = T1;\n", + "cp = cv+R;\n", + "p3 = p2;\n", + "\n", + "# Calculations and Results\n", + "m = p1*V1/R/T1/1000; \t\t\t#kg\n", + "T2 = T1*p2/p1;\n", + "\n", + "print (\"(i) constant volume process\")\n", + "dS_12 = m*cv*math.log(T2/T1);\n", + "print (\"dS = %.3f\")%(dS_12), (\"kJ/K\")\n", + "\n", + "print (\"(ii) Constant prssure process \")\n", + "dS_23 = m*cp*math.log(T3/T2);\n", + "print (\"dS = %.3f\")%(dS_23), (\"kJ/K\")\n", + "\n", + "print (\"(iii) Isothermal process\")\n", + "dS_31 = m*R*math.log(p3/p1);\n", + "print (\"dS = %.5f\")%(dS_31),(\"kJ/K\")\n", + "\n", + "print (\"T-s diagram\")\n", + "s = linspace(math.sqrt(300),math.sqrt(600),72);\n", + "T = s**2;\n", + "#plot(s,T)\n", + "\n", + "s = linspace(22.18,math.sqrt(600),24)\n", + "T = 10*(s-16.725)**2;\n", + "#plot(s,T,'r')\n", + "\n", + "s = [math.sqrt(300), 22.18];\n", + "T = [300 ,300];\n", + "#plot(s,T,'g')\n", + "\n", + "print (\"p-V diagram\")\n", + "\n", + "V = [0.018, 0.018];\n", + "p = [1 ,5];\n", + "#plot(V,p)\n", + "\n", + "p = [5 ,5];\n", + "V = [0.0036, 0.018];\n", + "#plot(V,p,'r')\n", + "\n", + "V = linspace(0.0036,0.018,145)\n", + "\n", + "def f():\n", + " return 1*0.018/V;\n", + "f1 = f()\n", + "\n", + "plot(V,f1,'g')\n", + "suptitle(\"p-V diagram\")\n", + "xlabel(\"V\")\n", + "ylabel(\"p\")\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) constant volume process\n", + "dS = 0.024 kJ/K\n", + "(ii) Constant prssure process \n", + "dS = -0.034 kJ/K\n", + "(iii) Isothermal process\n", + "dS = 0.00966 kJ/K\n", + "T-s diagram\n", + "p-V diagram\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 3, + "text": [ + "<matplotlib.text.Text at 0x4047ad0>" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEdCAYAAAASHSDrAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlUFGfCNfDbgKiAikRBBFQEFZCtAcUNbXFfI+7gglvC\noAbNJI6vGecVc6LRxJjEaAzJJBrzmWBe4kIUUKO2ioqIggFRAQXZBNzAlSBQ3x9OeiQsCnZR3c39\nncM5dHdVeeFYfXme6qqSCYIggIiIqBZ6UgcgIiLNxqIgIqI6sSiIiKhOLAoiIqoTi4KIiOrEoiAi\nojqxKEinrF69Gu+9916V55KSkuDk5FTnekqlEuPGjQMA/Prrr1i/fr1oGYm0DYuCdEpAQAB27dpV\n5bnw8HAEBAS89DbGjRuH5cuXv3IWQRDA05RIF7AoSGtkZWXBwcEBM2fOhJOTE6ZMmYInT55UWaZb\nt25o27Yt4uPjVc/93//9H/z9/attLyYmBo6OjvD09MSePXtUz2/fvh1vvfUWgGejiz59+sDDwwPD\nhg1DUVERAODWrVsYNmwYnJ2d8cYbb6BLly64e/cusrKy0KNHDwQGBsLFxQU5OTlYuHAhevXqBWdn\nZ4SGhqr+nS5duuC9996DXC6Hl5cXLly4gOHDh8Pe3h5hYWHq/NURvRIW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cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.39 Page no : 285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "m = 4; \t\t\t #kg\n", + "T1 = 400; \t\t\t#K\n", + "T2 = 500; \t\t\t#K\n", + "\n", + "# Calculations\n", + "def f12( T): \n", + "\t return m*(0.48+0.0096*T)/T\n", + "\n", + "dS = quad(f12, T1,T2)[0]\n", + "\n", + "# Results\n", + "print (\"dS = %.3f\")%(dS), (\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "dS = 4.268 kJ\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.40 Page no : 286" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "p1 = 1*10**5; \t\t\t#Pa\n", + "T1 = 273; \t\t\t#K\n", + "p2 = 25*10**5; \t\t\t#Pa\n", + "T2 = 750; \t\t\t#K\n", + "R = 0.29; \t\t\t#kJ/kg.K ; cp = 0.85+0.00025*T; cv = 0.56+0.00025*T; R = cp-cv;\n", + "\n", + "# Calculations\n", + "v2 = R*T2/p2;\n", + "v1 = R*T1/p1;\n", + "\n", + "def f8( T): \n", + "\t return (0.56+0.00025*T)/T\n", + "\n", + "def f9(v):\n", + " return R/v\n", + "ds = quad(f8, T1, T2)[0] + quad(f9,v1,v2)[0]\n", + "\n", + "# Results\n", + "print (\"ds = %.3f\")%(ds),(\"kJ/kg K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ds = 0.045 kJ/kg K\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.41 Page no : 287" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "cv = 0.715; \t\t\t#kJ/kg K\n", + "R = 0.287; \t\t\t#kJ/kg K\n", + "V_A = 0.25; \t\t\t#m**3\n", + "p_Ai = 1.4; \t\t\t#bar\n", + "T_Ai = 290; \t\t\t#K\n", + "V_B = 0.25; \t\t\t#m**3\n", + "p_Bi = 4.2; \t\t\t#bar\n", + "T_Bi = 440; \t\t\t#K\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) Final equilibrium temperature\")\n", + "m_A = p_Ai * 10**5 * V_A / R / 1000/ T_Ai; \t\t\t#kg\n", + "m_B = p_Bi * 10**5 * V_B / R / 1000/ T_Bi; \t\t\t#kg\n", + "\n", + "T_f = (m_B * T_Bi + m_A * T_Ai)/(m_A + m_B);\n", + "print (\"T_f = %.3f\")% (T_f), (\"K\")\n", + "\n", + "\n", + "print (\"(ii) Final pressure on each side of the diaphragm\")\n", + "p_Af = p_Ai*T_f/T_Ai;\n", + "print (\"p_Af = %.3f\")%(p_Af),(\"bar\")\n", + "\n", + "p_Bf = p_Bi*T_f/T_Bi;\n", + "print (\"p_Bf = %.3f\")%(p_Bf),(\"bar\")\n", + "\n", + "\n", + "print (\"(iii) Entropy change of the system\")\n", + "dS_A = m_A*cv*math.log(T_f/T_Ai);\n", + "dS_B = m_B*cv*math.log(T_f/T_Bi);\n", + "dS_net = dS_A+dS_B;\n", + "print (\"Net change of entropy = %.3f\")%(dS_net), (\"kJ/K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Final equilibrium temperature\n", + "T_f = 389.618 K\n", + "(ii) Final pressure on each side of the diaphragm\n", + "p_Af = 1.881 bar\n", + "p_Bf = 3.719 bar\n", + "(iii) Entropy change of the system\n", + "Net change of entropy = 0.016 kJ/K\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.42 Page no : 287" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "cv = 1.25; \t\t\t#kJ/kg.K\n", + "T1 = 530.; \t\t\t#K\n", + "v1 = 0.0624; \t\t\t#m**3/kg\n", + "v2 = 0.186; \t\t\t#m**3/kg\n", + "dT_31 = 25.; \t\t\t#K\n", + "T3 = T1-dT_31; \t\t\t#K\n", + "dT_21 = 165.; \t\t\t#K\n", + "\n", + "# Calculations\n", + "T2 = T1-dT_21; \t\t\t#K\n", + "# Path 1-2 : Reversible adiabatic process\n", + "ds_12 = 0;\n", + "v3 = 0.186; \t\t\t#m**3/kg\n", + "v3 = v2;\n", + "ds_13 = cv*math.log(T3/T2);\n", + "\n", + "# Results\n", + "print (\"Chang in entropy = %.4f\")%(ds_13), (\"kJ/kgK\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Chang in entropy = 0.4058 kJ/kgK\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.44 Page no : 289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "from numpy import *\n", + "\n", + "# Variables\n", + "T1 = 500.; \t\t\t#K\n", + "T2 = 400.; \t\t\t#K\n", + "T3 = 300.; \t\t\t#K\n", + "Q1 = 1500.; \t\t\t#kJ/min\n", + "W = 200.; \t\t\t#kJ/min\n", + "\n", + "# Calculations and Results\n", + "A = [[1,-1],[(1./400),(-1./300)]];\n", + "B = [(-1300),(-3)];\n", + "X = linalg.solve(A,B)\n", + "\n", + "Q2 = X[0];\n", + "print (\"Q2 = \"), (Q2), (\"kJ/min\")\n", + "\n", + "Q3 = X[1];\n", + "print (\"Q3 = \"), (Q3), (\"kJ/min\")\n", + "\n", + "print (\"(ii) Entropy change \")\n", + "dS1 = (-Q1)/T1;\n", + "print (\"Entropy change of source 1 = \"), (dS1), (\"kJ/K\")\n", + "\n", + "dS2 = (-Q2)/T2;\n", + "print (\"Entropy change of math.sink 2 = \"), (dS2), (\"kJ/K\")\n", + "\n", + "dS3 = Q3/T3;\n", + "print (\"Entropy change of source 3 = \"),(dS3), (\"kJ/K\")\n", + "\n", + "\n", + "print (\"(iii) Net change of the entropy\")\n", + "dSnet = dS1 + dS2 + dS3;\n", + "print (\"dSnet = %d\")% (dSnet)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q2 = -1600.0 kJ/min\n", + "Q3 = -300.0 kJ/min\n", + "(ii) Entropy change \n", + "Entropy change of source 1 = -3.0 kJ/K\n", + "Entropy change of math.sink 2 = 4.0 kJ/K\n", + "Entropy change of source 3 = -1.0 kJ/K\n", + "(iii) Net change of the entropy\n", + "dSnet = 0\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.45 Page no : 291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "T1 = 250; \t\t\t#K\n", + "T2 = 125; \t\t\t#K\n", + "\n", + "# Calculations\n", + "#cv = 0.0045*T**2\n", + "def f10( T): \n", + "\t return 0.045*T**2\n", + "\n", + "Q1 = quad(f10, T1, T2)[0]\n", + "\n", + "def f11( T): \n", + "\t return 0.045*T\n", + "\n", + "dS_system = quad(f11, T1, T2)[0]\n", + "\n", + "dS_universe = 0;\n", + "\n", + "W_max = ((-Q1) -T2*(dS_universe-dS_system))/1000;\n", + "\n", + "# Results\n", + "print (\"W_max = %.3f\")%(W_max), (\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "W_max = 73.242 kJ\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.46 Page no : 292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "cp = 1.005; \t\t\t#kJ/kg K\n", + "T_A = 333.; \t\t\t#K\n", + "T_B = 288.; \t\t\t#K\n", + "p_A = 140.; \t\t\t#kPa\n", + "p_B = 110.; \t\t\t#kPa\n", + "#h = cp*T\n", + "#v/T = 0.287/p\n", + "\n", + "# Calculations\n", + "def f9( T): \n", + "\t return cp/T\n", + "\n", + "def f10(p):\n", + " return 0.287/p\n", + " \n", + "ds_system = quad(f9, T_B, T_A)[0] + quad(f10,p_A,p_B)[0]\n", + "ds_surr = 0;\n", + "ds_universe = ds_system+ds_surr;\n", + "\n", + "# Results\n", + "print (\"change in entropy of universe = -%.4f\")% (ds_universe), (\"kJ/kgK\")\n", + "print (\"Since change in entropy of universe from A to B is -ve\")\n", + "print (\"The flow is from B to A\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "change in entropy of universe = -0.0767 kJ/kgK\n", + "Since change in entropy of universe from A to B is -ve\n", + "The flow is from B to A\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.47 Page no : 292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "m1 = 3.; \t\t\t#kg\n", + "m2 = 4.; \t\t\t#kg\n", + "T0 = 273.; \t\t\t#K\n", + "T1 = 80.+273; \t\t\t#K\n", + "T2 = 15.+273; \t\t\t#K\n", + "c_pw = 4.187; \t\t\t#kJ/kgK\n", + "\n", + "# Calculations\n", + "tm = (m1*T1 + m2*T2)/(m1+m2);\n", + "Si = m1*c_pw*math.log(T1/T0) + m2*c_pw*math.log(T2/T0);\n", + "Sf = (m1+m2)*c_pw*math.log(tm/T0);\n", + "dS = Sf-Si;\n", + "\n", + "# Results\n", + "print (\"Net change in entropy = %.3f\")%(dS),(\"kJ/K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Net change in entropy = 0.150 kJ/K\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.49 Page no : 294" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "m = 1.; \t\t\t#kg\n", + "T1 = 273.; \t\t\t#K\n", + "T2 = 363.; \t\t\t#K\n", + "c = 4.187;\n", + "\n", + "# Calculations and Results\n", + "print (\"(a)\")\n", + "ds_water = m*c*math.log(T2/T1);\n", + "print (\"(i) Entropy of water = %.3f\")%(ds_water), (\"kJ/kgK\")\n", + "\n", + "print (\"(ii) Entropy change of the reservoir \")\n", + "Q = m*c*(T2-T1);\n", + "ds_reservoir = -Q/T2;\n", + "print (\"ds_reservoir = %.3f\")% (ds_reservoir), (\"kJ/K\")\n", + "\n", + "ds_universe = ds_water+ds_reservoir;\n", + "print (\"(iii) Entropy change of universe = %.3f\")% (ds_universe), (\"kJ/K\")\n", + "\n", + "print (\"(b)\")\n", + "T3 = 313; \t\t\t#K\n", + "ds_water = m*c*(math.log(T3/T1) + math.log(T2/T3));\n", + "ds_res1 = -m*c*(T3-T1)/T3;\n", + "ds_res2 = -m*c*(T2-T3)/T2;\n", + "\n", + "ds_universe = ds_water+ds_res1+ds_res2;\n", + "print (\"(iii) Entropy change of universe = %.3f\")%(ds_universe), (\"kJ/K\")\n", + "\n", + "print (\"(c) The entropy change of universe would be less and less, if the water is heated in more and more stages, by bringing\")\n", + "print (\"the water in contact successively with more and more heat reservoirs, each succeeding reservoir being at a higher temperature\") \n", + "print (\"than the preceding one.\")\n", + "\n", + "print (\"When water is heated in infinite steps, by bringing in contact with an infinite number of reservoirs in succession, so that\") \n", + "print (\"at any insmath.tant the temperature difference between the water and the reservoir in contact is infinitesimally small, then\") \n", + "print (\"the entropy change of the universe would be zero and the water would be reversibly heated.\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "(i) Entropy of water = 1.193 kJ/kgK\n", + "(ii) Entropy change of the reservoir \n", + "ds_reservoir = -1.038 kJ/K\n", + "(iii) Entropy change of universe = 0.155 kJ/K\n", + "(b)\n", + "(iii) Entropy change of universe = 0.081 kJ/K\n", + "(c) The entropy change of universe would be less and less, if the water is heated in more and more stages, by bringing\n", + "the water in contact successively with more and more heat reservoirs, each succeeding reservoir being at a higher temperature\n", + "than the preceding one.\n", + "When water is heated in infinite steps, by bringing in contact with an infinite number of reservoirs in succession, so that\n", + "at any insmath.tant the temperature difference between the water and the reservoir in contact is infinitesimally small, then\n", + "the entropy change of the universe would be zero and the water would be reversibly heated.\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.50 Page no : 295" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "cp = 2.093; \t\t\t#kJ/kg0C\n", + "c = 4.187;\n", + "Lf = 333.33; \t\t\t#kJ/kg\n", + "m = 1.; \t\t\t#kg\n", + "T0 = 273.; \t\t\t#K\n", + "T1 = 268.; \t\t\t#K\n", + "T2 = 298.; \t\t\t#K\n", + "\n", + "# Calculations and Results\n", + "Q_s = m*cp*(T0-T1);\n", + "Q_f = m*Lf;\n", + "Q_l = m*c*(T2-T0);\n", + "Q = Q_s+Q_f+Q_l;\n", + "\n", + "print (\"(i) Entropy increase of the universe\")\n", + "ds_atm = -Q/T2;\n", + "ds_sys1 = m*cp*math.log(T0/T1);\n", + "ds_sys2 = Lf/T0;\n", + "ds_sys3 = m*c*math.log(T2/T0);\n", + "ds_total = ds_sys1+ds_sys2+ds_sys3;\n", + "ds_universe = ds_total+ds_atm;\n", + "\n", + "print (\"Entropy increase of universe = %.3f\")%(ds_universe), (\"kJ/K\")\n", + "\n", + "\n", + "print (\"(ii) Minimum amount of work necessary to convert the water back into ice at \u2013 5\u00b0C, Wmin.\")\n", + "dS_refrigerator = 0;\n", + "\n", + "dS_system = -1.6263; \t\t\t#kJ/kg K\n", + "T = 298; \t\t\t#K\n", + "#For minimum work \n", + "W_min = T*(-dS_system)-Q;\n", + "\n", + "print (\"Minimum work done = %.3f\")% (W_min), (\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Entropy increase of the universe\n", + "Entropy increase of universe = 0.122 kJ/K\n", + "(ii) Minimum amount of work necessary to convert the water back into ice at \u2013 5\u00b0C, Wmin.\n", + "Minimum work done = 36.167 kJ\n" + ] + } + ], + "prompt_number": 43 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/ch6.ipynb b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/ch6.ipynb new file mode 100755 index 00000000..2fc63442 --- /dev/null +++ b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/ch6.ipynb @@ -0,0 +1,1208 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b3244020b726410d1f880fd32ec7c61d578b2f34e3bde3131de02645aee53468" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : Availability and Irreversibility" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.1 Page no : 313" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "T0 = 293.; \t\t\t#K\n", + "T1 = 300.; \t\t\t#K\n", + "T2 = 370.; \t\t\t#K\n", + "cv = 0.716;\n", + "cp = 1.005;\n", + "R = 0.287;\n", + "p1 = 1.; \t\t\t#bar\n", + "p2 = 6.8; \t\t\t#bar\n", + "m = 1.; \t\t\t#kg\n", + "\n", + "# Calculations\n", + "Wmax = -(cv*(T2-T1) - T0*(cp*math.log(T2/T1)-R*math.log(p2/p1)));\n", + "n = 1/(1-(math.log(T2/T1)/math.log(p2/p1)));\n", + "Wact = m*R*(T1-T2)/(n-1);\n", + "I = Wmax - Wact;\n", + "\n", + "# Results\n", + "print (\"Irreversibility = %.3f\")%(I),(\"kJ/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Irreversibility = 13.979 kJ/kg\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.2 Page no : 313" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T1 = 1000.; \t\t\t#K\n", + "T2 = 500.; \t\t\t#K\n", + "T0 = 300.; \t\t\t#K\n", + "Q = 7200.; \t\t\t#kJ/min\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) Net change of entropy :\")\n", + "dS_source = -Q/T1;\n", + "dS_system = Q/T2;\n", + "dS_net = dS_source+dS_system;\n", + "print (\"dS_net = \"), (dS_net), (\"kJ/min.K\")\n", + "\n", + "\n", + "print (\"(ii) Decrease in available energy :\")\n", + "AE_source = (T1-T0)*(-dS_source); \t\t\t#Available energy with the source\n", + "AE_system = (T2-T0)*dS_system; \t\t\t#Available energy with the system\n", + "dAE = AE_source - AE_system; \t\t\t#Decrease in available energy\n", + "print (\"dAE = \"), (dAE), (\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Net change of entropy :\n", + "dS_net = 7.2 kJ/min.K\n", + "(ii) Decrease in available energy :\n", + "dAE = 2160.0 kJ\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.3 Page no : 315" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "m = 8.; \t\t\t#kg\n", + "T1 = 650.; \t\t\t#K\n", + "p1 = 5.5*10**5; \t\t\t#Pa\n", + "p0 = 1*10.**5; \t\t\t#Pa\n", + "T0 = 300.; \t\t\t#K\n", + "cp = 1.005; \t\t\t#kJ/kg.K\n", + "cv = 0.718;\n", + "R = 0.287;\n", + "#p1*v1/T1 = p0*v0/T0\n", + "#Let r = v1/v0 = 1/2.54\n", + "r = 1/2.54;\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) Change in available energy(for bringing the system to dead state) = \")\n", + "ds = cv*math.log(T1/T0) + R*math.log(r);\n", + "dAE = m*(cv*(T1-T0) - T0*ds);\n", + "#dAE is the change in available energy in kJ\n", + "V1 = m*R*10**3*T1/p1;\n", + "V0 = V1/r;\n", + "L = p0*(V0 - V1)/10**3;\n", + "print (\"Loss of availability, L = \"), (L), (\"kJ\")\n", + "\n", + "print (\"(ii) Available Energy and Effectiveness\")\n", + "Q = m*cp*(T1-T0);\n", + "ds = m*cp*math.log(T1/T0);\n", + "Unavailable_energy = T0*ds;\n", + "Available_energy = Q - Unavailable_energy;\n", + "print (\"Available energy = %.3f\")% (Available_energy), (\"kJ\")\n", + "\n", + "Effectiveness = Available_energy/dAE;\n", + "print (\"Effectiveness = %.3f\")% (Effectiveness)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Change in available energy(for bringing the system to dead state) = \n", + "Loss of availability, L = 417.872 kJ\n", + "(ii) Available Energy and Effectiveness\n", + "Available energy = 949.066 kJ\n", + "Effectiveness = 0.719\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.4 Page no : 316" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "c_pg = 1.; \t\t\t#kJ/kgK\n", + "h_fg = 1940.7; \t\t\t#kJ/kg\n", + "Ts = 473.; \t \t\t#K ; Temperature of saturation of steam\n", + "T1 = 1273.; \t\t\t#K ; Initial temperature of gases\n", + "T2 = 773.; \t\t \t#K ; Final temperature of gases\n", + "T0 = 293.; \t\t\t #K ; atmospheric temperature\n", + "\n", + "# Calculations\n", + "#Heat lost by gases = Heat gained by 1 kg saturated water when it is converted to steam at 200 0C\n", + "m_g = h_fg/c_pg/(T1-T2);\n", + "dS_g = m_g*c_pg*math.log(T2/T1);\n", + "dS_w = h_fg/Ts;\n", + "dS_net = dS_g + dS_w;\n", + "\n", + "# Results\n", + "print (\"Net change in entropy = %.3f\")% (dS_net), (\"kJ/K\")\n", + "\n", + "E = T0*dS_net; \t\t\t#Increase in unavailable energy due to hea transfer\n", + "print (\"Increase in unavailable energy = %.3f\")%(E), (\"kJ per kg of steam formed\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Net change in entropy = 2.167 kJ/K\n", + "Increase in unavailable energy = 634.847 kJ per kg of steam formed\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.5 Page no : 317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Variables\n", + "m_g = 3.; \t\t\t#kg\n", + "p1 = 2.5; \t\t\t#bar\n", + "T1 = 1200.; \t\t\t#K; Temperature of infinite source\n", + "T1a = 400.; \t\t\t#K; Initial temperature\n", + "Q = 600.; \t\t\t#kJ\n", + "cv = 0.81; \t\t\t#kJ/kg.K\n", + "T0 = 290.; \t\t\t#K; Surrounding Temperature\n", + "\n", + "# Calculations\n", + "#final temperature = T2a\n", + "T2a = Q/m_g/cv + T1a;\n", + "AE = (T1-T0)*Q/T1; \t\t\t#Available energy with the source\n", + "dS = m_g*cv*math.log(T2a/T1a); \t\t\t#Change in entropy of the gas\n", + "UAE = T0*dS; \t\t\t#Unavailability of the gas \n", + "A = Q-UAE; \t\t\t#Available energy with the gas\n", + "loss = AE-A;\n", + "\n", + "# Results\n", + "print (\"Loss in available energy due to heat transfer = %.3f\")%(loss),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loss in available energy due to heat transfer = 193.783 kJ\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.6 Page no : 318" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "m = 60.; \t\t\t#kg\n", + "T1 = 333.; \t\t\t#K\n", + "T0 = 279.; \t\t\t#K\n", + "p = 1.; \t\t\t#atm\n", + "cp = 4.187;\n", + "\n", + "# Calculations\n", + "def f16( T): \n", + "\t return m*cp*(1-T0/T)\n", + "\n", + "Wmax = quad(f16, T0, T1)[0]\n", + "Q1 = m*cp*(T1-T0);\n", + "#Let unavailable energy = E\n", + "E = Q1-Wmax;\n", + "\n", + "# Results\n", + "print (\"unavailable energy = %.3f\")%(E), (\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "unavailable energy = 12401.141 kJ\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.7 Page no : 319" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "m = 15.; \t\t\t#kg\n", + "T1 = 340.; \t\t\t#K\n", + "T0 = 300.; \t\t\t#K\n", + "cp = 4.187; \t\t\t#kJ/kgK\n", + "\n", + "# Calculations\n", + "#Work added during churning = Increase in enthalpy of water\n", + "W = m*cp*(T1-T0);\n", + "ds = cp*math.log(T1/T0);\n", + "AE = m*(cp*(T1-T0)-T0*ds);\n", + "AE_loss = W-AE; \t\t\t#Loss in availability\n", + "\n", + "# Results\n", + "print (\"Loss in availability %.3f\")% (AE_loss), (\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loss in availability 2358.261 kJ\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.8 Page no : 320" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "m = 5.; \t\t\t#kg\n", + "T1 = 550.; \t\t\t#K\n", + "p1 = 4*10.**5; \t\t\t#Pa\n", + "T2 = 290.; \t\t\t#K\n", + "T0 = T2;\n", + "p2 = 1.*10**5; \t\t\t#Pa\n", + "p0 = p2;\n", + "cp = 1.005; \t\t\t#kJ/kg K\n", + "cv = 0.718; \t\t\t#kJ/kg K\n", + "R = 0.287; \t\t\t#kJ/kg K\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) Availability of the system :\")\n", + "ds = cp*math.log(T1/T0) - R*math.log(p1/p0);\n", + "Availability = m*(cv*(T1-T0) - T0*ds);\n", + "print (\"Availability of the system = %.3f\")% (Availability), (\"kJ\")\n", + "\n", + "print (\"(ii) Available energy and Effectiveness\")\n", + "Q = m*cp*(T1-T0);\n", + "dS = m*cp*math.log(T1/T0);\n", + "E = T0*dS; \t\t\t#Unavailable energy\n", + "AE = Q-E;\n", + "print (\"Available Energy = %.3f\")%(AE), (\"kJ\")\n", + "\n", + "Effectiveness = AE/Availability;\n", + "print (\"Effectiveness = %.3f\")%(Effectiveness)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Availability of the system :\n", + "Availability of the system = 577.612 kJ\n", + "(ii) Available energy and Effectiveness\n", + "Available Energy = 373.806 kJ\n", + "Effectiveness = 0.647\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.9 Page no : 321" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "R = 0.287; \t\t\t#kJ/kgK\n", + "cp = 1.005; \t\t\t#kJ/kgK\n", + "m = 25./60; \t\t\t#kg/s\n", + "p1 = 1.; \t\t\t#bar\n", + "p2 = 2.; \t\t\t#bar\n", + "T1 = 288.; \t\t\t#K\n", + "T0 = T1;\n", + "T2 = 373.; \t\t\t#K\n", + "\n", + "# Calculations and Results\n", + "W_act = cp*(T2-T1); \t\t\t#W_actual\n", + "W_total = m*W_act;\n", + "\n", + "print (\"Total actual power required = %.3f\")%(W_total), (\"kW\")\n", + "\n", + "ds = cp*math.log(T2/T1) - R*math.log(p2/p1);\n", + "Wmin = cp*(T2-T1) - T0*(ds);\n", + "\n", + "\n", + "W = m*Wmin;\n", + "print (\"Minimuumm work required = %.3f\")%(W), (\"kW\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total actual power required = 35.594 kW\n", + "Minimuumm work required = 28.276 kW\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.10 Page no : 322" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "m_O2 = 1.; \t\t\t#kg\n", + "m_H2 = 1.; \t\t\t#kg\n", + "p = 1*10.**5; \t\t\t#Pa\n", + "T_O2 = 450.; \t\t\t#K\n", + "T_H2 = 450.; \t\t\t#K\n", + "T0 = 290.; \t\t\t#K\n", + "R0 = 8.314;\n", + "M_O2 = 32.;\n", + "M_H2 = 2.;\n", + "\n", + "# Calculations\n", + "R_O2 = R0/M_O2;\n", + "v_O2 = m_O2*R_O2*T_O2/p;\n", + "R_H2 = R0/M_H2;\n", + "v_H2 = m_H2*R_H2*T_H2/p;\n", + "v_f = v_O2 + v_H2; \t\t\t#total volume after mixing\n", + "dS_O2 = R_O2*math.log(v_f/v_O2);\n", + "dS_H2 = R_H2*math.log(v_f/v_H2);\n", + "dS_net = dS_O2 + dS_H2;\n", + "#Let E be the loss in availability \n", + "E = T0*dS_net;\n", + "\n", + "# Results\n", + "print (\"Loss in availability = %.3f\")% (E), (\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loss in availability = 286.555 kJ\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.11 Page no : 323" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "T0 = 283.; \t\t\t#K\n", + "cp = 4.18; \t\t\t#kJ/kgK\n", + "m1 = 20.; \t\t\t#kg\n", + "T1 = 363.; \t\t\t#K\n", + "m2 = 30.; \t\t\t#kg\n", + "T2 = 303.; \t\t\t#K\n", + "T3 = 327.; \t\t\t#K\n", + "\n", + "\n", + "# Calculations\n", + "def f13( T): \n", + "\t return m1*cp*(1-T0/T)\n", + "\n", + "AE1 = quad(f13, T0, T1)[0]\n", + "\n", + "def f14( T): \n", + "\t return m2*cp*(1-T0/T)\n", + "\n", + "AE2 = quad(f14, T0, T2)[0]\n", + "AE_total = AE1 + AE2; \t\t\t#before mixing\n", + "#If T K is the final temperature after mixing\n", + "T = (m1*T1+m2*T2)/(m1+m2);\n", + "m_total = m1+m2;\n", + "\n", + "#Available energy of 50kg of water at 54 0C\n", + "AE3 = m_total*cp*((T3-T0) - T0*math.log(T3/T0));\n", + "\n", + "#Decrease in available energy due to mixing dAE\n", + "dAE = AE_total - AE3;\n", + "\n", + "# Results\n", + "print (\"Decrease in avialble energy = %.3f\")% (dAE), (\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Decrease in avialble energy = 234.184 kJ\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.12 Page no : 324" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Variables\n", + "T_w1 = 323.; \t\t\t#K\n", + "T_w2 = 343.; \t\t\t#K\n", + "T_o1 = 513.; \t\t\t#K\n", + "T_o2 = 363.; \t\t\t#K\n", + "SG_oil = 0.82;\n", + "c_po = 2.6; \t\t\t#kJ/kg K\n", + "c_pw = 4.18; \t\t\t#kJ/kg K\n", + "T0 = 300.; \t\t\t#K\n", + "m_o = 1.; \t\t\t#kg\n", + "\n", + "# Calculations\n", + "#Heat lost by oil = Heat gained by water\n", + "m_w = (m_o*c_po*(T_o1-T_o2))/(c_pw*(T_w2-T_w1));\n", + "dS_w = m_w*c_pw*math.log(T_w2/T_w1);\n", + "dS_o = m_o*c_po*math.log(T_o2/T_o1);\n", + "dAE_w = m_w*(c_pw*(T_w2-T_w1))-T0*dS_w;\n", + "dAE_o = m_o*(c_po*(T_o2-T_o1))-T0*dS_o;\n", + "\n", + "# Loss in availability E = \n", + "E = dAE_w+dAE_o;\n", + "\n", + "# Results\n", + "print (\"Loss in availability = %.3f\")%(E),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loss in availability = -81.676 kJ\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.13 Page no : 325" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "m_i = 1.; \t\t\t#kg\n", + "T_i = 273.; \t\t\t#K\n", + "m_w = 12.; \t\t\t#kg\n", + "T_w = 300.; \t\t\t#K\n", + "T0 = 288.; \t\t\t#K\n", + "c_pw = 4.18; \t\t\t#kJ/kg K\n", + "c_pi = 2.1; \t\t\t#kJ/kg K\n", + "L_i = 333.5; \t\t\t#kJ/kg\n", + "\n", + "# Calculations\n", + "Tc = (m_w*c_pw*T_w + m_i*c_pw*T_i - L_i)/(m_w*c_pw + m_i*c_pw);\n", + "dS_w = m_w*c_pw*math.log(Tc/T_w);\n", + "dS_i = m_i*c_pw*math.log(Tc/T_i) + L_i/T_i;\n", + "dS_net = dS_w+dS_i;\n", + "\n", + "# Results\n", + "print (\"Increase in entropy = %.3f\")% (dS_net), (\"kJ/K\")\n", + "\n", + "dAE = T0*dS_net;\n", + "print (\"Increase in unavailable energy = %.3f\")% (dAE),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Increase in entropy = 0.107 kJ/K\n", + "Increase in unavailable energy = 30.878 kJ\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.14 Page no : 326" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T1 = 673.; \t\t\t#K\n", + "T2 = 473.; \t\t\t#K\n", + "T0 = 303.; \t\t\t#K\n", + "T1a = T2;\n", + "\n", + "# Calculations\n", + "UAE = T0*(T1-T1a)/T1a/(T1-T0);\n", + "\n", + "# Results\n", + "print (\"the fraction of energy that becomes unavailable = %.3f\")%(UAE)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the fraction of energy that becomes unavailable = 0.346\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.15 Page no : 327" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "T1 = 293.; \t\t\t#K\n", + "T2 = 353.; \t\t\t#K\n", + "Tf = 1773.; \t\t\t#K\n", + "T0 = 288.; \t\t\t#K\n", + "c_pl = 6.3; \t\t\t#kJ/kg K\n", + "\n", + "# Calculations\n", + "dAE = c_pl*(T2-T1) - T0*c_pl*math.log(T2/T1);\n", + "n = (1-T0/Tf); \t\t\t#efficiency\n", + "E = c_pl*(T2-T1)*n;\n", + "Effectiveness = dAE/E;\n", + "\n", + "# Results\n", + "print (\"Effectiveness of the heating process = %.3f\")%(Effectiveness)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Effectiveness of the heating process = 0.126\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.16 Page no : 328" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "T0 = 293.; \t\t\t#K\n", + "T1 = 293.; \t\t\t#K\n", + "T2 = 373.; \t\t\t#K\n", + "T3 = 323.; \t\t\t#K\n", + "cp = 1.005;\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) The ratio of mass flow\")\n", + "x = (T3-T1)/(T2-T3);\n", + "print (\"x = \"), (x)\n", + "\n", + "ds_13 = cp*math.log(T3/T1);\n", + "ds_32 = cp*math.log(T2/T3);\n", + "A = cp*(T3-T1) - T1*ds_13; \t \t\t#Increase of availability of system\n", + "B = x*(cp*(T2-T3)-T0*(ds_32));\t\t\t# Loss of availability of surroundings\n", + "Effectiveness = A/B;\n", + "print (\"Effectiveness of heating process = %.3f\")%(Effectiveness)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The ratio of mass flow\n", + "x = 0.6\n", + "Effectiveness of heating process = 0.306\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.17 Page no : 329" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "m = 2.5; \t\t\t#kg\n", + "p1 = 6.*10**5; \t\t\t#Pa\n", + "r = 2.; \t\t\t#r = V2/V1\n", + "cv = 0.718; \t\t\t#kJ/kg K\n", + "R = 0.287; \t\t\t#kJ/kg K\n", + "T1 = 363.; \t\t\t#K\n", + "p2 = 1.*10**5; \t\t\t#Pa\n", + "T2 = 278.; \t\t\t#K\n", + "V1 = m*R*T1/p1;\n", + "V2 = 2*V1;\n", + "T0 = 278.; \t\t\t#K\n", + "p0 = 1.*10**5; \t\t\t#Pa\n", + "Q = 0.; \t\t\t#adiabatic process\n", + "\n", + "# Calculations and Results\n", + "dS = m*cv*math.log(T2/T1) + m*R*math.log(V2/V1);\n", + "Wmax = m*(cv*(T1-T2)) + T0*(cv*math.log(T2/T1) + R*math.log(V2/V1));\n", + "print (\"(i)The maximum work\"),(\"Wmax = %.3f\")% (Wmax), (\"kJ\")\n", + "\n", + "dA = Wmax+p0*(V1-V2);\n", + "print (\"(ii)Change in availability = %.3f\")%(dA), (\"kJ\")\n", + "\n", + "I = T0*m*(cv*math.log(T2/T1)+R*math.log(V2/V1));\n", + "print (\"(iii)Irreversibility = %.3f\")% (I),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)The maximum work Wmax = 154.628 kJ\n", + "(ii)Change in availability = 111.219 kJ\n", + "(iii)Irreversibility = 5.132 kJ\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.18 Page no : 330" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "m = 1.; \t\t\t#kg\n", + "p1 = 7.*10**5; \t\t\t#Pa\n", + "T1 = 873.; \t\t\t#K\n", + "p2 = 1.*10**5; \t\t\t#Pa\n", + "T2 = 523.; \t\t\t#K\n", + "T0 = 288.; \t\t\t#K\n", + "Q = -9.; \t\t\t#kJ/kg\n", + "cp = 1.005; \t\t\t#kJ/kg K\n", + "R = 0.287; \t\t\t#kJ/kg K\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) The decrease in availability \")\n", + "dA = cp*(T1-T2) - T0*(R*math.log(p2/p1) - cp*math.log(T2/T1));\n", + "print (\"dA = %.3f\")%(dA), (\"kJ/kg\")\n", + "\n", + "print (\"(ii) The maximum work\")\n", + "Wmax = dA; \t\t\t#change in availability\n", + "print (\"Wmax %.3f\")% (Wmax), (\"kJ/kg\")\n", + "\n", + "\n", + "W = cp*(T1-T2) + Q;\n", + "I = Wmax - W;\n", + "print (\"(iii)Irreversibility = %.3f\")%(I), (\"kJ/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The decrease in availability \n", + "dA = 364.295 kJ/kg\n", + "(ii) The maximum work\n", + "Wmax 364.295 kJ/kg\n", + "(iii)Irreversibility = 21.545 kJ/kg\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.19 Page no : 331" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "cp = 1.005; \t\t\t#kJ/kg K\n", + "cv = 0.718; \t\t\t#kJ/kg K\n", + "R = 0.287; \t\t\t#kJ/kg K\n", + "m = 1.; \t\t\t#kg\n", + "T1 = 290.; \t\t\t#K\n", + "T0 = 290.; \t\t\t#K\n", + "T2 = 400.; \t\t\t#K\n", + "p1 = 1.; \t\t\t#bar\n", + "p0 = 1.; \t\t\t#bar\n", + "p2 = 6.; \t\t\t#bar\n", + "\n", + "# Calculations and Results\n", + "#Wrev = change in internal energy - T0*change in entropy\n", + "Wrev = -(cv*(T2-T1) - T0*(cp*math.log(T2/T1) - R*math.log(p2/p1)));\n", + "n = (1./(1-math.log(T2/T1)/math.log(p2/p1)));\n", + "Wact = m*R*(T1-T2)/(n-1);\n", + "\n", + "I = Wrev-Wact;\n", + "print (\"(i)Irreversibility = %.3f\")% (I), (\"kJ\")\n", + "\n", + "effectiveness = Wrev/Wact*100;\n", + "print (\"(ii)The effectiveness = %.3f\")%(effectiveness), (\"%\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)Irreversibility = 9.945 kJ\n", + "(ii)The effectiveness = 93.109 %\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.20 Page no : 333" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "I = 0.62; \t\t\t#kg/m**2\n", + "N1 = 2500.; \t\t\t#rpm\n", + "w1 = 2*math.pi*N1/60; \t\t\t#rad/s\n", + "m = 1.9; \t\t\t#kg; Water equivalent of shaft bearings\n", + "cp = 4.18;\n", + "T0 = 293.; \t\t\t#K\n", + "t0 = 20.; \t\t\t#0C\n", + "\n", + "# Calculations and Results\n", + "print (\"(i)Rise in temperature of bearings\")\n", + "KE = 1./2*I*w1**2/1000; \t\t\t#kJ\n", + "dT = KE/(m*cp); \t\t\t#rise in temperature of bearings\n", + "print (\"dT = %.3f\")% (dT), (\"0C\")\n", + "\n", + "t2 = t0+dT;\n", + "print (\"Final temperature of the bearings = %.3f\")% (t2), (\"0C\")\n", + "\n", + "T2 = t2+273;\n", + "print (\"(ii)Final r.p.m. of the flywheel\")\n", + "def f15( T): \n", + "\t return m*cp*(1-T0/T)\n", + "\n", + "AE = quad(f15, T0, T2)[0]\n", + "UE = KE - AE;\n", + "\n", + "print (\"Available energy = %.3f\")% (AE), (\"kJ\")\n", + "\n", + "UAE = KE-AE;\n", + "print (\"Unavailable energy = %.3f\")%(UAE), (\"kJ\")\n", + "\n", + "w2 = math.sqrt(AE*10**3*2/I);\n", + "N2 = w2*60/2/math.pi;\n", + "print (\"Final rpm of the flywheel = %.3f\")%(N2), (\"rpm\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)Rise in temperature of bearings\n", + "dT = 2.675 0C\n", + "Final temperature of the bearings = 22.675 0C\n", + "(ii)Final r.p.m. of the flywheel\n", + "Available energy = 0.096 kJ\n", + "Unavailable energy = 21.151 kJ\n", + "Final rpm of the flywheel = 168.407 rpm\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.21 Page no : 334" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "# Variables\n", + "p1 = 8.; \t\t\t#bar\n", + "T1 = 453.; \t\t\t#K\n", + "p2 = 1.4; \t\t\t#bar\n", + "T2 = 293.; \t\t\t#K\n", + "T0 = T2;\n", + "p0 = 1.; \t\t\t#bar\n", + "m = 1.; \t\t\t#kg\n", + "C1 = 80.; \t\t\t#m/s\n", + "C2 = 40.; \t\t\t#m/s\n", + "cp = 1.005; \t\t\t#kJ/kg K\n", + "R = 0.287; \t\t\t#kJ/kg K \n", + "\n", + "# Calculations and Results\n", + "print (\"(i) Reversible work and actual work \")\n", + "A1 = cp*(T1-T0)-T0*(cp*math.log(T1/T0)-R*math.log(p1/p0))+C1**2/2/10**3; \t\t\t#Availability at the inlet\n", + "A2 = cp*(T2-T0)-T0*(cp*math.log(T2/T0)-R*math.log(p2/p0))+C2**2/2/10**3; \t\t\t#Availability at the exit\n", + "\n", + "W_rev = A1-A2;\n", + "print (\"W_rev = %.3f\")%(W_rev), (\"kJ/kg\")\n", + "\n", + "W_act = cp*(T1-T2) + (C1**2-C2**2)/2/10**3;\n", + "print (\"W_act = %.3f\")%(W_act),(\"kJ/kg\")\n", + "\n", + "print (\"(ii) Irreversibilty and effectiveness = \")\n", + "\n", + "I = W_rev-W_act;\n", + "print (\"Irreversibilty = %.3f\")% (I), (\"kJ/kg\")\n", + "\n", + "Effectiveness = W_act/W_rev*100;\n", + "print (\"Effectiveness = %.3f\")%(Effectiveness),(\"%\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Reversible work and actual work \n", + "W_rev = 181.464 kJ/kg\n", + "W_act = 163.200 kJ/kg\n", + "(ii) Irreversibilty and effectiveness = \n", + "Irreversibilty = 18.264 kJ/kg\n", + "Effectiveness = 89.935 %\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + " Example 6.22 Page no : 335 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "p1 = 20.; \t\t\t#bar\n", + "t1 = 400.; \t\t\t#0C\n", + "p2 = 4.; \t\t\t#bar\n", + "t2 = 250.; \t\t\t#0C\n", + "t0 = 20.; \t\t\t#0C\n", + "T0 = t0+273;\n", + "h1 = 3247.6; \t\t\t#kJ/kg\n", + "s1 = 7.127; \t\t\t#kJ/kg K\n", + "#let h2' = h2a and s2' = s2a\n", + "h2a = 2964.3; \t\t\t#kJ/kg\n", + "s2a = 7.379; \t\t\t#kJ/kg K\n", + "s2 = s1;\n", + "s1a = s1;\n", + "#By interpolation, we get\n", + "h2 = 2840.8; \t\t\t#kJ/kg\n", + "\n", + "# Calculations and Results\n", + "n_isen = (h1-h2a)/(h1-h2);\n", + "print (\"(i)Isentropic efficiency = %.3f\")%(n_isen)\n", + "\n", + "A = h1-h2a + T0*(s2a-s1a);\n", + "print (\"(ii)Loss of availability = %.3f\")%(A), (\"kJ/kg\")\n", + "\n", + "Effectiveness = (h1-h2a)/A;\n", + "print (\"(iii)Effectiveness = %.3f\")% (Effectiveness)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)Isentropic efficiency = 0.696\n", + "(ii)Loss of availability = 357.136 kJ/kg\n", + "(iii)Effectiveness = 0.793\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/ch7.ipynb b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/ch7.ipynb new file mode 100755 index 00000000..50954e24 --- /dev/null +++ b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/ch7.ipynb @@ -0,0 +1,198 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:83b04c725ceaf9254a1b319f62cfdfa8f3ba518f51286a3d08dbbb299f685e47" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Thermodynamic Relations" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.17 Page no : 370" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "B = 5.*10**(-5); \t\t\t# /K\n", + "K = 8.6*10**(-12); \t\t\t# m**2/N\n", + "v = 0.114*10**(-3); \t\t\t#m**3/kg\n", + "p2 = 800.*10**5; \t\t\t#Pa\n", + "p1 = 20.*10**5; \t\t\t#Pa\n", + "T = 288.; \t\t\t#K\n", + "\n", + "# Calculations and Results\n", + "W = -v*K/2*(p2**2-p1**2);\n", + "print (\"(i) Work done on the copper = %.3f\")%(W),(\"J/kg\")\n", + "\n", + "ds = -v*B*(p2-p1);\n", + "print (\"(ii) Change in entropy = %.3f\")% (ds), (\"J/kg K\")\n", + "\n", + "Q = T*ds;\n", + "print (\"(iii) The heat transfer = %.3f\")%(Q), (\"J/kg\")\n", + "\n", + "du = Q-W;\n", + "print (\"(iv) Change in internal energy = %.3f\")%(du),(\"J/kg\")\n", + "\n", + "R = B**2*T*v/K;\n", + "print (\"(v) cp \u2013 cv = %.3f\")%(R),(\"J/kg K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Work done on the copper = -3.135 J/kg\n", + "(ii) Change in entropy = -0.445 J/kg K\n", + "(iii) The heat transfer = -128.045 J/kg\n", + "(iv) Change in internal energy = -124.909 J/kg\n", + "(v) cp \u2013 cv = 9.544 J/kg K\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.18 Page no : 371" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "vg = 0.1274; \t\t\t#m**3/kg\n", + "vf = 0.001157; \t\t\t#m**3/kg\n", + "# dp/dT = 32; \t\t\t#kPa/K\n", + "T3 = 473; \t\t\t#K\n", + "\n", + "# Calculations\n", + "h_fg = 32*10**3*T3*(vg-vf)/10**3;\n", + "\n", + "# Results\n", + "print (\" enthalpy of vapourisation = %.3f\")%(h_fg),(\"kJ/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " enthalpy of vapourisation = 1910.814 kJ/kg\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.19 Page no : 372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math\n", + "\n", + "# Variables\n", + "h_fg = 334.; \t\t\t#kJ/kg\n", + "v_liq = 1.; \t\t\t#m**3/kg\n", + "v_ice = 1.01; \t\t\t#m**3/kg\n", + "T1 = 273.; \t\t\t#K\n", + "T2 = 263.; \t\t\t#K\n", + "p1 = 1.013*10**5; \t\t\t#Pa\n", + "\n", + "# Calculations\n", + "p2 = (p1+h_fg*10**3/(v_ice-v_liq)*math.log(T1/T2))/10**5;\n", + "\n", + "# Results\n", + "print (\"pressure = %.3f\")%(p2),(\"bar\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "pressure = 13.477 bar\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.20 Page no : 372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "h_fg = 294.54; \t\t\t#kJ/kg\n", + "p = 0.1; \t\t\t#bar\n", + "T = 523; \t\t\t#K\n", + "\n", + "# Calculations\n", + "vg = h_fg*10**3/T/(2.302*3276.6*p*10**5/T**2 - 0.652*p*10**5/T);\n", + "\n", + "# Results\n", + "print (\"specific volume = %.3f\")%(vg),(\"m**3/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "specific volume = 2.139 m**3/kg\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/ch8.ipynb b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/ch8.ipynb new file mode 100755 index 00000000..0650ff08 --- /dev/null +++ b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/ch8.ipynb @@ -0,0 +1,908 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:417a431bb73c0f7340e3aa0171c3fc4bd9ac17c782d95798e961af6aeee610ed" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 : Ideal and Real Gases" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.1 Page no : 392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "R = 287.; \t\t\t#J/kg K\n", + "V1 = 40.; \t\t\t#m**3\n", + "V2 = 40.; \t\t\t#m**3\n", + "p1 = 1.*10**5; \t\t\t#Pa\n", + "p2 = 0.4*10**5; \t\t\t#Pa\n", + "T1 = 298.; \t\t\t#K\n", + "T2 = 278.; \t\t\t#K\n", + "\n", + "# Calculations\n", + "m1 = p1*V1/R/T1;\n", + "m2 = p2*V2/R/T2;\n", + "#Let mass of air removed be m\n", + "m = m1-m2;\n", + "\n", + "# Results\n", + "print (\"Mass of air removed = %.3f\")% (m),(\"kg\")\n", + "\n", + "V = m*R*T1/p1;\n", + "print (\"Volume of gas removed = %.3f\")% (V), (\"m**3\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass of air removed = 26.716 kg\n", + "Volume of gas removed = 22.849 m**3\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.2 Page no : 393" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "V = 0.04; \t\t\t#m**3\n", + "p = 120.*10**5; \t\t\t#Pa\n", + "T = 293.; \t\t\t#K\n", + "R0 = 8314.; \n", + "\n", + "# Calculations and Results\n", + "print (\"(i) kg of nitrogen the flask can hold\")\n", + "M = 28; \t\t\t#molecular weight of Nitrogen\n", + "R = R0/M;\n", + "\n", + "m = p*V/R/T;\n", + "print (\"kg of nitrogen = %.3f\")% (m), (\"kg\")\n", + "\n", + "print (\"(ii) Temperature at which fusible plug should melt\")\n", + "p = 150.*10**5; \t\t\t#Pa\n", + "T = p*V/R/m; \t\t\t#K\n", + "t = T-273; \t\t\t#0C\n", + "print (\"Temperature = %.3f\")% (t),(\"\u00b0C\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) kg of nitrogen the flask can hold\n", + "kg of nitrogen = 5.517 kg\n", + "(ii) Temperature at which fusible plug should melt\n", + "Temperature = 93.250 \u00b0C\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.3 Page no : 393" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "p1 = 1.*10**5; \t\t\t#Pa\n", + "T1 = 293.; \t\t\t#K\n", + "d = 6.; \t\t\t#m; diameter of the spherical balloon\n", + "p2 = 0.94*p1;\n", + "T2 = T1;\n", + "cv = 10400.; \t\t\t#J/kg K\n", + "R = 8314/2.;\n", + "r = 3.; \t\t\t#m\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) Mass of original gas escaped\")\n", + "\n", + "mass_escaped = (p1-p2)/p1*100;\n", + "print (\"%mass_escaped = \"), (mass_escaped), (\"%\")\n", + "\n", + "print (\"(ii)Amount of heat to be removed \")\n", + "T2 = 0.94*T1;\n", + "m = p1*4/3*math.pi*r**3/R/T1;\n", + "\n", + "Q = m*cv*(T1-T2)/10**6;\n", + "print (\"Q = %.3f\")% (Q),(\"MJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Mass of original gas escaped\n", + "%mass_escaped = 6.0 %\n", + "(ii)Amount of heat to be removed \n", + "Q = 1.698 MJ\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.4 Page no : 394" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "from numpy import *\n", + "import math \n", + "\n", + "# Variables\n", + "m = 28.; \t\t\t#kg\n", + "V1 = 3.; \t\t\t#m**3\n", + "T1 = 363.; \t\t\t#K\n", + "R0 = 8314.;\n", + "M = 28.; \t\t\t#Molecular mass of N2\n", + "R = R0/m;\n", + "V2 = V1;\n", + "T2 = 293.; \t\t\t#K\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) Pressure (p1) and specific volume (v1) of the gas\")\n", + "\n", + "p1 = m*R*T1/V1/10**5; \t\t\t#bar\n", + "print (\"Pressure = %.3f\")% (p1), (\"bar\")\n", + "\n", + "v1 = V1/m;\n", + "print (\"specific volume = %.3f\")% (v1), (\"m**3/kg\")\n", + "\n", + "\n", + "#cp-cv = R/1000;\n", + "#cp-1.4cv = 0;\n", + "#solving the above two eqns \n", + "A = [[1,-1],[1,-1.4]];\n", + "B = [R/1000,0];\n", + "X = linalg.inv(A)*B;\n", + "cp = X[0,0]\n", + "print (\"cp = %.3f\")% (cp), (\"kJ/kg K\")\n", + "\n", + "cv = X[1][0];\n", + "print (\"cv = %.3f\")% (cv),(\"kJ/kg K\")\n", + "\n", + "print (\"(iii) Final pressure of the gas after cooling to 20\u00b0C\")\n", + "p2 = p1*T2/T1;\n", + "print (\"p2 = %.3f\")% (p2), (\"bar\")\n", + "\n", + "\n", + "du = cv*(T2-T1);\n", + "print (\"Increase in specific internal energy = %.3f\")% (du), (\"kJ/kg\")\n", + "\n", + "dh = cp*(T2-T1);\n", + "print (\"Increase in specific Enthalpy = %.3f\")%(dh), (\"kJ/kg\")\n", + "\n", + "v2 = v1;\n", + "ds = cv*math.log(T2/T1) + R*math.log(v2/v1);\n", + "print (\"Increase in specific entropy = %.3f\")%(ds),(\"kJ/kg K\")\n", + "\n", + "W = 0; \t\t\t#constant volume process\n", + "Q = m*du+W;\n", + "print (\"Heat transfer = %.3f\")%(Q), (\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Pressure (p1) and specific volume (v1) of the gas\n", + "Pressure = 10.060 bar\n", + "specific volume = 0.107 m**3/kg\n", + "cp = 1.039 kJ/kg K\n", + "cv = 0.742 kJ/kg K\n", + "(iii) Final pressure of the gas after cooling to 20\u00b0C\n", + "p2 = 8.120 bar\n", + "Increase in specific internal energy = -51.963 kJ/kg\n", + "Increase in specific Enthalpy = -72.748 kJ/kg\n", + "Increase in specific entropy = -0.159 kJ/kg K\n", + "Heat transfer = -1454.950 kJ\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.5 Page no : 396" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "print (\"Part (a)\")\n", + "# Variables\n", + "R = 0.287; \t\t\t#kJ/kg K\n", + "y = 1.4;\n", + "m1 = 1.; \t\t\t#kg\n", + "p1 = 8.*10**5; \t\t\t#Pa\n", + "T1 = 373.; \t\t\t#K\n", + "p2 = 1.8*10**5; \t\t\t#Pa\n", + "cv = 0.717; \t\t\t#kJ/kg K\n", + "n = 1.2;\n", + "\n", + "# Calculations and Results\n", + "#pv**1.2 = consmath.tant\n", + "print (\"(i) The final specific volume, temperature and increase in entropy\")\n", + "\n", + "v1 = R*10**3*T1/p1;\n", + "v2 = v1*(p1/p2)**(1./n);\n", + "print (\"v2 = %.3f\")%(v2), (\"m**3/kg\")\n", + "\n", + "T2 = p2*v2/R/10**3; \t\t\t#K\n", + "t2 = T2-273; \t\t\t#0C\n", + "print (\"Final temperature = %.3f\")% (t2), (\"0C\")\n", + "\n", + "ds = cv*math.log(T2/T1) + R*math.log(v2/v1);\n", + "print (\"ds = %.3f\")%(ds), (\"kJ/kg K\")\n", + "\n", + "\n", + "W = R*(T1-T2)/(n-1);\n", + "print (\"Work done = %.3f\")% (W), (\"kJ/kg\")\n", + "\n", + "Q = cv*(T2-T1) + W;\n", + "print (\"Heat transfer = %.3f\")%(Q),(\"kJ/kg\")\n", + "\n", + "print (\"Part (b)\")\n", + "\n", + "print (\"(i) Though the process is assumed now to be irreversible and adiabatic, the end states are given to be the same as in (a). Therefore, all the properties at the end of the process are the same as in (a).\")\n", + "\n", + "\n", + "print (\"(ii) Adiabatic process\")\n", + "Q = 0;\n", + "print (\"Heat transfer = %.3f\")%(Q), (\"kJ/kg\")\n", + "\n", + "W = -cv*(T2-T1);\n", + "print (\"Work done = %.3f\")%(W),(\"kJ/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a)\n", + "(i) The final specific volume, temperature and increase in entropy\n", + "v2 = 0.464 m**3/kg\n", + "Final temperature = 17.897 0C\n", + "ds = 0.179 kJ/kg K\n", + "Work done = 117.818 kJ/kg\n", + "Heat transfer = 58.950 kJ/kg\n", + "Part (b)\n", + "(i) Though the process is assumed now to be irreversible and adiabatic, the end states are given to be the same as in (a). Therefore, all the properties at the end of the process are the same as in (a).\n", + "(ii) Adiabatic process\n", + "Heat transfer = 0.000 kJ/kg\n", + "Work done = 58.868 kJ/kg\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.6 Page no : 397" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "d = 2.5; \t\t\t#m; diameter\n", + "V1 = 4./3*math.pi*(d/2)**3; \t\t\t#volume of each sphere\n", + "T1 = 298.; \t\t\t#K\n", + "T2 = 298.; \t\t\t#K\n", + "m1 = 16.; \t\t\t#kg\n", + "m2 = 8.; \t\t\t#kg\n", + "V = 2.*V1; \t\t\t#total volume\n", + "m = m1+m2;\n", + "R = 287.; \t\t\t#kJ/kg K\n", + "\n", + "# Calculations\n", + "p = m*R*T1/V/10**5; \t\t\t#bar\n", + "\n", + "\n", + "# Results\n", + "print (\"pressure in the spheres when the system attains equilibrium = %.3f\")%(p),(\"bar\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "pressure in the spheres when the system attains equilibrium = 1.254 bar\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.7 Page no : 398" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "m = 6.5/60; \t\t\t#kg/s\n", + "import math \n", + "cv = 0.837; \t\t\t#kJ/kg K\n", + "p1 = 10*10**5; \t\t\t#Pa\n", + "p2 = 1.05*10**5; \t\t\t#Pa\n", + "T1 = 453; \t\t\t#K\n", + "R0 = 8.314;\n", + "M = 44.; \t\t\t#Molecular mass of CO2\n", + "\n", + "\n", + "# Calculations and Results\n", + "R = R0/M;\n", + "cp = cv+R;\n", + "y = cp/cv;\n", + "\n", + "T2 = T1*(p2/p1)**((y-1)/y);\n", + "print T2\n", + "t2 = T2-273;\n", + "print (\"Final temperature = %.3f\")%(t2),(\"0C\")\n", + "\n", + "v2 = R*10**3*T2/p2; \t\t\t#m**3/kg\n", + "print (\"final specific volume = %.3f\")%(v2), (\"m**3/kg\")\n", + "\n", + "ds = 0; \t\t\t#Reversible and adiabatic process\n", + "print (\"Increase in entropy = \"), (ds)\n", + "\n", + "Q = 0; \t\t\t#Adiabatic process\n", + "print (\"Heat transfer rate from turbine = \"), (Q)\n", + "\n", + "W = m*cp*(T1-T2);\n", + "print (\"Power delivered by the turbine = %.3f\")% (W), (\"kW\")\n", + "\n", + "\n", + "# Note : answers wont match with the book because of the rounding error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "299.106840283\n", + "Final temperature = 26.107 0C\n", + "final specific volume = 0.538 m**3/kg\n", + "Increase in entropy = 0\n", + "Heat transfer rate from turbine = 0\n", + "Power delivered by the turbine = 17.104 kW\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.8 Page no : 400" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "p1 = 8.*10**5; \t\t\t#Pa\n", + "V1 = 0.035; \t\t\t#m**3\n", + "T1 = 553.; \t\t\t#K\n", + "p2 = 8.*10**5; \t\t\t#Pa\n", + "V2 = 0.1; \t\t\t#m**3\n", + "n = 1.4;\n", + "R = 287.; \t\t\t#J/kg K\n", + "T3 = 553.; \t\t\t#K\n", + "cv = 0.71; \t\t\t#kJ/kg K\n", + "\n", + "# Calculations and Results\n", + "m = p1*V1/R/T1;\n", + "T2 = p2*V2/m/R;\n", + "p3 = p2/((T2/T3)**(n/(n-1)));\n", + "V3 = m*R*T3/p3;\n", + "\n", + "print (\"(i) The heat received in the cycle\")\n", + "\n", + "#constant pressure process 1-2\n", + "W_12 = p1*(V2-V1)/10**3; \t\t\t#kJ\n", + "Q_12 = m*cv*(T2-T1) + W_12; \t\t\t#kJ\n", + "\n", + "#polytropic process 2-3\n", + "W_23 = m*R/10**3*(T2-T3)/(n-1);\n", + "Q_23 = m*cv*(T3-T2) + W_23;\n", + "\n", + "Q_received = Q_12 + Q_23;\n", + "print (\"Total heat received in the cycle = \"),(Q_received), (\"kJ\")\n", + "\n", + "print (\"(ii) The heat rejected in the cycle\")\n", + "\n", + "#Isothermal process 3-1\n", + "W_31 = p3*V3*math.log(V1/V3)/10**3; \t\t\t#kJ\n", + "Q_31 = m*cv*(T3-T1) + W_31;\n", + "print (\"Heat rejected in the cycle = %.3f\")% (-Q_31), (\"kJ\")\n", + "\n", + "\n", + "n = (Q_received - (-Q_31))/Q_received*100;\n", + "print (\"Efficiency of the cycle = %.3f\")% (n), (\"%\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The heat received in the cycle\n", + "Total heat received in the cycle = 182.0 kJ\n", + "(ii) The heat rejected in the cycle\n", + "Heat rejected in the cycle = 102.883 kJ\n", + "Efficiency of the cycle = 43.471 %\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.9 Page no : 424" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "\n", + "# Variables\n", + "v = 44.; \t\t\t#m**3/kg-mol\n", + "T = 373.; \t\t\t#K\n", + "\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) Using Van der Waals\u2019 equation\")\n", + "a = 362850.; \t\t\t#N*m**4/(kg-mol)**2\n", + "b = 0.0423; \t\t\t#M**3/kg-mol\n", + "R0 = 8314.; \t\t\t#J/kg K\n", + "\n", + "p = ((R0*T/(v-b)) - a/v**2);\n", + "print (\"Pressure umath.sing Van der Waals equation = %.3f\")%(p), (\"N/m**2\")\n", + "\n", + "print (\"(ii) Using perfect gas equation\")\n", + "\n", + "p = R0*T/v;\n", + "print (\"Pressure using perfect gas equation = %.3f\")% (p), (\"N/m**2\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Using Van der Waals\u2019 equation\n", + "Pressure umath.sing Van der Waals equation = 70360.445 N/m**2\n", + "(ii) Using perfect gas equation\n", + "Pressure using perfect gas equation = 70480.045 N/m**2\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.10 Page no : 425" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 3.; \t\t\t#m**3\n", + "m = 10.; \t\t\t#kg\n", + "T = 300.; \t\t\t#K\n", + "\n", + "# Calculations and Results\n", + "R0 = 8314.;\n", + "M = 44.; \n", + "R = R0/M;\n", + "p = m*R*T/V;\n", + "print (\"Pressure Using perfect gas equation = %.3f\")% (p),(\"N/m**2\")\n", + "\n", + "a = 362850; \t\t\t#Nm**4/(kg-mol)**2\n", + "b = 0.0423; \t\t\t#m**3/(kg-mol)\n", + "v = 13.2; \t\t\t #m**3/kg-mol\n", + "\n", + "p = R0*T/(v-b) - a/v**2;\n", + "print (\"Pressure Using Van der Waals\u2019 equation = %.3f\")%(p), (\"N/m**2\")\n", + "\n", + "\n", + "A0 = 507.2836;\n", + "a = 0.07132;\n", + "B0 = 0.10476;\n", + "b = 0.07235;\n", + "C = 66*10**4;\n", + "A = A0*(1-a/v);\n", + "B = B0*(1-b/v);\n", + "e = C/v/T**3;\n", + "\n", + "p = R0*T*(1-e)/v**2*(v+B) - A/v**2;\n", + "print (\"Pressure Using Beattie Bridgeman equation = %.3f\")%(p), (\"N/m**2\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure Using perfect gas equation = 188954.545 N/m**2\n", + "Pressure Using Van der Waals\u2019 equation = 187479.533 N/m**2\n", + "Pressure Using Beattie Bridgeman equation = 190090.365 N/m**2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.11 Page no : 404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "a = 139250; \t\t\t#Nm**4/(kg-mol)**2\n", + "b = 0.0314; \t\t\t#m**3/kg-mol\n", + "R0 = 8314; \t\t\t#Nm/kg-mol K\n", + "v1 = 0.2*32; \t\t\t#m**3/kg-mol\n", + "v2 = 0.08*32; \t\t\t#m**3/kg-mol\n", + "T = 333; \t\t\t#K\n", + "print (\"(i) Work done during the process\")\n", + "\n", + "# Calculations\n", + "def f21( v): \n", + "\t return R0*T/(v-b) - a/v**2\n", + "\n", + "W = quad(f21, v1, v2)[0]\n", + "\n", + "\n", + "# Results\n", + "print (\"W = %.3f\")% (W),(\"Nm/kg-mol\")\n", + "\n", + "\n", + "print (\"(ii) The final pressure\")\n", + "p2 = R0*T/(v2-b) - a/v2**2;\n", + "print (\"p2 = %.3f\")%(p2), (\"N/m**2\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Work done during the process\n", + "W = -2524722.415 Nm/kg-mol\n", + "(ii) The final pressure\n", + "p2 = 1073651.290 N/m**2\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.12 Page no : 404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "pr = 20;\n", + "Z = 1.25;\n", + "Tr = 8.0;\n", + "Tc = 282.4; \t\t\t#K\n", + "\n", + "# Calculations\n", + "T = Tc*Tr;\n", + "\n", + "# Results\n", + "print (\"Temperature = %.3f\")%(T),(\"K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature = 2259.200 K\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.13 Page no : 405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "p = 260.*10**5; \t\t\t#Pa\n", + "T = 288.; \t\t\t#K\n", + "pc = 33.94*10**5; \t\t\t#Pa\n", + "Tc = 126.2; \t\t\t#K\n", + "R = 8314./28;\n", + "\n", + "# Calculations\n", + "pr = p/pc;\n", + "Tr = T/Tc;\n", + "Z = 1.08;\n", + "rho = p/Z/R/T;\n", + "\n", + "# Results\n", + "print (\"Density of N2 = %.3f\")% (rho), (\"kg/m**3\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Density of N2 = 281.517 kg/m**3\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.14 Page no : 405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "p = 200.*10**5; \t\t\t#Pa\n", + "pc = 73.86*10**5; \t\t\t#Pa\n", + "Tc = 304.2; \t\t\t#K\n", + "pr = p/pc;\n", + "Z = 1;\n", + "Tr = 2.48;\n", + "\n", + "# Calculations\n", + "T = Tr*Tc;\n", + "\n", + "# Results\n", + "print (\"Temperature = \"), (T), (\"K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature = 754.416 K\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.15 Page no : 405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "d = 12.; \t\t\t#m; diameter of spherical balloon\n", + "V = 4./3*math.pi*(d/2)**3;\n", + "T = 303.; \t\t\t#K\n", + "p = 1.21*10**5; \t\t\t#Pa\n", + "pc = 12.97*10**5; \t\t\t#Pa\n", + "Tc = 33.3; \t\t\t#K\n", + "R = 8314./2;\n", + "\n", + "# Calculations\n", + "pr = p/pc;\n", + "Tr = T/Tc;\n", + "Z = 1;\n", + "m = p*V/Z/R/T;\n", + "\n", + "# Results\n", + "print (\"Mass of H2 in the balloon = %.3f\")% (m), (\"kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass of H2 in the balloon = 86.917 kg\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.16 Page no : 406" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Calculations\n", + "Z_cp = 3./2-9./8;\n", + "\n", + "# Results\n", + "print (\"Z_cp = \"),(Z_cp)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Z_cp = 0.375\n" + ] + } + ], + "prompt_number": 17 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/ch9.ipynb b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/ch9.ipynb new file mode 100755 index 00000000..d03841d8 --- /dev/null +++ b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/ch9.ipynb @@ -0,0 +1,1568 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:299eac653f64d8a7c5614d61c55d5e5b51bd64ec7dc4bb7d26a6abfad893f9e1" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 : Gases and Vapour Mixtures" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.1 Page no : 420" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 0.35; \t\t\t#m**3\n", + "import math \n", + "m_CO = 0.4; \t\t\t#kg\n", + "m_air = 1; \t\t\t#kg\n", + "m_O2 = 0.233; \t\t\t#kg\n", + "m_N2 = 0.767; \t\t\t#kg\n", + "T = 293.; \t\t\t#K\n", + "R0 = 8.314; \t\t\t#kJ/kg K\n", + "M_O2 = 32.; \t\t\t#Molecular mass of O2\n", + "M_N2 = 28.; \t\t\t#Molecular mass of N2\n", + "M_CO = 28.; \t\t\t#Molecular mass of CO\n", + "\n", + "# Calculations and Results\n", + "\n", + "p_O2 = m_O2*R0*10**3*T/M_O2/V/10**5; \t\t\t#bar\n", + "print (\"partial pressure for p_O2 %.3f\")% (p_O2), (\"bar\")\n", + "\n", + "p_N2 = m_N2*R0*10**3*T/M_N2/V/10**5; \t\t\t#bar\n", + "print (\"partial pressure for p_N2 %.3f\")% (p_N2), (\"bar\")\n", + "\n", + "p_CO = m_CO*R0*10**3*T/M_CO/V/10**5; \t\t\t#bar\n", + "print (\"partial pressure for p_CO %.3f\")%(p_CO), (\"bar\")\n", + "\n", + "\n", + "print (\"(ii) Total pressure in the vessel\")\n", + "p = p_O2+p_N2+p_CO;\n", + "print (\"p = %.3f\")% (p), (\"bar\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "partial pressure for p_O2 0.507 bar\n", + "partial pressure for p_N2 1.907 bar\n", + "partial pressure for p_CO 0.994 bar\n", + "(ii) Total pressure in the vessel\n", + "p = 3.408 bar\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.2 Page no : 421" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "R0 = 8.314;\n", + "M_O2 = 32.;\n", + "M_N2 = 28.;\n", + "M_Ar = 40.;\n", + "M_CO2 = 44.;\n", + "\n", + "# Calculations\n", + "R_O2 = R0/M_O2; \t\t\t#kJ/kg K\n", + "R_N2 = R0/M_N2; \t\t\t#kJ/kg K\n", + "R_Ar = R0/M_Ar; \t\t\t#kJ/kg K\n", + "R_CO2 = R0/M_CO2; \t\t\t#kJ/kg K\n", + "\n", + "O2 = 0.2314;\n", + "N2 = 0.7553;\n", + "Ar = 0.0128;\n", + "CO2 = 0.0005;\n", + "\n", + "# Results\n", + "print (\"(i) Gas constant for air\")\n", + "R = O2*R_O2 + N2*R_N2 + Ar*R_Ar + CO2*R_CO2;\n", + "print (\"R = %.3f\")%(R), (\"kJ/kg K\")\n", + "\n", + "print (\"(ii) Apparent molecular weight.\")\n", + "M = R0/R;\n", + "print (\"M = %.3f\")%(M)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Gas constant for air\n", + "R = 0.287 kJ/kg K\n", + "(ii) Apparent molecular weight.\n", + "M = 28.954\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.3 Page no : 422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "p = 1.; \t\t\t#bar\n", + "#For oxygen\n", + "m_O2 = 0.2314;\n", + "M_O2 = 32;\n", + "n_O2 = m_O2/M_O2;\n", + "#For Nitrogen\n", + "m_N2 = 0.7553;\n", + "M_N2 = 28.;\n", + "n_N2 = m_N2/M_N2;\n", + "#For Argon\n", + "m_Ar = 0.0128;\n", + "M_Ar = 40;\n", + "n_Ar = m_Ar/M_Ar;\n", + "\n", + "#For CO2\n", + "m_CO2 = 0.0005;\n", + "M_CO2 = 44;\n", + "n_CO2 = m_CO2/M_CO2;\n", + "\n", + "# Calculations and Results\n", + "n = n_O2 + n_N2 + n_Ar + n_CO2;\n", + "\n", + "#Let Vi/V be A\n", + "A_O2 = n_O2/n * 100;\n", + "print (\"Vi/V of O2 = %.3f\")%(A_O2),(\"%\")\n", + "\n", + "A_N2 = n_N2/n * 100;\n", + "print (\"Vi/V of N2 = %.3f\")%(A_N2), (\"%\")\n", + "\n", + "A_Ar = n_Ar/n *100;\n", + "print (\"Vi/V of Ar %.3f\")% (A_Ar), (\"%\")\n", + "\n", + "A_CO2 = n_CO2/n * 100;\n", + "print (\"Vi/V of CO2 = %.3f\")% (A_CO2), (\"%\")\n", + "\n", + "\n", + "P_O2 = n_O2/n*p;\n", + "print (\"Partial pressure of O2 = %.3f\")% (P_O2), (\"bar\")\n", + "\n", + "P_N2 = n_N2/n*p;\n", + "print (\"Partial pressure of N2 = %.3f\")% (P_N2), (\"bar\")\n", + "\n", + "P_Ar = n_Ar/n*p;\n", + "print (\"Partial pressure of Ar = %.3f\")% (P_Ar), (\"bar\")\n", + "\n", + "P_CO2 = n_CO2/n*p;\n", + "print (\"Partial pressure of CO2 = %.4f\")% (P_CO2), (\"bar\")\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vi/V of O2 = 20.937 %\n", + "Vi/V of N2 = 78.103 %\n", + "Vi/V of Ar 0.927 %\n", + "Vi/V of CO2 = 0.033 %\n", + "Partial pressure of O2 = 0.209 bar\n", + "Partial pressure of N2 = 0.781 bar\n", + "Partial pressure of Ar = 0.009 bar\n", + "Partial pressure of CO2 = 0.0003 bar\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.4 Page no : 423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "p = 1.*10**5; \t\t\t#Pa\n", + "T = 293.; \t\t\t#K\n", + "n_CO2 = 1.; \t\t\t#moles of CO2\n", + "n = 4.; \t\t\t#moles of air\n", + "M_CO2 = 44.;\n", + "M_N2 = 28.;\n", + "M_O2 = 32.;\n", + "\n", + "#Let A be the volumeetric analysis\n", + "A_O2 = 0.21;\n", + "A_N2 = 0.79;\n", + "\n", + "# Calculations and Results\n", + "n_O2 = A_O2*n;\n", + "n_N2 = A_N2*n;\n", + "\n", + "print (\"(i) The masses of CO2, O2 and N2, and the total mass\")\n", + "\n", + "m_CO2 = n_CO2*M_CO2;\n", + "print (\"Mass of CO2 = %.3f\")%(m_CO2),(\"kg\")\n", + "\n", + "m_O2 = n_O2*M_O2;\n", + "print (\"Mass of O2 = %.3f\")%(m_O2),(\"kg\")\n", + "\n", + "m_N2 = n_N2*M_N2;\n", + "print (\"Mass of N2 = %.3f\")%(m_N2),(\"kg\")\n", + "\n", + "m = m_CO2 + m_O2 + m_N2;\n", + "print (\"Total mass = %.3f\")% (m), (\"kg\")\n", + "\n", + "\n", + "print (\"(ii) The percentage carbon content by mass\")\n", + "#Since the molecular weight of carbon is 12, therefore, there are 12 kg of carbon present for every mole of CO2\n", + "m_C = 12; \t\t\t#kg\n", + "\n", + "C = m_C/m*100;\n", + "print (\"Percentage carbon in mixture %.3f\")%(C),(\"%\")\n", + "\n", + "\n", + "print (\"(iii) The apparent molecular weight and the gas consmath.tant for the mixture\")\n", + "n = n_CO2 + n_O2 + n_N2;\n", + "M = n_CO2/n*M_CO2 + n_O2/n*M_O2 + n_N2/n*M_N2;\n", + "print (\"Apparent Molecular weight %.3f\")%(M)\n", + "\n", + "R0 = 8.314;\n", + "R = R0/M;\n", + "print (\"Gas constant for the mixture = %.3f\")%(R),(\"kJ/kg K\")\n", + "\n", + "\n", + "print (\"(iv) The specific volume of the mixture\")\n", + "v = R*10**3*T/p;\n", + "print (\"specific volume = %.3f\")%(v),(\"m**3/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The masses of CO2, O2 and N2, and the total mass\n", + "Mass of CO2 = 44.000 kg\n", + "Mass of O2 = 26.880 kg\n", + "Mass of N2 = 88.480 kg\n", + "Total mass = 159.360 kg\n", + "(ii) The percentage carbon content by mass\n", + "Percentage carbon in mixture 7.530 %\n", + "(iii) The apparent molecular weight and the gas consmath.tant for the mixture\n", + "Apparent Molecular weight 31.872\n", + "Gas constant for the mixture = 0.261 kJ/kg K\n", + "(iv) The specific volume of the mixture\n", + "specific volume = 0.764 m**3/kg\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.5 Page no : 424" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "p = 1.*10**5; \t\t\t#Pa\n", + "T = 298.; \t\t\t#K\n", + "M_H2 = 2.;\n", + "M_O2 = 32.;\n", + "R0 = 8314.;\n", + "# ratio = V_H2/V_O2 = 2;\n", + "ratio = 2;\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) The mass of O2 required\")\n", + "\t\t\t#Let the mass of O2 per kg of H2 = x kg\n", + "m_H2 = 1; \t\t\t#kg\n", + "n_H2 = m_H2/M_H2;\n", + "\n", + "# n_O2 = x/M_O2\n", + "x = M_O2*n_H2/ratio;\n", + "print (\"Mass of O2 per kg of H2 = %.3f\")%(x), (\"kg\")\n", + "\n", + "print (\"(ii) The volume of the container\")\n", + "n_O2 = x/M_O2;\n", + "n = n_H2 + n_O2;\n", + "V = n*R0*T/p;\n", + "print (\"V = %.3f\")%(V), (\"m**3\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The mass of O2 required\n", + "Mass of O2 per kg of H2 = 8.000 kg\n", + "(ii) The volume of the container\n", + "V = 18.582 m**3\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.6 Page no : 424" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#Let composition of mixture by volume be denoted by c1\n", + "#Let Final composition desired be denoted by c2\n", + "\n", + "# Variables\n", + "c1_H2 = 0.78;\n", + "c1_CO = 0.22;\n", + "c2_H2 = 0.52;\n", + "c2_CO = 0.48;\n", + "M_H2 = 2.;\n", + "M_CO = 28.;\n", + "\n", + "# Calculations\n", + "M = c1_H2*M_H2 + c1_CO*M_CO;\n", + "# Let x kg of mixture be removed and y kg of CO be added.\n", + "x = (c1_H2 - c2_H2)/c1_H2*M;\n", + "\n", + "# Results\n", + "print (\"Mass of mixture removed = %.3f\")%(x), (\"kg\")\n", + "\n", + "y = M_CO/M*x;\n", + "print (\"Mass of CO added = %.3f\")%(y),(\"kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass of mixture removed = 2.573 kg\n", + "Mass of CO added = 9.333 kg\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.7 Page no : 425" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "ratio = 1./8; \t\t\t#volume ratio; v1/v2\n", + "T1 = 1223.; \t\t\t#K\n", + "cp_CO2 = 1.235; \t\t\t#kJ/kg K\n", + "cp_O2 = 1.088; \t\t\t#kJ/kg K\n", + "cp_N2 = 1.172; \t\t\t#kJ/kg K\n", + "n_CO2 = 0.13;\n", + "n_O2 = 0.125;\n", + "n_N2 = 0.745;\n", + "M_CO2 = 44.;\n", + "M_O2 = 32.;\n", + "M_N2 = 28.;\n", + "\n", + "\n", + "# Calculations\n", + "m_CO2 = M_CO2*n_CO2;\n", + "m_O2 = M_O2*n_O2;\n", + "m_N2 = M_N2*n_N2;\n", + "m = m_CO2 + m_O2 + m_N2;\n", + "\n", + "# Let Fraction by mass be denoted by F\n", + "F_CO2 = m_CO2/m;\n", + "F_O2 = m_O2/m;\n", + "F_N2 = m_N2/m;\n", + "cp = F_CO2*cp_CO2 + F_O2*cp_O2 + F_N2*cp_N2;\n", + "R0 = 8.314;\n", + "R = F_CO2*R0/M_CO2 + F_O2*R0/M_O2 + F_N2*R0/M_N2;\n", + "\n", + "cv = cp - R;\n", + "n = 1.2;\n", + "\n", + "print (\"(i) The workdone\")\n", + "T2 = T1*(ratio)**(n-1);\n", + "W = R*(T1-T2)/(n-1);\n", + "print (\"W = %.3f\")%(W), (\"kJ/kg\")\n", + "\n", + "print (\"(ii) The heat flow\")\n", + "du = cv*(T2-T1);\n", + "Q = du + W;\n", + "print (\"Q = %.3f\")%(Q), (\"kJ/kg\")\n", + "\n", + "\n", + "print (\"(iii) Change of entropy per kg of mixture\")\n", + "ds_1A = R*math.log(1/ratio); \t\t\t#isothermal process\n", + "ds_2A = cv*math.log(T1/T2);\n", + "\n", + "ds_12 = ds_1A - ds_2A;\n", + "print (\"change of entropy = %.3f\")% (ds_12), (\"kJ/kg K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The workdone\n", + "W = 565.669 kJ/kg\n", + "(ii) The heat flow\n", + "Q = 190.777 kJ/kg\n", + "(iii) Change of entropy per kg of mixture\n", + "change of entropy = 0.191 kJ/kg K\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.8 Page no : 427" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "M_CO2 = 44.;\n", + "M_H2 = 2.;\n", + "M_N2 = 28.;\n", + "M_CH4 = 16.;\n", + "M_CO = 28.;\n", + "\n", + "# Let volumetric analysis be denoted by V\n", + "V_CO = 0.28;\n", + "V_H2 = 0.13;\n", + "V_CH4 = 0.04;\n", + "V_CO2 = 0.04;\n", + "V_N2 = 0.51;\n", + "Cp_CO = 29.27; \t\t\t#kJ/mole K\n", + "Cp_H2 = 28.89; \t\t\t#kJ/mole K\n", + "Cp_CH4 = 35.8; \t\t\t#kJ/mole K\n", + "Cp_CO2 = 37.22; \t\t\t#kJ/mole K\n", + "Cp_N2 = 29.14; \t\t\t#kJ/mole K\n", + "R0 = 8.314; \n", + "\n", + "# Calculations and Results\n", + "Cp = V_CO*Cp_CO + V_H2*Cp_H2 + V_CO2*Cp_CO2 + V_CH4*Cp_CH4 + V_N2*Cp_N2;\n", + "print (\"Cp = %.3f\")%(Cp), (\"kJ/mole K\")\n", + "\n", + "Cv = Cp-R0;\n", + "print (\"Cv = %.3f\")% (Cv), (\"kJ/mole K\")\n", + "\n", + "M = V_CO*M_CO + V_H2*M_H2 + V_CO2*M_CO2 + V_CH4*M_CH4 + V_N2*M_N2;\n", + "\n", + "cp = Cp/M;\n", + "print (\"cp = %.3f\")%(cp), (\"kJ/kg K\")\n", + "\n", + "cv = Cv/M;\n", + "print (\"cv %.3f\")% (cv), (\"kJ/kg K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cp = 29.733 kJ/mole K\n", + "Cv = 21.419 kJ/mole K\n", + "cp = 1.200 kJ/kg K\n", + "cv 0.864 kJ/kg K\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.9 Page no : 427" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "p = 1.3 \t\t\t#bar\n", + "R0 = 8.314;\n", + "M_CO2 = 44.;\n", + "M_O2 = 32.;\n", + "M_N2 = 28.;\n", + "M_CO = 28.;\n", + "m_O2 = 0.1;\n", + "m_N2 = 0.7;\n", + "m_CO2 = 0.15;\n", + "m_CO = 0.05;\n", + "#Considering 1 kg of mixture\n", + "m = 1; \t\t\t#kg\n", + "\n", + "# Calculations\n", + "#let moles be denoted by n\n", + "n_O2 = m_O2/M_O2;\n", + "n_N2 = m_N2/M_N2;\n", + "n_CO2 = m_CO2/M_CO2;\n", + "n_CO = m_CO/M_CO;\n", + "M = 1/(m_O2/M_O2 + m_N2/M_N2 + m_CO2/M_CO2 + m_CO/M_CO);\n", + "n = m/M;\n", + "x_O2 = n_O2/n;\n", + "x_N2 = n_N2/n;\n", + "x_CO2 = n_CO2/n;\n", + "x_CO = n_CO/n;\n", + "\n", + "# Results\n", + "print (\"(i) Partial pressures of the constituents\")\n", + "P_O2 = x_O2*p;\n", + "print (\"Partial pressure of O2 = %.3f\")% (P_O2), (\"bar\")\n", + "\n", + "P_N2 = x_N2*p;\n", + "print (\"Partial pressure of N2 = %.3f\")% (P_N2), (\"bar\")\n", + "\n", + "P_CO2 = x_CO2*p;\n", + "print (\"Partial pressure of CO2 = %.3f\")% (P_CO2), (\"bar\")\n", + "\n", + "P_CO = x_CO*p;\n", + "print (\"Partial pressure of CO = %.3f\")% (P_CO), (\"bar\")\n", + "\n", + "R_mix = R0/M;\n", + "print (\"Gas constant of mixture = %.3f\")%(R_mix), (\"kJ/kg K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Partial pressures of the constituents\n", + "Partial pressure of O2 = 0.122 bar\n", + "Partial pressure of N2 = 0.975 bar\n", + "Partial pressure of CO2 = 0.133 bar\n", + "Partial pressure of CO = 0.070 bar\n", + "Gas constant of mixture = 0.277 kJ/kg K\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.10 Page no : 428" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "p = 4.*10**5; \t\t \t#Pa\n", + "import math \n", + "T = 293.; \t\t\t #K\n", + "R0 = 8.314;\n", + "\n", + "m_N2 = 4.; \t \t\t #kg\n", + "m_CO2 = 6.; \t\t\t #kg\n", + "\n", + "M_N2 = 28.; \t\t \t #Molecular mass\n", + "M_CO2 = 44.; \t\t\t #Molecular mass\n", + "\n", + "n_N2 = m_N2/M_N2; \t\t\t#moles of N2\n", + "n_CO2 = m_CO2/M_CO2; \t\t\t#moles of CO2\n", + "\n", + "x_N2 = n_N2/(n_N2+n_CO2);\n", + "print (\"x_N2 = %.3f\")% (x_N2)\n", + "\n", + "x_CO2 = n_CO2/(n_CO2+n_N2);\n", + "print (\"x_CO2 = %.3f\")% (x_CO2)\n", + "\n", + "\n", + "print (\"(ii) The equivalent molecular weight of the mixture\")\n", + "M = x_N2*M_N2 + x_CO2*M_CO2;\n", + "print (\"M = %.3f\")%(M), (\"kg/kg-mole\")\n", + "\n", + "print (\"(iii) The equivalent gas consmath.tant of the mixture\")\n", + "m = m_N2+m_CO2;\n", + "Rmix = (m_N2*(R0/M_N2) + m_CO2*(R0/M_CO2))/m;\n", + "print (\"Rmix = %.3f\")% (Rmix), (\"kJ/kg K\")\n", + "\n", + "print (\"(iv) The partial pressures and partial volumes\")\n", + "P_N2 = x_N2*p/10**5;\n", + "print (\"P_N2 = %.3f\")% (P_N2), (\"bar\")\n", + "\n", + "P_CO2 = x_CO2*p/10**5;\n", + "print (\"P_CO2 = %.3f\")% (P_CO2), (\"bar\")\n", + "\n", + "V_N2 = m_N2*R0/M_N2*T/p*10**3;\n", + "print (\"V_N2 %.3f\")% (V_N2), (\"m**3\")\n", + "\n", + "V_CO2 = m_CO2*R0/M_CO2*T/p*10**3;\n", + "print (\"V_CO2 %.3f\")% (V_CO2), (\"m**3\")\n", + "\n", + "print (\"(v) The volume and density of the mixture\")\n", + "\n", + "V = m*Rmix*10**3*T/p;\n", + "print (\"V = %.3f\")% (V), (\"m**3\")\n", + "\n", + "rho_mix = m/V;\n", + "print (\"Density of mixture = %.3f\")% (rho_mix), (\"kg/m**3\")\n", + "\n", + "\n", + "print (\"(vi) cp and cv of the mixture\")\n", + "\n", + "y_N2 = 1.4;\n", + "cv_N2 = (R0/M_N2)/(y_N2 - 1);\n", + "cp_N2 = cv_N2*y_N2;\n", + "\n", + "y_CO2 = 1.286;\n", + "cv_CO2 = (R0/M_CO2)/(y_CO2 - 1);\n", + "cp_CO2 = cv_CO2*y_CO2;\n", + "\n", + "cp = (m_N2*cp_N2 + m_CO2*cp_CO2)/(m_N2+m_CO2);\n", + "print (\"cp = %.3f\")%(cp),(\"kJ/kg K\")\n", + "\n", + "cv = (m_N2*cv_N2 + m_CO2*cv_CO2)/(m_N2+m_CO2);\n", + "print (\"cv = %.3f\")%(cv),(\"kJ/kg K\")\n", + "\n", + "T1 = 293.; \t\t\t#K\n", + "T2 = 323.; \t\t\t#K\n", + "dU = m*cv*(T2-T1);\n", + "print (\"Change in internal energy = %.3f\")% (dU), (\"kJ\")\n", + "\n", + "dH = m*cp*(T2-T1);\n", + "print (\"Change in enthalpy = %.3f\")% (dH), (\"kJ\")\n", + "\n", + "dS = m*cv*math.log(T2/T1); \t\t\t#Consmath.tant volume process\n", + "print (\"Change in entropy = %.3f\")% (dS), (\"kJ/kg K\")\n", + "\n", + "\n", + "print (\"When the mixture is heated at constant pressure\")\n", + "\n", + "print (\"If the mixture is heated at constant pressure \u0394U and \u0394H will remain the same\")\n", + "\n", + "dS = m*cp*math.log(T2/T1);\n", + "print (\"Change in entropy = %.3f\")% (dS), (\"kJ/kg K\")\n", + "\n", + "\n", + "# Note : Answers are slightly different because of rounding error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "x_N2 = 0.512\n", + "x_CO2 = 0.488\n", + "(ii) The equivalent molecular weight of the mixture\n", + "M = 35.814 kg/kg-mole\n", + "(iii) The equivalent gas consmath.tant of the mixture\n", + "Rmix = 0.232 kJ/kg K\n", + "(iv) The partial pressures and partial volumes\n", + "P_N2 = 2.047 bar\n", + "P_CO2 = 1.953 bar\n", + "V_N2 0.870 m**3\n", + "V_CO2 0.830 m**3\n", + "(v) The volume and density of the mixture\n", + "V = 1.700 m**3\n", + "Density of mixture = 5.881 kg/m**3\n", + "(vi) cp and cv of the mixture\n", + "cp = 0.925 kJ/kg K\n", + "cv = 0.693 kJ/kg K\n", + "Change in internal energy = 208.001 kJ\n", + "Change in enthalpy = 277.644 kJ\n", + "Change in entropy = 0.676 kJ/kg K\n", + "When the mixture is heated at constant pressure\n", + "If the mixture is heated at constant pressure \u0394U and \u0394H will remain the same\n", + "Change in entropy = 0.902 kJ/kg K\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.11 Page no : 430" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "Cv_O2 = 21.07; \t\t\t#kJ/mole K\n", + "Cv_CO = 20.86; \t\t\t#kJ/mole K\n", + "p_O2 = 8*10**5; \t\t\t#Pa\n", + "p_CO = 1*10**5; \t\t\t#Pa\n", + "V_O2 = 1.8; \t\t\t#m**3\n", + "V_CO = 3.6; \t\t\t#m**3\n", + "T_O2 = 323.; \t\t\t#K\n", + "T_CO = 293.; \t\t\t#K\n", + "R0 = 8314.;\n", + "\n", + "# Calculations and Results\n", + "n_O2 = p_O2*V_O2/R0/T_O2;\n", + "n_CO = p_CO*V_CO/R0/T_CO;\n", + "n = (n_O2+n_CO);\n", + "V = (V_O2+V_CO);\n", + "\n", + "print (\"(i) Final temperature (T) and pressure (p) of the mixture\")\n", + "\n", + "#Before mixing\n", + "U1 = n_O2*Cv_O2*T_O2 + n_CO*Cv_CO*T_CO;\n", + "\n", + "T = U1/(n_O2*Cv_O2 + n_CO*Cv_CO);\n", + "t = T-273;\n", + "\n", + "print (\"Final temperature = %.3f\")% (t), (\"\u00b0C\")\n", + "\n", + "p = n*R0*T/V/10**5;\n", + "print (\"Final pressure = %.3f\")% (p), (\"bar\")\n", + "\n", + "\n", + "#For oxygen\n", + "dS_O1A = n_O2*R0*math.log(V/V_O2); \t\t\t#isothermal process\n", + "dS_O2A = n_O2*Cv_O2*math.log(T_O2/T); \t\t\t#consmath.tant volume process\n", + "dS_O12 = dS_O1A - dS_O2A; \t\t\t# Change of entropy of O2\n", + "\n", + "#For CO\n", + "dS_CO12 = n_CO*R0*math.log(V/V_CO) + n_CO*Cv_CO*math.log(T/T_CO); \t\t\t#Change of entropy of CO\n", + "dS = (dS_O12 + dS_CO12)/10**3;\n", + "print (\"(ii)Change of entropy of system = %.3f\")% (dS), (\"kJ/K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Final temperature (T) and pressure (p) of the mixture\n", + "Final temperature = 43.569 \u00b0C\n", + "Final pressure = 3.334 bar\n", + "(ii)Change of entropy of system = 5.396 kJ/K\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.12 Page no : 432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "p_A = 16.*10**5; \t\t\t#Pa\n", + "p_B = 6.4*10**5; \t\t\t#Pa\n", + "\n", + "T_A = 328.; \t\t\t#K\n", + "T_B = 298.; \t\t\t#K\n", + "\n", + "n_A = 0.6 \t\t\t#kg-mole\n", + "m_B = 3; \t \t\t#kg\n", + "\n", + "R0 = 8314.;\n", + "M_A = 28.; \n", + "y = 1.4;\n", + "\n", + "V_A = n_A*R0*T_A/p_A;\n", + "m_A = n_A*M_A;\n", + "R = R0/M_A;\n", + "V_B = m_B*R*T_B/p_B;\n", + "V = V_A+V_B;\n", + "m = m_A+m_B;\n", + "T = 303.; \t\t\t#K\n", + "\n", + "print (\"(a) (i) Final equilibrium pressure, p\")\n", + "p = m*R*T/V/10**5;\n", + "print (\"p = %.3f\")% (p), (\"bar\")\n", + "\n", + "cv = R/10**3/(y-1);\n", + "\n", + "print (\"(ii) Amount of heat transferred, Q :\")\n", + "\n", + "U1 = cv*(m_A*T_A + m_B*T_B);\n", + "U2 = m*cv*T;\n", + "Q = U2-U1;\n", + "print (\"Q = %.3f\")% (Q),(\"kJ\")\n", + "\n", + "print (\"(b) If the vessel were insulated :\")\n", + "\n", + "print (\"(i) Final temperature,\")\n", + "\n", + "T = cv*(m_A*T_A + m_B*T_B)/(m*cv);\n", + "t = T-273;\n", + "print (\"T = %.3f\")% (t), (\"\u00b0C\")\n", + "\n", + "\n", + "print (\"(ii) Final pressure\")\n", + "\n", + "p = m*R*T/V/10**5;\n", + "print (\"p = %.3f\")% (p), (\"bar\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) (i) Final equilibrium pressure, p\n", + "p = 12.393 bar\n", + "(ii) Amount of heat transferred, Q :\n", + "Q = -300.640 kJ\n", + "(b) If the vessel were insulated :\n", + "(i) Final temperature,\n", + "T = 50.455 \u00b0C\n", + "(ii) Final pressure\n", + "p = 13.230 bar\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.13 Page no : 434" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "m_O2 = 3.; \t\t\t#kg\n", + "M_O2 = 32.;\n", + "m_N2 = 9.; \t\t\t#kg\n", + "M_N2 = 28.;\n", + "R0 = 8.314;\n", + "\n", + "# Calculations\n", + "R_O2 = R0/M_O2;\n", + "R_N2 = R0/M_N2;\n", + "x_O2 = (m_O2/M_O2)/((m_O2/M_O2) + (m_N2/M_N2));\n", + "x_N2 = (m_N2/M_N2)/((m_O2/M_O2) + (m_N2/M_N2));\n", + "dS = -m_O2*R_O2*math.log(x_O2) -m_N2*R_N2*math.log(x_N2);\n", + "\n", + "# Results\n", + "print (\"Change in entropy = %.3f\")% (dS),(\"kJ/kg K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in entropy = 1.844 kJ/kg K\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.14 Page no : 434" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "m_N2 = 2.5; \t\t\t#kg \n", + "M_N2 = 28.;\n", + "p_N2 = 15.; \t\t\t#bar\n", + "p_total = 20.; \t\t\t#bar\n", + "\n", + "# Calculations\n", + "n_N2 = m_N2/M_N2;\n", + "p_O2 = p_total-p_N2;\n", + "n_O2 = p_O2/p_N2*n_N2;\n", + "M_O2 = 32;\n", + "m_O2 = n_O2*M_O2;\n", + "\n", + "# Results\n", + "print (\"Mass of O2 added = %.3f\")% (m_O2), (\"kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass of O2 added = 0.952 kg\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.15 Page no : 435" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "n_O2 = 1.;\n", + "M_N2 = 28.;\n", + "M_O2 = 32.;\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) Moles of N2 per mole of O2 :\")\n", + "n_N2 = n_O2*0.79/0.21;\n", + "print (\"n_N2 = %.3f\")%(n_N2),(\"moles\")\n", + "\n", + "n = n_O2+n_N2;\n", + "print (\"(ii)\")\n", + "p = 1; \t\t\t#atm\n", + "\n", + "p_O2 = n_O2/n*p;\n", + "print (\"p_O2 = %.3f\")% (p_O2), (\"atm\")\n", + "\n", + "p_N2 = n_N2/n*p;\n", + "print (\"p_N2 = %.3f\")% (p_N2), (\"atm\")\n", + "\n", + "\n", + "x = n_N2*M_N2/(n_N2*M_N2+n_O2*M_O2);\n", + "print (\"(iii) The kg of nitrogen per kg of mixture = %.3f\")% (x), (\"kg N2/kg mix\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Moles of N2 per mole of O2 :\n", + "n_N2 = 3.762 moles\n", + "(ii)\n", + "p_O2 = 0.210 atm\n", + "p_N2 = 0.790 atm\n", + "(iii) The kg of nitrogen per kg of mixture = 0.767 kg N2/kg mix\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.16 Page no : 436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "V = 0.6; \t\t\t#m**3\n", + "p1 = 12.*10**5; \t\t\t#Pa\n", + "p2 = 18.*10**5; \t\t\t#Pa\n", + "T = 298.; \t\t\t#K\n", + "R0 = 8.314;\n", + "x_O2 = 0.23;\n", + "x_N2 = 0.77;\n", + "\n", + "n = p1*V/R0/10**3/T;\n", + "#Considering 100 kg of air\n", + "m_O2 = 23.; \t\t\t#kg\n", + "m_N2 = 77.; \t\t\t#kg\n", + "M_O2 = 32.;\n", + "M_N2 = 28.;\n", + "m = 100.; \t\t\t#kg\n", + "\n", + "# Calculations and Results\n", + "R = (m_O2/M_O2 + m_N2/M_N2)*R0/m; \t\t\t#for air\n", + "M = R0/R \t \t\t#for air\n", + "\n", + "m = p1*V/R/T/10**3;\n", + "\n", + "m_O2 = x_O2*m;\n", + "print (\"Mass of O2 = %.3f\")% (m_O2), (\"kg\")\n", + "\n", + "m_N2 = x_N2*m;\n", + "print (\"Mass of N2 = %.3f\")% (m_N2), (\"kg\")\n", + "\n", + "#After adding CO2 in the vessel\n", + "p2 = 18.*10**5; \t\t\t#Pa;\n", + "\n", + "p_CO2 = 6.*10**5; \t\t\t#Pa\n", + "M_CO2 = 44.;\n", + "R_CO2 = R0/M_CO2;\n", + "\n", + "m_CO2 = p_CO2*V/(R_CO2*10**3*T);\n", + "print (\"Mass of CO2 = %.3f\")% (m_CO2), (\"kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass of O2 = 1.927 kg\n", + "Mass of N2 = 6.451 kg\n", + "Mass of CO2 = 6.393 kg\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.17 Page no : 437" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 6; \t\t \t#m**3\n", + "A = 0.45; \n", + "B = 0.55;\n", + "R_A = 0.288; \t\t\t#kJ/kg K\n", + "R_B = 0.295; \t\t\t#kJ/kg K\n", + "m = 2. \t\t\t#kg\n", + "T = 303. \t\t\t #K\n", + "\n", + "# Calculations\n", + "print (\"(i) The partial pressures\")\n", + "m_A = A*m;\n", + "m_B = B*m;\n", + "\n", + "p_A = m_A*R_A*10**3*T/V/10**5; \t\t\t#bar\n", + "print (\"p_A = %.3f\")% (p_A), (\"bar\")\n", + "\n", + "p_B = m_B*R_B*10**3*T/V/10**5; \t\t\t#bar\n", + "print (\"p_B = %.3f\")% (p_B), (\"bar\")\n", + "\n", + "\n", + "print (\"(ii) The total pressure\")\n", + "p = p_A+p_B;\n", + "print (\"p = %.3f\")% (p), (\"bar\")\n", + "\n", + "\n", + "print (\"(iii) The mean value of R for the mixture\")\n", + "Rm = (m_A*R_A + m_B*R_B)/(m_A + m_B);\n", + "print (\"Rm = %.3f\")% (Rm), (\"kJ/kg K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The partial pressures\n", + "p_A = 0.131 bar\n", + "p_B = 0.164 bar\n", + "(ii) The total pressure\n", + "p = 0.295 bar\n", + "(iii) The mean value of R for the mixture\n", + "Rm = 0.292 kJ/kg K\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.18 Page no : 438" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "m_O2 = 4.; \t\t\t#kg\n", + "m_N2 = 6.; \t\t\t#kg\n", + "p = 4.*10**5; \t\t\t#Pa\n", + "T = 300.; \t\t\t#K\n", + "M_O2 = 32.;\n", + "M_N2 = 28.;\n", + "m = 10.; \t\t\t#kg\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) The mole fraction of each component\")\n", + "n_O2 = m_O2/M_O2;\n", + "n_N2 = m_N2/M_N2;\n", + "\n", + "x_O2 = n_O2/(n_O2+n_N2);\n", + "print (\"x_O2 = %.3f\")% (x_O2)\n", + "\n", + "x_N2 = n_N2/(n_N2+n_O2);\n", + "print (\"x_N2 = %.3f\")% (x_N2)\n", + "\n", + "\n", + "print (\"(ii) The average molecular weight\")\n", + "M = (n_O2*M_O2 + n_N2*M_N2)/(n_O2 + n_N2);\n", + "print (\"M = %.3f\")%(M)\n", + "\n", + "print (\"(iii) The specific gas consmath.tant\")\n", + "R0 = 8.314;\n", + "R = R0/M;\n", + "print (\"R = %.3f\")% (R), (\"kJ/kg K\")\n", + "\n", + "print (\"(iv) The volume and density\")\n", + "V = m*R*T*10**3/p;\n", + "print (\"V = %.3f\")%(V), (\"m**3\")\n", + "\n", + "rho = (m_O2/V) + (m_N2/V);\n", + "print (\"density = %.3f\")% (rho), (\"kg/m**3\")\n", + "\n", + "\n", + "print (\"(v) The partial pressures and partial volumes\")\n", + "p_O2 = n_O2*R0*10**3*T/V/10**5; \t\t\t#bar\n", + "print (\"p_O2 = %.3f\")%(p_O2), (\"bar\")\n", + "\n", + "p_N2 = n_N2*R0*10**3*T/V/10**5; \t\t\t#bar\n", + "print (\"p_N2 = %.3f\")% (p_N2), (\"bar\")\n", + "\n", + "V_O2 = x_O2*V;\n", + "print (\"V_O2 = %.3f\")% (V_O2), (\"m**3\")\n", + "\n", + "V_N2 = x_N2*V;\n", + "print (\"V_N2 = %.3f\")% (V_N2), (\"m**3\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The mole fraction of each component\n", + "x_O2 = 0.368\n", + "x_N2 = 0.632\n", + "(ii) The average molecular weight\n", + "M = 29.474\n", + "(iii) The specific gas consmath.tant\n", + "R = 0.282 kJ/kg K\n", + "(iv) The volume and density\n", + "V = 2.116 m**3\n", + "density = 4.727 kg/m**3\n", + "(v) The partial pressures and partial volumes\n", + "p_O2 = 1.474 bar\n", + "p_N2 = 2.526 bar\n", + "V_O2 = 0.779 m**3\n", + "V_N2 = 1.336 m**3\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.19 Page no : 439" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "cp_CO2 = 0.85; \t\t\t#kJ/kg K\n", + "cp_N2 = 1.04; \t\t\t#kJ/kg K\n", + "m_CO2 = 4.; \t\t\t#kg\n", + "T1_CO2 = 313.; \t\t\t#K\n", + "m_N2 = 8.; \t\t\t#kg\n", + "T1_N2 = 433.; \t\t\t#K\n", + "p2 = 0.7; \t\t\t#bar\n", + "p1_CO2 = 1.4; \t\t\t#bar\n", + "p1_N2 = 1.;\n", + "R = 8.314;\n", + "M_CO2 = 44.;\n", + "M_N2 = 28.;\n", + "R_CO2 = R/M_CO2;\n", + "R_N2 = R/M_N2;\n", + "\n", + "# Calculations and Results\n", + "print (\"(i) Final temperature, T2\")\n", + "T2 = (m_CO2*cp_CO2*T1_CO2 + m_N2*cp_N2*T1_N2)/(m_CO2*cp_CO2 + m_N2*cp_N2);\n", + "print (\"T2 = %.3f\")%(T2),(\"K\")\n", + "\n", + "print (\"(ii) Change in entropy\")\n", + "n_CO2 = 0.0909;\n", + "n_N2 = 0.2857;\n", + "n = n_CO2 + n_N2;\n", + "x_CO2 = n_CO2/n;\n", + "x_N2 = n_N2/n;\n", + "p2_CO2 = x_CO2*p2;\n", + "p2_N2 = x_N2*p2;\n", + "\n", + "dS = m_CO2*cp_CO2*math.log(T2/T1_CO2) - m_CO2*R_CO2*math.log(p2_CO2/p1_CO2) + m_N2*cp_N2*math.log(T2/T1_N2) - m_N2*R_N2*math.log(p2_N2/p1_N2);\n", + "print (\"dS = %.3f\")%(dS), (\"kJ/K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Final temperature, T2\n", + "T2 = 398.188 K\n", + "(ii) Change in entropy\n", + "dS = 3.223 kJ/K\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.20 Page no : 440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "cv_O2 = 0.39; \t\t\t#kJ/kg K\n", + "cv_N2 = 0.446; \t\t\t#kJ/kg K\n", + "n_O2 = 1.;\n", + "n_N2 = 2.;\n", + "M_O2 = 32.;\n", + "M_N2 = 28.;\n", + "m_O2 = 32.; \t\t\t#kg\n", + "m_N2 = 2*28.; \t\t\t#kg\n", + "T_O2 = 293.; \t\t\t#K\n", + "T_N2 = 301.; \t\t\t#K\n", + "R0 = 8.314;\n", + "\n", + "# Calculations\n", + "p_O2 = 2.5*10**5; \t\t\t#Pa\n", + "p_N2 = 1.5*10**5; \t\t\t#Pa\n", + "T2 = (m_O2*cv_O2*T_O2 + m_N2*cv_N2*T_N2)/(m_O2*cv_O2 + m_N2*cv_N2);\n", + "V_O2 = n_O2*R0*10**5*T_O2/p_O2;\n", + "V_N2 = n_N2*R0*10**5*T_N2/p_N2;\n", + "V = V_O2+V_N2;\n", + "dS = m_O2*(cv_O2*math.log(T2/T_O2) + R0/M_O2*math.log(V/V_O2)) + m_N2*(cv_N2*math.log(T2/T_N2) + R0/M_N2*math.log(V/V_N2));\n", + "\n", + "# Results\n", + "print (\"Entropy change in the mixing process = %.3f\")%(dS),(\"kJ\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Entropy change in the mixing process = 16.627 kJ\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.21 Page no : 421" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "cv_N2 = 0.744; \t\t\t#kJ/kg K\n", + "cv_H2 = 10.352; \t\t\t#kJ/kg K\n", + "cp_N2 = 1.041; \t\t\t#kJ/kg K\n", + "cp_H2 = 14.476; \t\t\t#kJ/kg K\n", + "V = 0.45; \t\t\t#m**3\n", + "V_H2 = 0.3; \t\t\t#m**3\n", + "V_N2 = 0.15; \t\t\t#m**3\n", + "p_H2 = 3.*10**5; \t\t\t#Pa\n", + "p_N2 = 6.*10**5; \t\t\t#Pa\n", + "T_H2 = 403.; \t\t\t#K\n", + "T_N2 = 303.; \t\t\t#K\n", + "\n", + "# Calculations and Results\n", + "R_H2 = 8.314/2;\n", + "R_N2 = 8.314/28;\n", + "\n", + "print (\"(i) Temperature of equilibrium mixture\")\n", + "\n", + "m_H2 = p_H2*V_H2/(R_H2*10**3)/T_H2;\n", + "m_N2 = p_N2*V_N2/(R_N2*10**3)/T_N2;\n", + "T2 = (m_H2*cv_H2*T_H2 + m_N2*cv_N2*T_N2)/(m_H2*cv_H2 + m_N2*cv_N2);\n", + "print (\"T2 = %.3f\")%(T2),(\"K\")\n", + "\n", + "print (\"(ii) Pressure of the mixture\")\n", + "p2_H2 = m_H2*R_H2*10**3*T2/V;\n", + "p2_N2 = m_N2*R_N2*10**3*T2/V;\n", + "\n", + "p2 = p2_H2+p2_N2;\n", + "print (\"p2 = %.3f\")%(p2/10**5),(\"bar\")\n", + "\n", + "print (\"(iii) Change in entropy :\")\n", + "\n", + "dS_H2 = m_H2*(cp_H2*math.log(T2/T_H2) - R_H2*math.log(p2_H2/p_H2));\n", + "print (\"Change in entropy of H2 = %.3f\")%(dS_H2),(\"kJ/K\")\n", + "\n", + "dS_N2 = m_N2*(cp_N2*math.log(T2/T_N2) - R_N2*math.log(p2_N2/p_N2));\n", + "print (\"Change in entropy of N2 = %.3f\")%(dS_N2),(\"kJ/K\")\n", + "\n", + "dS = dS_H2+dS_N2;\n", + "\n", + "print (\"Total change in entropy = %.3f\")%(dS),(\"kJ/K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Temperature of equilibrium mixture\n", + "T2 = 345.767 K\n", + "(ii) Pressure of the mixture\n", + "p2 = 3.998 bar\n", + "(iii) Change in entropy :\n", + "Change in entropy of H2 = 0.006 kJ/K\n", + "Change in entropy of N2 = 0.425 kJ/K\n", + "Total change in entropy = 0.430 kJ/K\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.22 Page no : 443" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "import math \n", + "\n", + "# Variables\n", + "cv_N2 = 0.745; \t\t\t#kJ/kg K\n", + "cv_CO2 = 0.653; \t\t#kJ/kg K\n", + "cp_N2 = 1.041; \t\t\t#kJ/kg K\n", + "cp_CO2 = 0.842; \t\t#kJ/kg K\n", + "m_N2 = 4.; \t\t\t#kg\n", + "m_CO2 = 6.; \t\t#kg\n", + "pmix = 4.; \t\t \t#bar\n", + "m = m_N2+m_CO2;\n", + "\n", + "T1 = 298.; \t\t\t #K\n", + "T2 = 323.; \t\t\t #K\n", + "\n", + "# Calculations and Results\n", + "cv_mix = (m_N2*cv_N2 + m_CO2*cv_CO2)/(m_N2+m_CO2);\n", + "print (\"cv_mix = %.3f\")% (cv_mix), (\"kJ/kg K\")\n", + "\n", + "cp_mix = (m_N2*cp_N2 + m_CO2*cp_CO2)/(m_N2+m_CO2);\n", + "print (\"cp_mix = %.3f\")% (cp_mix), (\"kJ/kg K\")\n", + "\n", + "dU = m*cv_mix*(T2-T1);\n", + "print (\"Change in internal energy = %.3f\")% (dU), (\"kJ\")\n", + "\n", + "dH = m*cp_mix*(T2-T1);\n", + "print (\"Change in enthalpy = %.3f\")% (dH), (\"kJ\")\n", + "\n", + "dS = m_N2*cv_N2*math.log(T2/T1) + m_CO2*cv_CO2*math.log(T2/T1);\n", + "print (\"Change in entropy = %.3f\")% (dS), (\"kJ/K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "cv_mix = 0.690 kJ/kg K\n", + "cp_mix = 0.922 kJ/kg K\n", + "Change in internal energy = 172.450 kJ\n", + "Change in enthalpy = 230.400 kJ\n", + "Change in entropy = 0.556 kJ/K\n" + ] + } + ], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/screenshots/chapter8.png b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/screenshots/chapter8.png Binary files differnew file mode 100755 index 00000000..d0d66354 --- /dev/null +++ b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/screenshots/chapter8.png diff --git a/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/screenshots/coldair-stardotto.png b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/screenshots/coldair-stardotto.png Binary files differnew file mode 100755 index 00000000..7234c1fa --- /dev/null +++ b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/screenshots/coldair-stardotto.png diff --git a/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/screenshots/decreaseentropy.png b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/screenshots/decreaseentropy.png Binary files differnew file mode 100755 index 00000000..718cfb9f --- /dev/null +++ b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/screenshots/decreaseentropy.png diff --git a/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/screenshots/mechanicsesmicinst.png b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/screenshots/mechanicsesmicinst.png Binary files differnew file mode 100755 index 00000000..535bb827 --- /dev/null +++ b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/screenshots/mechanicsesmicinst.png diff --git a/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/screenshots/pvdiagram.png b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/screenshots/pvdiagram.png Binary files differnew file mode 100755 index 00000000..bd945aff --- /dev/null +++ b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/screenshots/pvdiagram.png diff --git a/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/screenshots/rangeflowratameter.png b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/screenshots/rangeflowratameter.png Binary files differnew file mode 100755 index 00000000..3a5df08f --- /dev/null +++ b/Industrial_Instrumentation_by_K._Krishnaswamy_And_S._Vijayachitra/screenshots/rangeflowratameter.png |