diff options
50 files changed, 12352 insertions, 0 deletions
diff --git a/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter10_2.ipynb b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter10_2.ipynb new file mode 100644 index 00000000..a1eb55f2 --- /dev/null +++ b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter10_2.ipynb @@ -0,0 +1,167 @@ +{ + "metadata": { + "name": "chapter10" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 10:Inductance" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:10.1, Page no:115\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Cal of average self-induced emf\n\n#Initialization\n\nL=25 #Inductance in mH\n\ndel_I=0.2 #Current in A\n\ndel_t=0.01 #Time in s\n\n#Calculation\n\nL=L/1000 #Inductance in H\n\nV=L*(del_I/del_t)\n\nprint \"V=\",V,\"V\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "V= 0.5 V\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:10.3, Page no:116" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Cal of inductance\n\n#Initialization\n\nN=500 #No. of Turns\n\nmu_o=1.26E-6 #Magnetic permeability of solenoid in air\n\nA=20 #Area in cm^2\n\nl=10 #Length in cm\n\n\n\n#calculation\n\nl=10/100 #convert length in m\n\nA=20/10000 #Convert area in m^2\n\nL= ((mu_o)*(N*N)*(A))/(l) #Formula for inductance of solenoid\n\nL=L*1000 #convert inductance in mH\n\nprint \"L=\",L,\"mH\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "L= 6.3 mH\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:10.4, Page no:116\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\nimport math\n\n#Cal of turns of wire\n\n#Initialization\n\nL=0.178 #Inductance in mH\n\nl=20 #Length of solenoid in cm\n\nd=2 #Diameter in cm\n\nmu_o=1.26E-6 #magnetic permeability in air\n\n#Calculation\n\nL=L/1000 #Convert Inductance in H\n\nl=l/100 #Convert Length in m\n\nd=2/100 #Convert diameter in m\n\nr=d/2 #Cal of radius\n\nA=(math.pi)*(r**2) #Cal of Area in m^2\n\nN=math.sqrt((L*l)/(mu_o*A)) #Calculating No.of Turns\n\nprint \"N= \",int(round(N)),\"turns\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "N= 300 turns\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:10.5, Page no:116" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\nimport math\n\n#Cal of Inductance\n\n#Initialization\n\nD=5 #Diameter in cm\n\nA=1 #Cross-sectional area in cm^&2\n\nmu_o=1.26E-6 #Magnetic permeability in air\n\nmu=400*mu_o #Permeability of iron given\n\nN=1000 #No. of turns\n\n#Calculation\n\nl=math.pi*(D/100) #Calculating length in m\n\nA=A/10000 #Convert Area in m^2\n\nL=(mu*(N**2)*A)/(l) #inductance Formula\n\nprint \"L=\",round(L,2),\"H\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "L= 0.32 H\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:10.6, Page no:117\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Cal of magnetic potential energy\n\n#initialization\n\nL=20 #inductance in mH\n\nI=0.2 #Current in A\n\n#Calculation\n\nL=L/1000 #Convert Inductance in H\n\nW=(1/2)*(L*I**2) #Formula for energy in current-carrying conductor\n\nprint \"W=\",'%4.0E' % W,\"J\"\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "W= 4E-04 J\n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:10.7, Page no:117" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\nimport math\n\n#Cal of Current\n\n#initialization\n\nL=20 #Inductance in mH\n\nW=1 #Energy in J\n\n#Calculation\n\nL=L/1000 #convert Inductance in H\n\nI=math.sqrt((2*W)/L)\n\nprint \"I=\",int(I),\"A\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "I= 10 A\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:10.8, Page no:119" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n\n#Cal of Current\n\n#Initialization\n\nL=0.1 #Inductance in Henry\n\nV=12 #Voltage in volts\n\nR=20 #Resistance in Ohm\n\nI=V/R\n\nprint \"(a) del_I/del_t =\",int(V/L),\"A/s\"\n\nprint \"(b) As the current increases,its rate of change del_I/del_t decreases.\"\n\nprint \"(c) I=\",I,\"A\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "(a) del_I/del_t = 120 A/s\n(b) As the current increases,its rate of change del_I/del_t decreases.\n(c) I= 0.6 A\n" + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter11_2.ipynb b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter11_2.ipynb new file mode 100644 index 00000000..9de2e0d2 --- /dev/null +++ b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter11_2.ipynb @@ -0,0 +1,230 @@ +{ + "metadata": { + "name": "chapter11" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 11:Capacitance" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:11.1, Page no:123" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Cal of charge on capacitors plates\n\n#initialization\n\nC=200 #Capacitance in pF\n\nV=100 #Voltage in V\n\n#Calculation\n\nC=200E-12 #Convert Capacitance in F\n\nQ=C*V #Capacitance formula\n\nprint \"Q=\",Q,\"C\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Q= 2e-08 C\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:11.2, Page no:123" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Cal of Capacitance\n\n#Initialization\n\nQ=5E-4 #Charge in C\n\nV=300 #Voltage in V\n\n#Calculation\n\nC=Q/V #Capacitance Formula \n\nC=C*(10**6) #Convert Capacitance in muF\n \nprint \"C=\",round(C,2),\"muF\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The Capacitance is 1.67 muF\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:11.3, Page no:124" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Cal of Capacitance\n\n#Initialization\n\nEo=8.85E-12 #Permittivity in F/m\n\nA=5 #Area in cm^2\n\nd=0.1 #distance in mm\n\n#Calculation\n\nK=1 #dielectric constant in air\n\nA=A/100 #Convert Area in m^2\n\nd=d/1000 #Convert diameter in m\n\nC=(K*Eo*(A**2))/(d)\n\nC=int(C*(10**12)) #Convert Capacitance in pF\n\nprint \"(a)C=\",C,\"pF\"\n\nK=6 #Permittivity for mica given\n\nC=K*C\n\nprint \"(b)C=\",C,\"pF\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "(a)C= 221 pF\n(b)C= 1326 pF\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:11.4, Page no:124" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Cal of dielectric constant of Benzene\n\n#Initialization\n\nC1=2 #Capacitance in air in muF\n\nC2=4.6 #Capacitance in Benzene\n\nK1=1 #Dielectric constant for air\n\n#Calculation\n\nK2=K1*(C2/C1)\n\nprint \"K2=\",K2", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "K2= 2.3\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:11.7, Page no:125" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\nimport math\n\n#Cal of voltage and charge\n\n#Initialization\n\nC=100 #Capacitance in muF\n\nW=50 #Energy in J\n\n#Calculation\n \nC=C*(10**-6) #Convert Capacitance in F \n \nV=math.sqrt((2*W)/C)\n\nprint \"(a)V=\",int(V),\"V\"\n\nQ=C*V\nprint \"(b)Q=\",Q,\"C\"\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "(a)V= 1000 V\n(b)Q= 0.1 C\n" + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:11.8, Page no:126" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Cal of Equivalent Capacitance\n\n#Initialization\n\n#Capacitance in muF\n\nC1=1\n\nC2=2\n\nC3=3\n\n#Calculation\n\nC=1/((1/C1)+(1/C2)+(1/C3)) #Formula for capacitors in series\n\nprint \"C=\",round(C,3),\"muF\"\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "C= 0.545 muF\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:11.9, Page no:126" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Cal of Equivalent Capacitance\n\n#Initialization\n\n#Capacitance in muF\n\nC1=2\n\nC2=3\n\n#Calculation\n\nC=(C1*C2)/(C1+C2) #Formula for Capacitors in series\n\nprint \"C=\",C,\"muF\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "C= 1.2 muF\n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:11.12, Page no:127" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n\n#Initialization\n\n#Cal of Equivalent capacitance\n\n#Capacitance in muF\n\nC1=5\n\nC2=10\n\nV=1000 #Voltage in Volts\n\nC=C1+C2\n\nprint \"(a) C=\",C,\"pF\"\n\n#Cal of Charge\n\nQ1=(C1*10**-12)*V\n\nQ2=(C2*10**-12)*V\n\nprint \"(b) Q1=\",Q1,\"C\"\n\nprint \" Q2=\",Q2,\"C\"\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "(a) C= 15 pF\n(b) Q1= 5e-09 C\n Q2= 1e-08 C\n" + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:11.13, Page no:130" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n\n#Initialization\n\n#Cal of Final charge\n\nC=20 #Capacitance in muF\n\nV=45 #Voltage in volts\n\nR=2000 #Resistance in Ohm\n\nQo=(C*10**-6)*V\n\nprint \"(a) Qo=\", \"%.0e\" %Qo,\"C\"\n\n#Cal of Time\n\nT=R*(C*10**-6)\n\nprint \"(b) T=\",T,\"s\"\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "(a) Qo= 9e-04 C\n(b) T= 0.04 s\n" + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:11.14, Page no:130" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\nimport math\n\n#Initialization\n\nt=0.01\n\nQo=9E-4\n\n#Cal of charge when t=0.01 s\n\nt_T=round(math.exp(-t/0.04),2)\n\nQ=Qo*(1-t_T)\n\nprint \"Q=\",\"%.0e\" %Q,\"C\"\n\n\n#Cal of Charge when t=0.1 s\n\nt=0.1\n\nt_T=round(math.exp(-t/0.04),2)\n\nQ=Qo*(1-t_T)\n\nprint \"Q=\",\"%.1e\" %Q,\"C\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Q= 2e-04 C\nQ= 8.3e-04 C\n" + } + ], + "prompt_number": 54 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter12_2.ipynb b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter12_2.ipynb new file mode 100644 index 00000000..0afcc703 --- /dev/null +++ b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter12_2.ipynb @@ -0,0 +1,146 @@ +{ + "metadata": { + "name": "chapter12" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 12:Trigonometry and Vectors" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:12.1, Page no:134" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Expressing the degree in radians\n\n#Initialization\n\nd=8 #Given degree\n\n#Calculation\n\ntheta=d*0.01745 #Converting degree to radians\n\nprint \"theta=\",round(theta,2),\"rad\"\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "theta= 0.14 rad\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:12.12, Page no:137" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Initialization\n\nimport math\n\n#Cal of sin(120 degrees)\n\ntheta=120 \n\nprint \"sin 120=\",round(math.sin(math.radians(theta)),3)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "sin 120= 0.866\n" + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:12.13, Page no:137" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Initialization\n\nimport math\n\n#Cal of cos(250 degrees)\n\ntheta=250 \n\nprint \"cos 250=\",round(math.cos(math.radians(theta)),3)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "cos 250= -0.342\n" + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:12.14, Page no:137" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Initialization\n\nimport math\n\n#Cal of tan(342 degrees)\n\ntheta=342 \n\nprint \"tan 342=\",round(math.tan(math.radians(theta)),3)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "tan 342= -0.325\n" + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:12.15, Page no:138" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\nimport math\n\n#Cal of length of hypotenuse\n\n#initialization\n\na=6 #Length of one side in in\n\nb=12 #Length of other side in in\n\n#Calculation\n\nc=math.sqrt((a**2)+(b**2))\n\nprint \"c=\",round(c,1),\"in\"\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "c= 13.4 in\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:12.16, Page no:138" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\nimport math\n\n#Cal of length of other side\n\n#initialization\n\nc=8 #Length of hypotenuse in m\n\nb=6 #Length of other side in m\n\n#Calculation\n\na=math.sqrt((c**2)-(b**2))\n\nprint \" a=\",round(a,1),\"m\"\n\n\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": " a= 5.3 m\n" + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter13_2.ipynb b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter13_2.ipynb new file mode 100644 index 00000000..9d4aac22 --- /dev/null +++ b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter13_2.ipynb @@ -0,0 +1,188 @@ +{ + "metadata": { + "name": "chapter13" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 13:Alternating Current" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:13.2, Page no:150" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "\nfrom __future__ import division\n\n#Cal of Frequency,Velocity,Amplitude\n\n#Initialization\n\nT=4 #Time period in s\n\nLambda=30 #wavelength in m\n\nf=0.25 #Frequency in Hz\n\ntot_range=2 #in m\n\n#Calculation\n\nf=1/T\n\nv=f*Lambda\n\nprint \"(a) f=\",f,\"Hz\"\n\nprint \"(b) v=\",v,\"m/s\"\n\nprint \"(c) The amplitude is half the total range,hence A=\",int(tot_range/2),\"m\"\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "(a) f= 0.25 Hz\n(b) v= 7.5 m/s\n(c) The amplitude is half the total range,hence A= 1 m\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:13.3, Page no:150" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Cal of Frequency\n\n#Initialization\n\nv=25 #Wave velocity in cm/s\n\nLambda=0.1 #Wavelength in mm\n\n#Calculation\n\nLambda=Lambda/1000 #Convert Wavelength in m\n\nv=v/100 #Convert wave velocity in m/s\n\nf=v/Lambda\n\nprint \"f=\",int(f),\"Hz\"\n\n\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "f= 2500 Hz\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:13.4, Page no:151" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Cal of Wavelength\n\n#Initialization\n\nv=5020 #Velocity in ft/s\n\nf=256 #Frequency in Hz\n\n#Calculation\n\nLambda=v/f\n\nprint \"Lambda=\",round(Lambda,1),\"ft\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Lambda= 19.6 ft\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:13.5, Page no:151" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "\nfrom __future__ import division\n\n#Cal of Frequency\n\n#Initialization\n\nLambda=3.2 #Wavelength in cm\n\nc=3E+8 #Velocity of light in m/s\n\n#Calculation\n\nLambda=Lambda/100 #Convert Wavelength in m\n\nf=c/Lambda\n\nprint \"f=\",'%0.1E' % f,\"Hz\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "f= 9.4E+09 Hz\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:13.7, Page no:152" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Cal of Effective ac potential difference\n\n#Initialization\n\nVmax=300 #Potential difference in V\n\n#Calculation\n\nVeff=0.707*(Vmax)\n\nprint \"Veff=\",int(Veff),\"V\"\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Veff= 212 V\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:13.8, Page no:152" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Cal of Effective current\n\n#Initialization\n\nImax=10 #Current in A\n\nR=20 #Resistance in Ohm \n\n#Calculation\n\nIeff=0.707*Imax\n\nP=(Ieff**2)*R\n\nprint \"Ieff=\",Ieff,\"A\"\n\nprint \"P=\",int(round(P)),\"W\"\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Ieff= 7.07 A\nP= 1000 W\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:13.9, Page no:153" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Cal of Secondary voltage and current\n\n#Initialization\n\nN1=100 #No.of turns in primary winding\n\nN2=500 #No. of turns in secondary winding\n\nV1=120 #Primary voltage in V\n\nI1=3 #Primary current in A\n\n#Calculation\n\nV2=(N2/N1)*V1\n\nI2=(N1/N2)*I1\n\nprint \"V2=\",int(V2),\"V\"\n\nprint \"I2=\",I2,\"A\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "V2= 600 V\nI2= 0.6 A\n" + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:13.10, Page no:154" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Initialization\n\nV1=5000 #primary voltage in V\n\nV2=240 #Secondary voltage in V\n\nP=10 #Power in kW\n\n#Cal of Ratio of turns\n\nN1_N2=V1/V2\n\nP=P*1000 #Convert power in W\n\n#Cal of Maximum current\n\nI2=P/V2\n\nprint \"(a) N1_N2=\",round(N1_N2,1)\n\nprint \"(b) I2=\",round(I2,1),\"A\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "(a) N1_N2= 20.8\n(b) I2= 41.7 A\n" + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter14_2.ipynb b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter14_2.ipynb new file mode 100644 index 00000000..dd9e9a8d --- /dev/null +++ b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter14_2.ipynb @@ -0,0 +1,104 @@ +{ + "metadata": { + "name": "chapter14" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 14:Series AC Circuits" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:14.2, Page no:160" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\nimport math\n\n#Initialization\n\nC=10 #Capacitance in muF\n\nV=15 #Voltage in V\n\nf=5 #Frequency in kHz\n\n#Cal of reactance of capacitor\n\nf=f*1000\n\nC=C*(10**(-6))\n\nXc=round(1/(2*math.pi*f*C),2)\n\nprint \"(a) Xc=\",Xc,\"Ohm\"\n\n#Cal of Current\n\nI=V/Xc\n\nprint \"(b) I=\",round(I,2),\"A\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "(a) Xc= 3.18 Ohm\n(b) I= 4.72 A\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:14.4, Page no:160" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\nimport math\n\n#Initializtion\n\nV=24 #Voltage in V\n\nf=60 #Frequency in Hz\n\nL=0.3 #Inductance in H\n\n#Cal of Reactance\n\nXL=2*math.pi*f*L\n\nprint \"(a) XL=\",int(XL),\"Ohm\"\n\n#Cal of Current\n\nI=V/XL\n\nprint \"(b) I=\",round(I,2),\"A\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "(a) XL= 113 Ohm\n(b) I= 0.21 A\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:14.5, Page no:160" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\nimport math\n\n#Cal of Inductance\n\n#Initialization\n\nf=500 #Frequency in Hz\n\nXL=80 #Reactance in Ohm\n\n#Calculation\n\nL=XL/(2*math.pi*f)\n\nL=L*1000 #Convert L in mH\n\nprint \"L=\",round(L,1),\"mH\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "L= 25.5 mH\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:14.11, Page no:167" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\nimport math\n\n#Initialization\n\nL=5 #inductance in mH\n\nC=5 #Capacitance in pF\n\nR=5 #Resistance in Ohm\n\nV=5E-4\n\n#Cal of frequency\n\nL=L/1000 #Convert L in H\n\nC=C/(10**12) #Convert C in F\n\n\nfo=1/(2*math.pi*(math.sqrt(L*C))) #Frequency\n\nfo=fo/1000 #Convert fo in kHz\n\nprint \"(a) fo=\",int(math.ceil(fo)),\"kHz\"\n\n#Cal of Current\n\n#At Resonance XL=XC and Z=R\n\nI=V/R\n\nI=I*1000\n\nprint \"(b) I=\",I,\"mA\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "(a) fo= 1007 kHz\n(b) I= 0.1 mA\n" + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter15_2.ipynb b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter15_2.ipynb new file mode 100644 index 00000000..4b0ee766 --- /dev/null +++ b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter15_2.ipynb @@ -0,0 +1,83 @@ +{ + "metadata": { + "name": "chapter15" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 15:Parallel AC Circuits" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:15.1, Page no:176" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\nimport math\n\n#Initialization\n\nV=240 #Voltage in volts\n\n#Resistance in Ohm\n\nR1=400\n\nR2=500\n\n#Cal of current in each resistor\n\nI1=V/R1\n\nI2=V/R2\n\nprint \"(a) I1=\" ,I1,\"A\",\"I2=\",I2,\"A\"\n\n#Cal of total current\n\nI=I1+I2\n\nprint \"(b) I=\",I,\"A\"\n\n#Cal of Total resistance\n\nR=V/I\n\nprint \"(c) R=\",int(R),\"Ohm\"\n\n#Cal of Total power\n\nP=I*V*math.cos(0)\n\nprint \"(d) P=\",int(P),\"W\"\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "(a) I1= 0.6 A I2= 0.48 A\n(b) I= 1.08 A\n(c) R= 222 Ohm\n(d) P= 259 W\n" + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:15.2, Page no:176" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\nimport math\n\n#Initialization\n\n#Capacitance in muF\n\nC1=30\n\nC2=50\n\nV=50 #Voltage in volts\n\nf=400 #frequency in Hz\n\n#Cal of current in each resistor\n\nXc1=1/(2*3.14*f*C1*10**-6)\n\nI1=V/Xc1\n\nXc2=round(1/(2*3.14*f*C2*10**-6))\n\nI2=V/Xc2\n\nprint \"(a) I1=\",round(I1,1),\"A\"\n\nprint \" I2=\",I2,\"A\"\n\n#Cal of total current\n\nI=I1+I2\n\nprint \"(b) I=\",int(I),\"A\"\n\n#Cal of Impedance\n\nZ=V/I\n\nprint \"(c) Z=\",int(round(Z)),\"Ohm\"\n\n#Cal of Total power\n\nW=I*V*math.cos(math.radians(90))\n\nprint \"(d) W=\",int(W)\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "(a) I1= 3.8 A\n I2= 6.25 A\n(b) I= 10 A\n(c) Z= 5 Ohm\n(d) W= 0\n" + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:15.12, Page no:183" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\nimport math\n\n#Cal of resonance frquency\n\n#Initialization\n\nL=180 #Inductance in muH\n\nC=100 #Capacitance in pF\n\n#Calculation\n\nL=L*(10**-6)\n\nC=C*(10**-12)\n\nfo=1/((2*math.pi)*(math.sqrt(L*C)))\n\nfo=fo/10**6 #Convert fo in MHz\n\nprint \"fo=\",round(fo,1),\"MHz\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "fo= 1.2 MHz\n" + } + ], + "prompt_number": 40 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter1_2.ipynb b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter1_2.ipynb new file mode 100644 index 00000000..33196715 --- /dev/null +++ b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter1_2.ipynb @@ -0,0 +1,146 @@ +{ + "metadata": { + "name": "chapter1" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 1:Basic Electricity and Algebra" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:1.1, Page no:2" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#cal of current in toaster\n\n#Initialization\n\nV=120 #voltage in V\n\nR=12 #Resistance in Ohm\n\n#calculation\n\nI=V/R\n\nprint \"I=\",I,\"A\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "I= 10 A\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:1.3, Page no:3" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n\n#cal of current in toaster\n\n#initialization\n\nR=12 #Resistance in Ohm\n\nV=100 #voltage in V\n\n\n#calculation\n\nI=V/R #ohm's Law\n\nprint \"When V=100 V,I=\",round(I,1),\"A\"\n\nV=150 #Voltage in V\n\n#calculation\n\nI=V/R\n\nprint \"When V=150 V,I=\",I,\"A\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "When V=100 V,I= 8.3 A\nWhen V=150 V,I= 12.5 A\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:1.2, Page no:2" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#cal of current in toaster\n\n#initialization\n\nR=10 #Resistance in Ohm\n\nV=120 #voltage in V\n\n#calculation\n\nI=V/R #ohm's Law\n\nprint \"When R=10 ohm,I=\",I,\"A\"\n\nR=15 #Resistance in Ohm\n\n#calculation\n\nI=V/R\n\nprint \"When R=15 Ohm, I=\",I,\"A\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "When R=10 ohm,I= 12 A\nWhen R=15 Ohm, I= 8 A\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:1.10, Page no:7" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Cal of potential difference across the terminals\n\n#Initialization\n\nI=2 #Current in A\n\nR=8 #Resistance in V\n\n#calculation\n\nV=I*R #ohm's Law\n\nprint \"V=\",V,\"V\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "V= 16 V\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:1.11, Page no:7" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Cal of Resistance of Electric heater\n\n#initialization\n\nV=120 #Voltage in V\n\nI=25 #Current in A\n\n#calculation\n\nR=V/I #Ohm's Law\n\nprint \"R=\",R,\"Ohm\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "R= 4.8 Ohm\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:1.16, Page no:9" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#cal of unknown resistance\n\n#initialization\n\n#Resistances in Ohm\n\nR1=10\n\nR2=1000\n\nR3=26\n\n#calculation\n\nRx=(R2*R3)/R1 #Wheatstone Bridge Formula\n\nprint \"Rx=\",int(Rx),\"Ohm\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Rx= 2600 Ohm\n" + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter2_2.ipynb b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter2_2.ipynb new file mode 100644 index 00000000..ce638a24 --- /dev/null +++ b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter2_2.ipynb @@ -0,0 +1,41 @@ +{ + "metadata": { + "name": "chapter2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "chapter:2 Fractions,Decimals,and Percentage" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:2.10, Page no:17" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Initialisation\n\nI=3.7 #Current in ampere\n\nt=1.4 #time in hours\n \n#Calculation \n\nE=I*t #Energy \n\nprint \"E=\",E,\"Ah\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "E= 5.18 Ah\n" + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter3_2.ipynb b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter3_2.ipynb new file mode 100644 index 00000000..1467bcbc --- /dev/null +++ b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter3_2.ipynb @@ -0,0 +1,230 @@ +{ + "metadata": { + "name": "chapter3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 3:Power and Energy" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:3.3,Page no:24" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#cal of Highest voltage drop\n\n#initialization\n\nP=10 #Power in W\n\nI=0.04 #Current in A\n\n#calculation\n\nV=P/I\n\nprint \"V=\",int(V),\"V\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "V= 250 V\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:3.5,Page no:24" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#cal of power dissipated as heat\n\n#initialization\n\nR=50 #Resistance on Ohm\n\nI=2 #Current in A\n\n#calculation\n\nP=(I**2)*R #Power Equation\n\nprint \"P=\",P,\"W\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "P= 200 W\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:3.6,Page no:24" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Cal of Resistance\n\n#Initialization\n\nP=3000 #Power in W\n\nV=240 #Voltage in V\n\n#calculation\n\nR=(V**2)/P #Another form of power equation\n\nprint \"R=\",R,\"Ohm\"\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "R= 19.2 Ohm\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:3.7,Page no:25" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#cal of area of circle\n\n#initialization\n\nr=6 #Radius in inches\n\npi=3.14 #Pi constant Value\n\n#calculation\n\nA=pi*r**2 #Area of Circle Euation in square inches\n\nprint \"A=\",int(A),\"in^2\"\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "A= 113 in^2\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:3.8,Page no:25" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "import math\n\n#Cal of Volume of a spherical tank\n\n#Initialization\n\nr=10 #Radius in m\n\npi=3.14 #Pi value constant\n\n\n#Calculation\n\nV=math.ceil((4*pi*r**3)/3) #Equation of volume of sphere\n\nprint \"V=\",int(V),\"m^3\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "V= 4187 m^3\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:3.11,Page no:26" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Cal of Operating voltage\n\n#Initialization\n\nR=18 #resistance in ohm\n\nP=2 #Power in W\n\nimport math\n\n#calculation\n\nV=math.sqrt(P*R)\n\nprint \"V=\",int(V),\"V\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "V= 6 V\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:3.12,Page no:26" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\nimport math\n\n#cal of Maximum current\n\n#initialization\n\nR=50 #Resistance in Ohm\n\nP=10 #Power in W\n\n#calculation\n\nI=math.sqrt(P/R)\n\nprint \"I=\",round(I,3),\"A\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "I= 0.447 A\n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:3.13,Page no:27" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#cal of radius of wire\n\n#initialization\n\nA=5 #Area in mm^2\n\npi=3.14 #pi constant value\n\nimport math\n\n#calculation\n\nr=math.sqrt(A/pi)\n\nprint \"r=\",round(r,2),\"mm\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "r= 1.26 mm\n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:3.15,Page no:28" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#cal of Energy\n\n#initialization\n\nV=240 #Voltage in V\n\nI=15 #Current in A\n\nt=45 #Time in minutes\n\n\n\n#Calculation\n\nP=(I*V)/1000 #Power in kW\n\nt=t/60 #convert time to hours\n\nW=P*t #Work done in kWh\n\nprint \"W=\",round(W,1),\"kWh\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "W= 2.7 kWh\n" + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:3.16,Page no:28" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "import math\n\n#cal of Cost per week\n\n#Initialization\n\nP=75 #Power in W\n\n#Calculation\n\nt=7*24 #Number of hours in a week\n\nP=75/1000 #Power in kWh\n\nW=P*t #Energy used per week\n\nC=12.6*0.09 #Cost at $0.09 per kWh\n\nprint \"Cost per week W =\",\"$\",round(C,2)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Cost per week W = $ 1.13\n" + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter4_2.ipynb b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter4_2.ipynb new file mode 100644 index 00000000..a5fc44d3 --- /dev/null +++ b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter4_2.ipynb @@ -0,0 +1,41 @@ +{ + "metadata": { + "name": "chapter4" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 4:Powers of 10 and Logarithms" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:4.17, Page no:37" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Cal of Inductive Reactance\n\n#Iniatialization\n\nL=5 #Inductance in mH\n\nf=10 #Frequency in kHz\n\n\n#Calculation\n\nL=5/1000 #Convert Inductance in H\n\nf=10*1000 #Convert Frequency in Hz\n\nXL=2*3.14*f*L #Inductance Formula\n\nprint \"The inductive Reactance of 5mH inductor is\",int(XL),\"Ohm\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The inductive Reactance of 5mH inductor is 314 Ohm\n" + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter5_2.ipynb b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter5_2.ipynb new file mode 100644 index 00000000..bd329287 --- /dev/null +++ b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter5_2.ipynb @@ -0,0 +1,251 @@ +{ + "metadata": { + "name": "chapter5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 5:Resistance and Wire Size" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:5.1, Page no: 46" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Cal of Length of wire\n\n#Initialization\n\nL1=20 #Length in ft\n\nR1=13 #Resistance in Ohm\n\nR2=8 #Resistance in Ohm\n\n\n#Calculation\n\nL2=(R2*L1)/R1\n\nprint \"L2=\",round(L2,1),\"ft\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "L2= 12.3 ft\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no.:5.2, Page no: 47" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Cal of Resistance\n\n#Initialization\n\nR1=2 #Resistance in Ohm\n\nD1=0.04 #Diameter in inches\n\nD2=0.10 #Diameter in inches\n\n\n\n\n#Cal of Resistance when diameter is 0.10 in\n\nR2=(D1/D2)**2*R1\n\nprint \"(a) The resistance when diameter is 0.10 in is\",R2,\"Ohm\"\n\n\n\n\n#Cal of Resistance when diameter is 0.01 in \n\nD2=0.01 #Diameter in inches\n\nR2=(D1/D2)**2*R1\n\nprint \"(b) The resistance when diameter is 0.01 in is\",int(R2),\"Ohm\"\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "(a) The resistance when diameter is 0.10 in is 0.32 Ohm\n(b) The resistance when diameter is 0.01 in is 32 Ohm\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:5.4, Page no:47" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Cal of Cross-sectional area\n\n#Initialization\n\nD=0.06408 #Diameter in inches\n\n#Calculation\n\nD=0.06408/0.001 #Convert Diameter in mils\n\nA=D**2\n\nprint \"A_cmil=\",int(A),\"cmil\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "A_cmil= 4106 cmil\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:5.5, Page no:48" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Comparing the Resistances of wires\n\n#Initialization\n\nA10=10380 #Area in cmil\n\nA14=4106 #Area in cmil\n\nfrom decimal import *\n\n#Calculation\n\nR14_R10=A10/A14\n\nprint \"The no. 14 wire has\",round(R14_R10,2),\"times as much resistance as the no. 10 wire\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The no. 14 wire has 2.53 times as much resistance as the no. 10 wire\n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:5.6, Page no:48" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Cal of Resistance\n\n#Initialization\n\nD_mil=0.080 #Diameter in inches\n\nl=1500 #Length in ft\n\nrho=10.4 #Specific resistance in Ohm\n\n#Calculation\n\nD_mil=0.080/0.001 #Diameter in mils\n\nA_cmil=D_mil*D_mil #Area in cmil\n\nR=(rho*l)/A_cmil #Specific Resistance formula\n\nprint \"R=\",round(R,2),\"ohm\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "R= 2.44 ohm\n" + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:5.7, Page no:48" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Cal of Length of Nichrome wire\n\n#Initialization\n\nD_mil=20 #Diameter in inches\n\nrho=600 #Specific resistance in Ohm\n\nR=5 #Resistance in ohm\n\n\n\n#Calculation\n\nA_cmil=D_mil*D_mil #Area in cmil\n\nl=(R*A_cmil)/rho #Specific Resistance formula\n\nprint \"l=\",round(l,2),\"ft\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "l= 3.33 ft\n" + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:5.8, Page no:48" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Cal of minimum diameter of wire\n\n#initialization\n\nl=400 #Length in ft\n\nR=1.5 #Resistance in ohm\n\nrho=10.4 #Specific resistance for copper wire in cmil/ft\n\nimport math\n\n#Calculation\n\nA_cmil=(rho*l)/R\n\nD_mil=math.sqrt(A_cmil)\n\nprint \"D_mil=\",round(D_mil,1),\"mils\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "D_mil= 52.7 mils\n" + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:5.14, Page no: 51" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Cal of Maximum length\n\n#Initialization\n\nA=6530 #Area in cmil\n\nV=5 #Voltage in V\n\nI=15 #Current in A\n\n#Calculation\n\nl=(A*V)/(10.4*I)\n\nprint \"l=\",int(l),\"ft\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "l= 209 ft\n" + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:5.15, Page no: 52" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Cal of Resistance\n\n#Initialization\n\nl=80 #length in m\n\nA=2.5 #Area in mm^2\n\nrho=0.0175 #Specific Resistance of copper wire in mm^2/m\n\n#Calculation\n\nR=(rho*l)/A\n\nprint \"R=\",R,\"Ohm\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "R= 0.56 Ohm\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:5.16, Page no: 52" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Cal of Length of wire\n\n#Iniatialization\n\nA=0.1 #Area in mm^2\n\nR=3 #Resistance in Ohm\n\nrho=0.0175 #Specific Resistance of copper wire in mm^2/m\n\n#Calculation\n\nl=(R*A)/rho\n\nprint \"l= \",int(l),\"m\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "l= 17 m\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:5.17, Page no: 52" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Cal of cross-sectional area\n\n#Initialization\n\nl=50 #Length in m\n\nR=0.2 #Resistance in ohm\n\nrho=0.0175 #Specific Resistance of copper wire in mm^2/m\n\n#Calculation\n\nA=(rho*l)/R\n\nprint \"A=\",round(A,1),\"mm^2\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "A= 4.4 mm^2\n" + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter6_2.ipynb b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter6_2.ipynb new file mode 100644 index 00000000..aec8aee8 --- /dev/null +++ b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter6_2.ipynb @@ -0,0 +1,62 @@ +{ + "metadata": { + "name": "chapter6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 6:Series Circuits" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:6.1, Page no:54" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Cal of Resistance\n\n#Initialization\n\n#Resistances in ohm connected in series\n\nR1=5\n\nR2=5\n\nR3=5\n\n#Calculation\n\nR=R1+R2+R3 #Formula for series resistors\n\nprint \"The Equivalent resistance is\",R,\"ohm\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The Equivalent resistance is 15 ohm\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:6.7, Page no:57" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Cal of Current\n\n#initialization\n\nV_emf=1.5 #Voltage in V\n\nR=0.4 #Resistance in Ohm\n\nr=0.05 #internal resistance in Ohm\n\n#Calculation\n\nI=V_emf/(R+r) #Formula for current with emf and internal resistance\n\nprint \"The Current in the circuit is\",round(I,2),\"A\"\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The Current in the circuit is 3.33 A\n" + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter7_2.ipynb b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter7_2.ipynb new file mode 100644 index 00000000..c132c178 --- /dev/null +++ b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter7_2.ipynb @@ -0,0 +1,125 @@ +{ + "metadata": { + "name": "chapter7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 7:Parallel Circuits" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:7.5, Page no:67\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Cal of Equivalent resistance\n\n#Initialization\n\n#Resistors connected in parallel in Ohm\n\nR1=5\n\nR2=10\n\nfrom decimal import *\n\n#Calculation\n\nR=(R1*R2)/(R1+R2)\n\nprint \"R=\",round(R,2),\"ohm\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "R= 3.33 ohm\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:7.1, Page no:64" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Cal of Equivalent resistance\n\n#Initialization\n\n#Resistors connected in parallel\n\nR1=R2=R3=5 #in Ohm\n\n#Calculation\n\nR=1/((1/R1)+(1/R2)+(1/R3))\n\nprint \"R=\",round(R,2),\"Ohm\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "R= 1.67 Ohm\n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:7.6, Page no:67" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Cal of resistance(R2) to be reduced\n\n#Initialization\n\n#Resistance in Ohm\n\nR1=50\n\nR=20\n\nR2=(R1*R)/(R1-R)\n\nprint \"R2=\",round(R2,1),\"Ohm\"\n \n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "R2= 33.3\n" + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:7.7, Page no:67" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Cal of Power in series and parallel\n\n#Initialization\n\nR1=R2=240 # in Ohm\n\nV=120 #voltage in volts\n\n#(a)Power in series\n\nR=R1+R2 #Equivalent resistance\n\nI=V/R #Current in the circuit\n\nP=(I**2)*R1 #Power dissipated\n\nprint \"(a)P=\",int(P),\"W\"\n\n#(b)POwer in Parallel\n\nP=(V**2)/R1\n\nprint \"(b)P=\",int(P),\"W\"\n\n\nprint \"The bulbs will be higher when connected in parallel.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "(a)P= 15 W\n(b)P= 60 W\nThe bulbs will be higher when connected in parallel.\n" + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Problem no:7.10, Page no:69" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "from __future__ import division\n\n#Cal of resistor to be connected with the meter\n\n#Initialization\n\nI_meter=0.001 #meter current in ampere\n\nI_shunt=0.999 #Shunt current in ampere\n\nR_meter=40 #Shunt resistance in Ohm\n\nR_shunt=(I_meter/I_shunt)*R_meter\n\nprint \"R_shunt=\",round(R_shunt,2),\"Ohm\"\n\nprint \"A\",R_shunt,\"Ohm resistor in parallel with the meter will permit it to measure currents from 0 to 1 A\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "R_shunt= 0.04 Ohm\nA 0.04004004004 Ohm resistor in parallel with the meter will permit it to measure currents from 0 to 1 A\n" + } + ], + "prompt_number": 23 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/screenshots/Screenshot_from_2016-03-09_13:50:16_1.png b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/screenshots/Screenshot_from_2016-03-09_13:50:16_1.png Binary files differnew file mode 100644 index 00000000..2791cc72 --- /dev/null +++ b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/screenshots/Screenshot_from_2016-03-09_13:50:16_1.png diff --git a/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/screenshots/Screenshot_from_2016-03-09_13:52:27_1.png b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/screenshots/Screenshot_from_2016-03-09_13:52:27_1.png Binary files differnew file mode 100644 index 00000000..12aff38e --- /dev/null +++ b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/screenshots/Screenshot_from_2016-03-09_13:52:27_1.png diff --git a/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/screenshots/Screenshot_from_2016-03-09_13:53:23_1.png b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/screenshots/Screenshot_from_2016-03-09_13:53:23_1.png Binary files differnew file mode 100644 index 00000000..fcef5ff8 --- /dev/null +++ b/Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/screenshots/Screenshot_from_2016-03-09_13:53:23_1.png diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-10.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-10.ipynb new file mode 100644 index 00000000..e3c14774 --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-10.ipynb @@ -0,0 +1,353 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10 : Law of Hydrostatics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.1 Page no 98 " + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.1 pagr no. 98\n", + "\n", + "\n", + "\n", + " height of mercury h=2.493 ft\n", + " density of mercury rho=848.700 lb/ft**3\n", + " atmospheric pressure P_at=2116.000 psf \n", + "gauge pressure P=2115.809 psf\n", + " absolute pressure P_ab=4232.000 psf\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"Example 10.1 pagr no. 98\\n\\n\"\n", + "# in a column of liquid\n", + "h=2.493#height of the liquid (mercury) column\n", + "rho=848.7#density of mercury\n", + "P_at=2116#atmospheric pressure \n", + "print \"\\n height of mercury h=%0.3f ft\\n density of mercury rho=%0.3f lb/ft**3\\n atmospheric pressure P_at=%0.3f psf \"%(h,rho,P_at)#\n", + "#refer to equation 10.5\n", + "g=9.8\n", + "g_c=9.8\n", + "P=rho*(g/g_c)*h#gauge pressure \n", + "P_ab=round(P+P_at)#absolute pressure\n", + "print \"gauge pressure P=%0.3f psf\\n absolute pressure P_ab=%0.3f psf\"%(P,P_ab)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.2 Page no 99" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.2 page no 99\n", + "\n", + "\n", + "\n", + " density rho=1000.000 kg/m**3\n", + " pressure P1=10.000 atm\n", + " pressure P2=1.000 atm\n", + " height at ocean surface z1=0.000 m\n", + " \n", + " depth z2=-92.987 m\n" + ] + } + ], + "source": [ + "print \"Example 10.2 page no 99\\n\\n\"\n", + "#determining the depth of atlantic ocean \n", + "rho=1000#density of water\n", + "P1=10#pressure at which depth is to be determine\n", + "P2=1#pressure at the ocean surface z1\n", + "z1=0#ocean surface\n", + "g=9.807#gravitational constant\n", + "print \"\\n density rho=%0.3f kg/m**3\\n pressure P1=%0.3f atm\\n pressure P2=%0.3f atm\\n height at ocean surface z1=%0.3f m\"%(rho,P1,P2,z1)#\n", + "z2=z1-(P1-P2)*101325/(rho*g)#depth at pressure P2\n", + "print \" \\n depth z2=%0.3f m\"%(z2)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.3 Page no 99 " + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.3 page no 99 fig 10.1\n", + "\n", + "\n", + "\n", + "\n", + " density of water rho=1000.000 kg/m**3\n", + " density of oil rho_oil=890.000 kg/m**3\n", + "\n", + " depth at point 1, z1=0.000 m\n", + " pressure P1=1.000 atm\n", + " depth at point 2,z2=-10.980 m\n", + "\n", + " gauge pressure P2_gu=95835.965 Pag\n", + "\n", + " depth z3=-13.720 m\n", + " pressure at bottom P3=122707.145 Pag\n", + "\n", + " diameter of tank d=6.100 m\n", + " surface area of tank s=29.225 m**2\n", + "\n", + " absolute pressure P3_ab=224032.145 Pag\n", + " pressure force at bottom F=6.55e+06 N\n", + "\n", + " force on the side of the tank F_s=5.73e+06 N\n" + ] + } + ], + "source": [ + "from math import pi\n", + "from sympy.mpmath import quad\n", + "print \"Example 10.3 page no 99 fig 10.1\\n\\n\\n\"\n", + "#a cylindrical tank contain water and immiscible oil ,tank isvopen to the atmosphere\n", + "rho=1000#density of water \n", + "SG=0.89#special gravity of oil\n", + "rho_oil=rho*SG#density of oil\n", + "print \"\\n density of water rho=%0.3f kg/m**3\\n density of oil rho_oil=%0.3f kg/m**3\"%(rho,rho_oil)#\n", + "#applying bernoulli equationbetween point 1 and 2 to calculate the gauge pressure at water oil interface\n", + "z1=0#depth at surface\n", + "P1=1#pressure at point 1\n", + "z2=-10.98#depth at point 2\n", + "print \"\\n depth at point 1, z1=%0.3f m\\n pressure P1=%0.3f atm\\n depth at point 2,z2=%0.3f m\"%(z1,P1,z2)#\n", + "g=9.807#gravitational constant\n", + "P2_gu=rho_oil*g*(z1-z2)#gauge pressure at point 2\n", + "print \"\\n gauge pressure P2_gu=%0.3f Pag\"%(P2_gu)#\n", + "#gauge preesure at bottom z3\n", + "z3=-13.72\n", + "P3=P2_gu+rho*g*(z2-z3)\n", + "print \"\\n depth z3=%0.3f m\\n pressure at bottom P3=%0.3f Pag\"%(z3,P3)#\n", + "d=6.1#diameter of tank\n", + "s=pi*d**2/4#surface area of tank \n", + "print \"\\n diameter of tank d=%0.3f m\\n surface area of tank s=%0.3f m**2\"%(d,s)#\n", + "P3_ab=P3+101325#absolute pressure\n", + "F=P3_ab*s#pressure force at the bottom of tank\n", + "print \"\\n absolute pressure P3_ab=%0.3f Pag\\n pressure force at bottom F=%0.2e N\"%(P3_ab,F)# \n", + "#the force on the side of the tank ,within water layer\n", + "F_s=(pi*d)*quad(lambda z:-11910-9807*z,[-13.72,-10.98])#\n", + "print \"\\n force on the side of the tank F_s=%0.2e N\"%(F_s)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.4 Page no 102 " + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Example 10.4 page n0 102 \n", + "\n", + "\n", + "\n", + " weight of air W_a=200.000 lbf\n", + " weight of water W_w=120.000 lbf\n", + " sp.weight of water gamma_w=62.400 lbf/ft**3\n", + "\n", + "buoyant force F_b=80.000 lbf\n", + "\n", + " volume displaced V_dis=1.282 ft**3\n", + "\n", + " density of block rho_b=156.000 lb/ft**3\n" + ] + } + ], + "source": [ + "print \" Example 10.4 page n0 102 \\n\\n\"\n", + "W_a=200#weight of material in air\n", + "W_w=120#weight of material in water\n", + "gamma_w=62.4#specific weight of water\n", + "print \"\\n weight of air W_a=%0.3f lbf\\n weight of water W_w=%0.3f lbf\\n sp.weight of water gamma_w=%0.3f lbf/ft**3\"%(W_a,W_w,gamma_w)#\n", + "F_b=W_a-W_w#buoyant force\\\n", + "print \"\\nbuoyant force F_b=%0.3f lbf\"%(F_b)#\n", + "V_dis=F_b/gamma_w#volume displaced\n", + "print \"\\n volume displaced V_dis=%0.3f ft**3\"%(V_dis)#\n", + "rho_b=W_a/V_dis#density of block\n", + "print \"\\n density of block rho_b=%0.3f lb/ft**3\"%(rho_b)##printing mistake in book\n", + "#assumption of rho_b>rho_w is justified" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.5 Page no 103" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 10.5 page no 103\n", + "\n", + "\n", + "\n", + " force F=0.130 N\n", + " sp.gravity SG=1.300 \n", + " stem diameter D=0.008 m\n", + " density rho_w=1000.000 kg/m**3\n", + " g=ravitational acc. g=9.807 m/s**2\n", + "\n", + " height h=0.061 m\n" + ] + } + ], + "source": [ + "print \"\\n Example 10.5 page no 103\\n\\n\"\n", + "#a hydrometer is a liquid specific gravity indicator with the value being indicated by the level at which the surface of the liquid intersects the sten when floating in avliquid\n", + "F=0.13#the total hydrometer weight, N\n", + "SG=1.3#sp. gravity of liquid\n", + "D=.008#stem diameter of hydrometer,m\n", + "rho_w=1000#density of water ,kg/m**3\n", + "g=9.807\n", + "pi=22/7\n", + "print \"\\n force F=%0.3f N\\n sp.gravity SG=%0.3f \\n stem diameter D=%0.3f m\\n density rho_w=%0.3f kg/m**3\\n g=ravitational acc. g=%0.3f m/s**2\"%(F,SG,D,rho_w,g)#\n", + "h=(4*F/(pi*D**2*rho_w*g))*(1-1/SG)#height where it will float\n", + "print \"\\n height h=%0.3f m\"%(h)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.6 Page no 105" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 10.6 page no 105 fig. 10.3\n", + "\n", + "\n", + "\n", + " \n", + " pressure P=1.817 psi\n", + "\n", + " pressure at right leg P_r=14.700 psia\n", + " pressure due to water height P_w=1.298 psi\n", + "\n", + " absolute pressure P_a=14.181 psia\n", + " gauge pressure P_g=-0.519 psig\n", + "\n", + "pressure in psfa P_af=2042 psfa\n", + " pressure in psfg P_gf=-75 psfg\n" + ] + } + ], + "source": [ + "print \"\\n Example 10.6 page no 105 fig. 10.3\\n\\n\\n\"\n", + "# since the density of air is effectively zero,the contribution of air to the 3 ft. manometer can be neglected\n", + "#the contribution due to the carbon tetrachloride can be found by using the hydrostatic equation\n", + "rho=62.3#density of water\n", + "SG=1.4#/specific gravity of ccl4\n", + "h=3#height in manometer\n", + "P=rho*SG*h/144#factor 144 for psf to psi\n", + "print \" \\n pressure P=%0.3f psi\"%(P)#\n", + "P_r=14.7#the right leg of manometer is open to atmosphere,atmospheric pressure at this point\n", + "#contribution to the prssure due to the height of water above pressure gauge\n", + "P_w=rho*h/144\n", + "print \"\\n pressure at right leg P_r=%0.3f psia\\n pressure due to water height P_w=%0.3f psi\"%(P_r,P_w)#\n", + "P_a=P_r-P+P_w#absolute pressure\n", + "P_g=P_a-14.7#gauge pressure \n", + "print \"\\n absolute pressure P_a=%0.3f psia\\n gauge pressure P_g=%0.3f psig\"%(P_a,P_g)# \n", + "P_af=P_a*144\n", + "P_gf=round(P_g*144)\n", + "print \"\\npressure in psfa P_af=%0.f psfa\\n pressure in psfg P_gf=%0.f psfg\"%(P_af,P_gf)#" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-11.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-11.ipynb new file mode 100644 index 00000000..7b061e12 --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-11.ipynb @@ -0,0 +1,271 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11 : Ideal Gas Law" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.2 Page no. 113" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.2-Page no.113\n", + "\n", + "\n", + "density of gas rho =0.076lb/ft**3\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"Example 11.2-Page no.113\\n\\n\"\n", + "#given\n", + "#Pressure(P),Temp.(T),Molecular wt. of gas(M)\n", + "P=1#atm\n", + "T_d=60#degree F\n", + "M=29#gram\n", + "#Gas constant R\n", + "R=.73\n", + "T=T_d+460# rankin\n", + "#density of gaS\n", + "rho=(P*M)/(R*T)\n", + "print \"density of gas rho =%0.3flb/ft**3\"%(rho)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.3 Page no. 114" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.3-Page no. 114\n", + "\n", + "\n", + "actual volumetric flowrate Qa=4461.54 acfm\n" + ] + } + ], + "source": [ + "print \"Example 11.3-Page no. 114\\n\\n\"\n", + "#given\n", + "#standard volumetric flowrate of a gas stream(Qs),standard conditions,actual conditions\n", + "Qs=2000#scfm\n", + "Ps=1#atm\n", + "Ts=60#degree F\n", + "Pa=1#atm\n", + "Ta=700#degree F\n", + "Ta=Ta+460#rankin\n", + "Ts=Ts+460#rankin\n", + "Qa=Qs*(Ta/Ts)*(Ps/Pa)\n", + "print \"actual volumetric flowrate Qa=%.2f acfm\"%(Qa)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.4 Page no. 115" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.4-Page no. 115\n", + "\n", + "\n", + "standard volumetric flowrate Qs=654.48 scfm\n" + ] + } + ], + "source": [ + "print \"Example 11.4-Page no. 115\\n\\n\"\n", + "#given\n", + "#mass flowrate of flue gas ,average moleculer weight flue gas,standard conditions\n", + "m=50#lb/min\n", + "M=29#lb/lbmol\n", + "Ts=60#degree F\n", + "Ps=1#atm\n", + "R=0.73#atm.ft**3/(lbmol.degree R)\n", + "Ts=Ts+460#rankin\n", + "Qs=(m/M)*(R*Ts/Ps)\n", + "print \"standard volumetric flowrate Qs=%0.2f scfm\"%(Qs)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.5 Page no. 116" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.5-Page no.1 116\n", + "\n", + "\n", + "molecular weight of gas Mw=32.02\n" + ] + } + ], + "source": [ + "print \"Example 11.5-Page no.1 116\\n\\n\"\n", + "#given\n", + "#specific volume(V),temperature(T),pressure(P)\n", + "V=12.084#ft**3/lb\n", + "T=70#degree F\n", + "P=1#atm\n", + "R=0.73\n", + "T=T+460#rankin\n", + "Mw=(R*T)/(P*V)\n", + "print \"molecular weight of gas Mw=%0.2f\"%(Mw)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.6 Page no 118" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.6 page no 118\n", + "\n", + "\n", + "\n", + "Volume of gas V=0.63 L/gmol\n" + ] + } + ], + "source": [ + "print \"Example 11.6 page no 118\\n\\n\"\n", + "#first and second viral coeff.\n", + "B=-0.159#m**3/kgmol\n", + "C=0.009#(m**3/kgmol)**2\n", + "V_new=0\n", + "V=0.820#\n", + "for i in range(1,4):\n", + " V_new=(1+(B)/V+(C)/(V**2))/1.22\n", + " V=V_new\n", + "print \"\\nVolume of gas V=%0.2f L/gmol\"%(V)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.7 Page no 118" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.7 page no 118\n", + "\n", + "\n", + "\n", + " Volume V=48.80 ft**3/lbmol \n" + ] + } + ], + "source": [ + "print \"Example 11.7 page no 118\\n\\n\"\n", + "#given\n", + "T_c=343# critical temperature,deg R\n", + "P_c=45.4#critical pressure,atm\n", + "#emplying redlich kwong (R-K)equation\n", + "R=0.73#gas constant \n", + "a=round(0.42748*R**2*T_c**2.5/P_c)#R-k constant\n", + "b=0.08664*R*T_c/P_c#R-k constant\n", + "# V_new=[[490/(V-b)]-[a/(25.9*V*V+b)]]/10\n", + "# V=V_new\n", + "#by trial and error method\n", + "V=48.8\n", + "print \"\\n Volume V=%0.2f ft**3/lbmol \"%(V)#" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-12.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-12.ipynb new file mode 100644 index 00000000..62ea9886 --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-12.ipynb @@ -0,0 +1,329 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12 : Flow Mechanisms" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.1 Page no 124" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.1 page no 124\n", + "\n", + "\n", + "\n", + " temperature at inlet T_i=660.00 k\n", + " diameter at inlet D_1=6.00 ft\n", + " velocity at inlet v_1=25.00 ft/s\n", + "\n", + " area at ilet A_1=28.27 st**2\n", + " volumatric flow rate at inlet q_1=706.86 ft**3/s\n", + "\n", + " temperature T_2=2360.00 k\n", + " velocity of flow at outlet v_2=40.00 ft/s\n", + "\n", + " volumatric flow rate at outlet q_2=2527.55 ft**3/s\n", + " cross sectional area at outlet A_2=63.19 ft**2 \n", + "\n", + " diameter at outlet D_2=8.97 ft \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import pi,sqrt\n", + "print \"Example 12.1 page no 124\\n\\n\"\n", + "T_i=660#temperature of flue at inlet in furnsce\n", + "D_1=6#inside diameter of pipe,ft\n", + "v_1=25#velocity at inlet\n", + "print \"\\n temperature at inlet T_i=%0.2f k\\n diameter at inlet D_1=%0.2f ft\\n velocity at inlet v_1=%0.2f ft/s\"%(T_i,D_1,v_1)#\n", + "A_1=pi/4*D_1**2#\n", + "q_1=A_1*v_1#volumatric flow rate at inlet\n", + "print\"\\n area at ilet A_1=%0.2f st**2\\n volumatric flow rate at inlet q_1=%0.2f ft**3/s\"%(A_1,q_1)#\n", + "#applying charle's law for volumatic flow out of the scrubber\n", + "#given\n", + "T_2=2360#the temperature up to which furnace heats the gas\n", + "v_2=40#velocity of flow at outlet\n", + "print \"\\n temperature T_2=%0.2f k\\n velocity of flow at outlet v_2=%0.2f ft/s\"%(T_2,v_2)#\n", + "q_2=q_1*(T_2/T_i)#volumatric flow rate at outlet\n", + "A_2=q_2/v_2# cross sectional area at outlet duct\n", + "print \"\\n volumatric flow rate at outlet q_2=%0.2f ft**3/s\\n cross sectional area at outlet A_2=%0.2f ft**2 \"%(q_2,A_2)#\n", + "D_2=sqrt(4*A_2/pi)#diameter at outlet\n", + "print \"\\n diameter at outlet D_2=%0.2f ft \"%(D_2)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.2 Page no 125" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.2 page no 125\n", + "\n", + "\n", + "\n", + " diameter of tube L=2.54 cm\n", + " density rho=1.50 gm/cm**3\n", + " velocity v=20.00 cm/s\n", + " viscosity meu=0.01 g/cm*s\n", + "\n", + " Reynolds no. R_e=9769.23 \n" + ] + } + ], + "source": [ + "print \"Example 12.2 page no 125\\n\\n\"\n", + "#to calculate reynolds number\n", + "L=2.54#diameter of tube in cm\n", + "rho=1.50#density of liquid in gm/cm**3\n", + "v=20#velocity of flow in cm/s\n", + "meu=0.78e-2#viscosity of liquid in g/cm*s\n", + "print \"\\n diameter of tube L=%0.2f cm\\n density rho=%0.2f gm/cm**3\\n velocity v=%0.2f cm/s\\n viscosity meu=%0.2f g/cm*s\"%(L,rho,v,meu)#\n", + "R_e=L*rho*v/meu#reynolds number\n", + "print \"\\n Reynolds no. R_e=%0.2f \"%(R_e)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.3 Page no 126" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 12.3 page no 126\n", + "\n", + "\n", + "\n", + " velocity v = 3.80 m/s\n", + " diameter D=0.45 m\n", + " density rho=1.20 kg/m**3\n", + " viscosity meu=1.73e-05 kg/m*s\n", + "\n", + " reynoldsno R_e = 118612.72 \n" + ] + } + ], + "source": [ + "print \"\\n Example 12.3 page no 126\\n\\n\"\n", + "#to determine the teynolds no of a gas stream \n", + "v=3.8#velocity through the duct \n", + "D=0.45#duct diameter\n", + "rho=1.2#density of gas\n", + "meu=1.73e-5#viscosity of gas\n", + "print \"\\n velocity v = %0.2f m/s\\n diameter D=%0.2f m\\n density rho=%0.2f kg/m**3\\n viscosity meu=%0.2e kg/m*s\"%(v,D,rho,meu)#\n", + "R_e=D*v*rho/meu#reynolds no\n", + "print \"\\n reynoldsno R_e = %0.2f \"%(R_e)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.5 Page no 128" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Example 12.5 page no 128\n", + "\n", + "\n", + "\n", + " volumatric flow rate q = 0.006 m**3/s\n", + "\n", + " mass flow rate m_dot=5.43 kg/s\n", + "\n", + " average velocity v_av=2.00 m/s\n" + ] + } + ], + "source": [ + "print \" Example 12.5 page no 128\\n\\n\"\n", + "SG=0.96#sp.gravity of a liquid\n", + "R=0.03#radius of long circular tube through which liquid flow\n", + "#flow rate is related with the diameter of circular tube \n", + "q=2*pi*(3*R**2-(200/3)*R**3)#\n", + "print \"\\n volumatric flow rate q = %0.3f m**3/s\"%(q)#\n", + "rho_w=1000#density of water \n", + "rho_l=SG*rho_w#density of liquid\n", + "m_dot=rho_l*q#mass flow rate \n", + "print \"\\n mass flow rate m_dot=%0.2f kg/s\"%(m_dot)#\n", + "s=pi*R**2#surface area\n", + "v_av=q/s#average velocity\n", + "print \"\\n average velocity v_av=%0.2f m/s\"%(v_av)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.6 Page no 129" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.6 page no 129\n", + "\n", + "\n", + "\n", + " time t=3539.82 s\n" + ] + } + ], + "source": [ + "print \"Example 12.6 page no 129\\n\\n\"\n", + "#refer to example 12.6\n", + "V=20#volume of liquid passes through the section,m**3\n", + "q=0.00565#volumatric flow rate \n", + "t=V/q#time to pass liquid pass through volume V\n", + "print \"\\n time t=%0.2f s\"%(t)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.7 Page no 130" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.7 page no. 130\n", + "\n", + "\n", + "\n", + " actual volumatric flow rate q=1461.54 acfm \n", + "\n", + " average velocity v=21.54 ft/s\n", + "\n", + " density rho=0.06 lb/ft**3\n", + "\n", + " mass flow rate m_dot=0.13 lb/s\n", + "\n", + "v_m=6.55\n", + "\n", + " reynolds no R_e=103737.71 \n" + ] + } + ], + "source": [ + "print \"Example 12.7 page no. 130\\n\\n\"\n", + "#a gas is flowing through a circular duct\n", + "D=1.2#diameter of duct,ft\n", + "T=760#temperature,k\n", + "P=1#pressure\n", + "T_s=520#standard temperature\n", + "P_s=1#standard pressure\n", + "q_s=1000# standard volumatric flow rate,in scfm(given)\n", + "q=q_s*(T/T_s)*(P/P_s)#actual volumatric flow rate\n", + "print \"\\n actual volumatric flow rate q=%0.2f acfm \"%(q)#\n", + "s=pi*D**2/4#cross sectional area\n", + "s_m=s*0.0929#area in m**2 \n", + "v=(q/s)/60#velocity\n", + "print \"\\n average velocity v=%0.2f ft/s\"%(v)#\n", + "MW=33#mlecular weight of gas\n", + "R=0.7302#gas constant\n", + "rho=(P*MW)/(R*T)#density from ideal gas law\n", + "print \"\\n density rho=%0.2f lb/ft**3\"%(rho)#\n", + "m_dot=rho*v*s_m#mass flow rate \n", + "print \"\\n mass flow rate m_dot=%0.2f lb/s\"%(m_dot)##printing mistake in book\n", + "D_m=0.366#diamter in m\n", + "v_m=6.55#velocity in m/s\n", + "rho_m=rho*(0.4536/.3048**3)#density in kg/m**3\n", + "rho_m=0.952#round off value\n", + "print \"\\nv_m=%0.2f\"%(v_m)#\n", + "meu=2.2e-5#viscosity of gas in \n", + "R_e=D_m*v_m*rho_m/meu#reynolds no\n", + "print \"\\n reynolds no R_e=%0.2f \"%(R_e)##calculation error in book" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-13.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-13.ipynb new file mode 100644 index 00000000..46b2208c --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-13.ipynb @@ -0,0 +1,315 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13 : Laminar Flow in Pipe" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.1 Page no 136" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 13.1 page no 136\n", + "\n", + "\n", + "\n", + " velocity v_w=0.13 ft/s\n", + "\n", + " velocity of air v_a=1.44 ft/s\n", + "\n", + " velocity of oil v_o=22.00 ft/s\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"Example 13.1 page no 136\\n\\n\"\n", + "#calculate average velocities for which th flow will be viscous,laminar\n", + "#(a) water at 60 deg F in a 2-inch standard pipe \n", + "R_e=2100#reynolds number <2100, for laminar flow\n", + "meu_w=6.72e-4#viscosity of water,lb/ft.s\n", + "rho_w=62.4#density of water,lb/ft**3\n", + "D_w=2.067#diameter of pipe,ft\n", + "v_w=(R_e*meu_w)/((D_w/12)*rho_w)#velocity of water\n", + "print \"\\n velocity v_w=%0.2f ft/s\"%(v_w)#\n", + "#(b) air at 60 deg F and 5 psig in a 2 inch standard pipe\n", + "meu_a=12.1e-6#viscosity of air ,lb/ft.s\n", + "rho_a=.1024# density of air,lb/ft**3\n", + "D_a=0.17225#diameter of pipe ,ft\n", + "v_a=(R_e*meu_a)/(D_a*rho_a)#velocity of air\n", + "print \"\\n velocity of air v_a=%0.2f ft/s\"%(v_a)#\n", + "#(c) oil of a viscosity of 300 cP and SG of .92 in a 4 inch standard pipe\n", + "meu_o=300*6.72e-4#viscosity of oil ,lb/ft.s\n", + "rho_o=0.92*62.4#density of oil, lb/ft**3\n", + "D_o=.3355#diameter of pipe,ft\n", + "v_o=round((R_e*meu_o)/(D_o*rho_o))#velocity of oil\n", + "print \"\\n velocity of oil v_o=%0.2f ft/s\"%(v_o)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.2 Page no 137" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Example 13.2 page no 137\n", + "\n", + "\n", + "\n", + " pressure drop per unit length P_l=0.09 psf/ft\n" + ] + } + ], + "source": [ + "print \" Example 13.2 page no 137\\n\\n\"\n", + "#refer to part a of example 1\n", + "#appplying Hagen-Poiseuille equation\n", + "meu=6.72e-4#viscosity of water\n", + "v=0.13#velocity of water\n", + "D=2.067/12#diameter of pipe\n", + "P_l=32*meu*v/(D**2)\n", + "print \"\\n pressure drop per unit length P_l=%0.2f psf/ft\"%(P_l)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.4 Page no 138" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Example 13.4 page no 138\n", + "\n", + " \n", + "\n", + " hydraulic diameter D=0.40 m\n", + "\n", + " velocity of air v=0.06 m/s\n" + ] + } + ], + "source": [ + "print \" Example 13.4 page no 138\\n\\n \"\n", + "#an air conducting duct has a rectangular cross section\n", + "w=1#width of rectangular section \n", + "h=0.25#height of rectangular section\n", + "D=2*w*h/(w+h)#equivalent or hydraulic diameter\n", + "print \"\\n hydraulic diameter D=%0.2f m\"%(D)\n", + "R_e=2300#critical reynolds no\n", + "neu=1e-5#kinematic viscosity of air\n", + "v=R_e*neu/D#velocity\n", + "print \"\\n velocity of air v=%0.2f m/s\"%(v)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.5 Page no 139" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Example 13.5 page no 139\n", + "\n", + "\n", + "flow velocity v=22.27 ft/s\n", + "\n", + " dynamic viscosity meu=0.18 lb/ft.s\n", + "\n", + " reynolds no R_e=1438.12 \n", + "\n", + " friction factor f=0.01 \n", + "\n", + " entance length L_e=11.99 ft\n" + ] + } + ], + "source": [ + "from math import pi\n", + "print \" Example 13.5 page no 139\\n\\n\"\n", + "#a circulsr horizontal tube cntains asphalt\n", + "D=0.1667#diameter of tube,ft\n", + "s=pi*D**2/4#surface area of tube,ft**2\n", + "q=0.486#volumatric flow rate,ft**3/s\n", + "v=q/s#flow velocity\n", + "print \"flow velocity v=%0.2f ft/s\"%(v)#\n", + "g=32.174\n", + "P_grad=144#pressure gradient ,psf/ft\n", + "meu=(pi*P_grad*g*D**4)/(128*q)#dynamic viscosity,laminar flow\n", + "print \"\\n dynamic viscosity meu=%0.2f lb/ft.s\"%(meu)#\n", + "#check on the laminar flow\n", + "rho=70#density,lb/ft**3\n", + "R_e=D*v*rho/meu#reynlods number\n", + "print \"\\n reynolds no R_e=%0.2f \"%(R_e)#\n", + "f=16/R_e#fanning friction factor\n", + "print \"\\n friction factor f=%0.2f \"%(f)#\n", + "#the pipe must be longer than the entrance length to have fully developed flow\n", + "L_e=0.05*D*R_e#entrance length\n", + "print \"\\n entance length L_e=%0.2f ft\"%(L_e)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.6 Page no 140" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Example 13.6 page no 140\n", + "\n", + "\n", + "vol. flow rate q=0.01 m**3/s\n", + "\n", + " av. velocity v_av=8.00 m/s\n", + " mass flow rate m_dot=12.60 kg/s\n", + " mass flux G=10080.00 kg/m**2.s\n", + " linear mometum flux M_dot=100.80 N \n" + ] + } + ], + "source": [ + "from sympy.mpmath import quad\n", + "print \" Example 13.6 page no 140\\n\\n\"\n", + "#liquid glycerin flows in a tube \n", + "#to obtain the properties of glycerine use table A.2 in the appendix\n", + "rho=1260#density,kg/m**3\n", + "meu=1.49#viscosity,kg/ms\n", + "neu=meu/rho#kinematic viscosity,m**2/s\n", + "R=0.02#by no slip condition radius of tube,m\n", + "q=32*pi*quad(lambda r:r-2500*r**3,[0,R]) #volumatric flow rate from the given parabolic velocity distribution\n", + "print \"vol. flow rate q=%0.2f m**3/s\"%(q)#\n", + "r=0#for average velocity for laminar flow\n", + "v_av=16*(1-2500*r**2)/2#average velocity\n", + "q=0.010#approximation\n", + "m_dot=q*rho#mass flow rate\n", + "G=rho*v_av#mass flux \n", + "M_dot=m_dot*v_av#inear momentum flux\n", + "print \"\\n av. velocity v_av=%0.2f m/s\\n mass flow rate m_dot=%0.2f kg/s\\n mass flux G=%0.2f kg/m**2.s\\n linear mometum flux M_dot=%0.2f N \"%(v_av,m_dot,G,M_dot)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.7 Page no 142" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 13.7 page no 142\n", + "\n", + "\n", + "\n", + " reynolds no R_e=135.30 \n", + "\n", + " time t=87.72 min\n" + ] + } + ], + "source": [ + "print \"Example 13.7 page no 142\\n\\n\"\n", + "#refer to example 13.6\n", + "rho=1260#density,kg/m**3\n", + "v=8#flow velocity,m**2/s\n", + "D=0.02#diameter,m\n", + "meu=1.49#viscosity\n", + "R_e=rho*v*D/meu#reynolds no\n", + "print \"\\n reynolds no R_e=%0.2f \"%(R_e)#\n", + "V=14000#volume in gallons of glycerine pass through a cross section of tube \n", + "q=159.6#flow rate\n", + "t=V/q#time\n", + "print \"\\n time t=%0.2f min\"%(t)#" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-14.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-14.ipynb new file mode 100644 index 00000000..399b68f6 --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-14.ipynb @@ -0,0 +1,570 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14 : Turbulent Flow in Pipes" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.1 page no 148" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 14.1 page no 148\n", + "\n", + "\n", + "\n", + " Reynolds no R_e = 9769.23 \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"Example 14.1 page no 148\\n\\n\" # a liquid flow through a tube\n", + "meu=0.78e-2#viscosity of liquid,g/cm*s\n", + "rho=1.50#density,g/cm**3\n", + "D=2.54#diameter,cm\n", + "v=20#flow velocity\n", + "R_e=D*v*rho/meu#reynolds no\n", + "print \"\\n Reynolds no R_e = %.2f \"%(R_e)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.2 page no 148" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 14.2 page no 148\n", + "\n", + "\n", + "\n", + " velocity v = 0.28 ft/s\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"Example 14.2 page no 148\\n\\n\" # a fluid is moving through a cylinder in laminar flow\n", + "meu=6.9216e-4#viscosity of fluid,lb/ft*s\n", + "rho=62.4#density,lb/ft**3\n", + "D=1/12#diameter,ft\n", + "R_e=2100#reynolds no\n", + "v=R_e*meu/(D*rho)#minimum velocity at which turbulance will appear\n", + "print \"\\n velocity v = %.2f ft/s\"%(v)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.3 page no 152" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 14.3 page no 152\n", + "\n", + "\n", + "\n", + " fanning friction factor f_a=0.01 \n", + "\n", + " friction factor f_b1=0.01 \n", + "\n", + " friction factor f_b2=0.01 \n", + "\n", + " friction factor f_c=0.01 \n", + "\n", + " friction factor f_d=0.01 \n", + "\n", + " friction factor f_e=0.01\n", + "\n", + " average friction f_av=0.01 \n" + ] + } + ], + "source": [ + "from math import log10\n", + "print \"Example 14.3 page no 152\\n\\n\" # calculate the friction factor by using different equation's\n", + "R_e=14080#reynolds no\n", + "K_r=0.004#relative roughness (a) by PAT proposed equation\n", + "f_a=0.0015+(8*(R_e)**0.30)**-1\n", + "print \"\\n fanning friction factor f_a=%0.2f \"%(f_a)# equation for 5000<R_e>50000\n", + "f_b1=0.0786/(R_e)**0.25 \n", + "print \"\\n friction factor f_b1=%0.2f \"%(f_b1)# equation for 30000<R_e>1000000\n", + "f_b2=0.046/(R_e)**0.20\n", + "print \"\\n friction factor f_b2=%0.2f \"%(f_b2)# equation for the completely turbulent region \n", + "f_c=1/(4*(1.14-2*log10(K_r))**2)\n", + "print \"\\n friction factor f_c=%0.2f \"%(f_c)# equation given by jain \n", + "f_d=1/(2.28-4*log10(K_r+21.25/(R_e**.9)))**2\n", + "print \"\\n friction factor f_d=%0.2f \"%(f_d)#\n", + "f_e=0.0085 #from figur 14.2\n", + "print \"\\n friction factor f_e=%0.2f\"%(f_e)#\n", + "f_av=(f_a+f_b1+f_b2+f_c+f_d+f_e)/6\n", + "print \"\\n average friction f_av=%0.2f \"%(f_av)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.4 page no 154" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 14.4 page no 154\n", + "\n", + "\n", + "\n", + " equivalent diameter D_eq_a=3.33 in\n", + "\n", + " equivalent diameter D_eq_b=18.00 cm\n", + "\n", + " equivalent diameter D_eq_c=10.00 cm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "print \"Example 14.4 page no 154\\n\\n\" # for turbulent fluid flow in across section (a) for a rectangle \n", + "w=2#width of a rectangle,in\n", + "h=10#height of rectangle,in\n", + "S_a=h*w#cross sectional area\n", + "P_a=2*h+2*w#perimeter of rectangle\n", + "D_eq_a=4*S_a/P_a#equivalent diameter\n", + "print \"\\n equivalent diameter D_eq_a=%0.2f in\"%(D_eq_a)# (b) for an annulus \n", + "d_o=10#outer diameter of annulus\n", + "d_i=8#inner diameter \n", + "S_b=pi*(d_o**2-d_i**2)/4#cross sectional area\n", + "P_b=pi*(d_o-d_i)#perimeter\n", + "D_eq_b=(4*S_b)/(P_b)#eq. diameter\n", + "print \"\\n equivalent diameter D_eq_b=%0.2f cm\"%(D_eq_b)# (c) for an half- full circle\n", + "d_c=10#diameter of circle \n", + "S_c=pi*d_c**2/8# cross sectional area\n", + "P_c=pi*d_c/2#perimeter\n", + "D_eq_c=4*S_c/P_c#eq. diameter\n", + "print \"\\n equivalent diameter D_eq_c=%0.2f cm\"%(D_eq_c)# " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exampkle 14.5 page no 157" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 14.5 page no 157\n", + "\n", + "\n", + "\n", + " pipe diameter D=0.29 ft\n", + "\n", + "D=0.69 \n", + "\n", + " flow velocity v=22.28 ft/s\n" + ] + } + ], + "source": [ + "print \"Example 14.5 page no 157\\n\\n\" # air is transported through a circular conduit \n", + "MW=28.9#molecular weight of air \n", + "R=10.73#gas constant\n", + "T=500#temperature\n", + "P=14.75#pressure,psia applying ideal gas law for density\n", + "rho=P*MW/(R*T)#density \n", + "rho=0.08#after round off\n", + "meu=3.54e-7#viscosity of air at 40 degF assume flow is laminar\n", + "q=8.33#flow rate ,ft**3/s\n", + "L=800#length of pipe,ft\n", + "P_1=.1#pressure at starting point\n", + "P_2=.01#pressure at delivery point \n", + "D=((128*meu*L*q)/(pi*(P_1-P_2)*144))**(1/4)#diameter\n", + "print \"\\n pipe diameter D=%0.2f ft\"%(D)# check the flow type\n", + "meu=1.14e-5\n", + "R_e1=4*q*rho/(pi*D*meu)#reynolds no print \"\\n reynolds no R_e=%0.2f \"%(R_e)# from R_e we can conclude that laminar flow is not valid\n", + "P_drop=12.96#pressure drop P_1-P2 in psf\n", + "f=0.005#fanning friction factor\n", + "g_c=32.174\n", + "D=(32*rho*f*L*q**2/(g_c*pi**2*P_drop))**(0.2)#diamter from new assumption strat the second iteration with the newly calculated D\n", + "k=0.00006/12#roughness factor\n", + "K_r=k/D#relative roughness \n", + "C_f=1.321224\n", + "R_e_n=4*q*rho/(pi*D*meu)#new reynolds no print \"\\n new reynolds no R_e=%0.2f \"%(R_e)#\n", + "f_n=0.0045#new fanning friction factor\n", + "D=(((8*rho*f_n*L*q**2)/(g_c*pi**2*P_drop))**(0.2))*C_f#final calculated diameter because last diameter is same with this\n", + "print \"\\nD=%0.2f \"%(D)# iteration may now be terminated\n", + "S=pi*(D**2)/4#cross sectional area of pipe\n", + "v=q/S#flow velocity\n", + "print \"\\n flow velocity v=%0.2f ft/s\"%(v)##printing mistake in book in the value of meu in the formula of D is first time that's why this deviation in answer" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.6 page no 159" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 14.6 page no. 159\n", + "\n", + "\n", + "\n", + " R_e=106208.60 \n", + "\n", + " since R_e is more than 4000 flow is turbulent\n" + ] + } + ], + "source": [ + "print \"Example 14.6 page no. 159\\n\\n\" # ethyl alcohol is pumped through a horizontal tube\n", + "rho=789#density .kg/m**3\n", + "meu=1.1e-3#viscosity ,kg/m-s\n", + "k=1.5e-6#roughness,m\n", + "L=60#length of tube,m\n", + "q=2.778e-3#flow rate \n", + "g=9.807\n", + "h_f=30#friction loss\n", + "A=(L*q**2)/(g*h_f)\n", + "A=1.574e-7\n", + "D=0.66*(((k**1.25)*(A**4.75)+meu*(A**5.2)/(q*rho))**.04)\n", + "D=0.0377 # calculate velocity of alcohol in the tube\n", + "S=3.14*(D)**2/4#surface area\n", + "v=q/S#velocity\n", + "v=3.93#velocity\n", + "neu=1.395e-6#dynamic viscosity\n", + "R_e=D*v/neu#reynolds no \n", + "print \"\\n R_e=%0.2f \"%(R_e)##printing mistake in book\n", + "print \"\\n since R_e is more than 4000 flow is turbulent\" #" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exanmple 14.7 page no 160" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 14.7 page no 160\n", + "\n", + "\n", + "\n", + " average velocity v=2.37 m/s\n", + "\n", + " S=0.00 \n", + "\n", + " flow rate q=1244.02 m**3/s\n", + "\n", + " mass flow rate m_dot=1020094.94 kg/s\n", + "\n", + " v_max=2.91 m/s\n", + "\n", + " length L_c=1.36 m\n" + ] + } + ], + "source": [ + "print \"Example 14.7 page no 160\\n\\n\" # kerosene flow ina lng ,smooth ,horizontal pipe\n", + "rho=820#density,kg/m**3\n", + "D=0.0493#iside diameter of pipe by appendix A.5,m\n", + "R_e=60000\n", + "meu=0.0016#viscosity,kg/m.s\n", + "v=(R_e*meu)/(D*rho)# flow average velocity\n", + "print \"\\n average velocity v=%0.2f m/s\"%(v)#\n", + "S=(pi/4)*D**2#cross sectional area\n", + "print \"\\n S=%0.2f \"%(S)#\n", + "q=v/S#flow rate \n", + "print \"\\n flow rate q=%0.2f m**3/s\"%(q)##printing mistake in book\n", + "m_dot=rho*q#mass flow rate\n", + "print \"\\n mass flow rate m_dot=%0.2f kg/s\"%(m_dot)##printing mistake in book in the value of v\n", + "n=7#seventh power apply\n", + "v_max=v/(2*n**2/((n+1)*(2*n+1)))#maximum velocity\n", + "print \"\\n v_max=%0.2f m/s\"%(v_max)# check the assumptioon of fully developed flow\n", + "R_e=60000#reynolds no\n", + "L_c=4.4*R_e**(1/6)*D#critical length\n", + "print \"\\n length L_c=%0.2f m\"%(L_c)# since L_c <L th eassumption is valid" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.8 page no 161" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 14.8 page no 161\n", + "\n", + "\n", + "\n", + " fanning friction factor f=0.01 \n", + "\n", + " h_f friction loss=1.07 m \n", + "\n", + " P_drop_a =0.09 atm\n" + ] + } + ], + "source": [ + "print \"\\n Example 14.8 page no 161\\n\\n\" # refer to example no 14.7\n", + "rho=860#density\n", + "R_e=60000#reynolds no\n", + "f=.046/R_e**.2#fanning friction factor\n", + "print \"\\n fanning friction factor f=%0.2f \"%(f)#\n", + "L=9#length of tube\n", + "v=2.38#velocity\n", + "D=.0493#diameter of tube\n", + "g=9.807\n", + "h_f=4*f*(L*v**2)/(D*2*g)#friction loss \n", + "print \"\\n h_f friction loss=%0.2f m \"%(h_f)# applying bernoulli equation\n", + "P_drop=rho*g*h_f#pressure drop in pa\n", + "P_drop_a=P_drop/10**5#pressure drop in atm\n", + "print \"\\n P_drop_a =%0.2f atm\"%(P_drop_a)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.9 page no 161" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Example 14.9 page no 161\n", + "\n", + "\n", + "\n", + " Force required to hold pipe F=16.58 N\n" + ] + } + ], + "source": [ + "print \" Example 14.9 page no 161\\n\\n\" # refer to example 14.7\n", + "D=0.0493#diameter of tuube\n", + "S=pi*D**2/4#cross sectional area\\\n", + "P=8685#pressure\n", + "F=P*S#force required to hold the pipe,direction is opposite the flow\n", + "print \"\\n Force required to hold pipe F=%0.2f N\"%(F)# " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.10 page no 163" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 14.10 page no 163\n", + "\n", + "\n", + "\n", + " vz_bar=40.00\n", + "\n", + " vz_sqr=4.60\n", + "\n", + " intensity of turbulance I=0.05 \n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "print \"Example 14.10 page no 163\\n\\n\" # a fluid is moving in the turbulent flw through a pipe a hot wire anemometer is inserted to measure the local velocity at a given point P in the system following readings were recorded at equal time interval instantaneous velocities at subsequent time interval\n", + "vz=[43.4,42.1,42,40.8,38.5,37,37.5,38,39,41.7]\n", + "vz_bar=0#\n", + "n=10#\n", + "i = 0#\n", + "sums=0#\n", + "for i in range(0,10):\n", + " sums=sums+vz[i]#\n", + "\n", + "vz_bar=sums/n#\n", + "print \"\\n vz_bar=%0.2f\"%(vz_bar)#\n", + "sigma=0#\n", + "for i in range(0,10):\n", + " sigma=sigma+(vz[i]-vz_bar)**2#\n", + " vz_sqr=sigma/10#\n", + "\n", + "print \"\\n vz_sqr=%0.2f\"%(vz_sqr)\n", + "I = sqrt(vz_sqr)/vz_bar#intensity of turbulance\n", + "print \"\\n intensity of turbulance I=%0.2f \"%(I)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.11 page no 164" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 14.11 page no 164\n", + "\n", + "\n", + "\n", + " flow rate q_a=0.33 ft**3/min\n", + " \n", + " flow rate q_b=0.65 ft**3/min\n", + "\n", + " flow rate q_c=0.53 ft**3/min\n" + ] + } + ], + "source": [ + "print \"Example 14.11 page no 164\\n\\n\" # a fluid is flowing through a pipe\n", + "D=2#inside diameter of pipe,in\n", + "v_max=30#maximum velocity,ft/min\n", + "A=(pi/4)*(D/12)**2#cross sectional area (a) for laminar flow \n", + "v_a=(1/2)*v_max#average velocity\n", + "q_a=v_a*A#volumatric flow rate\n", + "print \"\\n flow rate q_a=%0.2f ft**3/min\"%(q_a)# (b) for plug flow \n", + "v_b=v_max#average velocity \n", + "q_b=v_b*A#volumatric flow rate\n", + "print \" \\n flow rate q_b=%0.2f ft**3/min\"%(q_b)# (c)for turbulent flow\n", + "v_c=(49/60)*v_max#average velocity\n", + "q_c=v_c*A#volumatric flow rate\n", + "print \"\\n flow rate q_c=%0.2f ft**3/min\"%(q_c)#" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-15.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-15.ipynb new file mode 100644 index 00000000..34fbff2e --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-15.ipynb @@ -0,0 +1,305 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 15 : Compressible and Sonic Flow" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.2 Page no 169" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Example 15.2 page no 169\n", + "\n", + "\n", + "\n", + " speed of sound on nitrogen c=349.01 m/s\n", + "\n", + " mach no. M_a=0.235 \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import sqrt\n", + "print \" Example 15.2 page no 169\\n\\n\"\n", + "#nitrogen gas is flowing in a duct,neglect compressibility effects\n", + "T=293#temperature,k\n", + "R=8314.4#gas constant\n", + "k=1.4#for nitrogen\n", + "M=28#molecular weight of nitrogen\n", + "c=sqrt(k*R*T/M)#speed of sound in nitrogen \n", + "print \"\\n speed of sound on nitrogen c=%0.2f m/s\"%(c)#\n", + "v=82#flow velocity \n", + "M_a=v/c#mach no.\n", + "print \"\\n mach no. M_a=%0.3f \"%(M_a)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.3 Page no 170" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 15.3 page no 170\n", + "\n", + "\n", + "\n", + " speed of sound in propane c=266.91 m/s\n", + "\n", + " M_a mach no=0.16 \n", + "\n", + " reynolds no R_e=872394.75 \n" + ] + } + ], + "source": [ + "print \"Example 15.3 page no 170\\n\\n\"\n", + "#propane is flowing in a tube\n", + "k=1.3#degree of freedom for propane\n", + "T=290#temperature,k\n", + "M=44#mol. weight \n", + "R=8314.4#gas constant\n", + "c=sqrt((k*R*T)/M)#speed of sound in propane\n", + "print \"\\n speed of sound in propane c=%0.2f m/s\"%(c)#\n", + "v=43#average velocity\n", + "M_a=v/c#mach no.\n", + "print \"\\n M_a mach no=%0.2f \"%(M_a)#\n", + "#mach no is< 0.3,that's why flow is incompressible\n", + "rho=6.39#density,kg/m**3\n", + "meu=8e-6#viscosity ,m**2/s\n", + "D=0.0254#inside diameter of tube\n", + "R_e=D*rho*v/meu#reynolds no.\n", + "print \"\\n reynolds no R_e=%0.2f \"%(R_e)#\n", + "#because R_e is >4000,flow is turbulent" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.6 Page no 173" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 15.6 page no 173\n", + "\n", + "\n", + "\n", + " pressure drop P_drop=35.00 psia\n" + ] + } + ], + "source": [ + "from math import pi\n", + "print \"Example 15.6 page no 173\\n\\n\"\n", + "#methane is flowing through a horizontal steel pipe\n", + "m_dot=10#mass flow rate, lb/s\n", + "D=1#diameter of pipe,ft\n", + "G=m_dot/((pi/4)*D**2)#mass velocity flux\n", + "P=89.7#inlet pressure\n", + "T=530#temprature,k\n", + "MW=16#mol. weight\n", + "R=10.73#gas constant\n", + "#applying eq 15.7\n", + "rho=P*MW/(R*T)#density\n", + "f=0.008#friction factor\n", + "L=15840#length of pipe,ft\n", + "g_c=32.2#gravitational constant\n", + "P_drop=(2*f*L*(G**2))/(g_c*rho*D)#pressure drop\n", + "P1=89.7#inlet pressure,psia\n", + "P2=P1-(P_drop/144)\n", + "P2=54.7#corrected value\n", + "P_drop=P1-P2#updated value of P_drop\n", + "print \"\\n pressure drop P_drop=%0.2f psia\"%(P_drop)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.7 Page no 174" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 15.7 page no 174\n", + "\n", + "\n", + "\n", + " reynolds no R_e=1718538.57 \n" + ] + } + ], + "source": [ + "print \"Example 15.7 page no 174\\n\\n\"\n", + "#refr to example 15.6\n", + "D=1#diameter of pipe\n", + "G=12.7#mass velocity flux\n", + "meu=7.39e-6#viscosity,lb/ft.s\n", + "R_e=(D*G)/(meu)#reynolds no\n", + "print \"\\n reynolds no R_e=%0.2f \"%(R_e)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.8 Page no 174" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example no page no 174\n", + "\n", + "\n", + "\\ density rho =3.31 kg/m**3\n", + "\n", + " G mass velocity flux =99.40 kg/m**2.s\n", + "\n", + " pressure drop P__2=2.52 atm\n", + "\n", + " P_drop pressure=0.18 atm\n" + ] + } + ], + "source": [ + "print \"Example no page no 174\\n\\n\"\n", + "#air flowing through a steel pipe \n", + "P_1=2.7#pressure,atm\n", + "T=288#temperature,k\n", + "v=30#velocity at the entrance of the pipe ,m/s\n", + "Mw=29#mol. weight of air\n", + "V=22.4#standard volume\n", + "T_s=273#st. temp\n", + "P_s=1#st. pressure\n", + "rho=(Mw*P_1*T_s)/(V*T*P_s)#density \n", + "print \"\\ density rho =%0.2f kg/m**3\"%(rho)#\n", + "G=v*rho#mass veocity flux\n", + "print \"\\n G mass velocity flux =%0.2f kg/m**2.s\"%(G)#\n", + "f=0.004#friction factor\n", + "D=0.085#diameter ,m\n", + "L=65#length of pipe,m\n", + "#gravitational constant\n", + "P_2=P_1-2*f*L*G**2/(rho*D*101325)#pressure drop across the line\n", + "#factor 101325 for atm\n", + "print \"\\n pressure drop P__2=%0.2f atm\"%(P_2)#\n", + "P_drop=P_1-P_2#pressure drop\n", + "print \"\\n P_drop pressure=%0.2f atm\"%(P_drop)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.9 Page no 175" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Example 15.9 page no 175\n", + "\n", + "\n", + "\n", + " reynolds no R_e=485086.21 \n" + ] + } + ], + "source": [ + "print \" Example 15.9 page no 175\\n\\n\"\n", + "#refer to Example 15.9\n", + "meu=1.74e-5#viscosity,kg/m.s\n", + "D=0.085#diameter of pipe\n", + "G=99.3#mass velocity flux\n", + "R_e=D*G/meu#reynolds no.\n", + "print \"\\n reynolds no R_e=%0.2f \"%(R_e)#" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-16.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-16.ipynb new file mode 100644 index 00000000..29b12b30 --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-16.ipynb @@ -0,0 +1,245 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 16 : Two Phase Flow" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.2 Page no 183" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Example 16.2 page no 183\n", + "\n", + "\n", + "\n", + " Y_g=32.71 \n", + "\n", + " P_drop_t=88.63 psf/100 ft\n", + "\n", + " Y_l =12.03 \n", + "\n", + " P_drop=90.21 psf/100ft\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \" Example 16.2 page no 183\\n\\n\"\n", + "#cal. pressure drop if the flow for both phases is turbulent\n", + "#a. since the flow is tt and 1<X<10 ,apply equatuion 16.16b to obtain Y_g\n", + "X=1.66\n", + "Y_g=5.80+6.7143*X+6.9643*X**2-0.75*X**3\n", + "print \"\\n Y_g=%0.2f \"%(Y_g)#\n", + "#the value of Y_g is an excellent agreement with the values provided by lockhart and Martinelli\n", + "#then pressure drop is\n", + "P_drop_g=2.71\n", + "P_drop_t=Y_g*P_drop_g\n", + "print \"\\n P_drop_t=%0.2f psf/100 ft\"%(P_drop_t)#\n", + "#b. applying eq. 16.17b to generate Y_l\n", + "Y_l=18.219*X**-.8192\n", + "print \"\\n Y_l =%0.2f \"%(Y_l)#\n", + "#pressure drop from eq. 16.2\n", + "P_drop_l=7.50\n", + "P_drop=Y_l*P_drop_l\n", + "print \"\\n P_drop=%0.2f psf/100ft\"%(P_drop)# " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.3 Page no 185" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Example 16.3 page no 185\n", + "\n", + "\n", + "\n", + " Y_G_tv=20.48 \n", + "\n", + " pressure drop P_drop_a=55.51 psf/100 ft\n", + "\n", + " Y_l_tv=8.07 \n", + "\n", + " P_drop_b=60.52 psf/100 f\n" + ] + } + ], + "source": [ + "print \" Example 16.3 page no 185\\n\\n\"\n", + "#if the flow for the gas phase is turbulent and the liquid phase is viscous\n", + "#cal. pressure drop total\n", + "X=1.66#from ex. 16.1\n", + "Y_G_tv=20-21.81*X+16.357*X**2-1.8333*X**3\n", + "print \"\\n Y_G_tv=%0.2f \"%(Y_G_tv)#\n", + "#pressure drop from eq 16.1\n", + "P_drop_g=2.71\n", + "P_drop_a=Y_G_tv*P_drop_g\n", + "print \"\\n pressure drop P_drop_a=%0.2f psf/100 ft\"%(P_drop_a)#\n", + "#b. applying eq 16.20b to generate Y_l\n", + "Y_l_tv=11.702*X**-0.7334\n", + "print \"\\n Y_l_tv=%0.2f \"%(Y_l_tv)#\n", + "#pressure drop from equation 16.2\n", + "P_drop_l=7.50\n", + "P_drop_b=Y_l_tv*P_drop_l\n", + "print \"\\n P_drop_b=%0.2f psf/100 f\"%(P_drop_b)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.4 Page no 187" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 16.4 page no 187\n", + "\n", + "\n", + "\n", + " Y_G=12.45 \n", + "\n", + " pressure drop P_drop=33.74 psf/100 ft\n", + "\n", + " Y_l =4.88 \n", + "\n", + " pressure drop P_drop_b=36.61 psf/100 ft\n" + ] + } + ], + "source": [ + "print \"Example 16.4 page no 187\\n\\n\"\n", + "#if flow for both phases is laminar then cal pressure drop total\n", + "#a. apply eq. 16.22b to obtain Y_G\n", + "X=1.66\n", + "Y_G=10-10.405*X+8.6786*X**2-0.9167*X**3\n", + "print \"\\n Y_G=%0.2f \"%(Y_G)#\n", + "#pressure drop from eq 16.1\n", + "P_drop_g=2.71\n", + "P_drop=Y_G*P_drop_g\n", + "print \"\\n pressure drop P_drop=%0.2f psf/100 ft\"%(P_drop)#\n", + "#b. apply eq 16.23b to generate Y_l\n", + "Y_l=6.4699*X**-0.556\n", + "print \"\\n Y_l =%0.2f \"%(Y_l)#\n", + "#pressure drop from eq. 16.2\n", + "P_drop_l=7.50\n", + "P_drop_b=Y_l*P_drop_l\n", + "print \"\\n pressure drop P_drop_b=%0.2f psf/100 ft\"%(P_drop_b)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.6 Page no 191" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 16.6 page no 191\n", + "\n", + "\n", + "\n", + " S=0.03 \n", + "\n", + " velocity v_a =3.07 ft/s\n", + " velocity v_k=1.03 ft/s\n", + "\n", + " R_e_a=3557.49\n", + "R_e_k=6145.91 \n" + ] + } + ], + "source": [ + "from math import pi\n", + "print \"\\n Example 16.6 page no 191\\n\\n\"\n", + "#a mixture of air(a) and kerosene(k) are flowing in a horizontal pipe \n", + "rho_a=0.075#density of airlb/ft**3\n", + "meu_a=1.24e-5#viscosity of air ,lb/ft.s\n", + "q_a=5.3125#flow rate ft**3/s\n", + "rho_k=52.1#density of kerosene,lb/ft**3\n", + "meu_k=0.00168#viscosity lof kerosene,lb/ft.s\n", + "q_k=1.790#flow rate ft**3/s\n", + "D=.19167#diameter of pipe ,ft\n", + "S=(pi/4)*D**2#cross sectional area,ft**2\n", + "print \"\\n S=%0.2f \"%(S)#\n", + "#superficial velocity of each phase can be obtained by applying either eq, 16.7 and 16.8\n", + "v_a=q_a/(S*60)#for air\n", + "v_k=q_k/(S*60)#for kerosene\n", + "print \"\\n velocity v_a =%0.2f ft/s\\n velocity v_k=%0.2f ft/s\"%(v_a,v_k)#\n", + "R_e_a=D*rho_a*v_a/meu_a#reynolds no. of Air\n", + "R_e_k=D*rho_k*v_k/meu_k#reynolds no. of kerosene\n", + "print \"\\n R_e_a=%0.2f\\nR_e_k=%0.2f \"%(R_e_a,R_e_k)#" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-17.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-17.ipynb new file mode 100644 index 00000000..eb0cadd2 --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-17.ipynb @@ -0,0 +1,300 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 17 : Prime Movers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.1 Page no 201" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 17.1 page no 201\n", + "\n", + "\n", + "\n", + " power requirement h_p_b=33.10 bhp\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"Example 17.1 page no 201\\n\\n\"\n", + "#fan are operating for transporting gas\n", + "#two fans fan(a)and fan(b)\n", + "D_a=46#diameter of blade of fan (a)\n", + "rpm_a=1575#operating speed of fan(a)\n", + "D_b=42#diameter of blade of fan(b)\n", + "rpm_b=1625#operating speed of fan(b)\n", + "h_p_a=47.5#power requirement of fan (a)\n", + "h_p_b=(rpm_b**3/rpm_a**3)*(D_b/D_a)**5*h_p_a#power requirement of fan(b)\n", + "print \"\\n power requirement h_p_b=%.2f bhp\"%(h_p_b)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.2 Page no 201" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 17.2 page no 201\n", + "\n", + "\n", + "\n", + "new flow rate q_n=15123.97 acfm\n", + "\n", + "new pressureP_n=7.68 in H20\n", + "\n", + " new powerhp_n=17.62 bhp\n" + ] + } + ], + "source": [ + "print \"Example 17.2 page no 201\\n\\n\"\n", + "rpm=1694#speed of fan \n", + "q=12200#flow rate of q_a\n", + "rpm_n=2100#new speed of fan \n", + "q_n=q*(rpm_n/rpm)#new flow rate\n", + "print \"\\nnew flow rate q_n=%.2f acfm\"%(q_n)#\n", + "#applyingeq 17.5\n", + "P=5#pressure ,in\n", + "P_n=P*(rpm_n**2/rpm**2)#new pressure\n", + "print \"\\nnew pressureP_n=%.2f in H20\"%(P_n)#\n", + "#required power is calculated using eq. 17.6\n", + "hp=9.25#power at 1694 speed\n", + "hp_n=hp*(rpm_n**3/rpm**3)#new power required\n", + "print \"\\n new powerhp_n=%.2f bhp\"%(hp_n)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.3 Page no. 201" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\\Example 17.3 page no 201\n", + "\n", + "\n", + "\n", + " total pressure P_drop=10.80 in H20\n", + "\n", + " brake horse power bhp=17.55 bhp\n" + ] + } + ], + "source": [ + "print \"\\Example 17.3 page no 201\\n\\n\"\n", + "# a gas stream in a process\n", + "P_l_m=4.4# minor pressure loss for duct work,valves etc,in\n", + "P_l_mz=6.4#major pressure loss due to pieces of equipment,in\n", + "P_drop=P_l_m+P_l_mz#total pressure drop\n", + "print \"\\n total pressure P_drop=%.2f in H20\"%(P_drop)#\n", + "#applying eq 17.7\n", + "q=6500#flow rate ,acfm\n", + "neta=0.63#overall fan-motor effficiency \n", + "bhp=1.575e-4*q*P_drop/neta#brake horse power required\n", + "#1.575e-5 is aconversion factor for horse power\n", + "print \"\\n brake horse power bhp=%.2f bhp\"%(bhp)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.4 Page no 208" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Example 17.4 page no 208\n", + "\n", + "\n", + "\n", + " pressure P=20.00 kpa\n" + ] + } + ], + "source": [ + "print \" Example 17.4 page no 208\\n\\n\"\n", + "#a pump is in process\n", + "#given: parabolic pump pressure flow \n", + "#P=a-b*q**2 equation\n", + "#a and b calculate from conditions\n", + "a=25\n", + "b=5\n", + "#then equation becomes P=25-5*q**2\n", + "#pressure at 1m**3/s flow rate\n", + "q=1#flow rate,m**3/s\n", + "P=a-b*q**2#pressure\n", + "print \"\\n pressure P=%.2f kpa\"%(P)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.6 Page no 214" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 17.6 page no. 214\n", + "\n", + "\n", + "\n", + " total head hc=36.24 ft of water\n", + "\n", + " m_dot mass flow rate =4.87 lb/s\n", + "\n", + " fluid power requirement W_dot=176.40 lbf.ft/s\n", + "\n", + " brake horse power bhp=0.53 bhp\n" + ] + } + ], + "source": [ + "print \"\\n Example 17.6 page no. 214\\n\\n\"\n", + "#the total head developed by a centrifugal pump is given by a equation \n", + "#hc=42-0.0047*q**2\n", + "#the pump is to be used in a water flow system in which the pump head in feet of water is given by eq.\n", + "#hp=12+0.0198*q**2\n", + "#for cal. flow rate hc=hp\n", + "q=35#from condition hc=hp,gpm\n", + "hc=42-0.0047*q**2#total head\n", + "print \"\\n total head hc=%.2f ft of water\"%(hc)#\n", + "rho=62.40#density\n", + "q_c=0.078#flow rate in cfs unit\n", + "m_dot=rho*q_c#mass flow rate\n", + "print \"\\n m_dot mass flow rate =%.2f lb/s\"%(m_dot)#\n", + "W_dot=m_dot*hc#fluid power requirement can be calculated\n", + "print \"\\n fluid power requirement W_dot=%.2f lbf.ft/s\"%(W_dot)#\n", + "neta=.6#efficiency\n", + "W_dot_hp=.32#fluid power requirement in hp\n", + "bhp=W_dot_hp/neta#brake horse power\n", + "print \"\\n brake horse power bhp=%.2f bhp\"%(bhp)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.8 Page no 216" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Example 17.8 page no 216\n", + "\n", + "\n", + "\n", + " energy requirement W_s=-1163.53 btu/lbmol of air\n", + "\n", + " power hp=-2.34e+05 ft .lbf/min\n" + ] + } + ], + "source": [ + "print \" Example 17.8 page no 216\\n\\n\"\n", + "#compressed air is to be employed in the nozzle\n", + "T1=520#temperature\n", + "P2=40#pressure\n", + "P1=14.7#atmosphric pressure\n", + "gamma=1.3#degree of freedom\n", + "R=1.987#gas constant\n", + "W_s=-(gamma*R*T1/(gamma-1))*((P2/P1)**((gamma-1)/gamma)-1)#compreesd energy requirement \n", + "print \"\\n energy requirement W_s=%.2f btu/lbmol of air\"%(W_s)#\n", + "hp=W_s*(7.5/29)*778#power\n", + "print \"\\n power hp=%.2e ft .lbf/min\"%(hp)#" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-18.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-18.ipynb new file mode 100644 index 00000000..88bde43a --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-18.ipynb @@ -0,0 +1,390 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 18 : Valves and Fittings" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.1 Page no 225" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 18.1 page no 225\n", + "\n", + "\n", + "\n", + " K_se coeff. of sudden expansion=0.56 \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"\\n Example 18.1 page no 225\\n\\n\"\n", + "#there is a sudden expansion in which the diameter D1 doubls to D2,D2=2D1\n", + "#if D1=1 then D2=2\n", + "D1=1.0#diameter D1\n", + "D2=2#diameter D2\n", + "K_se=(1-(D1/D2)**2)**2# coefficent of sudden expansion \n", + "print \"\\n K_se coeff. of sudden expansion=%0.2f \"%(K_se)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.2 Page no 227" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 18.2 page no 227\n", + "\n", + "\n", + "\n", + " L_eq_gate=21.00 in\n", + "\n", + " L_eq_globe=900.00 in \n" + ] + } + ], + "source": [ + "print \"\\n Example 18.2 page no 227\\n\\n\"\n", + "#cal. equivalent length of pipe that would cause the same head los for gate and globe valve located in piping\n", + "D=3#diameter of pipe,in\n", + "L_gate=7#L/D ratio for fully open gate valve\n", + "L_globe=300#L/D ratio for globe valve \n", + "L_eq_gate=L_gate*D#equivalent length for gate valve\n", + "print \"\\n L_eq_gate=%0.2f in\"%(L_eq_gate)#\n", + "L_eq_globe=L_globe*D#equivalent length for globe valve\n", + "print \"\\n L_eq_globe=%0.2f in \"%(L_eq_globe)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.3 Page no 227" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 18.3 page no 227\n", + "\n", + "\n", + "\n", + " reynolds no R_e=29017.86 \n", + "\n", + " friction factor f=0.01 \n", + "\n", + " pressure drop P_drop=2689.88 lbf/ft**2 \n" + ] + } + ], + "source": [ + "print \"\\n Example 18.3 page no 227\\n\\n\"\n", + "# water is flowing at room temperature\n", + "rho=62.4#density of water,lb/ft**3\n", + "meu=6.72e-4#viscosity of water,lb/ft.s\n", + "D=0.03125#diameter of pipe\n", + "v=10#velocity \n", + "R_e=D*v*rho/meu#reynolds no.\n", + "print \"\\n reynolds no R_e=%0.2f \"%(R_e)#\n", + "f=0.0015+0.125/R_e**.30#equation for friction factor\n", + "print \"\\n friction factor f=%0.2f \"%(f)#\n", + "L=30#length of pipe\n", + "gc=32.2#gravitational constant\n", + "P_drop=2*f*rho*v**2*L/(D*gc)#pressure drop \n", + "print \"\\n pressure drop P_drop=%0.2f lbf/ft**2 \"%(P_drop)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.4 Page no 229" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 18.4 pageno 229\n", + "\n", + "\n", + "\n", + " friction loss due to globe valve h_f=34.16 ft.lbf/lb\n" + ] + } + ], + "source": [ + "print \"\\n Example 18.4 pageno 229\\n\\n\"\n", + "#refer to example 18.3\n", + "#applying eq 18.4 for friction loss by globe valve\n", + "K_f=22#coeff of expansion loss\n", + "v=10#velocity\n", + "gc=32.2#ravitational constant\n", + "h_f=K_f*v**2/(2*gc)#friction loss due to globe valve\n", + "print \"\\n friction loss due to globe valve h_f=%0.2f ft.lbf/lb\"%(h_f)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.5 Page no 230" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Example 18.5 page no. 230\n", + "\n", + "\n", + "\n", + " total pressure drop P_d_t=4814.78 lbf/ft**2\n" + ] + } + ], + "source": [ + "print \" Example 18.5 page no. 230\\n\\n\"\n", + "#refer to example no. 18.3 and 18.4\n", + "P_drop=34.16#pressure drop ,ft\n", + "h_f=43#friction loss due to fitting\n", + "rho=62.4#density,lb/ft**3\n", + "P_d_t=(P_drop+h_f)*rho#total pressure drop\n", + "print \"\\n total pressure drop P_d_t=%0.2f lbf/ft**2\"%(P_d_t)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.6 Page no 230" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 18.6 page no 230\n", + "\n", + "\n", + "\n", + " h_f=120.05 \n", + "\n", + " reynolds number R_e=904180.14 \n", + "\n", + " vol. flow rate q=6.40 ft**3/s\n" + ] + } + ], + "source": [ + "from math import sqrt, pi\n", + "print \"Example 18.6 page no 230\\n\\n\"\n", + "k=0.00085#relative roughness of pipe ,ft\n", + "D=0.833#diameter of pipe,ft\n", + "f=0.005#we assume fanning friction factor ,0.004-0.005,select upper limit\n", + "K=0.45#entrance loss coefficient is estimated from eq. 18.10 and 18.11\n", + "L=5000#length of pipe,ft\n", + "h_f=4*f*(L/D)#the friction head loss in terms of the line velocity\n", + "print \"\\n h_f=%0.2f \"%(h_f)##printing mistake in book 12 instead of 120\n", + "#applying bernoulli equation between points 1 and 2 to calculate v2\n", + "h_s=0#no shaft head\n", + "v1=0#large tank\n", + "#because both locations open to the atmosphere,P1=P2=0 psig\n", + "h=260#height from point 1 to 2\n", + "V2_h=sqrt(h/(1+h_f+K))#total velocity head at point 2\n", + "g=32.174\n", + "V2=V2_h*2*g\n", + "V2=11.75\n", + "neu=1.0825e-5#viscosity\n", + "R_e=D*(V2)/neu#reynolds number\n", + "print \"\\n reynolds number R_e=%0.2f \"%(R_e)##printing mistake in book due to value of h_f\n", + "q=V2*(pi*(D**2)/4)#volumatric flow rate\n", + "print \"\\n vol. flow rate q=%0.2f ft**3/s\"%(q)##printing mistake in book due to value of h_f" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.7 Page no 232" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 18.7 page no 232\n", + "\n", + "\n", + "\n", + " relative roughness K_r=0.00 \n", + "\n", + " flow velocity v=2.64 m/s\n", + "\n", + " reynolds no R_e=205941.18 \n", + "\n", + " head loss h_f=377.37 J/kg\n", + "\n", + " major friction losses h_s=377.37 J/kg\n" + ] + } + ], + "source": [ + "print \"Example 18.7 page no 232\\n\\n\"\n", + "#two large water reservoirs are connected by a pipe\n", + "D=0.0779#diameter of pipe (m), by appendix A.5 for 3 inch schdule 40 pipe\n", + "k=0.046*1e-3#roughness of pipe\n", + "K_r=k/D#relative roughness\n", + "print \"\\n relative roughness K_r=%0.2f \"%(K_r)#\n", + "q=0.0126#flow rate of water m**3/s,\n", + "S=(pi/4)*D**2#cross sectional area of pipe\n", + "v=q/S#flow velocity of water\n", + "print \"\\n flow velocity v=%0.2f m/s\"%(v)#\n", + "neu=1e-6#viscosity of water\n", + "R_e=v*D/neu#reynolds no\n", + "print \"\\n reynolds no R_e=%0.2f \"%(R_e)#\n", + "#from R_e and relative roughness K_r ,obtain friction factor \n", + "f=0.00345\n", + "L=2000*.3048#length of pipe,m\n", + "h_f=4*f*(L/D)*(v**2/2)\n", + "print \"\\n head loss h_f=%0.2f J/kg\"%(h_f)#\n", + "#apply bernoulli equation between station 1 and 2. Note that P1=P2=1 atm,v1=v2,z1=z2\n", + "#P_drop/rho + V**2/2g + z = h_s - h_f\n", + "#whera h_s is the major friction loss\n", + "#above equation reduces to h_s=h_f\n", + "h_s=h_f#h_s is major friction loss\n", + "print \"\\n major friction losses h_s=%0.2f J/kg\"%(h_s)# " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.8 Page no 233" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 18.8 page no 233\n", + "\n", + "\n", + "\n", + " W_dot fluid power=5985.00 kw\n" + ] + } + ], + "source": [ + "print \"\\n Example 18.8 page no 233\\n\\n\"\n", + "#refer to example no 18.7\n", + "rho=1000#density\n", + "g=9.807#gravitational acc.\n", + "h_f=38.39#head loss\n", + "P_rise=rho*g*h_f#pressure rise across the pump\n", + "P_rise=475000#in book by mistake this value instead original value \n", + "q=0.0126#flow rate from example 18.7\n", + "W_dot=q*P_rise#ideal pumping requirement(the fluid power)\n", + "print \"\\n W_dot fluid power=%0.2f kw\"%(W_dot)##printing mistake in book in putting value of P_rise" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-19.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-19.ipynb new file mode 100644 index 00000000..5739e8a1 --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-19.ipynb @@ -0,0 +1,416 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 19 : Flow Measurement" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.1 Page no. 246" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 19.1 page no 246\n", + "\n", + "\n", + "\n", + " pressure P1=1.10e+05 Pag\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"Example 19.1 page no 246\\n\\n\"\n", + "#we have to find pressure at different point in a oil tank\n", + "#apply manometer equation between point 1 and 2\n", + "#since rho1=rho2,z1=z2\n", + "#it gives P1=P2\n", + "#applying manometer equation between points 2 and 3\n", + "rho_oil=0.8*1000#density of oil\n", + "#since rho3=rho_oil=rho2\n", + "rho3=rho_oil\n", + "z_32=.4#height difference between point 2 and 3\n", + "g=9.807#grav. acc.\n", + "P7=0#pressure at point 7,on gauge basis\n", + "z_76=0.8#height difference between point 6 and 7\n", + "rho_hg=13600#density of mercury\n", + "P6=P7 + rho_hg*g*z_76#pressure at point 6\n", + "P5=P6#pressure at point 5\n", + "rho_air=1.2#density of air\n", + "z_54=1#height difference between point 5 and 4\n", + "P4=P5 + rho_air*g*z_54#pressure at point 4 \n", + "P3=P4#pressure at point 3\n", + "P2=P3 + rho_oil*g*z_32#pressure at point 2\n", + "P1=P2#air pressure in the oil tank\n", + "print \"\\n pressure P1=%0.2e Pag\"%(P1)# " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.2 Page no 250" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 19.2 page no 250\n", + "\n", + "\n", + "\n", + " velocity v=29.87 ft/s\n", + "\n", + " maximum veocity v_max=29.87 ft/s\n", + "\n", + " average velocity v_av=24.34 ft/s\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "print \"Example 19.2 page no 250\\n\\n\"\n", + "#pitot tube is located at the center line of a horizontal pipe transporting air\n", + "rho=0.075#density of gas ,lb/ft**2\n", + "h=0.0166667#height difference,ft\n", + "g=32.2#gravitational acc. lb/ft**2\n", + "rho_m=62.4#density of medium which is air\n", + "v=sqrt(2*g*h*(rho_m-rho)/rho)#velocity\n", + "print \"\\n velocity v=%0.2f ft/s\"%(v)#\n", + "v_max=v#because at that point where the reading was taken is the centerline\n", + "print \"\\n maximum veocity v_max=%0.2f ft/s\"%(v_max)#\n", + "#since the flowing fluid is air at a high velocity the flow has a high probability of being turbilent .from chapter 14,assume\n", + "#v_av/v_max=0.815\n", + "v_av=v_max*0.815\n", + "print \"\\n average velocity v_av=%0.2f ft/s\"%(v_av)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.3 Page no 251" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 19.3 page no 251\n", + "\n", + "\n", + "\n", + " flow rate q=1149.24 ft**3 min\n", + "\n", + " m_dot mass flow rate=5171.58 lb/hr\n" + ] + } + ], + "source": [ + "print \"Example 19.3 page no 251\\n\\n\"\n", + "#refer to example 19.3 \n", + "S=0.785#cross sectional area,ft**2\n", + "v_av=24.4#average velocity,ft/s\n", + "q=v_av*S*60#flow rate,factor 60 for minute\n", + "print \"\\n flow rate q=%0.2f ft**3 min\"%(q)#\n", + "rho=0.075#density \n", + "m_dot=q*rho*60#mass flow rate \n", + "print \"\\n m_dot mass flow rate=%0.2f lb/hr\"%(m_dot)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.4 Page no 251" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 19.4 page no\n", + "\n", + "\n", + "\n", + " water velocity v=4.16 m/s \n", + "\n", + " cross sectional area S=0.00 m**2\n", + "\n", + " flow rate q=0.02 m**3/s\n", + "\n", + " reynolds no R_e=324007.33 \n" + ] + } + ], + "source": [ + "from math import pi\n", + "print \"Example 19.4 page no\\n\\n\"\n", + "#water flow ina circular pipe,a pitot tube is used to measure the water velocity \n", + "h=0.07#manometer height,m\n", + "rho=1000#density of water,kg/m**3\n", + "rho_m=13600#density of mercury,kg/m**3\n", + "g=9.807\n", + "v=sqrt(2*g*h*(rho_m-rho)/rho)\n", + "print \"\\n water velocity v=%0.2f m/s \"%(v)#\n", + "D=0.0779#pipe inside diameter,by using table A.5 in the appendix for a 3 inch schedule 40 pipe\n", + "S=(pi/4)*D**2\n", + "print \"\\n cross sectional area S=%0.2f m**2\"%(S)#\n", + "q=v*S#flow rate\n", + "print \"\\n flow rate q=%0.2f m**3/s\"%(q)#\n", + "meu=0.001#viscosity of water,kg/m.s\n", + "R_e=rho*v*D/meu#reynolds number\n", + "print \"\\n reynolds no R_e=%0.2f \"%(R_e)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.5 Page no 254" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 19.5 page no 254\n", + "\n", + "\n", + "\n", + " velocity at throat v2=3.61 m/s\n", + "\n", + " flow rate q =0.00 m**3/s\n", + "\n", + " pressure P2=96890.27 Pa\n", + "\n", + " pressure loss P_l=443.47 Pa\n", + "\n", + " power loss W_l=0.50 W\n" + ] + } + ], + "source": [ + "print \"Example 19.5 page no 254\\n\\n\"\n", + "#a venturi meter has gasoline flowing through it.\n", + "h=0.035#height of venturi meter\n", + "D1=0.06#upsteeam diameter,m\n", + "D2=0.02#throat diameter,m\n", + "rho_m=13600#density of mercury\n", + "rho=680#density of gasoline\n", + "g=9.807\n", + "v2=sqrt((2*g*h*(rho_m-rho)/rho)/1-D2**4/D1**4)#velocity of gasoline at the the throat\n", + "print \"\\n velocity at throat v2=%0.2f m/s\"%(v2)#\n", + "q=(pi/4)*D2**2*v2#flow rate\n", + "print \"\\n flow rate q =%0.2f m**3/s\"%(q)#\n", + "P1=101325#upstream pressure,Pa\n", + "P2=P1-g*h*(rho_m-rho)#pressure at throat P2\n", + "print \"\\n pressure P2=%0.2f Pa\"%(P2)#\n", + "P_d=P1-P2#pressure difference\n", + "P_l=.1*P_d#pressure loss is 10 %\n", + "print \"\\n pressure loss P_l=%0.2f Pa\"%(P_l)#\n", + "W_l=q*P_l#power loss\n", + "print \"\\n power loss W_l=%0.2f W\"%(W_l)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.6 Page no. 255" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 19.6 page no. 255\n", + "\n", + "\n", + "\n", + " velocity v2=12.21 m/s\n", + "\n", + " flow rate q=3.84e-03 m**3/s\n" + ] + } + ], + "source": [ + "print \"\\n Example 19.6 page no. 255\\n\\n\"\n", + "#refer to example 19.5\n", + "#if gasoline has vapor pressure of 50000Pa ,we have to calculate flow rate at whhich cavitation to occur\n", + "P1=101325#upstream pressure,Pa\n", + "P2=50000#given vapor pressure,Pa\n", + "D1=0.06#upstream diameter,m\n", + "D2=0.02#throat diameter,m\n", + "rho=680#density of gasoline\n", + "v2=sqrt((2*(P1-P2))/rho*(1-D2**4/D1**4))#velocity\n", + "print \"\\n velocity v2=%0.2f m/s\"%(v2)# \n", + "q=(pi/4)*D2**2*v2#flow rate\n", + "print \"\\n flow rate q=%0.2e m**3/s\"%(q)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.7 Page no 258" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 19.7 page no 258\n", + "\n", + "\n", + "\n", + " velocity through orifice v2=35.27 m/s\n", + "\n", + " pressure P=509.80 Pa\n", + "\n", + " Reynolds no. R_e=457919.49 \n", + "\n", + " actual pressure drop P_l=572.00 Pa\n" + ] + } + ], + "source": [ + "print \"Example 19.7 page no 258\\n\\n\"\n", + "#an orifice meter is equipped with flange top is installed to measure the flow rate of air in a circular duct\n", + "D1=0.25#diameter of circular duct,m\n", + "D2=0.19#orifice diamter,m\n", + "v2=4/(pi*D2**2)#velocity through orifice\n", + "print \"\\n velocity through orifice v2=%0.2f m/s\"%(v2)#\n", + "C_o=1# assuming orifice discharge coefficient\n", + "rho=1.23#density of air,kg/m**3\n", + "P=rho*v2**2*(1-(D2**4/D1**4))/2#pressure \n", + "print \"\\n pressure P=%0.2f Pa\"%(P)#\n", + "meu=1.8e-5# absolute viscosity\n", + "R_e=rho*v2*D2/(meu)#reynolds no.\n", + "print \"\\n Reynolds no. R_e=%0.2f \"%(R_e)#\n", + "C_ac=0.62#actual discharge cefficient,from fig.19.8\n", + "P_ac=P/(C_ac)**2#actual pressure drop \n", + "P_rec=14*(D2/D1) + 80*((D2/D1)**2)#equation for percentage pressure recovery\n", + "P_loss=100-P_rec#precentage pressure loss\n", + "P_l=round((P_loss/100)*P_ac)#actual pressure drop after recovery\n", + "print \"\\n actual pressure drop P_l=%0.2f Pa\"%(P_l)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.9 Page no 259" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 19.9 page no 259\n", + "\n", + "\n", + "\n", + " volumatric flow rate q=6.67 ft**3/s\n" + ] + } + ], + "source": [ + "print \"\\n Example 19.9 page no 259\\n\\n\"\n", + "#air at ambient condition is flowing in a pipe\n", + "rho=0.075#density of air ,lb/ft**3\n", + "m_dot=0.5#mass flow rate ,lb/s\n", + "q=m_dot/rho#volumatric flow rate\n", + "print \"\\n volumatric flow rate q=%0.2f ft**3/s\"%(q)#" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-2.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-2.ipynb new file mode 100644 index 00000000..d46e639e --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-2.ipynb @@ -0,0 +1,192 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2 : Unit and Dimensions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.1(1) Page no.10" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 2.1(1) Page no. 10\n", + "\n", + "\n", + "8.03 yr =a\n", + "\n", + "\n", + "8.03 yr is 253234080.00 seconds \n", + "\n", + "\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"Example 2.1(1) Page no. 10\\n\\n\"\n", + "#convert 8.03 yr to seconds\n", + "print \"8.03 yr =a\\n\\n\"\n", + "yr=365#day\n", + "day=24#h\n", + "h=60#min\n", + "Min=60#second\n", + "a=8.03*365*24*60*60\n", + "print \"8.03 yr is %0.2f seconds \\n\\n\"%(a)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.1(2) Page no. 10" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 2.1(2) Page no.10\n", + "\n", + "\n", + "150 mile/h =x\n", + "\n", + "\n", + "150 mile/h is 264000.00 yd/h\n", + "\n" + ] + } + ], + "source": [ + "print \"Example 2.1(2) Page no.10\\n\\n\"\n", + "#convert 150 mile/h to yard/h\n", + "print \"150 mile/h =x\\n\\n\"\n", + "mile=5280.0#ft\n", + "ft=(1/3)#yd\n", + "x=150*5280*(1.0/3)\n", + "print \"150 mile/h is %0.2f yd/h\\n\"%(x)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.1(3) Page no. 10" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 2.1(3) Page no. 10\n", + "\n", + "\n", + "100 m/s**2 =a\n", + "\n", + "\n", + "100 m/s**2 is 1181102.36 ft/min**2\n", + "\n" + ] + } + ], + "source": [ + "print \"Example 2.1(3) Page no. 10\\n\\n\"\n", + "#convert 100 m/s**2 to ft/min**2\n", + "print \"100 m/s**2 =a\\n\\n\"\n", + "m =100#cm\n", + "cm=(1/30.48)#ft\n", + "min=60#sec\n", + "a=100*100*(1/30.48)*(60)**2\n", + "print \"100 m/s**2 is %0.2f ft/min**2\\n\"%(a)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.1(4) Page no. 10" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 2.1(4) Page no.10\n", + "\n", + " \n", + "0.03g/cm**3 =x\n", + "\n", + "0.03g/cm**3 is 1.87 lb/ft**3\n", + "\n" + ] + } + ], + "source": [ + "print \"Example 2.1(4) Page no.10\\n\\n \"\n", + "#convert 0.03g/cm**3 to lb/ft**3\n", + "print \"0.03g/cm**3 =x\\n\"\n", + "g=(1/454)#lb\n", + "ft=(30.48)**3#cm**3\n", + "x=0.03*(1.0/454)*(30.48)**3\n", + "print \"0.03g/cm**3 is %0.2f lb/ft**3\\n\"%(x)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-20.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-20.ipynb new file mode 100644 index 00000000..a0ceda90 --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-20.ipynb @@ -0,0 +1,335 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 20 : Ventilation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.2 Page no 269" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 20.2 page no 269\n", + "\n", + "\n", + "\n", + " C_a concentration of toluene=0.00 \n", + " q volumatric flow rate q=0.38 gal/h \n", + " S_g specific gravity=0.87 \n", + "\n", + " mass flow rate m_dot-tol=1.09 lb/h\n", + "\n", + " mass flow rate in g/min m_dot_g=8.24 g/min\n", + "\n", + " no. of moles n_dot_tol=0.09 gmol/min\n", + "\n", + " R gas constant=0.08 atm.L/(gmol.K)\n", + " T temperature=293.00 K\n", + " P pressure =1.00 atm\n", + "\n", + " toluene vapor vol. flow rate q_tol=2.15 L/min\n", + "\n", + " diluent vol. flow rate q_dil=134375.00 L/min\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"\\n Example 20.2 page no 269\\n\\n\"\n", + "#ventilation required in an indoor work area where a toluene containing adhesive in a nanotechnology process is used.\n", + "#equation for estimate the dilution air requirement \n", + "C_a=80e-6#concentration of toluene\n", + "q=3/8#volumatric flow rate, gal/h\n", + "v=0.4#adhesive contains 4 volume % toluene\n", + "S_g=0.87#specific gravity\n", + "print \"\\n C_a concentration of toluene=%.2f \\n q volumatric flow rate q=%.2f gal/h \\n S_g specific gravity=%.2f \"%(C_a,q,S_g)#\n", + "#mass flow rate of toluene \n", + "m_dot_tol=q*v*S_g*(8.34)#factor 8.34 for lb\n", + "print \"\\n mass flow rate m_dot-tol=%.2f lb/h\"%(m_dot_tol)#\n", + "m_dot_g=m_dot_tol*(454/60)#unit conversion of mass flow rate in g/min\n", + "print \"\\n mass flow rate in g/min m_dot_g=%.2f g/min\"%(m_dot_g)#\n", + "M_w=92#molecular weight of toluene\n", + "n_dot_tol=m_dot_g/M_w#no. of gm moles of toluene/min\n", + "print \"\\n no. of moles n_dot_tol=%.2f gmol/min\"%(n_dot_tol)#\n", + "#resultant toluene vapor volumatric flow rate q_tol is directly calculated from th eidal gas law\n", + "#applying ideal gas law\n", + "R=0.08206#gas constant \n", + "P=1#standard pressure\n", + "T=293#standard temperature\n", + "print \"\\n R gas constant=%.2f atm.L/(gmol.K)\\n T temperature=%.2f K\\n P pressure =%.2f atm\"%(R,T,P)#\n", + "q_tol=n_dot_tol*R*T/P#toluene vapor volumatric flow rate \n", + "print \"\\n toluene vapor vol. flow rate q_tol=%.2f L/min\"%(q_tol)#\n", + "q_tol=2.15#round off value\n", + "#the required diluent volumatric flow rtae\n", + "K=5#dimensionless mixing factor \n", + "q_dil=K*q_tol/(C_a)#diluent vol. flow rate\n", + "print \"\\n diluent vol. flow rate q_dil=%.2f L/min\"%(q_dil)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.3 Page no 270" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 20.3 page no 270 \n", + "\n", + "\n", + "\n", + " lbmol of H2S n_H2S=0.01 lbmol\n", + "\n", + " mass of H2S m_H2S=0.34 lb\n", + "\n", + " stand. temperature T_st=32.00 F\n", + " temperature of air in room T_r=51.00 F\n", + " stand. volume v_st=359.00 ft**3\n", + "\n", + " volume of air at 51deg F V_a=372.86 ft**3\n", + "\n", + " conc. of H2S in ppm C_H2S=2732.19 ppm\n" + ] + } + ], + "source": [ + "print \"Example 20.3 page no 270 \\n\\n\"\n", + "# a certain poorly ventilated room chemical stroage room has a ceiling fan\n", + "#inside this room bottle of iron(3) sulfide sits next to a bottle sulfuric acid containg 1 lb H2SO4 in water\n", + "# an earthquake sends the botlles on the shelf crashing to the floor where bottles break and their contant mix and react to form iron(3) sulfate and hydrogen sulfide\n", + "#we have to calculate maximum H2S concentration that could be reached in the room\n", + "Mw_Fe2S3=208#mol. weight of Fe2S3\n", + "Mw_H2SO4=98#mol. weight of H2SO4\n", + "Mw_H2S=34#mol. weight of H2S\n", + "Mw_air=29#mol. weight of air\n", + "#balancing chemical reaction \n", + "# from the stiochiometric of the reaction ,sulfuric acid is the limiting reagent\n", + "# 0.030 lbmol of Fe2S3 is required to react with 0.010 lbmol of H2SO4\\\n", + "v_r=1600#volume of room,ft**3\n", + "n_H2SO4=0.010# lbmol of H2SO4\n", + "Stoi_c_H2SO4=3#stoichiometric coeff. of H2SO4\n", + "Stoi_c_H2S=3#stoichiometric coeff. of H2S\n", + "n_H2S=n_H2SO4*(Stoi_c_H2S/Stoi_c_H2SO4)#lbmol of H2S\n", + "print \"\\n lbmol of H2S n_H2S=%.2f lbmol\"%(n_H2S)#\n", + "m_H2S=n_H2S*Mw_H2S#conversion of moles into mass of H2S\n", + "print \"\\n mass of H2S m_H2S=%.2f lb\"%(m_H2S)#\n", + "#at 32 degF and i atm pressure an ideal gas occupies 359 ft**3 volume then,at 51 deg F occupies\n", + "T_r=51#temperature of air in the room\n", + "T_st=32#standard temperature\n", + "v_st=359#standard volume\n", + "print \"\\n stand. temperature T_st=%.2f F\\n temperature of air in room T_r=%.2f F\\n stand. volume v_st=%.2f ft**3\"%(T_st,T_r,v_st)# \n", + "V_a=v_st*(460+T_r)/(460+T_st)#volume of air\n", + "print \"\\n volume of air at 51deg F V_a=%.2f ft**3\"%(V_a)#\n", + "#the final concentration of H2S in the room in ppm C_H2S\n", + "C_H2S=m_H2S*(V_a/Mw_air)*1e+6/(v_r)\n", + "print \"\\n conc. of H2S in ppm C_H2S=%.2f ppm\"%(C_H2S)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.4 Page no 271" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 20.4 page no 271\n", + "\n", + "\n", + "\n", + " rho density of vinyl chloride=0.00 g/cm**3\n", + "\n", + " vol. flow rate q=3135.11 cm**3/min\n", + "\n", + " vol.flow rate q_air=110700.00 acfm\n", + "\n", + " air flow rate for dilution q_dil=1107000.00 acfm\n", + "\n", + " air flow rate q_exh=521.00 acfm\n" + ] + } + ], + "source": [ + "print \"Example 20.4 page no 271\\n\\n\"\n", + "#vinyl chloride application\n", + "#calculation of density by using ideal gas law\n", + "Mw=78#molecular weight of vinyl chloride\n", + "R=82.06#gas constant,cm**3.atm/mol.K \n", + "T=298#temperature,K \n", + "P=1#pressure ,atm\n", + "rho=P*Mw/(R*T)#density of vinyl chloride\n", + "print \"\\n rho density of vinyl chloride=%.2f g/cm**3\"%(rho)#\n", + "#given\n", + "m_dot=10#mass flow rate,g/min\n", + "q=m_dot/rho#volumatric flow rate\n", + "print \"\\n vol. flow rate q=%.2f cm**3/min\"%(q)#\n", + "q_acfm=0.1107#vol flow rate in acfm\n", + "#cal. the air flow rate in acfm q_air required to meet the 1.0 ppm constraint with the equation \n", + "q_air=q_acfm/1e-6\n", + "print \"\\n vol.flow rate q_air=%.2f acfm\"%(q_air)#\n", + "S_factor=10#correct for mixing by employing a saftey factor\n", + "#apply saftey factor to calculate the actual air flow rate for dilution ventilation \n", + "q_dil=S_factor*q_air\n", + "print \"\\n air flow rate for dilution q_dil=%.2f acfm\"%(q_dil)#\n", + "#now consider the local exhaust ventilation by first calculating the face area\n", + "H=30#height of hood,in\n", + "W=25#width of hood,in\n", + "S=H*W/144#surface area of hood ,ft**2\n", + "#the air flow rate in acfm q_air,exh required for a face velocity of 100 ft/min is then\n", + "v=100#face velocity,ft/min\n", + "q_exh=round(S*v)\n", + "print \"\\n air flow rate q_exh=%.2f acfm\"%(q_exh)# " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.7 Page no 276" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 20.7 page no 276\n", + "\n", + "\n", + "\n", + " q_o min. air ventilation flow rate=10.00 m**3/min\n" + ] + } + ], + "source": [ + "print \"\\n Example 20.7 page no 276\\n\\n\"\n", + "#refer to illustrative Example 20.5\n", + "#(1)\n", + "#we have to calculate minimum air ventilation flow rate into the room containing 10 ng/m**3 of a toxic chemical\n", + "#ng means nanograms\n", + "rV=250#chemical generated in the laboratory,ng/min\n", + "c_o=10#room containg toxic chemical of 10ng/m**3 \n", + "c=35#limit of chemical concentration,ng/m**3\n", + "#applicable modal in this case\n", + "#q_o(c_o-c) + rV =V*dc/dt\n", + "#substituting gives\n", + "q_o=(-rV)/(c_o-c)#minimum air ventilation flow rate\n", + "print \"\\n q_o min. air ventilation flow rate=%.2f m**3/min\"%(q_o)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.8 Page no 277" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Example 20.8 page no 277\n", + "\n", + "\n", + "\n", + " t=29.00 min \n" + ] + } + ], + "source": [ + "from math import exp\n", + "from scipy.optimize import fsolve\n", + "print \" Example 20.8 page no 277\\n\\n\"\n", + "#refer to example no 20.5 and 20.7\n", + "V=142#volume of room,m**3\n", + "q=12.1# flow rate of air,m**3/min\n", + "tou=V/q#time ,min\n", + "r=30#rate of generation of chemical,ng/min\n", + "k=r/V#ng/(m**3.min)\n", + "c_i=85#intial concentration in laboratory,ng/m**3\n", + "c_o=10#given concentration in room\n", + "c=20.7#final concentration in room\n", + "#by using trial and error mthod we get \n", + "def f(t):\n", + " y=c_i*(exp(-t/tou))+ (c_o+k*tou)*(1-exp(-t/tou)) - c\n", + " return y\n", + "t=fsolve(f,30)#\n", + "#by using trail and error method we get\n", + "t=29\n", + "print \"\\n t=%.2f min \"%(t)#" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-21.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-21.ipynb new file mode 100644 index 00000000..3205d162 --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-21.ipynb @@ -0,0 +1,410 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 21 : Academic Application" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21.7 Page no 284" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 21.7 page no 284\n", + "\n", + "\n", + "\n", + " veloctiy of fluid v=3.43 ft/s\n", + "\n", + " reynolds no R_e=13326.84 \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"Example 21.7 page no 284\\n\\n\"\n", + "# water is flowing through a 3/8 in schedule 40 brass pipe\n", + "D=0.0411#diameter of pipe,ft\n", + "S=0.00133#cross section area of pipe,ft**2\n", + "meu=6.598e-4#viscosity of water from table A.4 in the appendix,lb/ft.s\n", + "rho=62.4#density,lb/ft**3\n", + "q_gpm=2#vol.flow rate \n", + "q=q_gpm*0.00228#volumatric flow rate in ft**3s\n", + "v=q/S#velocity of fluid\n", + "print \"\\n veloctiy of fluid v=%.2f ft/s\"%(v)#\n", + "R_e=D*v*rho/meu#reynolds no.\n", + "print \"\\n reynolds no R_e=%.2f \"%(R_e)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21.8 Page no 285" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 21.8 page no 285\n", + "\n", + "\n", + "\n", + " reynolds no R_e11=115553.46\n", + " reynolds no R_e12=462213.85 \n", + "\n", + " reynolds no R_e21=91588.19\n", + " reynolds no R_e22=366352.78\n" + ] + } + ], + "source": [ + "print \"Example 21.8 page no 285\\n\\n\"\n", + "#water flowing through a pipe\n", + "rho=62.4#density of water,lb/ft**3\n", + "meu=6.72e-4#viscosity of water,lb/ft.s\n", + "q_1gpm=1.5#vol. flow rate in gpm\n", + "q_2gpm=6#vol. flow rate in gpm \n", + "D_1=0.493#internal diameter of 3/8 in schdule pipe\n", + "v11=(0.409*q_1gpm)/(D_1**2)#flow velocity for an 3/8 in pipe with 1.5 gpm flow rate \n", + "v12=(0.409*q_2gpm)/(D_1**2)#flow velocity for an 3/8 pipe with 6 gpm flow\n", + "R_e11=D_1*v11*rho/meu#reynolds no for case 11\n", + "R_e12=D_1*v12*rho/meu#reynolds no for case 12\n", + "print \"\\n reynolds no R_e11=%.2f\\n reynolds no R_e12=%.2f \"%(R_e11,R_e12)##printing mistake in book\n", + "D_2=0.622#internal diameter of 1/2 in schdule pipe \n", + "v21=(0.409*q_1gpm)/D_2**2#flow velocity for 1/2 pipe with 1.5 gpm\n", + "v22=(0.409*q_2gpm)/D_2**2#flow velocity for 1/2 pipe with 6 gpm\n", + "R_e21=D_2*v21*rho/meu#reynolds no for case 21\n", + "R_e22=D_2*v22*rho/meu#reynolds no foe case 22\n", + "print \"\\n reynolds no R_e21=%.2f\\n reynolds no R_e22=%.2f\"%(R_e21,R_e22)#\n", + "#printing mistake in value of R_e" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21.9 page no 286 " + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example no 21.9 page no 286\n", + "\n", + "\n", + "\n", + " frictional loss h_f=14.93 ft.lbf/lb \n" + ] + } + ], + "source": [ + "print \"Example no 21.9 page no 286\\n\\n\"\n", + "#water is flowing in a vertical pipe \n", + "#assume constant velocity \n", + "P_drop=-4.5#pressure drop from bottom to top\n", + "rho=62.4 #density of water \n", + "z2=15#height of pipe\n", + "z1=0#bottom level\n", + "#applying bernoulli equation \n", + "h_f=(P_drop/rho)+(z2-z1)#frictional loss \n", + "print \"\\n frictional loss h_f=%.2f ft.lbf/lb \"%(h_f)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21.10 Page no 286" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 21.10 page no 286\n", + "\n", + "\n", + "\n", + " work h_sf=499500.00 ft.lbf/s\n", + "\n", + " actual work W_p=1397.00 hp\n" + ] + } + ], + "source": [ + "print \"Example 21.10 page no 286\\n\\n\"\n", + "#a centrifugal pump is needed to transport water from sea level to 10000 feet above sea level\n", + "#using bernoulli equation\n", + "#neglectiing kinetic energy effects and frictional losses\n", + "P1=14.7#atmospheric pressure at sea level,psi\n", + "P2=10.2#atmospheric pressure at 10000 feet,psi\n", + "z1=0#at sea level,ft\n", + "z2=10000#height above sea level,ft\n", + "rho=62.4#density of water\n", + "g=32.2#gravitational acc.\n", + "g_c=32.2#gravitational constant\n", + "h_s=((P2-P1)*144/(rho) + (z2-z1)*(g/g_c))#work deliverd by the pump to the water,in ft.lbf/lb\n", + "h_s=9990#ft.lbf/lb\n", + "h_sf=h_s*50#in ft.lbf\n", + "print \"\\n work h_sf=%.2f ft.lbf/s\"%(h_sf)#\n", + "#actual pump work is calculated by dividing the above terms by the frictional afficiency\n", + "neta=0.65#frictional efficiency\n", + "W_p=round((h_sf/550)/neta)#actual work\n", + "print \"\\n actual work W_p=%.2f hp\"%(W_p)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21.12 Page no 288" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 21.12 page no 288\n", + "\n", + "\n", + "\n", + " frictional loss h_f=12.77 ft.lbf/lb\n" + ] + } + ], + "source": [ + "print \"Example 21.12 page no 288\\n\\n\"\n", + "#refer to illustrative Example 21.4\n", + "# if the pipe contains two globe valves and one straight through tee,what is the friction loss\n", + "K_f_globe=6\n", + "K_f_tee=0.4\n", + "v=2.53# flow velocity \n", + "g_c=32.2\n", + "f=5/4#friction factor\n", + "L=144#lenth of pipe\n", + "D=62.4#diameter\n", + "h_f=4*f*(L/D) + (2*K_f_globe + K_f_tee)*(v**2/(2*g_c))\n", + "print \"\\n frictional loss h_f=%.2f ft.lbf/lb\"%(h_f)#\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21.13 Page no 289 " + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 21.13 page no 289 fig 21.1 \n", + "\n", + "\n", + "\n", + "\n", + " flow velocity v=3.29 m/s\n", + "\n", + " reynolds no R_e=4157.04 \n", + "\n", + " mass flow rate m_dot=7.18 kg/s\n" + ] + } + ], + "source": [ + "from math import sqrt, pi\n", + "print \"Example 21.13 page no 289 fig 21.1 \\n\\n\\n\"\n", + "#a pitot tube is inserted in acircular pipe to measure the flow velocity\n", + "# the tube is inserted so that it points upstream into the flow and the pressure sensed by thre probeis the stagnation pressure \n", + "#the change in elevation between the tip of the pitot and the wall pressure tap is negligible \n", + "#the flowing fluid is soyabean oil at 20 deg C and the fluid in manometer tube is mercury\n", + "#point 2 is a stagnation point ,P2>P1 and the manometer fluid should be higher on th eleft side(h<0) \n", + "rho_m=13600#density of mercury,kg/m**3\n", + "h=0.04#height of mercury,\n", + "rho=919#density of oil kg/m**3\n", + "g=9.804\n", + "D=0.055#diameter of pipe,m\n", + "meu=0.04#viscosity of oil,kg.m.s\n", + "v=sqrt(2*g*h*((rho_m/rho)-1))#flow velocity\n", + "print \"\\n flow velocity v=%.2f m/s\"%(v)#\n", + "#assuming uniform velocity\n", + "S=(pi/4)*D**2\n", + "m_dot=rho*v*S#mass flow rate\n", + "R_e=(D*v*rho)/meu#reynolds no\n", + "print \"\\n reynolds no R_e=%.2f \"%(R_e)#\n", + "print \"\\n mass flow rate m_dot=%.2f kg/s\"%(m_dot)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21.14 Page no 290" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 21.14 page no 290\n", + "\n", + "\n", + "\n", + " frictional loss h_f=8661.02 ft.lbf/lb \n" + ] + } + ], + "source": [ + "print \"Example 21.14 page no 290\\n\\n\"\n", + "#given: a 50 ft pipe with flowing water ,we have to determine the flow rate if there is an expansion from 3/8 inch to 1/8 inch and immediatly back to 3/8n inch with an overall pressure loss no greater than 2lbf/ft**2\n", + "#from table A.5 in the appendix \n", + "S1=0.00133#cross sectional area of 3/8 inch pipe,ft**2\n", + "S2=0.00211#cross sectional area of 1/2 inch pipe,ft**2\n", + "K_e=(1-S1/S2)**2#expansion constant\n", + "K_c=0.4*(1-S2/S1)**2#contraction constant\n", + "L=50#length of pipe\n", + "D=0.03125#diameter of pipe\n", + "v=1.93#velocity ,ft/s\n", + "f=0.01124#friction factor from table 21.3,for velocity estimated to be 1.93 ft/s\n", + "g_c=32.2 \n", + "h_f=(4*f*L/D + K_e + K_c)*(v**2*g_c)#frictional loss\n", + "print \"\\n frictional loss h_f=%.2f ft.lbf/lb \"%(h_f)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21.16 Page no 291" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 21.16 page no 291\n", + "\n", + "\n", + "\n", + " flow velocity v_m=45.00 m/s\n", + "\n", + " pressure drop in prototype P_drop_p=0.021 Pa\n" + ] + } + ], + "source": [ + "print \"Example 21.16 page no 291\\n\\n\"\n", + "#water flows in a concrete pipe\n", + "v_p=0.02# flow velocity,m/s \n", + "D_p=1.5#diameter of pipe\n", + "L_p=20#length of pipe,m\n", + "rho_p=1000#density of water,kg/m**3\n", + "meu_p=0.001#viscosity of water,kg/m.s\n", + "K_p=0.003#roughnes factor,m\n", + "#this prototype is to be modeled in a lab using a 1/3o th scale pipe\n", + "D_m=D_p/30#D_m is diameter of modeled pipe\n", + "L_m=L_p*(D_m/D_p)#length of modeled pipe\n", + "K_m=K_p*(D_m/D_p)#roughness factor for modeled pipe\n", + "#the fluid in the model is caster oil \n", + "rho_m=961.3#densiy of oil, kg/m**3\n", + "meu_m=0.0721#viscosity of oil,kg/m.s\n", + "#since R_e = (rho_m*v_m*D_m)/meu_m = (rho_p*v_p*D_p)/meu_p\n", + "v_m = (rho_p*v_p*D_p*meu_m)/(rho_m*D_m*meu_p)# flow velcity in molded pipe\n", + "print \"\\n flow velocity v_m=%.2f m/s\"%(v_m)#\n", + "#pressure drop in prototype\n", + "P_drop_m=1e+5#pressure drop in model\n", + "P_drop_p=(P_drop_m*rho_p*(v_p)**2)/(rho_m*(v_m)**2)#pressure drop in prototype\n", + "print \"\\n pressure drop in prototype P_drop_p=%.3f Pa\"%(P_drop_p)#" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-22.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-22.ipynb new file mode 100644 index 00000000..7e2cae2b --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-22.ipynb @@ -0,0 +1,810 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 22 : Industrial Application" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22.4 Page no 298" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 22.4 page no 298\n", + "\n", + "\n", + "\n", + " velocity v=113.49 ft/s\n", + "\n", + " circumference c=3.78 ft/rotation\n", + "\n", + " diameter D=1.20 ft\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import sqrt,pi\n", + "print \"Example 22.4 page no 298\\n\\n\"\n", + "#a centrifugal pump operating at 1800 rpm ,we have to find the impeller diameter needed to develop a head of 200 ft\n", + "h=200#height,ft\n", + "g=32.2#gravitational acc. ft/s**2\n", + "v=sqrt(2*g*h)#velocity needed to develop a head of 200 ft\n", + "print \"\\n velocity v=%.2f ft/s\"%(v)#\n", + "N=1800#pump operating at this rotational speed,in rpm\n", + "c=v*60/N#the number of feet that the impeller travels in one rotations\n", + "#this c represents the circumference of the impeller since it is equal to one rotation \n", + "print \"\\n circumference c=%.2f ft/rotation\"%(c)#\n", + "D=c/pi#diameter of the impeller\n", + "print \"\\n diameter D=%.2f ft\"%(D)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22.5 Page no 299" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 22.5 page no 299\n", + "\n", + "\n", + "\n", + " reynolds no R_e=169425.74 \n", + "\n", + " h_f frictional loss=10.86 J \n", + "\n", + " e_l total elbow loss=2.56 J/kg\n", + "\n", + " potential energy PE=215.82 J/kg\n", + "\n", + " total energy TE=229.24 J/kg\n", + "\n", + " theoritical power W_dot_s=4575.71 J/s\n", + "\n", + " equivalent head h=23.37 m \n" + ] + } + ], + "source": [ + "print \"Example 22.5 page no 299\\n\\n\"\n", + "#water for a processing plant is required to be stored in a reservoir\n", + "#assume the properties of water at 20 deg C are\n", + "rho=998#density,kg/m**3\n", + "meu=0.001#viscosity,N.s/m**2\n", + "L=120#length of pipe,m\n", + "D=0.15#diameter of pipe,m\n", + "S=(pi/4)*D**2#cross sectional area of pipe\n", + "#given:\n", + "q=1.2/60#volumetric flow rate,m**3/s\n", + "v=q/S#flow velocity,m/s\n", + "R_e=D*v*rho/meu#reynolds no\n", + "print \"\\n reynolds no R_e=%.2f \"%(R_e)#\n", + "#from value of R_e ,flow is clearly turbulent\n", + "k=0.0005#roughness factor for galvanized iron\n", + "K_r=k/D#relative roughness\n", + "f=0.0053#fricion factor from fig. 14.2\n", + "h_f=4*f*(L/D)*(v**2/2)#friction loss of energy\n", + "print \"\\n h_f frictional loss=%.2f J \"%(h_f)#\n", + "#for right elbows (from table 18.1),the estimated value of resistance coff. K for one regular 90 deg elbows is 0.5\n", + "K=4#resstance coeff.\n", + "V_h=v**2/2#velociy head\n", + "e_l=K*V_h#the total loss from the elbows\n", + "print \"\\n e_l total elbow loss=%.2f J/kg\"%(e_l)#\n", + "#the energy to move 1 kg of water against a head of 22m of water is\n", + "z=22#height,m\n", + "g=9.81#grav. acc,m/s**2\n", + "PE=z*g\n", + "print \"\\n potential energy PE=%.2f J/kg\"%(PE)#\n", + "TE = h_f + e_l + PE#total requirement per kg\n", + "print \"\\n total energy TE=%.2f J/kg\"%(TE)#\n", + "W_dot_s= TE*q*rho#theoretical power requirement \n", + "print \"\\n theoritical power W_dot_s=%.2f J/s\"%(W_dot_s)# \n", + "h=TE/g#head equivalent to the energy requirement \n", + "print \"\\n equivalent head h=%.2f m \"%(h)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22.6 Page no 301" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 22.6 page no 301\n", + "\n", + "\n", + "\n", + " reynolds no =8.91e+02 \n", + "\n", + " gauge reading h=0.17 ft \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"Example 22.6 page no 301\\n\\n\"\n", + "#oil is flowing through a standard 3/2 inch steel pipe containing a 1 inch square edged orifice\n", + "v_gal=400#orifice velocity of oil in gal/hr\n", + "v_o=400*144/(0.785*3600*7.48)#orifice velocity in ft/hr\n", + "D_o=1/12#diameter of orifice\n", + "rho=0.87*62.4#density of oil\n", + "meu=20.6*0.000672#viscosity of oil\n", + "R_e=D_o*v_o*rho/meu\n", + "print \"\\n reynolds no =%.2e \"%(R_e)#\n", + "D_r=0.62#ratio of orifice plate to pipe diametersD_o/D1 = 1/1.61\n", + "C_d=0.76#discharge coeff. fro fig 19.8\n", + "g=32.2#grav. acc. ft/s**2\n", + "h=(v_o**2/(2*g*(C_d)**2))*(1-D_r**4)#height of oil in gauge reading\n", + "print \"\\n gauge reading h=%.2f ft \"%(h)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22.7 Page no 302" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 22.7 page no 302\n", + "\n", + " \n", + "\n", + " orifice veloctiy v_o=60.76 ft/s\n", + "\n", + " R_e_o reynolds no =92475.80 \n", + "\n", + " mass flow rate m_dot=403.00 lb/hr\n" + ] + } + ], + "source": [ + "print \"Example 22.7 page no 302\\n\\n \"\n", + "#natural gas consisting of essentially pure methane flows through a long straight standard 10 inch steel pipe into which is inserted a square edged orifice 2.50 inches in diameter ,with pressure taps ,each 5 inch from the orifice plate\n", + "#manometer is attached across the orifice reads 1.60 in H20\n", + "D_o=2.50#diameter of orifice\n", + "D_1=10.15#diameter of plate\n", + "D_r=D_o/D_1#ratio of diameters\n", + "#assuming the reynolds no R_e in the orifice to be over 30,000\n", + "C_o=0.61#coeff. of discharge from R_e value\n", + "g=32.2#garv. acc ft/s**2\n", + "rho_m=62.4#density of medium (water)\n", + "rho=0.054#density of methane gas,lb/ft**3\n", + "h=1.60#manometer reading height,in\n", + "meu=12*0.011*0.000672#viscosity \n", + "v_o= C_o*sqrt((2*g*h*rho_m)/(12*rho))# orifice velocity\n", + "print \"\\n orifice veloctiy v_o=%.2f ft/s\"%(v_o)#\n", + "R_e_o=D_o*v_o*rho/meu#reynolds no in the orifice\n", + "print \"\\n R_e_o reynolds no =%.2f \"%(R_e_o)#\n", + "#from R_e_o value C_o=0.61 is permissible\n", + "m_dot=round(v_o*(pi/4)*(D_o**2)*rho*(3600/144))#mass flow rate \n", + "print \"\\n mass flow rate m_dot=%.2f lb/hr\"%(m_dot)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22.8 Page no 303" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 22.8 page no 303\n", + "\n", + "\n", + "\n", + " vol.flow rate q=0.09 m**3/s\n", + "\n", + " mach no. M_a =0.10 \n", + "\n", + " pressure at point 2=129436.49 Pa\n" + ] + } + ], + "source": [ + "print \"Example 22.8 page no 303\\n\\n\"\n", + "#refer to fig 22.1\n", + "D1=.1#upstream diameter(at station 1),m\n", + "D2=.06#downstream diameter(station 2),m\n", + "S2=(pi/4)*D2**2#cross sectional area at point 2\n", + "rho=1.22#density of air from ideal gas law\n", + "rho_m=827#density of medium,kg.m**3\n", + "g=9.8#gravitational acc.\n", + "h=0.08#manometer head,m\n", + "#from bernoulli equation\n", + "v2=sqrt(2*g*h*((rho_m/rho)-1))#velocity at point 2\n", + "v1=v2*(D2/D1)**2#velocity at point 1\n", + "q=v2*S2#volumatric flow rate\n", + "print \"\\n vol.flow rate q=%.2f m**3/s\"%(q)#\n", + "#calculation of mach number from equation 15.1\n", + "T=293#temperature in k\n", + "c=20*sqrt(T)#speed of light at this temperature,m/s\n", + "M_a=v2/c#mach no.\n", + "print \"\\n mach no. M_a =%.2f \"%(M_a)#\n", + "#noting that M_a=0.095 < 0.3 , we can conclude that flow is incompressible#given \n", + "P1=130000 #absolute pressure at point 1,pa\n", + "#by using bernoulli eq for P2\n", + "P2=P1-rho*v2**2*(1-(D2/D1)**4)/2#pressure at point 2\n", + "print \"\\n pressure at point 2=%.2f Pa\"%(P2)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22.9 Page no 305 " + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 22.9 page no 305\n", + "\n", + "\n", + "\n", + " h_s =305.56 ft.lbf/lb\n", + "\n", + " frictional loss h_f=-643.25 ft.lbf/lb\n" + ] + } + ], + "source": [ + "print \"\\n Example 22.9 page no 305\\n\\n\"\n", + "#water is flowing from an elevated reservoir through a conduit to a turbine at a lower level and out of the turbine through a similar conduit \n", + "#refer to fig 22.2\n", + "#since the diameter of the conduit is the same at location 1 and 2 ,kinetic energy effects can be neglected and bernoulli eq. takes the form\n", + "#P/rho + z(g/g_c) -h_s + h_f = 0\n", + "P1=30#/pressure at point 1,psia\n", + "z1=300#height of point 1,ft\n", + "P2=18#pressure at point 2,psia\n", + "z2=-10#height of point 2,ft\n", + "rho=62.4#density\n", + "m_dot=3600#mass flow rate,tons/hr\n", + "W_dot =1000#output at the shaft of turbine,hp\n", + "neta=0.9#efficiency of turbine\n", + "h_s=W_dot*550*3600/(neta*m_dot*2000)#\n", + "print \"\\n h_s =%.2f ft.lbf/lb\"%(h_s)#\n", + "#put this value in bernoulli eq.\n", + "h_f=(P2-P1)*144/rho + (z2-z1) -h_s#frictional loss\n", + "print \"\\n frictional loss h_f=%.2f ft.lbf/lb\"%(h_f)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22.10 Page no 306" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 22.10 page no 306\n", + "\n", + "\n", + "\n", + " dynamic head D_h=0.92 m\n", + "\n", + " pressure at point 3 P3=78265.03 Pa\n", + "\n", + " NPSH=7.06 m\n", + "\n", + " new pressure at point 3 P3_n_ab=86273.97 Pa absolute\n", + "\n", + " height z3=0.85 m\n" + ] + } + ], + "source": [ + "print \"\\n Example 22.10 page no 306\\n\\n\"\n", + "#benzene is pumped from a large tank to a delivery station \n", + "#refer fig 22.3\n", + "q=0.003#vol. flow rate,m**3/s\n", + "#tank is at atmosphric pressure\n", + "D=0.03#diameter of suction and discharge line,m\n", + "v_2=q/((pi/4)*D**2)#discharge velocity,m/s\n", + "#since all diameters are same likewise velocities are same\n", + "v_3=v_2\n", + "g=9.807#grav. acc.\n", + "D_h=(v_3**2)/(2*g)#dynamic head\n", + "print \"\\n dynamic head D_h=%.2f m\"%(D_h)#\n", + "z1=0#height at point 1,tank level\n", + "z2=1.8#height at point 3\n", + "#applying bernoulli's eq. between the top of the tank(open to theatomsphere)and the inlet to the pump(station3)\n", + "rho=865#density of benzene,kg/m**3\n", + "P3=101325-(z2+D_h)*(rho*g)#ptressure at point 3\n", + "print \"\\n pressure at point 3 P3=%.2f Pa\"%(P3)#\n", + "P_v=26200#vapor pressure of benzene,Pa\n", + "NPSH = (P3 - P_v)/(rho*g) + D_h\n", + "print \"\\n NPSH=%.2f m\"%(NPSH)\n", + "#the manufacturer NPSH is 8 m, which is greater than the calculated NPSH of 7.06m,therfore, the suction point of pump must be lowered \n", + "#calculation of new pressure\n", + "NPSH_m=8#NPSH by manufacturer\n", + "P3_n_ab=8*(rho*g)-D_h*(rho*g) + P_v\n", + "print \"\\n new pressure at point 3 P3_n_ab=%.2f Pa absolute\"%(P3_n_ab)#\n", + "P3_n_bz=-1.77#pressure in terms of benzene height,m\n", + "z3=-P3_n_bz -D_h#desired height of point 3\n", + "print \"\\n height z3=%.2f m\"%(z3)# " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22.11 Page no 308" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 22.11 page no 308\n", + "\n", + "\n", + "\n", + " reynolds no. R_e=427481.50\n", + "\n", + " frictional loss h_fp=109.93 ft.lbf/lb\n", + "\n", + " total frictional loss h_f_total=128.27 ft.lbf/lb\n", + "\n", + " W_dot_s=85.35 hp\n" + ] + } + ], + "source": [ + "print \"Example 22.11 page no 308\\n\\n\"\n", + "#a storage tank on top of a building pumps 60 deg F water through an open pipe to it from a reservoir \n", + "q=1.36#vol. flow rate ,ft**3/s\n", + "D=0.333#diameter of pipe,ft\n", + "S=pi/4*D**2#cross sectional area,ft**2\n", + "v2=q/S#flow velocity,ft/s\n", + "rho=62.37#density of water,lb/ft**3\n", + "meu=1.129*6.72e-4#viscosity of water\n", + "R_e=D*v2*rho/meu#reynolds no.\n", + "print \"\\n reynolds no. R_e=%.2f\"%(R_e )#\n", + "#from R_e we can conclude that flow is turbulent\n", + "k=0.0018#roughness factor\n", + "K_r=k/D#relative roughness\n", + "f=0.0046#friction factor\n", + "L=525#length of pipe,ft\n", + "g_c=32.174#grav. acc\n", + "h_fp=(4*f*L*v2**2)/(D*2*g_c)#frictional loss due to the length of pipe\n", + "print \"\\n frictional loss h_fp=%.2f ft.lbf/lb\"%(h_fp)#\n", + "#friction due to the fitings from table 18.1\n", + "K_ff_gate=2*0.11#loss coeff. due to gates\n", + "K_ff_elbows=5*0.64#loss coeff. due to elbows\n", + "#friction due to the sudden contraction is obtained from eq. 18.10 .\n", + "#note that D1/D2=0,since the upstream diameter is singnificantly larger than the downward diameter \n", + "K_c=0.42#coeff. of sudden contraction\n", + "K_e=1#coeff. of sudden expansion\n", + "K_s=K_ff_gate +K_ff_elbows +K_e +K_c#sum of loss coeff.\n", + "h_f=K_s*v2**2/(2*g_c)#friction losses due to fitting,expansion,contraction\n", + "h_f_total=h_fp + h_f#total frictional losses\n", + "print \"\\n total frictional loss h_f_total=%.2f ft.lbf/lb\"%(h_f_total)#\n", + "v1=0\n", + "P_drop=0#pressure drop\n", + "z1=0#reservoir water level\n", + "z2=200#height of reservoir\n", + "W_s=(v2**2-v1**2)/(2*g_c) + (z2-z1) + h_f_total#power requirement\n", + "m_dot=q*rho#mass flow rate,lb/s\n", + "neta=0.6#efficiency of pump\n", + "W_dot_s=m_dot*W_s/(550*neta)#actual horsepower requirement\n", + "print \"\\n W_dot_s=%.2f hp\"%(W_dot_s)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22.12 Page no 311" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 22.12 page no 311\n", + "\n", + "\n", + "\n", + " frictional loss h_f =224.91 ft.lbf/lb\n", + "\n", + " q=0.34 ft**3/s \n", + "\n", + " brake horse power bhp=18.11 hp\n" + ] + } + ], + "source": [ + "print \"Example 22.12 page no 311\\n\\n\"\n", + "#turpentine is being moved from a large storage tank to a blender through a 700 ft pipeline\n", + "rho=62.4#density\n", + "SG=0.872#specific gravity of terpentine\n", + "rho_t=SG*rho#density of turpentine\n", + "v=12.67#av. velocity of the turpentine in the line,ft/s\n", + "z1=20#height of top surface in the storage tank above floor level,ft\n", + "z2=90#height of discharge end of pipe,ft\n", + "neta=0.74#efficiency of pump\n", + "W_s=401.9#average energy delivered by pump,ft/lbf/lb\n", + "g_c=32.174#grav.acc\n", + "L=700#length of pipeline\n", + "#from bernoulli eq.\n", + "h_f= neta*W_s - v**2/(2*g_c) - (z2-z1)#frictional loss if there is no pressure drop\n", + "print \"\\n frictional loss h_f =%.2f ft.lbf/lb\"%(h_f)# \n", + "k_c=0.4#coeff. of contraction\n", + "k_e=0.9#coeff. of expansion\n", + "k_f=0.2#coeff. of bends and valve\n", + "#making equation(1) from the friction coeff. due to fittings between f and D,f=0.0293*D \n", + "#making another equation(2) from Reynolds number in terms D ,R_e=582250*D\n", + "#from trial and error method we get D\n", + "D=0.184#diameter\n", + "S=pi*D**2/4#cross sectional area\n", + "S=0.0266\n", + "q=v*S#volumetric flow rate \n", + "print \"\\n q=%.2f ft**3/s \"%(q)#\n", + "m_dot=rho_t*q#mass flow rate\n", + "bhp =m_dot*W_s/(550*neta)#brake horse power\n", + "print \"\\n brake horse power bhp=%.2f hp\"%(bhp)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22.13 Page no 313" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 22.13 page no 313\n", + "\n", + "\n", + "\n", + " R_e reynolds no=589.08 \n", + "\n", + " Pressure gradient P_grad=0.00 Pa/m\n", + "\n", + " fanning friction factor f=0.03 \n", + "\n", + " darcy friction factor f_d=0.11 \n", + "\n", + " friction loss h_f=0.04 m\n", + "\n", + " friction power loss W_f=0.00 W\n" + ] + } + ], + "source": [ + "print \"Example 22.13 page no 313\\n\\n\"\n", + "#hydrogen flows through a horizontal pipe\n", + "#properties of hydrogen at 20 deg C from table A.3 in the appendix\n", + "rho=0.0838#density of hydrogen,kg/m**3\n", + "meu=9.05e-6#viscosity,kg/m.s\n", + "D=0.08#diameter of pipe,m\n", + "L=1#unit length of pipe,m\n", + "q=0.0004#vol. flow rate ,m**3/s\n", + "S=.000503#cross sectional area\n", + "v=q/S#flow velocity,m/s\n", + "m_dot=rho*q#mass flow rate,kg/s\n", + "R_e=(D*v*rho/meu)#reynolds no.\n", + "print \"\\n R_e reynolds no=%.2f \"%(R_e)#\n", + "#since R_e is 593<2100, flow is laminar\n", + "#since the tube is horizontal z1=z2,calculation of pressure gradient(P/L)\n", + "P_grad= 128*meu*q/(pi*D**4)#pressure gradient\n", + "print \"\\n Pressure gradient P_grad=%.2f Pa/m\"%(P_grad)\n", + "v_max=2*v#m/s\n", + "#calculation of fanning friction factor\n", + "#since the flow is laminar \n", + "f=16/R_e#fanning friction factor\n", + "print \"\\n fanning friction factor f=%.2f \"%(f)#\n", + "f_d=4*f#darcy friction factor\n", + "print \"\\n darcy friction factor f_d=%.2f \"%(f_d)#\n", + "g=9.807#grav. acc.\n", + "h_f=f_d*(L/D)*(v**2/(2*g))#friction loss\n", + "print \"\\n friction loss h_f=%.2f m\"%(h_f)#\n", + "W_f = m_dot*g*h_f#friction power loss\n", + "print \"\\n friction power loss W_f=%.2f W\"%(W_f)# " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22.14 Page no 315" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 22.14 page no 315\n", + "\n", + "\n", + "\n", + " reynolds no R_e=4447617.59 \n", + "\n", + " ideal shaft work W_s_id=29304.00 W \n", + "\n", + " actual shaft work W_s_ac=36630.00 W\n", + "\n", + " f_inc=133.33 \n" + ] + } + ], + "source": [ + "print \"Example 22.14 page no 315\\n\\n\"\n", + "#gasoline is pump through a horizontal cast iron pipe\n", + "L=30#length of pipe\n", + "D=0.2#diameter of pipe,m\n", + "S=(pi/4)*D**2#cross sectional area\n", + "q=0.3#vol. flow rate ,m**3/s\n", + "v=q/S#flow velocity,m/s\n", + "rho=680#density of gasoline,kg/m**3\n", + "meu=2.92e-4#viscosity of gasoline,kg/m.s\n", + "R_e=D*v*rho/meu#reynolds no.\n", + "print \"\\n reynolds no R_e=%.2f \"%(R_e)#\n", + "#since R_e is >4000 flow is turbulent\n", + "k=0.00026#roughness factor from table 14.1 for cast iron,m\n", + "K_r=k/D#relative roughness\n", + "f=0.00525#fanning friction factor from fig 14.2\n", + "#Note that the flow corresponds to complete turbulence in the rough pipe\n", + "g=9.807#gravitational acceleration\n", + "#h_f=4*f*(L/D)*(v**2/(2*g))#head loss\n", + "h_f=14.647\n", + "#applying bernoulli equation to the fluid in the pipe\n", + "#in this case the pipe is horizontal (z1=z2) with constant diameter (v1=v2) and no shaft head (h_s=0)\n", + "#first convert the friction head to a pressure difference\n", + "P_diff=rho*g*h_f#pressure difference \n", + "P_diff= 97.68*10**3#after round off\n", + "W_s_id=q*P_diff#ideal shaft work\n", + "print \"\\n ideal shaft work W_s_id=%.2f W \"%(W_s_id)#\n", + "neta=0.8#efficiency of pump\n", + "W_s_ac=W_s_id/neta#actual shaft work \n", + "print \"\\n actual shaft work W_s_ac=%.2f W\"%(W_s_ac)#\n", + "f_s=0.009#friction factor smooth\n", + "f_r=0.021#friction factor roughnes\n", + "k=f_r/f_s\n", + "f_inc=100*(k-1)#percentage increment in f due to roughness \n", + "print \"\\n f_inc=%.2f \"%(f_inc)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22.15 Page no 316" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 22.15 page no 316\n", + "\n", + "\n", + "\n", + " flow velocity v=0.06 m/s\n", + "\n", + " reynolds no R_e=156991.90 \n", + "\n", + " pressure drop P_drop=1.35 Pa\n", + "\n", + " friction power loss W_dot_f=0.34 W\n" + ] + } + ], + "source": [ + "print \"\\n Example 22.15 page no 316\\n\\n\"\n", + "#liquid benzene flows through a smooth horizontal iron pipe \n", + "D=2.3#diameter of pipe,m\n", + "L=146.304#length of pipe,m\n", + "S=(pi/4)*D**2#cross sectional area,m**2\n", + "q=4000#vol. flow rate,gal/min\n", + "v=q/(S*264.17*60)#flow velocity\n", + "print \"\\n flow velocity v=%.2f m/s\"%(v)#\n", + "rho=899#density of benzene\n", + "meu=0.0008#viscosity of benzene,kg/m.s\n", + "R_e = D*v*rho/meu#reynolds no\n", + "print \"\\n reynolds no R_e=%.2f \"%(R_e)#\n", + "#since the reynolds number falls in the turbulent regime,determine the fanning friction factor from fig. 14.2\n", + "f=0.0032#fanning friction factor\n", + "# calculation of pressure drop with the assumption of no height and velocity change , and no pump work \n", + "#since only frictional losses are to be considered\n", + "#applying eq. 14.3\n", + "P_drop = 4*f*(L/D)*(v**2/2)*rho#pressure drop\n", + "print \"\\n pressure drop P_drop=%.2f Pa\"%(P_drop)#\n", + "W_dot_f=q*P_drop/(264.17*60)#friction power loss\n", + "print \"\\n friction power loss W_dot_f=%.2f W\"%(W_dot_f)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22.16 Page no 317" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 22.16 page no 317\n", + "\n", + "\n", + "\n", + " work extracted from the system W_s=563.54 Btu/lb \n", + "\n", + " W_dot_s =253592134.06 Btu/h\n", + "\n", + " power generated W_hp=99585.63 hp\n" + ] + } + ], + "source": [ + "print \"\\n Example 22.16 page no 317\\n\\n\"\n", + "#a power plant employs steam to generate power \n", + "#adiabatic conditions\n", + "z1=0#steam vertical position at inlet,ft\n", + "z2=-20#steam vertical position at outlet,ft\n", + "v1=120#steam velocity at inlet,ft/s\n", + "v2=330#steam velocity at outlet,ft/s\n", + "H1=1505.4#steam enthalpy at inlet \n", + "H2=940#steam enthalpy at outlet\n", + "Q=0#for adiabatic conditions\n", + "g_c=32.174#grav .acc\n", + "#applying energy equation\n", + "W_s=-(z2/778) - v2**2/(2*g_c*778) - H2 +z1 + v1**2/(2*g_c*778) + H1#work extracted from system\n", + "print \"\\n work extracted from the system W_s=%.2f Btu/lb \"%(W_s)#\n", + "m_dot=450000#mass flow rate ,lb/h\n", + "W_dot_s=m_dot*W_s#total power generated by the turbine \n", + "print \"\\n W_dot_s =%.2f Btu/h\"%(W_dot_s)##approx calculation in book \n", + "W_hp=W_dot_s*3.927e-4#power generated in horsepower hp\n", + "print \"\\n power generated W_hp=%.2f hp\"%(W_hp)##approx calculation in book" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-23.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-23.ipynb new file mode 100644 index 00000000..87b065ec --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-23.ipynb @@ -0,0 +1,506 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 23 : Particle Dynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23.1 Page no 323" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 23.1 Page no 323\n", + "\n", + "\n", + "\n", + " d_pa1=1.98 micron\n", + "d_pa2=2.00 micron\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "from __future__ import division\n", + "print \"Example 23.1 Page no 323\\n\\n\"\n", + "#calculation of aerodynamic diameter for the following particles\n", + "d_es=1.4#equivalent dia of solid sphere,micrometer\n", + "sg_s=2#specific gravity of solid sphere\n", + "d_eh=2.8#equivalent diameter of hollow sphere, mirometer\n", + "sg_h=0.51#specific gravity of hollow sphere\n", + "d_pa1=d_es*sqrt(sg_s)#aerodynamic dia for solid sphere\n", + "d_pa2=round(d_eh*sqrt(sg_h))#aerodynamic dia for hollow sphere\n", + "print \"\\n d_pa1=%0.2f micron\\nd_pa2=%0.2f micron\"%(d_pa1,d_pa2)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23.2 Page no 323 " + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 23.2 Page no 323\n", + "\n", + "\n", + "\n", + " aerodynamic diameter d_pa=1.99 micron\n" + ] + } + ], + "source": [ + "print \"Example 23.2 Page no 323\\n\\n\"\n", + "#calculation of aerodynamic diameter of irregular saped sphere\n", + "d_e=1.3#eq. diameter,micron\n", + "sg=2.35\n", + "d_pa=d_e*sqrt(sg)#aerodynamic diameter\n", + "print \"\\n aerodynamic diameter d_pa=%0.2f micron\"%(d_pa)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23.3 Page no 335" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 23.3 Page no 335\n", + "\n", + "\n", + "CCF C=1.41 \n" + ] + } + ], + "source": [ + "from math import exp\n", + "print \"Example 23.3 Page no 335\\n\\n\"\n", + "#calculation of cunningham correction factor \n", + "dp=0.4#particle diameter\n", + "lemda=6.53e-2\n", + "A=1.257 + 0.40*exp(-1.10*dp/(2*lemda))\n", + "C= 1 + 2*A*lemda/dp#cunningham correction factor(CCF)\n", + "print \"CCF C=%0.2f \"%(C)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23.4 Page no 336" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 23.4 Page no 336\n", + "\n", + "\n", + "\n", + " dimensionless constant K1=0.01 \n", + " K2=1.44 \n", + " K3=14.42 \n", + "\n", + " terminal settling velocity for particle 1 v1=0.00 ft/s\n", + "\n", + " terminal settling velocity v2=0.31 ft/s\n", + "\n", + " terminal settling velocity v3=8.90 ft/s \n", + "\n", + " distance by 2 particle x2=9.44 ft\n", + " distance by 3 particle x3=266.88 ft\n", + "\n", + " distance travel by 1 particle x1=0.00 ft\n" + ] + } + ], + "source": [ + "print \"Example 23.4 Page no 336\\n\\n\"\n", + "#three different diameter sized fly ash particls settle through air \n", + "#we have to calculate the particle terminal velocity and determine how far each will fall in 30 seconds \n", + "#assume the particles are speherical \n", + "SG=2.31#specific gravity of fly ash\n", + "rho_w=62.4#density of water \n", + "rho_p=SG*rho_w#density of particles\n", + "#properties of air\n", + "R=0.7302#gas constant\n", + "T=698#temperature,R\n", + "P=1#pressure ,atm\n", + "Mw=29#mol. wt of air\n", + "rho_a=P*Mw/(R*T)#density of air,lb/ft**3\n", + "meu=1.41e-5#viscosity of air,lb/ft.s\n", + "g=32.174#grav. acc\n", + "D1=0.4#diameter of particle 1,microns\n", + "D2=40#diameter of particle 2,microns\n", + "D3=400#diameter of particle 3,microns\n", + "K1=(D1/(25400*12))*(g*rho_p*rho_a/(meu**2))**(1/3)#dimensionless constant for particle 1\n", + "K2=(D2/(25400*12))*(g*rho_p*rho_a/(meu**2))**(1/3)#dimensionless constant for particle 2\n", + "K3=(D3/(25400*12))*(g*rho_p*rho_a/(meu**2))**(1/3)#dimensionless constant for particle 3\n", + "print \"\\n dimensionless constant K1=%0.2f \\n K2=%0.2f \\n K3=%0.2f \"%(K1,K2,K3)#\n", + "#first we determine which fluid particle dynamic law applies for the above values of K\n", + "#for particle 1,strokes law applies\n", + "#for particle 2,strokes law applies\n", + "#for particle 3,intermediate law applies\n", + "#terminal settling velocity for each particle\n", + "v1=(D1/(25400*12))**2*g*rho_p/(18*meu)\n", + "print \"\\n terminal settling velocity for particle 1 v1=%0.2f ft/s\"%(v1)#\n", + "v2=(D2/(25400*12))**2*g*rho_p/(18*meu)\n", + "print \"\\n terminal settling velocity v2=%0.2f ft/s\"%(v2)#\n", + "v3=(D3/(25400*12))**1.14*0.153*g**0.71*rho_p**0.71/(rho_a**0.29*meu**0.43)\n", + "print \"\\n terminal settling velocity v3=%0.2f ft/s \"%(v3)#\n", + "#calculation of how far x,the fly ash particles will fall in 30 seconds\n", + "t=30#time,sec\n", + "x2=v2*t#distance travel by 2 particle\n", + "x3=v3*t#distance travel by 3 particle\n", + "print \"\\n distance by 2 particle x2=%0.2f ft\\n distance by 3 particle x3=%0.2f ft\"%(x2,x3)#\n", + "#for 1 particle K1 and v1 value are without the CCF.With the correction factor lemda=6.53e-8,gives\n", + "lemda=6.53e-8#correction factor\n", + "y=-1.10*(D1/(25400*12))/(2*lemda)\n", + "A =1.257 + 0.40*exp(y)\n", + "C=1 + 2*A*lemda/(D1/(25400*12))#cunningham correction factor(ccf)\n", + "#now equation 23.36 can be employed \n", + "v1_corrected=v1*C#corrected velocity of 1 particle\n", + "x1=v1_corrected*t#distance travel by 1 particle\n", + "print \"\\n distance travel by 1 particle x1=%0.2f ft\"%(x1)# " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23.5 Page no 338" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 23.5 Page no 338\n", + "\n", + "\n", + "\n", + " dimensionless constant W=0.13 \n", + "\n", + " diameter of particle D_p=2.75e-04 ft\n" + ] + } + ], + "source": [ + "print \"\\n Example 23.5 Page no 338\\n\\n\"\n", + "#refer to example 23.5\n", + "#we have to calculate size of a flyash particle that will settle with a velocity of 1.384 ft/s\n", + "SG=2.31#specific gravity of fly ash\n", + "rho_w=62.4#density of water \n", + "rho_p=SG*rho_w#density of particles\n", + "#properties of air\n", + "R=0.7302#gas constant\n", + "T=698#temperature,R\n", + "P=1#pressure ,atm\n", + "Mw=29#mol. wt of air\n", + "rho_a=P*Mw/(R*T)#density of air,lb/ft**3\n", + "meu=1.41e-5#viscosity of air,lb/ft.s\n", + "g=32.174#grav. acc\n", + "v=1.384#velocity at which particle settle down,ft/s\n", + "W= v**3*rho_a**2/(g*rho_p*meu)#dimensionless constant\n", + "print \"\\n dimensionless constant W=%0.2f \"%(W)#\n", + "#since W < 0.2222 stokes' law applies\n", + "D_p=sqrt(18*meu*v/(g*rho_p))#diameter of particle\n", + "print \"\\n diameter of particle D_p=%0.2e ft\"%(D_p)#\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23.7 Page no 340" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 23.7 Page no 340\n", + "\n", + "\n", + "\n", + " dimensionless constant K_l=2.73e+02 \n", + "\n", + " settling velocity v_l=11.85 ft/s\n", + "\n", + " descent time t_l=33.74 second\n", + " horizontal distance L=989.79 ft\n", + "\n", + " dimensionless constant K_s=6.57e-02 \n", + "\n", + " settling velocity v_s=3.59e-04 ft/s\n", + "\n", + " descent time t_s=1114285.36 s\n", + "horizontal distance travelled by smallest particle L_s=3.27e+07 ft\n", + "\n", + " actual volume V_act=4006.41 ft**3\n", + "bulk volume V_b=8012.82 \n", + "\n", + " L_d=3.27e+07 \n", + "\n", + " deposition height H_d=2.45e-06 ft\n" + ] + } + ], + "source": [ + "print \"\\n Example 23.7 Page no 340\\n\\n\"\n", + "# In a plant manufacturing ivory soap detergent explodes one windy day\n", + "#we have to calculate the distance from the plant where the soap particles will start to deposit and where they will cease to deposit\n", + "#the smallest particle wll travel the greatest distance while the largest will travel the least distance \n", + "#for the minimumdistance ,we use largest particle \n", + "D_l=3.28e-3#largest diameter,ft\n", + "g=32.174#grav. acc.\n", + "SG=0.8#specific gravity of soap particle\n", + "rho_w=62.4\n", + "rho_p=SG*rho_w#density of particle\n", + "rho_a=0.0752#density of given atmosphere,lb/ft**3\n", + "meu=1.18e-5#viscosity \n", + "K_l = D_l*(g*(rho_p-rho_a)*rho_p/(meu**2))**(1/3)#dimensionless constant\n", + "print \"\\n dimensionless constant K_l=%0.2e \"%(K_l)#\n", + "#value of K indicates the intermediate range applies \n", + "#the settling velocity is given by \n", + "v_l=0.153*g**0.71*D_l**1.14*rho_p**0.71/(meu**0.43*rho_a**0.29)\n", + "print \"\\n settling velocity v_l=%0.2f ft/s\"%(v_l)#\n", + "H=400#vertical height blowen by particle,ft\n", + "t_l=H/v_l#descent time\n", + "v_w=20#wind velocity in miles/h\n", + "L=t_l*v_w*(5280/3600)#horizontal distance travelled by particles\n", + "print \"\\n descent time t_l=%0.2f second\\n horizontal distance L=%0.2f ft\"%(t_l,L)#\n", + "#for the minimum distance we use smallest particle\n", + "D_s=6.89e-6#diameter of smallest particle,ft\n", + "K_s=D_s*(g*(rho_p-rho_a)*rho_a/(meu**2))**(1/3)\n", + "print \"\\n dimensionless constant K_s=%0.2e \"%(K_s)#\n", + "#velocity is in the stokes regime and is given by\n", + "v_s=g*D_s**2*rho_p/(18*meu)\n", + "print \"\\n settling velocity v_s=%0.2e ft/s\"%(v_s)#\n", + "t_s=H/v_s#descent time \n", + "L_s=t_s*v_w*(5280/3600)#horizontal distance travelled \n", + "print \"\\n descent time t_s=%0.2f s\\nhorizontal distance travelled by smallest particle L_s=%0.2e ft\"%(t_s,L_s)#\n", + "m=100*2000#mass of particles\n", + "V_act=m/rho_p#actual volume of particles\n", + "e=0.5#void fraction\n", + "V_b=V_act/e#bulk volume\n", + "print \"\\n actual volume V_act=%0.2f ft**3\\nbulk volume V_b=%0.2f \"%(V_act,V_b)#\n", + "L_d=L_s-L#length of drop area\n", + "print \"\\n L_d=%0.2e \"%(L_d)#\n", + "W=100#width ,ft\n", + "A_d=L_d*W#deposition area\n", + "H_d=V_b/A_d#deposition height\n", + "print \"\\n deposition height H_d=%0.2e ft\"%(H_d)#\n", + "#deposition height can be ,at bestt, described asa sprinkling " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23.8 Page no 342" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 23.8 Page no 342\n", + "\n", + "\n", + "\n", + " density of particle rho_p=2897.19 kg/m**3\n", + "\n", + " reynolds no R_e=0.27 \n", + "\n", + " K=1.70 \n", + "\n", + " drag coeff C_d=88.38 \n", + "\n", + " drag force F_d=0.00 N\n", + "\n", + " buoyancy force F_b=0.00 N\n", + "\n", + " k_w settling factor =158.99 \n", + "\n", + " terminal velocity in water v_t_w=0.58 m/s\n" + ] + } + ], + "source": [ + "from math import pi\n", + "print \"Example 23.8 Page no 342\\n\\n\"\n", + "#a small sphere is observed to fall through caster oil \n", + "v_t=0.042#terminal velocity of particle \n", + "meu_f=0.9#viscosity of oil\n", + "rho_f=970#density of oil\n", + "g=9.807#grav. acc.\n", + "D_p=0.006#diameter of particle\n", + "rho_p=(18*meu_f*v_t)/(g*D_p**2) + rho_f\n", + "print \"\\n density of particle rho_p=%0.2f kg/m**3\"%(rho_p)#\n", + "neu_f=9.28e-4#dynamic viscosity of fluid\n", + "R_e=D_p*v_t/neu_f#reynolds no\n", + "print \"\\n reynolds no R_e=%0.2f \"%(R_e)#\n", + "#since R_e < 0.3\n", + "#calculation of the settling criterion factor ,K\n", + "K=D_p*(g*rho_f*(rho_p-rho_f)/(meu_f**2))**(1/3)#the settling criterion factor\n", + "print \"\\n K=%0.2f \"%(K)#\n", + "#since K <3.3, stokes law applies \n", + "#the drag coeff. C_d \n", + "C_d=24/R_e\n", + "print \"\\n drag coeff C_d=%0.2f \"%(C_d)#\n", + "F_d=3*pi*meu_f*D_p*v_t#drag force\n", + "print \"\\n drag force F_d=%0.2f N\"%(F_d)#\n", + "F_b=(pi/6)*D_p**3*rho_f*g#buoyancy force \n", + "print \"\\n buoyancy force F_b=%0.2f N\"%(F_b)#\n", + "#Consider the case when same sphere is dropped in water \n", + "rho_w=1000#density of water,kg/m**3\n", + "meu_w=0.001#viscosity of water,kg/m.s\n", + "#the particle will move faster because of the lower viscosity of water ,stokes law will almost definietly not apply\n", + "K_w=D_p*(g*rho_w*(rho_p-rho_w)/(meu_w**2))**(1/3)#the settling criterion factor\n", + "print \"\\n k_w settling factor =%0.2f \"%(K_w)#\n", + "#since K_w = 158 > 43.6,the flow is in the Newton's law regime \n", + "#employ eq. 23.31 but include the (buoyant) density ratio factor\n", + "v_t_w=1.75*sqrt((rho_p-rho_w)/(rho_w)*g*D_p)#terminal velocity \n", + "print \"\\n terminal velocity in water v_t_w=%0.2f m/s\"%(v_t_w)# " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23.9 Page no 344" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 23.9 Page no 344\n", + "\n", + "\n", + "Reynolds no R_e=2.40e+08 \n", + "\n", + "coeff. discharge C_d=1.97e-03 \n", + "\n", + " drag force F_d=1.42e+04 N\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"Example 23.9 Page no 344\\n\\n\"\n", + "#the bottom of a ship,moving in water\n", + "rho=1000#density of water\n", + "v=12#velocity of boat,m/s\n", + "L=20#length,m\n", + "W=5#width ,m\n", + "meu=1e-3#viscosity\n", + "R_e=rho*v*L/meu#reynolds no\n", + "print \"Reynolds no R_e=%0.2e \"%(R_e)#\n", + "#from reynolds no flow is turbulent\n", + "C_d=0.031/(R_e**(1/7))#coeff. discharge\\\n", + "print \"\\ncoeff. discharge C_d=%0.2e \"%(C_d)#\n", + "#calculation of the drag on area LW\n", + "F_d=(1/2)*C_d*rho*v**2*L*W#drag force\n", + "print \"\\n drag force F_d=%0.2e N\"%(F_d)# " + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-24.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-24.ipynb new file mode 100644 index 00000000..33813984 --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-24.ipynb @@ -0,0 +1,557 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 24 : Sedimentation Centrifugation and Flotation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 24.1 Page no 350" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 24.1 page no 350\n", + "\n", + "\n", + "\n", + " volume fraction fluid particles v_frac_f =0.62 \n", + "\n", + " volume fraction for the glass particles v_frac_p=0.38 \n", + "\n", + " bulk density of slurry rho_m=1553.00 kg/m**3 \n", + "\n", + " terminal velocity v_t=0.00 m/s\n", + "\n", + " effective mixture viscosity meu_m=0.00 kg/m.s\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"Example 24.1 page no 350\\n\\n\"\n", + "#glass sphere are settling in water at 20 deg C\n", + "#the slurry contains 60 wt% solids \n", + "# start by assuming a basis of 100 kg of slurry\n", + "m_f=40#mass of fluid,kg\n", + "rho_f=998#density of water,kg/m**3\n", + "V_f=m_f/rho_f#volume of the fluid,m**3\n", + "m_s=60#mass of solid,kg\n", + "rho_p=2467#density of glass,kg/m**3\n", + "V_s=m_s/rho_p#volume of glass,m**3\n", + "V = V_f + V_s#total volume,m**3\n", + "v_frac_f = V_f/V#volume fraction for the fluid particles\n", + "print \"\\n volume fraction fluid particles v_frac_f =%0.2f \"%(v_frac_f)#\n", + "v_frac_p=1-v_frac_f#volume fraction for the glass particles\n", + "print \"\\n volume fraction for the glass particles v_frac_p=%0.2f \"%(v_frac_p)#\n", + "rho_m=round(v_frac_f*rho_f + v_frac_p*rho_p)#bulk density of slurry\n", + "print \"\\n bulk density of slurry rho_m=%0.2f kg/m**3 \"%(rho_m)#\n", + "b=10**(1.82*(1-v_frac_f))#dimensionless correction factor\n", + "g=9.807#gravitational acc.,m/s**2\n", + "D_p=0.0001554#diameter of particle,m\n", + "meu_f=0.001#viscosity of fluid\n", + "v_t = g*D_p**2*(rho_p-rho_f)*v_frac_f**2/(18*meu_f*b)#terminal velocity\n", + "print \"\\n terminal velocity v_t=%0.2f m/s\"%(v_t)#\n", + "meu_m = meu_f*b#effective mixture viscosity\n", + "print \"\\n effective mixture viscosity meu_m=%0.2f kg/m.s\"%(meu_m)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 24.2 Page no 352" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 24.2 page no 352\n", + "\n", + "\n", + "\n", + " volume fraction fluid particles v_frac_f =0.62 \n", + "\n", + " volume fraction for the glass particles v_frac_p=0.38 \n", + "\n", + " bulk density of slurry rho_m=1553.00 kg/m**3 \n", + "\n", + " terminal velocity v_t=0.00 m/s\n", + "\n", + " effective mixture viscosity meu_m=0.00 kg/m.s\n", + "\n", + " reynolds no R_e=0.12 \n" + ] + } + ], + "source": [ + "print \"Example 24.2 page no 352\\n\\n\"\n", + "#refer to example 24.1\n", + "m_f=40#mass of fluid,kg\n", + "rho_f=998#density of water,kg/m**3\n", + "V_f=m_f/rho_f#volume of the fluid,m**3\n", + "m_s=60#mass of solid,kg\n", + "rho_p=2467#density of glass,kg/m**3\n", + "V_s=m_s/rho_p#volume of glass,m**3\n", + "V = V_f + V_s#total volume,m**3\n", + "v_frac_f = V_f/V#volume fraction for the fluid particles\n", + "print \"\\n volume fraction fluid particles v_frac_f =%0.2f \"%(v_frac_f)#\n", + "v_frac_p=1-v_frac_f#volume fraction for the glass particles\n", + "print \"\\n volume fraction for the glass particles v_frac_p=%0.2f \"%(v_frac_p)#\n", + "rho_m=round(v_frac_f*rho_f + v_frac_p*rho_p)#bulk density of slurry\n", + "print \"\\n bulk density of slurry rho_m=%0.2f kg/m**3 \"%(rho_m)#\n", + "b=10**(1.82*(1-v_frac_f))#dimensionless correction factor\n", + "g=9.807#gravitational acc.,m/s**2\n", + "D_p=0.0001554#diameter of particle,m\n", + "meu_f=0.001#viscosity of fluid\n", + "v_t = g*D_p**2*(rho_p-rho_f)*v_frac_f**2/(18*meu_f*b)#terminal velocity\n", + "print \"\\n terminal velocity v_t=%0.2f m/s\"%(v_t)#\n", + "meu_m = meu_f*b#effective mixture viscosity\n", + "print \"\\n effective mixture viscosity meu_m=%0.2f kg/m.s\"%(meu_m)#\n", + "R_e=rho_m*v_t*D_p/(meu_m*v_frac_f)#reynolds no.\n", + "print \"\\n reynolds no R_e=%0.2f \"%(R_e)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 24.3 Page no 352" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 24.3 page no 352\n", + "\n", + "\n", + "\n", + " settling factor K1=11.26 \n", + "\n", + " particle diameter= D_p=2.18e-03 ft \n", + "\n", + " final settling factor K_n=28.30\n" + ] + } + ], + "source": [ + "print \"Example 24.3 page no 352\\n\\n\"\n", + "#classification of small speherical particles of charcoal with a specific gravity of 2.2\n", + "#the particles are falling in a vertical tower against a rising current of air\n", + "#we have to calculate the minimum size of charcoal that will settle down to the bottom of the tower\n", + "rho =0.075#density of air,lb/ft**3\n", + "meu=1.23e-5#viscosity of air,lb/ft.s\n", + "#assume stokes law to apply\n", + "SG=2.2#specific gravity of charcoal\n", + "rho_w=62.4#density of water \n", + "rho_p=SG*rho_w#density of charcoal\n", + "v=15#velocity of air\n", + "g=32.2#grav. acc\n", + "D_p1=(18*meu*v/(g*rho_p))**0.5\n", + "K1 = D_p1*(g*rho*rho_p/meu**2)**(1/3)#settling factor\n", + "print \"\\n settling factor K1=%0.2f \"%(K1)#\n", + "#from value of K,stokes law does not apply\n", + "#therefore,assume Intermediate range law applies\n", + "D_p =((v*rho**0.29*meu**0.43)/(0.153*(g*rho_p)**0.71))**(1/1.14)\n", + "print \"\\n particle diameter= D_p=%0.2e ft \"%(D_p)#\n", + "K_n=(D_p/D_p1)*K1\n", + "print \"\\n final settling factor K_n=%0.2f\"%(K_n)\n", + "#since the result is correct for the intermediate range" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exmple 24.4 Page no 354" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 24.4 page no 354\n", + "\n", + "\n", + "\n", + " G=7.00 \n" + ] + } + ], + "source": [ + "print \"Example 24.4 page no 354\\n\\n\"\n", + "#a particle is spining in a 3 inch ID centrifuge \n", + "r=3/12#radius of centrifuge,ft\n", + "omega=30#rotational speed,rad/s\n", + "g=32.2\n", + "G=round(r*omega**2/g)\n", + "print \"\\n G=%0.2f \"%(G)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 24.5 Page no 357" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 24.5 page no 357\n", + "\n", + "\n", + "\n", + " omega =26.20 rad/s\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "print \"Example 24.5 page no 357\\n\\n\"\n", + "#a circular cylinder filled with water is rotated a uniform ,steady angular speed about it's central axis in rigid body motion\n", + "#since the cylinder is full the water will spill the moment the cylinder starts to spin ,spilling occur when omega > 0 rpm\n", + "# to determine the angular speed for 1/3 of the water to spill , consider the cylinder at rest when 1/3 of the water has already beem spilled\n", + "g=32.174#grav. acc\n", + "R = 0.25 #radius of cylinder\n", + "z_st=2/3#the stationary height, ft\n", + "h = 2*(1-z_st)#increase in height is h/2,ft\n", + "omega=sqrt(4*g*(h/2)/R**2) \n", + "print \"\\n omega =%0.2f rad/s\"%(omega)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 26.6 Page no 392 " + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 26.6 page no 392\n", + "\n", + "\n", + "\n", + "pressure drop P_drop=583.84 psf\n" + ] + } + ], + "source": [ + "print \"Example 26.6 page no 392\\n\\n\"\n", + "#a bed of pulverized is to be fluidized with liquid oil\n", + "D=4#diameter of bed ,ft\n", + "d_p=0.00137#particle diameter ,ft \n", + "rho_s=84#coal particle density ,lb/ft**3\n", + "rho_f=55#oil density,lb/ft**3\n", + "e_mf=0.38#void fraction\n", + "L_mf=8#bed height at minimum fluidization,ft\n", + "P_drop=(rho_s-rho_f)*(1-e_mf)*L_mf +rho_f*L_mf \n", + "print \"\\npressure drop P_drop=%0.2f psf\"%(P_drop)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 24.7 Page no 358" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 24.7 page no 358\n", + "\n", + "\n", + "\n", + " pressure P_a=990.51 Pa_gauge\n", + " pressure P_b=990.51 Pa_gauge\n", + "\n", + " pressure P_c=396.20 Pa_gauge\n", + "\n", + " r=2.12cm \n", + "\n", + " thickness film t_f=0.88 m\n" + ] + } + ], + "source": [ + "print \"Example 24.7 page no 358\\n\\n\"\n", + "#a cylindrical cup open to the atmosphere is filled with liquid to a height of 7 cm\n", + "#rotated around it's axis\n", + "#calculation of an angular velocity that will cause the liquid to start spilling \n", + "h=0.03#height,m\n", + "R=0.03#radius,cm\n", + "#applying eq. 24.22\n", + "g=9.807#grav. acc\n", + "omega=sqrt(2*h*g/(R**2))\n", + "omega=36.2#printing mistake in book\n", + "#calculation of pressure at point A and B that is P_a and P_b\n", + "z=.1#liquid height above point A and B,m\n", + "rho=1010#density of liquid,kg/m**3\n", + "P_a = rho*g*z\n", + "P_b=P_a#from symmetry P_a = P_b\n", + "print \"\\n pressure P_a=%0.2f Pa_gauge\\n pressure P_b=%0.2f Pa_gauge\"%(P_a,P_b)#\n", + "z_c=0.04#liquid height above point c,m\n", + "P_c=rho*g*z_c#pressure at point c\n", + "print \"\\n pressure P_c=%0.2f Pa_gauge\"%(P_c)#\n", + "#to obtain the film thicknes,we have to find the original height \n", + "z_l=0.07#liquid height ,m\n", + "h_o=z_l-z_c#original height\n", + "r = 100*sqrt(2*h_o*g/(omega**2))#100 for centimeter\n", + "print \"\\n r=%0.2fcm \"%(r)#\n", + "R=3\n", + "t_f=R-r#thikness of film\n", + "print \"\\n thickness film t_f=%0.2f m\"%(t_f)##printing mistake in book" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 24.8 Page no 360" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 24.7 page no 358\n", + "\n", + "\n", + "\n", + " settling factor K_q=2.28 \n", + "\n", + " settling velocity (quartz) v_q=0.01 m/s\n", + "\n", + " settling factor K_g=1.60 \n", + "\n", + " setling velocity v_g=0.01 m/s\n", + "\n", + " water velocity v_w=0.01 m/s\n" + ] + } + ], + "source": [ + "print \"Example 24.7 page no 358\\n\\n\"\n", + "#It is desired to separate quartz particles from galena particles \n", + "SG_q = 2.65#specific gravity of quartz particle \n", + "SG_g=7.5#specific gravity of galena particles \n", + "rho_f=1000#density of water \n", + "rho_q=SG_q*rho_f#density of quartz paticles\n", + "rho_g=SG_g*rho_f#density of galena particle \n", + "#calculation of the settling veloctiy of the largest quartz particle with a diameter \n", + "D_q=9e-5#diameter of largest particle of quartz\n", + "g=9.807#grav. acc\n", + "meu_f=0.001#viscosity of water\n", + "K_q = D_q*(g*(rho_q-rho_f)*rho_f/(meu_f**2))**(1/3)#settling factor\n", + "print \"\\n settling factor K_q=%0.2f \"%(K_q)#\n", + "#since K =2.27<3.3,stokes flow regime applies ,from the equation 23.36\n", + "v_q=g*D_q**2*(rho_q-rho_f)/(18*meu_f)#settling velocity of thelargest quartz particle\n", + "print \"\\n settling velocity (quartz) v_q=%0.2f m/s\"%(v_q)#\n", + "#calculation of the settling velocity of the smallest galena partilce \n", + "d_g=4e-5#diameter of smallest galena particle\n", + "K_g = d_g*(g*(rho_g-rho_f)*rho_f/(meu_f**2))**(1/3)#settling factor\n", + "print \"\\n settling factor K_g=%0.2f \"%(K_g)#\n", + "#since K = 1.6<3.3,stokes flow regime again applies\n", + "v_g=g*d_g**2*(rho_g-rho_f)/(18*meu_f)#settling velocity for galena particles\n", + "print \"\\n setling velocity v_g=%0.2f m/s\"%(v_g)#\n", + "#to obtain pure galena the upward velociy of the water must be equal to or greater than the settling veloctiy of the quartz particle\n", + "v_w=v_q#velocity of water\n", + "print \"\\n water velocity v_w=%0.2f m/s\"%(v_w)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 24.9 Page no 361" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 24.9 page no 361\n", + "\n", + "\n", + "\n", + " diameter D =4.54e-05 m\n", + "\n", + " settling factor K=1.81 \n" + ] + } + ], + "source": [ + "print \"\\n Example 24.9 page no 361\\n\\n\"\n", + "#refer to illustrative example 24.8\n", + "#we have to determine the size range of the galena in the top product\n", + "#to determine the size range of the galena product ,calculate the galena particle size that has a settling velocity equal to water velocity \n", + "#assume stokes law applies\n", + "v_w=0.0073#velocity of water\n", + "v_q=v_w#velocity of quartz particles\n", + "SG_q = 2.65#specific gravity of quartz particle \n", + "SG_g=7.5#specific gravity of galena particles \n", + "rho_f=1000#density of water \n", + "rho_q=SG_q*rho_f#density of quartz paticles\n", + "rho_g=SG_g*rho_f#density of galena particle\n", + "g=9.807#grav. acc\n", + "meu_f=0.001#viscosity of water\n", + "D = sqrt(18*meu_f*v_q/(g*(rho_g-rho_f)))\n", + "print \"\\n diameter D =%0.2e m\"%(D)#\n", + "#check on the validity of stokes law by calculating the K factor \n", + "K = D*(g*(rho_g-rho_f)*rho_f/(meu_f**2))**(1/3)#settling factor\n", + "print \"\\n settling factor K=%0.2f \"%(K)#\n", + "#since K =1.82<3.3 , the flow is in the stokes law range " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 24.10 Page no 362" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 24.10 page no 362\n", + "\n", + "\n", + "\n", + "D_p_max=5.01e-04 \n", + "\n", + " settling factor K=5.58 \n" + ] + } + ], + "source": [ + "from math import pi\n", + "print \"Example 24.10 page no 362\\n\\n\"\n", + "#air is being dried by bubbling through concentrated NaOH\n", + "q=4/60#flow rate of air,ft**3/min\n", + "D=2.5/12#diameter of tube\n", + "S=(pi/4)*D**2#cross sectional area\n", + "v=q/S#velocity of air,ft/s\n", + "meu=1.23e-5#viscosity of NaOH\n", + "rho=0.0775#density of air\n", + "g=32.2#grav. acc.\n", + "SG=1.34#specific gravity of NaOH\n", + "rho_w=62.4#density of water\n", + "rho_p=SG*rho_w#density of NaOH\n", + "D_p_max = (v*(rho**0.29)*(meu**0.43)/(0.153*(g*rho_p)**0.71))**(1/1.14)#assuming that the intermediate range applies ,maximum diamter of particle\n", + "print \"\\nD_p_max=%0.2e \"%(D_p_max)#\n", + "#settling factor \n", + "K=D_p_max*(g*rho*rho_p/(meu**2))**(1/3)\n", + "print \"\\n settling factor K=%0.2f \"%(K)#\n", + "#tus result for D_p_max is correct" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-25.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-25.ipynb new file mode 100644 index 00000000..fee941ff --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-25.ipynb @@ -0,0 +1,298 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 25 : Porous Media and Packed Beds" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 25.1 Page no 370" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 25.1 page no 370\n", + "\n", + "\n", + "\n", + " effective partcle diameter D_p=5.50 mm \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"Example 25.1 page no 370\\n\\n\"\n", + "#calculation of efffective particle diameter for a set of packing\n", + "V=0.2#packing volume\n", + "n=100#no. of particle assume\n", + "V_p=V*1000/n#the volume of single particle,mm**2#\n", + "S_p=2.18#average surface area of particle,mm**2\n", + "a_p=S_p/V_p#specific surface area of particle ,(mm)**-1\n", + "D_p = 6/a_p#effective diameter of particle,mm\n", + "print \"\\n effective partcle diameter D_p=%.2f mm \"%(D_p)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 25.2 Page no 371" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 25.2 page no 371\n", + "\n", + "\n", + "\n", + " Reynolds no R_e=6463.00 \n" + ] + } + ], + "source": [ + "print \"Example 25.2 page no 371\\n\\n\"\n", + "#refer to example 25.1\n", + "V=0.2#packing volume\n", + "n=100#no. of particle assume\n", + "V_p=V*1000/n#the volume of single particle,mm**2#\n", + "S_p=2.18#average surface area of particle,mm**2\n", + "a_p=S_p/V_p#specific surface area of particle ,(mm)**-1\n", + "D_p = 6/a_p#effective diameter of particle,mm\n", + "D_p=5.50#round off value for accurate answer\n", + "rho=0.235#density of fluid,g/cm**3\n", + "meu=2e-4#viscosity,g/cm.s\n", + "v=10#interstitial velocity ,cm\n", + "R_e=round((D_p/v)*rho*v/meu)#reynolds no\n", + "print \"\\n Reynolds no R_e=%.2f \"%(R_e)#\n", + "#from R_e value we can conclude that the flow of fluid would be in the turbulent region" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 25.3 Page no 372" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 25.3 page no 372\n", + "\n", + "\n", + "\n", + " particle specific surface a_p =3.47 cm**-1 \n", + "\n", + " effective particle diameter d_p_e=1.73 cm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "print \"Example 25.3 page no 372\\n\\n\"\n", + "#air flows across a packed bed \n", + "d_p=1.5#diamter of cylinderical particles,cm\n", + "h=2.5#height ,cm\n", + "V_p=pi*d_p**2*h/(4)#volume of the cylinderical particles\n", + "S_p=pi*d_p*h + 2*(pi*d_p**2/4)#cylinderical particle surface area,cm**2\n", + "a_p=S_p/V_p#particle specific surface \n", + "print \"\\n particle specific surface a_p =%.2f cm**-1 \"%(a_p)#\n", + "d_p_e=6/a_p#effective particle diameter\n", + "print \"\\n effective particle diameter d_p_e=%.2f cm\"%(d_p_e)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 25.4 Page no 373" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Example 25.4 page no 373\n", + "\n", + "\n", + "\n", + " specific particle surface area a_p=8.00 in**-1\n", + "\n", + " effective particle diameter d_p_e=0.75 in\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"\\nExample 25.4 page no 373\\n\\n\"\n", + "#a absorber bed consists of cube particles \n", + "L=3/4#edge length of particle\n", + "V_p=L**3#volume of particle \n", + "S_p=6*L**2#surface area of particle\n", + "a_p=6*L**2/L**3#specific particle surface area\n", + "print \"\\n specific particle surface area a_p=%.2f in**-1\"%(a_p)#\n", + "d_p_e = L#effective particle diameter = edge length\n", + "print \"\\n effective particle diameter d_p_e=%.2f in\"%(d_p_e)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 25.5 Page no 373" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 25.5 page no 373\n", + "\n", + "\n", + "\n", + " superficial velocity v_s=2.00 ft/s\n", + "\n", + " interstitial velocity v_i=5.00 ft/s\n", + "\n", + " bulk density rho_b=46.37 lb/ft**3\n", + "\n", + " specific surface area a_p=72.03 ft**-1\n", + "\n", + " bed specific surface a_b=43.22 ft**-1\n" + ] + } + ], + "source": [ + "print \"Example 25.5 page no 373\\n\\n\"\n", + "#gas(propane) flows through a catalyst tower\n", + "Mw=44.1#molecular weight\n", + "P=4320#pressre at the bottom of the catalyst bed,psf\n", + "R=10.73#gas constant\n", + "T=960#temperature,Rankine\n", + "rho=P*Mw/(R*T*144)#density of propane\n", + "L=50#height of bed,ft\n", + "D=20#diameter of bed,ft\n", + "V=pi*D**2*L/4#bed volume\n", + "theta=10#contact time,s\n", + "e=0.4#bed porosity\n", + "q=V*e/theta#volumetric flow rate\n", + "v_s=4*q/(pi*D**2)#superficial velocity\n", + "print \"\\n superficial velocity v_s=%.2f ft/s\"%(v_s)#\n", + "v_i=v_s/e#interstitial velocity\n", + "print \"\\n interstitial velocity v_i=%.2f ft/s\"%(v_i)#\n", + "rho_s=77.28#ultimate density(spheres )\n", + "rho_b=(1-e)*rho_s#bulk density\n", + "print \"\\n bulk density rho_b=%.2f lb/ft**3\"%(rho_b)#\n", + "d_p=0.0833#diameter of particles\n", + "a_p=6/d_p#specific surface area\n", + "print \"\\n specific surface area a_p=%.2f ft**-1\"%(a_p)#\n", + "a_b=a_p*(1-e)#bed specific surface\n", + "print \"\\n bed specific surface a_b=%.2f ft**-1\"%(a_b)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 25.6 Page no 375" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 25.6 page no 375\n", + "\n", + "\n", + "\n", + " hydraulic diameter D_h=0.04 ft\n", + " hydrulic radius r_h=0.009 ft\n" + ] + } + ], + "source": [ + "print \"Example 25.6 page no 375\\n\\n\"\n", + "#refer to example 25.5\n", + "d_p=0.0833#diameter of particles,ft\n", + "e=0.4#bed porosity\n", + "D_h=2/3*(e/(1-e))*d_p#hydraulic diameter\n", + "r_h=D_h/4#hydrulic radius\n", + "print \"\\n hydraulic diameter D_h=%.2f ft\\n hydrulic radius r_h=%.3f ft\"%(D_h,r_h)# " + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-26.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-26.ipynb new file mode 100644 index 00000000..c86f0998 --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-26.ipynb @@ -0,0 +1,566 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 26 : Fluidization" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 26.2 Page no 382" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 26.2 page no 384\n", + "\n", + "\n", + "\n", + " superficial velocity v_s=0.04 ft/s\n", + "\n", + " R_e=22.93\n", + "\n", + " superficial velocity v_s_t=0.01 ft/s\n", + "\n", + " reynolds no R_e_t=6.14 \n", + "\n", + " vol. flow rate q=2.62e-04 ft**3/s\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import sqrt,pi\n", + "print \"Example 26.2 page no 384\\n\\n\"\n", + "#a water softner unit consists of a large diameter tank ,the bottom of tank is connected to a vertical ion exchange pipe\n", + "h_f=1.25#total fluid height \n", + "h_l=h_f\n", + "g=32.174#grav. acc\n", + "e=0.25# bed porosity \n", + "d_p=0.00417#ion exchange resin particle diameter,ft\n", + "L=1#pipe length ,ft\n", + "#assume turbulent flow ,apply burke purmer equation\n", + "v_s=sqrt(g*h_f*e**3*d_p/(1.75*(1-e)*L))#superficial velocity\n", + "print \"\\n superficial velocity v_s=%.2f ft/s\"%(v_s)#\n", + "meu=6.76e-4#absolute viscosity of water\n", + "rho=62.4#density of water\n", + "#check for turbulent flow \n", + "R_e=d_p*v_s*rho/((1-e)*meu)\n", + "print \"\\n R_e=%.2f\"%(R_e)#\n", + "#since reynold no is low the calculation is not valid \n", + "#assume laminar flow and use Blake-Kozeny equation 26.9\n", + "v_s_t=rho*g*h_f*e**3*d_p**2/(150*meu*((1-e)**2)*L)#superficial velocity\n", + "print \"\\n superficial velocity v_s_t=%.2f ft/s\"%(v_s_t)#\n", + "#check the porous medium reynolds no\n", + "R_e_t=v_s_t*d_p*rho/((1-e)*meu)\n", + "print \"\\n reynolds no R_e_t=%.2f \"%(R_e_t)#\n", + "#since reynolds no R_e < 10,the flow is therfor laminar\n", + "D=0.167#diameter of pipe\n", + "S=(pi/4)*D**2#empty cross sectional area\n", + "q=v_s_t*S#volumetric flow rate\n", + "print \"\\n vol. flow rate q=%.2e ft**3/s\"%(q)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 26.3 Page no 384" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 26.3 page no 384\n", + "\n", + "\n", + "\n", + " superficial velocity v_s=0.04 ft/s\n", + "\n", + " R_e=22.93\n", + "\n", + " superficial velocity v_s_t=0.01 ft/s\n", + "\n", + " reynolds no R_e_t=6.14 \n", + "\n", + " fricion pressure drop P_drop_fr=78.00 psf\n", + "\n", + " pressure drop across across the resin bed P_drop_r=15.60 psf\n" + ] + } + ], + "source": [ + "print \"Example 26.3 page no 384\\n\\n\"\n", + "#refer to Example 26.2\n", + "#a water softner unit consists of a large diameter tank ,the bottom of tank is connected to a vertical ion exchange pipe\n", + "h_f=1.25#total fluid height \n", + "h_l=h_f\n", + "g=32.174#grav. acc\n", + "e=0.25# bed porosity \n", + "d_p=0.00417#ion exchange resin particle diameter,ft\n", + "L=1#pipe length ,ft\n", + "#assume turbulent flow ,apply burke purmer equation\n", + "v_s=sqrt(g*h_f*e**3*d_p/(1.75*(1-e)*L))#superficial velocity\n", + "print \"\\n superficial velocity v_s=%.2f ft/s\"%(v_s)#\n", + "meu=6.76e-4#absolute viscosity of water\n", + "rho=62.4#density of water\n", + "#check for turbulent flow \n", + "R_e=d_p*v_s*rho/((1-e)*meu)\n", + "print \"\\n R_e=%.2f\"%(R_e)#\n", + "#since reynold no is low the calculation is not valid \n", + "#assume laminar flow and use Blake-Kozeny equation 26.9\n", + "v_s_t=rho*g*h_f*e**3*d_p**2/(150*meu*((1-e)**2)*L)#superficial velocity\n", + "print \"\\n superficial velocity v_s_t=%.2f ft/s\"%(v_s_t)#\n", + " #check the porous medium reynolds no\n", + "R_e_t=v_s_t*d_p*rho/((1-e)*meu)\n", + "print \"\\n reynolds no R_e_t=%.2f \"%(R_e_t)#\n", + "#since reynolds no R_e < 10,the flow is therfor laminar\n", + "#calculation of the pressure drop due to friction and the pressure drop across the resin bed \n", + "k=e**3*d_p**2/(150*(1-e)**2)#packed bed permeability\n", + "P_drop_fr=rho*h_f#friction pressure drop across resin bed,psf\n", + "print \"\\n fricion pressure drop P_drop_fr=%.2f psf\"%(P_drop_fr)# \n", + "z_d=-1#length from point 2 to 3,ft\n", + "P_drop_r=rho*(z_d+h_f)#pressure drop across the resi bed\n", + "print \"\\n pressure drop across across the resin bed P_drop_r=%.2f psf\"%(P_drop_r)#\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 26.4 Page no 387" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Example 26.4 page no 387\n", + "\n", + "\n", + "\n", + " min. fluidization velocity v_mf=0.25 m/s\n", + "\n", + " Reynolds no R_e=1.79 \n", + "\n", + " mass flow rate m_dot =0.01 kg/s\n", + "\n", + " gas pressure drop P_fr=3560.00 Pa\n" + ] + } + ], + "source": [ + "print \"\\nExample 26.4 page no 387\\n\\n\"\n", + "#air is used to fluidize a bed of speherical particles\n", + "D=0.2#bed diameter,m\n", + "d_p=7.4e-5#diameter of 200 mesh particles from table 23.2,m\n", + "rho_s=2200#ultimate solid density\n", + "rho_f=1.2#density of air\n", + "meu=1.89e-5#viscosity of air\n", + "g=9.807#grav. constant\n", + "e=0.45#bed porosity\n", + "L_mf=0.3#length at minimum fluidization\n", + "#assume laminar flow \n", + "#applying equation 26.29\n", + "v_mf=(1-e)*g*rho_s*d_p**2/(150*e**3*meu)#minimum fluidizaton veloctiy \n", + "print \"\\n min. fluidization velocity v_mf=%.2f m/s\"%(v_mf)#\n", + "#check the flow regime\n", + "R_e=v_mf*d_p/(meu*(1-e))\n", + "print \"\\n Reynolds no R_e=%.2f \"%(R_e)#\n", + "#since R_e= 1.79 <10,flow is laminar\n", + "m_dot=pi*v_mf*D**2*rho_f/4#mass flow rate\n", + "print \"\\n mass flow rate m_dot =%.2f kg/s\"%(m_dot)#\n", + "P_fr=round((1-e)*rho_s*g*L_mf)#gas pressure drop across the bed\n", + "print \"\\n gas pressure drop P_fr=%.2f Pa\"%(P_fr)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 26.5 Page no 389" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 26.5 page no 389\n", + "\n", + "\n", + "\n", + " pressure drop P_rop=18.08 lb/ft**2\n" + ] + } + ], + "source": [ + "print \"Example 26.5 page no 389\\n\\n\"\n", + "#air flowing through a 10 ft packed bed\n", + "V_o=4.65#superficial velocity,ft/s\n", + "meu_g=1.3e-5#viscosity of air \n", + "rho_g=0.67#density of air,lb/ft**3\n", + "e=0.89#void volume\n", + "g_c=32.2#grav. constant\n", + "L=10#length of packed bed \n", + "d_p=0.007815#effective particle diameter\n", + "P_drop = ((150*V_o*meu_g/(g_c*d_p**2))*((1-e)**2/e**3) + (1.75*rho_g*V_o**2/(g_c*d_p))*((1-e)**2/e**3))*L#pressure drop\n", + "print \"\\n pressure drop P_rop=%.2f lb/ft**2\"%(P_drop)##calculation error in book \n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 26.6 Page no 392 " + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 26.6 page no 392\n", + "\n", + "\n", + "\n", + "pressure drop P_drop=583.84 psf\n" + ] + } + ], + "source": [ + "print \"Example 26.6 page no 392\\n\\n\"\n", + "#a bed of pulverized is to be fluidized with liquid oil\n", + "D=4#diameter of bed ,ft\n", + "d_p=0.00137#particle diameter ,ft \n", + "rho_s=84#coal particle density ,lb/ft**3\n", + "rho_f=55#oil density,lb/ft**3\n", + "e_mf=0.38#void fraction\n", + "L_mf=8#bed height at minimum fluidization,ft\n", + "P_drop=(rho_s-rho_f)*(1-e_mf)*L_mf +rho_f*L_mf \n", + "\n", + "print \"\\npressure drop P_drop=%.2f psf\"%(P_drop)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 26.7 Page no 393" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 26.7 page no 393\n", + "\n", + "\n", + "\n", + " superficial velocity v_s=0.01 ft/s\n", + "\n", + " vol. floe rate q=0.12 ft**3/s\n", + "\n", + " reynolds no R_e=0.15\n", + "\n", + " since R_e is less than 10 ,flow is laminar\n" + ] + } + ], + "source": [ + "print \"Example 26.7 page no 393\\n\\n\"\n", + "#refer to example 26.6\n", + "D=4#diameter of bed ,ft\n", + "d_p=0.00137#particle diameter ,ft \n", + "rho_s=84#coal particle density ,lb/ft**3\n", + "rho_f=55#oil density,lb/ft**3\n", + "meu_f=3.13e-4#viscosity of oil\n", + "e_mf=0.38#void fraction\n", + "L_mf=8#bed height at minimum fluidization,ft\n", + "L_f=10#bed height,ft\n", + "e=1-L_mf*(1-e_mf)/L_f#bed voidage\n", + "g=32.174#grav acc\n", + "v_s=(d_p**2)*g*(e**3)*(rho_s-rho_f)/(150*meu_f*(1-e)) #superficial velocity\n", + "print \"\\n superficial velocity v_s=%.2f ft/s\"%(v_s)#\n", + "q=(pi/4)*D**2*v_s#volumetric flow rate\n", + "print \"\\n vol. floe rate q=%.2f ft**3/s\"%(q)#\n", + "#check on the laminar flow assumption\n", + "meu_f=0.01\n", + "R_e=d_p*v_s*rho_f/(meu_f*(1-e))\n", + "print \"\\n reynolds no R_e=%.2f\"%(R_e)#\n", + "print \"\\n since R_e is less than 10 ,flow is laminar\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 26.8 Page no 393" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Example 26.8 page no 393\n", + "\n", + "\n", + "\n", + " head loss h_f=1224.30 ft of propane \n", + "\n", + " pressure P1=4303.69 psf\n" + ] + } + ], + "source": [ + "print \" Example 26.8 page no 393\\n\\n\"\n", + "#refer to example 25.6\n", + "#obtain the porous medium friction factor usingthe burke -plummer equation \n", + "#/since the flow is turbulent ,eq.26.6 applies\n", + "f_pm=1.75#porous medium friction facot\n", + "v_s=2#superficial velocity\n", + "e=.4#porosity\n", + "L=50#length of bed\n", + "d_p=0.0833#particle diameter\n", + "g=32.174#grav. acc\n", + "h_f=(f_pm)*(v_s**2)*(1-e)*L/(g*(e**3)*d_p)#head loss\n", + "print \"\\n head loss h_f=%.2f ft of propane \"%(h_f)#\n", + "#applying bernoulli eq. between the entrance and gas exit \n", + "#neglect the dynamic head\n", + "P2=4320#pressure at the bottom of the catalyst bed\n", + "rho_f=0.0128#density of fluid\n", + "z_d=-50#length from point 2 to 3,z2-z1\n", + "P1 = P2 + rho_f*(z_d-h_f)# absolute pressure of the inlet gas\n", + "print \"\\n pressure P1=%.2f psf\"%(P1)#\n", + "#since flow is turbulent , permeablity of the medium k can not be calculated" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 26.9 Page no 394" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 26.9 page no 394\n", + "\n", + "\n", + "\n", + " superficial velocity v_s=0.75 m/s\n", + "\n", + "pressure drop P_drop=2.36e+07 Pa\n" + ] + } + ], + "source": [ + "print \"Example 26.9 page no 394\\n\\n\"\n", + "#turbulent flow of water through a carbon bed\n", + "d_p=0.001#particle diameter\n", + "meu=0.001#viscosity of water\n", + "e=0.25#porosity\n", + "R_e=1000#R_e is >1000 for turbulent flow,for minimum pressure drop\n", + "rho=1000#density of water,kg/m**3\n", + "v_s=R_e*meu*(1-e)/(d_p*rho)#superficial velocity\n", + "print \"\\n superficial velocity v_s=%.2f m/s\"%(v_s)#\n", + "phi_s=1#spehercity\n", + "L=0.5#length of bed,m\n", + "P_drop = 1.75*rho*L*v_s**2*(1-e)/(phi_s*d_p*(e**3))#presssure drop\n", + "print \"\\npressure drop P_drop=%.2e Pa\"%(P_drop)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 26.10 Page no 395" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 26.10 page no 395\n", + "\n", + "\n", + "\n", + " zero porosity bed height L_o=0.17 m\n", + "\n", + " velocity at min. fluidization v_mf=0.01 m/s\n", + "\n", + " expanded bed height L_f=1.83 m\n", + " bed inventory m=45.62 kg\n" + ] + } + ], + "source": [ + "print \"Example 26.10 page no 395\\n\\n\"\n", + "#a bed of 200 mesh particles is fluidized with air\n", + "d_b=0.2#diameter of bed,m\n", + "d_p=7.4e-5#particle diameter\n", + "L_mf=0.3#bed height at minimum fludization\n", + "e_mf=0.45#bed porosity at min. fluidization\n", + "L_o=L_mf*(1-e_mf)#the zero porosity bed height \n", + "print \"\\n zero porosity bed height L_o=%.2f m\"%(L_o)#\n", + "rho_s=2200#density of particles \n", + "rho_f=1.2#density of fluid\n", + "g=9.807#grav. acc\n", + "meu_f=1.89e-5#viscosity of fluid\n", + "#assuming laminar flow ,use equation 26.9\n", + "v_mf =(e_mf**3)*(g*(rho_s-rho_f)*(d_p**2))/(150*(1-e_mf)*meu_f)#velocity at minimum fluidization\n", + "print \"\\n velocity at min. fluidization v_mf=%.2f m/s\"%(v_mf)#\n", + "v_t=0.35#terminal velocity from example 26.3\n", + "e=0.91#value of e porosity from eq26.9\n", + "L_f=L_o/(1-e)#expanded bed height L_f\n", + "m=rho_s*pi*d_b**2*L_o#bed inventory\n", + "print \"\\n expanded bed height L_f=%.2f m\\n bed inventory m=%.2f kg\"%(L_f,m)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 26.11 Page no 396" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 26.11 page no 396\n", + "\n", + "\n", + "\n", + " zero porosity bed height L_o=0.17 m\n", + "\n", + " velocity at min. fluidization v_mf=0.01 m/s\n", + "\n", + " fluidization mode F_mf=0.07 \n" + ] + } + ], + "source": [ + "print \"\\n Example 26.11 page no 396\\n\\n\"\n", + "#refer to illustrative example 26.9\n", + "d_p=7.4e-5#particle diameter\n", + "L_mf=0.3#bed height at minimum fludization\n", + "e_mf=0.45#bed porosity at min. fluidization\n", + "L_o=L_mf*(1-e_mf)#the zero porosity bed height \n", + "print \"\\n zero porosity bed height L_o=%.2f m\"%(L_o)#\n", + "rho_s=2200#density of particles \n", + "rho_f=1.2#density of fluid\n", + "g=9.807#grav. acc\n", + "meu_f=1.89e-5#viscosity of fluid\n", + "#assuming laminar flow ,use equation 26.9\n", + "v_mf =(e_mf**3)*(g*(rho_s-rho_f)*(d_p**2))/(150*(1-e_mf)*meu_f)#velocity at minimum fluidization\n", + "print \"\\n velocity at min. fluidization v_mf=%.2f m/s\"%(v_mf)#\n", + "F_mf=v_mf**2/(g*d_p)#fluidization mode\n", + "print \"\\n fluidization mode F_mf=%.2f \"%(F_mf)#\n", + "#from value of F_mf ,fluidization is smoth,F_mf =0.66<0.13" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-27.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-27.ipynb new file mode 100644 index 00000000..fcf77fcc --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-27.ipynb @@ -0,0 +1,237 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 27 : Filteraion" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 27.2 Page no 413" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 27.2 page no 413\n", + "\n", + "\n", + "\n", + " filter colth area A=720.00 ft**2\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"Example 27.2 page no 413\\n\\n\"\n", + "#plate and frame filter press is to be employed to filter a slurry \n", + "m_dot_slurry=600*60#mass flow rate ,lb/h\n", + "m=0.1#sluury contain 10% by mass solid\n", + "m_dot_solids = m*m_dot_slurry#the solid flow rate in the slurry\n", + "a=(1/5)#filter colth area required for 1 lb/h of solid\n", + "A=m_dot_solids*(a)#filter colth area for 3600 lb/h of solids\n", + "print \"\\n filter colth area A=%0.2f ft**2\"%(A)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 27.4 Page no 414" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 27.4 page no. 414\n", + "\n", + "\n", + "\n", + " coeff. K_c=3894.00 s/ft**6\n", + " coeff. q_r=217.00 s/ft**3\n" + ] + } + ], + "source": [ + "print \"Example 27.4 page no. 414\\n\\n\"\n", + "m=1947#slope of curve b/w t/V vs V,s/ft**6\n", + "K_c=2*m\n", + "c=217#intercept on graph\n", + "q_r=c#reciprocal of q\n", + "print \"\\n coeff. K_c=%0.2f s/ft**6\\n coeff. q_r=%0.2f s/ft**3\"%(K_c,q_r)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 27.5 Page no 415" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 27.5 page no 415\n", + "\n", + "\n", + "R_m=1.18e+10 ft\n", + "\n", + " alpha=1.79e+10 ft/lb\n" + ] + } + ], + "source": [ + "print \"Example 27.5 page no 415\\n\\n\"\n", + "#refer to example 27.4\n", + "meu=5.95e-4#viscosity \n", + "g_c=32.174#grav. acc\n", + "P_drop=20*144#pressure drop\n", + "q_o=(1/217)#flow rate \n", + "S=0.35#filteration area per unit\n", + "K_c=3894#coefficentc\n", + "c=4.142#slurry conentration \n", + "R_m=S*g_c*P_drop/(q_o*meu)#filteration coeff.\n", + "print \"R_m=%0.2e ft\"%(R_m)#\n", + "alpha=K_c*S**2*g_c*P_drop/(c*meu)#filteration coeff.\n", + "print \"\\n alpha=%0.2e ft/lb\"%(alpha)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 27.7 Page no 418" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 27.7 page no 418\n", + "\n", + "\n", + "\n", + " specific cake resistance alpha_o=9.77e+10 ft/lb\n" + ] + } + ], + "source": [ + "print \"Example 27.7 page no 418\\n\\n\"\n", + "#the following result were obtained during the running of a filteration experiment \n", + "alpha=4.57e+11#cake resistance,ft/lb\n", + "P_drop=1554#pressure drop ,lbf/ft**2\n", + "alpha_o=alpha/(P_drop**0.21)#specific cake resistance\n", + "print \"\\n specific cake resistance alpha_o=%0.2e ft/lb\"%(alpha_o)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 27.9 Page no 418" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 27.9 page no 418\n", + "\n", + "\n", + "\n", + " washing time t_w=16.50 min\n", + "\n", + " flow rate q_c=56.34 gal/hr \n" + ] + } + ], + "source": [ + "print \"Example 27.9 page no 418\\n\\n\"\n", + "#a filter press operates at a constant pressure\n", + "P=50#pressure,psig\n", + "q=10#flow rate,ft**3/min\n", + "#applying eq.27.12\n", + "#q = P/(B*V_s + C)\n", + "#in this case,V_s=0\n", + "C=P/q#constant\n", + "#for constant pressure applying equation 27.13\n", + "#t = B*V_s**2/(2P) + C*V_s/P\n", + "t=60#time ,min\n", + "V_s=100#volume,ft**3\n", + "B= 2*P*t/(V_s**2) - 2*C/V_s#constant\n", + "#during the washing cycle t_w = V_w/q_w\n", + "#B and C remain same\n", + "V_w=15#volume of water for washing per hr\n", + "t_w= V_w*(B*V_s + C)/P#time in washing\n", + "print \"\\n washing time t_w=%0.2f min\"%(t_w)#\n", + "t_d=30#time for dumping and cleanig\n", + "t_c=(t + t_w +t_d)/60#collecting time,in hr\n", + "q_c =V_s/t_c#flow rate for 100 ft**3\n", + "print \"\\n flow rate q_c=%0.2f gal/hr \"%(q_c)# " + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-28.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-28.ipynb new file mode 100644 index 00000000..c62b2b05 --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-28.ipynb @@ -0,0 +1,468 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 28 : Environmental management" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 28.3 Page no 430" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 28.3 page no 430\n", + "\n", + "\n", + "\n", + " settling factor K=0.104 \n", + "\n", + "settling velocity v=1.205e-03 ft/s\n", + "\n", + " desent time t=124430.77 sec\n", + "\n", + " minimum horizontal distance x=103.69 miles\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"Example 28.3 page no 430\\n\\n\"\n", + "#we have to determine the minimum distance downstream from a cement dust emitting source that will be free of cement deposit \n", + "#the souce is equipped with a cyclone located 150 ft above ground level \n", + "#neglect meteorological aspects\n", + "h=150#cyclone height from ground level,ft\n", + "v_w=3/3600#wind velocity,miles/second\n", + "SG=1.96#specific gravity of cement dust\n", + "rho_w=62.4#density of water,lb/ft**3\n", + "rho_p=SG*rho_w#/density cement particles\n", + "#applying ideal gas law for density of air\n", + "P=1#pressure,atm\n", + "M= 29#mol. weight of air\n", + "R=0.73#gas constant \n", + "T=520#temperature,Rankine\n", + "rho_a=P*M/(R*T)#density of air \n", + "meu=1.22e-5#viscosity of air,lb/ft.s\n", + "g=32.174#grav. acc.\n", + "d_p=2.5/(25400*12)#particle diameter,ft\n", + "K = d_p*(g*rho_p*rho_a/(meu**2))**(1/3)#settling factor\n", + "print \"\\n settling factor K=%.3f \"%(K)#\n", + "#since K=0.103<3.3,sokes law rane applies\n", + "v= g*d_p**2*rho_p/(18*meu)#terminal settling velocity)\n", + "print \"\\nsettling velocity v=%.3e ft/s\"%(v)#\n", + "t=h/v#time for desent\n", + "print \"\\n desent time t=%.2f sec\"%(t)#\n", + "x=v_w*t#horizontal distance travelled in miles\n", + "print \"\\n minimum horizontal distance x=%.2f miles\"%(x)##printing mistake in book" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 28.4 Page no 432" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 28.4 page no 432\n", + "\n", + "\n", + "\n", + " filtering beg area S_c=5461.54 ft**2\n", + "\n", + " area S_a=33.51 ft**2\n", + " number og bags N_a=163.00 \n", + "\n", + " area S_b=41.89 ft**2\n", + " no. of bags N_b=130.00 \n", + "\n", + " total cost TC_a=4238.00 $\n", + "\n", + " total cost TC_b=4940.00 $\n" + ] + } + ], + "source": [ + "from math import pi,sqrt\n", + "print \"Example 28.4 page no 432\\n\\n\"\n", + "#it is proposed to install a pulse jet fabric filter system to clean an air stream containing particulate pollutants\n", + "#we have to select the most apporpriate filter beg fabric \n", + "q_scfm=10000#volumetric flow rate of polluted air stream at 60 deg F ,1 atm\n", + "T=520#temperature,R\n", + "T_o=710#operating temparature ,R\n", + "q_acfm=q_scfm*(T_o/T)#flow rate in acfm\n", + "v_f=2.5#filteration velocity,ft/min\n", + "S_c=q_acfm/v_f#filtering beg area\n", + "print \"\\n filtering beg area S_c=%.2f ft**2\"%(S_c)#\n", + "#(1) for bag A ,the area and N number of bags are\n", + "D_a=8/12#diamter,ft\n", + "H_a=16#height,ft\n", + "S_a =pi*D_a*H_a#area\n", + "N_a= round(S_c/S_a)#no. of bags \n", + "print \"\\n area S_a=%.2f ft**2\\n number og bags N_a=%.2f \"%(S_a,N_a)#\n", + "#(2) for bag B\n", + "D_b=10/12#diameter,ft\n", + "H_b=16#height,ft\n", + "S_b=pi*D_b*H_b#area\n", + "N_b=round(S_c/S_b)#no. of bags\n", + "print \"\\n area S_b=%.2f ft**2\\n no. of bags N_b=%.2f \"%(S_b,N_b)#\n", + "#total cost for each bag\n", + "#for bag A\n", + "c_a=26#cost per bag\n", + "TC_a=round(N_a*c_a)#total cost for A bag\n", + "print \"\\n total cost TC_a=%.2f $\"%(TC_a)#\n", + "#for bag B\n", + "c_b=38#cost per bag\n", + "TC_b=N_b*c_b#total cost for bag B\n", + "print \"\\n total cost TC_b=%.2f $\"%(TC_b)#\n", + "#since the total cost for bag A is less than bag B,select bag A" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 28.5 Page no 433" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 28.5 page no 433\n", + "\n", + "\n", + "\n", + " no. of bags N=106.10 \n", + "\n", + " time t=16.80 min\n" + ] + } + ], + "source": [ + "print \"\\n Example 28.5 page no 433\\n\\n\"\n", + "#we have to determine the number if filtering bags required and cleaning frequency for a plant equipped with a fabric system\n", + "q=50000#volumetric flow rate of gas stream,acfm\n", + "v_f=10#filteration velocity,ft/min\n", + "D=1#diameter of filtering bag,ft\n", + "L=15#length of filtering bag,ft\n", + "S_c=q/v_f#filtering area,ft**2\n", + "S=pi*D*L#area per bag,ft**2\n", + "N=S_c/S#no. of bags\n", + "print \"\\n no. of bags N=%.2f \"%(N)#\n", + "c=0.0007143#dust concentration ,lb/ft**2\n", + "P_drop=8#pressure drop ,in H20\n", + "t=(P_drop-(0.2*v_f))/(5*c*v_f**2)#time sic ethe bags were cleaned\n", + "print \"\\n time t=%.2f min\"%(t)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 28.6 Page no 434" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 28.6 page no 434\n", + "\n", + "\n", + "\n", + " volumetric flow rate q=2045.26 ft**3/s\n" + ] + } + ], + "source": [ + "print \"Example 28.6 page no 434\\n\\n\"\n", + "#comparison between flow in pipes and open channel flow\n", + "#water is passing through a trapezodial channel\n", + "l_b=20#length of bottom base,ft\n", + "l_t=50#length of top base,ft\n", + "h=7.5#height of channel,ft\n", + "A = (l_b+ l_t)*(h/2)#cross sectional area\n", + "P = l_b +sqrt(h**2+ (2*h)**2)#perimeter of trapezoid\n", + "r_h=A/P#hydrulic radius\n", + "S=0.0008#coeff. in manning equation\n", + "n=0.02#coeff. in manning eq.\n", + "q = 1.486*A*r_h**(2/3)*S**(1/2)/n#manning equation to determine flow rate\n", + "print \"\\n volumetric flow rate q=%.2f ft**3/s\"%(q)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 28.7 Page no 435" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 28.7 page no 435\n", + "\n", + "\n", + "\n", + " fdischarge from the treatment plant m_dot_w=2919.00 lb/day\n", + "\n", + " total nitrogen discharge m_r=7515.12 lb/day \n" + ] + } + ], + "source": [ + "print \"\\n Example 28.7 page no 435\\n\\n\"\n", + "#waste water treatment plant \n", + "#we have to compare the total nitrogen discharge from the watershed with that of the city 's sewage treatment plant\n", + "q_w=10#flow rate from waste water treatment plant\n", + "c=35#nitoren concentration,mg/l\n", + "m_dot_w=c*q_w*8.34#discharge from the treatment plant\n", + "print \"\\n fdischarge from the treatment plant m_dot_w=%.2f lb/day\"%(m_dot_w)#\n", + "S=8#area of watershed,mi**2 \n", + "r=0.06#rate of rainfall,ml/day\n", + "n=.5#50% rain reaches the sewers\n", + "q=n*r*S*(5280**2/(3600*12))#volumetric flow rate of the runoff\n", + "c_r=9#tota# nitrogen conentration in runoff,mg/l\n", + "rho=62.4#/density of water\n", + "m_r=q*c_r*1e-6*(3600*24)*rho#total nitrogen discharge from runoff\n", + "print \"\\n total nitrogen discharge m_r=%.2f lb/day \"%(m_r)#\n", + " #since the durinf rain ,the runoff is over 2.5 times that for the tratment plant" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 28.8 Page no 436" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 28.8 page no 436\n", + "\n", + "\n", + "\n", + " volume based on organic loading V_ol=3900.00 ft**3\n", + "\n", + " volume based on hyraulic load V_hl=7295.09 ft**3\n" + ] + } + ], + "source": [ + "print \"Example 28.8 page no 436\\n\\n\"\n", + "#we have to determine the siaze an aerobic digester to treat the solids \n", + "m=1000#mass of solid that is generate by municipality,lb\n", + "OL=0.2#organic loading,lbcs/ft**3.day\n", + "VS=.78#volatile solids\n", + "V_ol=m*VS/OL#volume based on organic loading\n", + "print \"\\n volume based on organic loading V_ol=%.2f ft**3\"%(V_ol)#\n", + "t_h=20#detention time hydraulic, days\n", + "TS=0.044#percentage solids enterning digester\n", + "V_hl=m*t_h/(TS*8.33*7.48)#volume based on hydrulic load\n", + "print \"\\n volume based on hyraulic load V_hl=%.2f ft**3\"%(V_hl)#\n", + "#since V_hl >V_ol,the hdraulic time controls and the design volume is V_hl" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 28.9 Page no 437" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 28.9 page no 437\n", + "\n", + "\n", + "\n", + " volume of cavern availible for solid waste V=8.61e+10 ft**3\n", + "\n", + " q=208000.00 \n", + "\n", + " time to fill the cavern t=4.14e+05 year\n" + ] + } + ], + "source": [ + "print \"Example 28.9 page no 437\\n\\n\"\n", + "#a large deep cavern has been proposed as an ultimate disposal site for both solid hazardous and municipal wastes\n", + "V_c=0.78#approximate total volume of cavern,mi**2\n", + "V_s=.75#% volume availiable for solid waste depositry \n", + "V=V_c*V_s*(5280)**3#volume of the cavern availible for the solid waste ,factor 5280 to convert mi**3 into ft**3\n", + "print \"\\n volume of cavern availible for solid waste V=%.2e ft**3\"%(V)\n", + "r=20000#proposed maximum waste feed rate to cavern ,lb/day\n", + "rho=30#average bulk density,lb/ft**3\n", + "q=(r/rho)*(6*52)#volume rate of solid deposited within the cavern in ft**3/year\n", + "print \"\\n q=%.2f \"%(q)#\n", + "t=V/q#time to fill the cavern\n", + "print \"\\n time to fill the cavern t=%.2e year\"%(t)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 28.10 Page no 438" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 28.10 page no 438\n", + "\n", + "\n", + "\n", + " particulate con. C_p=0.07 gr/dscf\n", + "\n", + " velocity v=36.72 fps\n", + "\n", + " stack flow rate v_s=6921.12 acfm\n", + "\n", + " standard volumetric flow rate q_s=5628.65 dscfm\n", + "\n", + " particulate emmision rate R_e=81.67 lb/day\n", + "\n", + " mol. weight of flue gas on dry basis MW_d=30.52 lb/lbmol\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "print \"Example 28.10 page no 438\\n\\n\"\n", + "# a compliance stack test on a facility yields the results ,we have to determine whether the incineratormeets the state particulate standard of 0.05 gr/dscf\n", + "g=9.807#grav. acc\n", + "rho_l=1000#density of manometer fluid,kg/m**3\n", + "rho=1.084#density of flue gas,kg/m**3\n", + "C=0.85#pitot tube constant \n", + "h=0.3772#mean pitot tube reading ,in H2O\n", + "m=0.16#mass of particulate collected ,g\n", + "V=35#volume sampled,dscf\n", + "C_p=m*15.43/V#partculate concentration,gr/dscf\n", + "print \"\\n particulate con. C_p=%.2f gr/dscf\"%(C_p)#\n", + "#since this does not exceed the particulate standard of 0.05 gr/dscf,the facility is not in compliance\n", + "#the stack flow rate is calculated from the velocity measurement\n", + "v=C*sqrt(2*g*(rho_l/rho)* 0.0254*h)/.3048#velocity\n", + "print \"\\n velocity v=%.2f fps\"%(v)#\n", + "D=2#diameter of stack,ft\n", + "v_s=(v*pi*D**2/4)*60#stack flow rate \n", + "print \"\\n stack flow rate v_s=%.2f acfm\"%(v_s)#\n", + "w_mo=0.07#% moisture in stack gas\n", + "v_dry=(1-w_mo)*v_s#dry volumetric flow rate \n", + "#correct to standard conditions of 70 deg F and 1 atm\n", + "T_s=530# standard temprature deg R\n", + "P_s=29.9#standard pressure,psi\n", + "P_g=29.6#pressure of stack gas,psi\n", + "T_g=600#temprature of standard gas,deg R\n", + "q_s=v_dry*(T_s/T_g)*(P_g/P_s)#standard volumetric flow rate\n", + "print \"\\n standard volumetric flow rate q_s=%.2f dscfm\"%(q_s) \n", + "R_e=C_p*q_s*(1440/7000)#particulate emission rate\n", + "print \"\\n particulate emmision rate R_e=%.2f lb/day\"%(R_e)#\n", + "w_co2=0.14#percentage of co2 by volume\n", + "w_N2=0.79#percentage of N2 by volume\n", + "mw_o=32#molecular weight of oxygen\n", + "mw_co2=44#molecular weight of co2\n", + "mw_N2=28#molecular weight of N2\n", + "MW_d=w_mo*mw_o + w_co2*mw_co2 +w_N2*mw_N2#molecular weight of flue gas on dry basis\n", + "print \"\\n mol. weight of flue gas on dry basis MW_d=%.2f lb/lbmol\"%(MW_d)#\n", + " " + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-29.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-29.ipynb new file mode 100644 index 00000000..e2b810a2 --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-29.ipynb @@ -0,0 +1,224 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 29 : Accident and emergency" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 29.2 Page no 455" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 29.2 page no 455\n", + "\n", + "\n", + "\n", + " probability P=1.98e-05 \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import factorial\n", + "print \"Example 29.2 page no 455\\n\\n\"\n", + "#the probability distribution of the number of defectives in a sample of five pump drawn with replacement from lot of 1000 pump\n", + "#the probability distribution of x, thenumber of sucess in n performances of th erandom experiment is the probability distribution function \n", + "#P(x) = (factorial(n)/factorial(x)*(factorial n -factorial x))*(p**x*q**n-x)\n", + "n=5#no. of performances\n", + "x=3#no. of successes \n", + "p=0.05#probability of sucesses when the sample of pump is drawn with replacement\n", + "q=1-p#probability of faliure\n", + "P=factorial(n)*((p**x)*(q**(n-x)))/(factorial(x)*(factorial(n)-factorial(x)))#probability when x=3#probability when x=3/factorial(x)*(factorial(n)-factorial(x))*(p**x*q**(n-x))#probability when x=3\n", + "print \"\\n probability P=%.2e \"%(P)# #calculation error in book" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Examctple 29.3 Page no 455" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 29.3 page no 455\n", + "\n", + " reynolds no. R_e=807607.46 \n", + "\n", + " pressure drop in duct P_drop_d=12.71 lbf/ft**2\n", + "\n", + " total pressure drop P_drop_t=33.51 lbf/ft**2\n", + "\n", + " power required hp=30.46 hp \n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "print \"Example 29.3 page no 455\"\n", + "#an iron foundry has four work stations that are connected to single duct\n", + "v_air=4000#the minimum air velocity required for general foundry dust,ft/min\n", + "v_air_s=v_air/60#velocity of air in ft/s\n", + "n=4#no. of duct\n", + "q_e=3000#each duct transport air,acfm\n", + "q=n*q_e#total transport,acfm\n", + "A=q/v_air#cross sectional area required ,ft**2\n", + "D=sqrt(4*A/pi)#duct diameter,ft\n", + "rho=0.075#density of air\n", + "meu=1.21e-5#viscosity of air\n", + "R_e=D*rho*v_air_s/meu#reynolds no\n", + "print \"\\n reynolds no. R_e=%.2f \"%(R_e)#\n", + "f=0.003#/fanning friction factor,since R_e >20000\n", + "L=400#duct length\n", + "g_c=32.2#grav. acc.\n", + "P_drop_d=(4*f*L*v_air_s**2*rho)/(2*g_c*D)#pressure drop in the duct\n", + "print \"\\n pressure drop in duct P_drop_d=%.2f lbf/ft**2\"%(P_drop_d)#\n", + "P_drop_h=0.5*5.2#pressure drop in hood\n", + "P_drop_cyc=3.5*5.2#pressure drop in cyclone cleaner\n", + "P_drop_t=P_drop_d + P_drop_h + P_drop_cyc#total prssure drop\n", + "print \"\\n total pressure drop P_drop_t=%.2f lbf/ft**2\"%(P_drop_t)#\n", + "neta=0.4#pump efficiency\n", + "hp=(P_drop_t*q/neta)*3.03e-5#power required in hp\n", + "print \"\\n power required hp=%.2f hp \"%(hp)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 29.6 Page no 458" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 29.6 page no 458\n", + "\n", + "\n", + "\n", + " penetration associated with failed bags P_tc=0.07 \n", + "\n", + " no. of bags L=1.52 \n" + ] + } + ], + "source": [ + "print \"Example 29.6 page no 458\\n\\n\"\n", + "#a baghouse has been used to clean a particulate gas steam\n", + "l_i=5#inlet loading,grains/ft**3\n", + "l_o=0.03#outlet loading,grains/ft**3\n", + "l_o_max=0.4#maximum outlet loading,grains/ft**3\n", + "E_b=(l_i-l_o)/l_i#efficiency before bag failure\n", + "P_t=1-E_b#penetration before bag failure\n", + "E=(l_i-l_o_max)/l_i#efficiency on regulatory conditions\n", + "P_t_r=1-E#penetration regulatory conditons\n", + "P_tc=P_t_r-P_t#penetration associated with failed bags\n", + "print \"\\n penetration associated with failed bags P_tc=%.2f \"%(P_tc)#\n", + "P_drop=6#pressure drop,in of H2O\n", + "T=250#temperature,deg F\n", + "q=50000#volumetric flow rate,acfm\n", + "D=8#diamter of bags,in\n", + "L= q*P_tc/(0.582*P_drop**0.5*D**2*(T+460)**0.5)#number of bag failure that the system can tolerate and still remain in compliance\n", + "print \"\\n no. of bags L=%.2f \"%(L)#\n", + "#thus if two bags fail,baghouse is out of complance" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 29.7 Page no 461" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 29.7 page no 461\n", + "\n", + "\n", + "\n", + " n_air=45444.92 gmol\n", + "\n", + " mole fraction of HC x_hc=16503.22 ppb \n" + ] + } + ], + "source": [ + "print \"Example 29.7 page no 461\\n\\n\"\n", + "#a reactor is located in a relatively large laboratory,the reactor can emit as much as of hydrocarbon into the room if a safety valves ruptures\n", + "v=1100#volume of reactor,m**3\n", + "T=295#temperature of reactor,K\n", + "v_s=0.0224#volume of gas at STP,m**3\n", + "T_s=273#standard temperature,K\n", + "n_air=(v/v_s)*(T_s/T)#total gmoles of air in the room\n", + "print \"\\n n_air=%.2f gmol\"%(n_air)#\n", + "v_r=0.75#Hydrocarbon emit by reactor,gmol\n", + "x_hc= (v_r/(n_air + v_r))*10**9#mole fraction of hydrocarbon in the room,parts per billion \n", + "print \"\\n mole fraction of HC x_hc=%.2f ppb \"%(x_hc)# \n", + " " + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-3.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-3.ipynb new file mode 100644 index 00000000..c75dd3f8 --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-3.ipynb @@ -0,0 +1,225 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3 : Key Terms and Definitions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.2 Page no. 25" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.2 Page no. 25\n", + "\n", + "\n", + "surface tension=0.07N/m\n", + " Radius = 4.00e-03 m\n", + " theta = 0 degree\n", + " g=9.81m/s**2\n", + " rho=1000.00kg/m**3\n", + "\n", + "height of liquid rise = 3.63e-03 m\n", + "\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from numpy import cos\n", + "print \"Example 3.2 Page no. 25\\n\\n\"\n", + "#given temperature(T),pressure(P),capilLary tube diameter(D),water density(rho),contact angle(ththetaeta)\n", + "sigma=0.0712#surface tension (sigma)of water at 30 degree C temperature in appendix A.4\n", + "D=0.008\n", + "R=D/2\n", + "theta=0\n", + "g=9.807\n", + "rho=1000\n", + "print \"surface tension=%0.2fN/m\\n Radius = %0.2e m\\n theta = %0.f degree\\n g=%0.2fm/s**2\\n rho=%0.2fkg/m**3\\n\"%(sigma,R,theta,g,rho)\n", + "h=(2.0*sigma*cos(0))/(rho*g*R)#height rise of the liquid\n", + "print \"height of liquid rise = %0.2e m\\n\"%(h)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3 Page no. 26" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.3 Page no. 26\n", + "\n", + "\n", + "rho=996.00\\kg/m**3\n", + " surface tension (sigma)=0.07 N/m\n", + "\n", + "theta=0.00 degree \n", + " g=9.81 m/s**2\n", + " h=0.001 m\n", + "\n", + "R=0.015 m\n", + " D=0.029 m\n", + "\n" + ] + } + ], + "source": [ + "print \"Example 3.3 Page no. 26\\n\\n\"\n", + "#given at 30 degree temerature\n", + "#properties of water from appendix A.2 density(rho),surface tension(sigma)\n", + "rho=996\n", + "sigma=0.071\n", + "print \"rho=%0.2f\\kg/m**3\\n surface tension (sigma)=%0.2f N/m\\n\"%(rho,sigma)\n", + "theta=0#negligible angle of contact\n", + "g=9.807\n", + "h=0.001#less than one milimeter\n", + "print \"theta=%0.2f degree \\n g=%0.2f m/s**2\\n h=%0.3f m\\n\"%(theta,g,h)\n", + "R=(2*sigma*cos(0))/(rho*g*h)#by capiilary rise equation\n", + "D=2*R\n", + "print \"R=%0.3f m\\n D=%0.3f m\\n\"%(R,D)\n", + "#if the tube diameter is greater than 0.029075 mm, then the capillary rise will be less than 1mm" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.4 Page no. 28" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.4 page no 28\n", + "\n", + "\n", + "\n", + " F_p=8.66 lbf\n", + "\n", + " F-n=5.00 lbf\n", + "\n", + " tou=4.33 psf\n", + " P=2.50 psf\n" + ] + } + ], + "source": [ + "from math import pi, sin\n", + "print \"Example 3.4 page no 28\\n\\n\"#\n", + "S=2#surface area ft**2\n", + "F=10#magnitude of force,lbf\n", + "theta=pi/6#angle\n", + "F_p=F*cos(theta)#parallel comp. of force\n", + "print \"\\n F_p=%0.2f lbf\"%(F_p)#\n", + "F_n=F*sin(theta)#normal comp. of force\n", + "print \"\\n F-n=%0.2f lbf\"%(F_n)#\n", + "tou=F_p/S#shear stress\n", + "P=F_n/S#pressure\n", + "print \"\\n tou=%0.2f psf\\n P=%0.2f psf\"%(tou,P)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.5 Page no. 30" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.5 Page no. 30\n", + "\n", + "\n", + "m=1.00 kg\n", + " g=9.80 m/s**2\n", + " Z1=0.00 m\n", + " Z2=10.00 m\n", + "\n", + "PE1=0J\n", + " PE2=98.00J\n", + " PE=98.00J\n", + "\n" + ] + } + ], + "source": [ + "print \"Example 3.5 Page no. 30\\n\\n\"\n", + "#determine potential energy of water \n", + "# given height,mass of water,g\n", + "m=1\n", + "g=9.8\n", + "Z1=0#at ground level\n", + "Z2=10#at 10 m above from ground level\n", + "print \"m=%0.2f kg\\n g=%0.2f m/s**2\\n Z1=%0.2f m\\n Z2=%0.2f m\\n\"%(m,g,Z1,Z2)\n", + "PE1=m*g*Z1#potential energy at ground level\n", + "PE2=m*g*Z2#potential energy at 10m height\n", + "PE= PE2-PE1\n", + "print \"PE1=%0.fJ\\n PE2=%0.2fJ\\n PE=%0.2fJ\\n\"%(PE1,PE2,PE)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-31.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-31.ipynb new file mode 100644 index 00000000..032c384e --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-31.ipynb @@ -0,0 +1,210 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 31 : Numerical Methods" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 31.1 Page no 486" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 31.1 Page no 486\n", + "\n", + " \n", + "\n", + " X= \n", + "[[ 5.]\n", + " [ 3.]\n", + " [-2.]]\n", + "\n", + "X1=5.00\n", + "X2=3.00 \n", + "X3=-2.00\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from numpy import mat\n", + "print \"Example 31.1 Page no 486\\n\\n \"\n", + "#set of linear algebric equation using gauss elimination\n", + "A=mat([[3,-2,1],[1,4,-2],[2,-3,-4]])#matrix A\n", + "B=mat([[7],[21],[9]])#matrix B\n", + "X=(A**-1)*B\n", + "print \"\\n X= \\n\",(X)#\n", + "X1=X[0]#value of X1\n", + "X2=X[1]#value of X2\n", + "X3=X[2]#value of X3\n", + "print \"\\nX1=%.2f\\nX2=%.2f \\nX3=%.2f\"%(X1,X2,X3)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 31.2 Page no 492" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 31.2 Page no 492\n", + "\n", + "\n", + "\n", + " T1=1.10 k\n", + "\n", + " T2=1.01 k\n", + "\n", + " T3=1.00 k\n" + ] + } + ], + "source": [ + "print \"Example 31.2 Page no 492\\n\\n\"\n", + "#the vapor pressure p' for a new synthetic chemical at a given temperature\n", + "t1=1100#assume intial actual temperature,k\n", + "T1=t1*1e-3#temperature,k\n", + "print \"\\n T1=%.2f k\"%(T1)#\n", + "f1=T1**3 -2*T1**2 + 2*T1 -1#function of T,f(T)\n", + "f_d1=3*T1**2 -4*T1 + 2#derivative of f(T)\n", + "#using newton rapson formula to estimate T2\n", + "T2=T1 -(f1/f_d1)#temperature T2\n", + "print \"\\n T2=%.2f k\"%(T2)#\n", + "f2=T2**3 -2*T2**2 + 2*T2 -1\n", + "f_d2=3*T2**2 -4*T2 + 2\n", + "T3=T2 -(f2/f_d2)#temperature T3\n", + "print \"\\n T3=%.2f k\"%(T3)#\n", + "#finally the best estimate is T3,t=1.000095" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 31.3 Page no 493" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 31.3 Page no 493\n", + "\n", + "\n", + "\n", + " v6=10.09 ft/s \n" + ] + } + ], + "source": [ + "from sympy import symbols, solve\n", + "print \"Example 31.3 Page no 493\\n\\n\"\n", + "#friction factor for smooth tubes can be approximated by\n", + "#f = 0.079*R_e**(-1/4),if 2000< R_e<2e-5\n", + "# average velocity in the system ,involving the flow of water at 60 deg F is given by \n", + "#v =sqrt(2180/(213.4R_e**(-1/4) + 10), flow of water at 60 deg F\n", + "#R_e=12168v,putting this value and by simplifying we get\n", + "v=symbols('v')\n", + "f=213.5*v**2 +105.03*v- 22896.08*v\n", + "#df=derivat(213.5*v**2 +105.03*v- 22896.08*v)\n", + "df=- 22791.05 + 427*v \n", + "v1=5\n", + "f1=213.5*v1**2 +105.03*v1- 22896.08*v1# value of f at v=5\n", + "df1=- 22791.05 + 427*v1#value of df at v=5\n", + "v2=v1-(f1/df1)\n", + "#by iteration we get values of v3,v4,v5,v6\n", + "#at v6 result converges\n", + "v6=10.09\n", + "print \"\\n v6=%.2f ft/s \"%(v6)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 31.4 Page no 497" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 31.4 Page no 497\n", + "\n", + "\n", + "\n", + " I=0.90 \n" + ] + } + ], + "source": [ + "from sympy import mpmath\n", + "print \"Example 31.4 Page no 497\\n\\n\"\n", + "#integration\n", + "I=mpmath.quad(lambda x:(1-0.4*x**2)/((1-x)*(1-0.4*x)-1.19*x**2),[0,0.468])\n", + "print \"\\n I=%.2f \"%(I)#" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-32.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-32.ipynb new file mode 100644 index 00000000..63b79999 --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-32.ipynb @@ -0,0 +1,218 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 32 : Economics and Finance " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 32.5 Page no 512" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 32.5 page no 512\n", + "\n", + "\n", + "\n", + " total cost with 2 inch pipe TC_a=22112.00 $\n", + "\n", + " total cost with 4 inch pipe TC_b=13922.00 $\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"Example 32.5 page no 512\\n\\n\"\n", + "# a fluid is transported 4 miles under turbulent flow conditions\n", + "#we have two choices in designing the system\n", + "OC_a=20000#per year pressure drop costs for the 2 inch ID pipe,$\n", + "CRF=0.1#capital recovery factor for both pipe\n", + "OC_b=OC_a/16#operating cost associated with the pressure drop cost per year for 4 inch pipe\n", + "d=4*5280#distance,feet\n", + "c_a=1# 2 inch ID pipe cost per feet,$\n", + "c_b=6# 4 inch ID pipe cost per feet,$\n", + "CC_a=d*c_a*CRF#capital cost for 2 inch ID pipe,$\n", + "CC_b=d*c_b*CRF#capital cost for 4 inch ID pipe,$\n", + "TC_a= OC_a +CC_a#total cost associated with 2 inch pipe\n", + "print \"\\n total cost with 2 inch pipe TC_a=%0.2f $\"%(TC_a)#\n", + "TC_b=OC_b + CC_b#total cost associated with 4 inch pipe\n", + "print \"\\n total cost with 4 inch pipe TC_b=%0.2f $\"%(TC_b)#\n", + "#from result we can conclude that 4 inch pipe is more economical" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 32.6 Page no 512" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Example 32.6 page no 512\n", + "\n", + "\n", + "\n", + " P1=54.46\n" + ] + } + ], + "source": [ + "from scipy.optimize import fsolve\n", + "from __future__ import division\n", + "print \" Example 32.6 page no 512\\n\\n\"\n", + "#a process emits gas of containg dust,a particulate device is employed for particle capture \n", + "q=50000#vol. flow rate of dust,ft**3/min\n", + "c=2/7000#inlet loading of dust\n", + "DV=0.03#value of dust\n", + "#recovered value RV can be expressed in terms of pressure drop\n", + "#RV=q*c*DV*P1/(P1+15)\n", + "C_e=0.18#cost of electricity\n", + "E_f=0.55#fractional efficiency\n", + "def f(P1):\n", + " \n", + " E=P1/(P1+15)#collection efficiency\n", + " RV=q*c*DV*E#recovered value in terms of E$/min\n", + " C_p=q*(C_e/44200)*P1/(E_f*60)\n", + "# x=q*c*DV*P1/(P1+15)-q*C_e*P1/E_f\n", + " x=RV-C_p \n", + " return x\n", + "P1=fsolve(f,100)\n", + "print \"\\n P1=%0.2f\"%(P1)#\n", + "#calculation mistake in book" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 32.8 Page no 514" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 32.8 page no 514\n", + "\n", + "\n", + "\n", + " uniform annual payment UAP=5767.91 $\n", + "\n", + " apprasial value B=26944.44 $\n" + ] + } + ], + "source": [ + "print \"Example 32.8 page no 514\\n\\n\"\n", + "#a filter press is in operation\n", + "#we have to determine the appraisal value of the press\n", + "i=0.03375#intrest on fund\n", + "n=9#time,year\n", + "SFDF=i/((1+i)**n -1)#sinking fund depreciation factor\n", + "P=60000#cost of filter press,$\n", + "L=500#salvage value,$\n", + "UAP= (P-L)*SFDF#uniform annual payment,$\n", + "print \"\\n uniform annual payment UAP=%0.2f $\"%(UAP)#\n", + "#in determing the appraisel value where the straight line method of depreciation is used \n", + "# B = P -(P-L/n)x\n", + "#where x refers to any time the present before the end of usable\n", + "x=5#let for 5 year\n", + "B5=P-((P-L)/n)*x#appraissl value for 5 year\n", + "print \"\\n apprasial value B=%0.2f $\"%(B5)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 32.9 Page no 516" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 32.9 page no 516\n", + "\n", + "\n", + "\n", + " annulized cost AC=51583.60 $\n" + ] + } + ], + "source": [ + "print \"Example 32.9 page no 516\\n\\n\"\n", + "#we have to determine the annulized cost of a new processing plant of enviromental control\n", + "#input data\n", + "CC=150000#capital cost,$\n", + "I=.07#interst\n", + "n=5#time,year\n", + "CRF=(I*(1+I)**n)/((1+I)**5-1)#capital recovery factor CRF\n", + "IC=CRF*CC#installation cost,$\n", + "OC=15000#operation cost,$\n", + "AC=IC + OC#annulized cost\n", + "print \"\\n annulized cost AC=%0.2f $\"%(AC)#" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-33.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-33.ipynb new file mode 100644 index 00000000..e439723b --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-33.ipynb @@ -0,0 +1,393 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 33 : Biomedical Engineering " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 33.1 Page no 524" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 33.1 Page no 524\n", + "\n", + "\n", + "\n", + " viscosity meu_e=8.40e-04 lb/ft.s\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"Example 33.1 Page no 524\\n\\n\"\n", + "#unit conversion of viscosity of blood\n", + "meu_cp=1.25#vicosity of blood in cp\n", + "meu_e=meu_cp*6.72e-4#viscosity in english unit,lb/ft.s\n", + "print \"\\n viscosity meu_e=%0.2e lb/ft.s\"%(meu_e)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 33.2 Page no 525" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 33.2 Page no 525\n", + "\n", + "\n", + "\n", + " P1=3.15 inHg\n", + " P2=3.57 ft H2O\n", + "P3=42.83 in H2O\n", + " P4=1.55 psia\n", + "P5=222.74 psfa\n", + "P6=10663.16 N/m**2\n" + ] + } + ], + "source": [ + "print \"Example 33.2 Page no 525\\n\\n\"\n", + "#unit conversion of poressure given in mmHg into various units\n", + "P=80#pressure given in mmHg\n", + "P1=P*(29.92/760)#pressure , in Hg\n", + "P2=P*(33.91/760)#pressure ,ft H2O\n", + "P3=P2*12#pressure ,in H2O\n", + "P4=P*(14.7/760)#pressure ,psia\n", + "P5=P*(2116/760)#pressure ,psfa\n", + "P6=P*(1.013e+5/760)#pressure ,N/m**2\n", + "print \"\\n P1=%0.2f inHg\\n P2=%0.2f ft H2O\\nP3=%0.2f in H2O\\n P4=%0.2f psia\\nP5=%0.2f psfa\\nP6=%0.2f N/m**2\"%(P1,P2,P3,P4,P5,P6)##in book answers are round off after decimal but there are exact answers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 33.5 Page no 527" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 33.5 Page no 527\n", + "\n", + "\n", + "\n", + " ratio of diameters D_r=1.41 \n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "from __future__ import division\n", + "print \"Example 33.5 Page no 527\\n\\n\"\n", + "#an artery branches into two smaller equal area arteries so that velocity is same\n", + "#because q1=q2,volumetric flow rate\n", + "#q1=q2=q/2\n", + "#because s1=s2,cross sectional area\n", + "#s1=s2=s/2\n", + "#let the values \n", + "q=1#flow rate at inlet artery \n", + "q1=q/2#flow rate at outlet artery\n", + "s=1#area of inlet artery\n", + "s1=s/2#area of outlet artery\n", + "#v=q/s\n", + "D_r=sqrt(q/q1)#ratio of diameters\n", + "print \"\\n ratio of diameters D_r=%0.2f \"%(D_r)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 33.6 Page no 528" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 33.6 Page no 528\n", + "\n", + "\n", + "\n", + " velocity v3=4.52 mm/s\n" + ] + } + ], + "source": [ + "print \"Example 33.6 Page no 528\\n\\n\"\n", + "#a blood vessel branches into three openings \n", + "#we have to find the velocity in 3 rd opening\n", + "a=0.2#cross sectional area of inlet 1,m**2\n", + "v=5#velocity inlet 1,mm/s\n", + "a1=0.08#area of branch1,m**2\n", + "v1=7#velocity in branch2,mm/s\n", + "a2=0.025#area of branch,m**2\n", + "v2=12#velocity in branch,mm/s\n", + "a3=0.031#area of branch,m**2\n", + "q=a*v#flow rate at inlet\n", + "q1=a1*v1#flow rate at branch 1\n", + "q2=a2*v2#flow rate at branch 2\n", + "q3=q-q1-q2#flow rate in branch 3\n", + "v3=q3/a3#velocity in branch 3\n", + "print \"\\n velocity v3=%0.2f mm/s\"%(v3)#\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 33.7 Page no 531" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 33.7 Page no 531\n", + "\n", + "\n", + "\n", + " flow velocity v=19.01 cm/s\n" + ] + } + ], + "source": [ + "from math import pi\n", + "print \"Example 33.7 Page no 531\\n\\n\"\n", + "#blood flowing through the arota\n", + "D=2.5#diameter of arota\n", + "S=pi*D**2/4#cross sectional area,cm**2\n", + "q=93.3#volumeric flow rate,cm**3/s\n", + "v=q/S#flow velocity\n", + "print \"\\n flow velocity v=%0.2f cm/s\"%(v)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 33.8 Page no 531" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 33.8 Page no 531\n", + "\n", + "\n", + "\n", + " no.of times heart beats T=3.11e+09 \n" + ] + } + ], + "source": [ + "print \"Example 33.8 Page no 531\\n\\n\"\n", + "#one of the auther of this book is 74 year old ,we have to determine the no. of times that the the auther's heart has to beat to date\n", + "Y=74#age in year\n", + "d=365#days\n", + "h=24#hours\n", + "m=60#minutes\n", + "b=80#heart beats per minutes\n", + "T=Y*d*h*m*b# no. of times heart beats\n", + "print \"\\n no.of times heart beats T=%0.2e \"%(T)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 33.9 Page no 531" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 33.9 Page no 531\n", + "\n", + "\n", + "\n", + " Volume of blood V=2.18e+11 ml\n" + ] + } + ], + "source": [ + "print \"\\n Example 33.9 Page no 531\\n\\n\"\n", + "#refer to example no 33.8\n", + "Y=74#age in year\n", + "d=365#days\n", + "h=24#hours\n", + "m=60#minutes\n", + "b=80#heart beats per minutes\n", + "T=Y*d*h*m*b# no. of times heart beats\n", + "v=70#volume of blood discharge with each blood,ml\n", + "V=T*v#volume of blood that has circulated through the auther's system over his lifetime\n", + "print \"\\n Volume of blood V=%0.2e ml\"%(V)# " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 33.10 Page no 532" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 33.10 Page no 532\n", + "\n", + "\n", + "\n", + " pressure drop P_drop=1.69 ft*lbf/lb\n" + ] + } + ], + "source": [ + "print \"Example 33.10 Page no 532\\n\\n\"\n", + "#the flow of blood from the arota to the atrium is reprsented by a vessel\n", + "meu=1.1*6.72e-4#viscosity of blood\n", + "L=0.3#length of vessel,mile\n", + "g_c=32.2#grav. acc\n", + "rho=62.4#density of blood \n", + "D=2.53/30.48#diameter of vessel,ft\n", + "P_drop=32*meu*(19/30.48)*5280*L/(rho*D**2*g_c)\n", + "print \"\\n pressure drop P_drop=%0.2f ft*lbf/lb\"%(P_drop)\n", + "#since the model is resonable from the fluid dynamics perspective" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 33.12 Page no 534" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 33.12 Page no 534\n", + "\n", + "\n", + "\n", + "power generated hp=0.55 hp\n" + ] + } + ], + "source": [ + "print \"\\n Example 33.12 Page no 534\\n\\n\"\n", + "#estimation of power generated by human heart\n", + "P_drop=60#pressure drop in the circulatory system,mmHg\n", + "q=0.0033#volumetric flow rate,ft**3/s\n", + "hp=(q*P_drop*14.7*(144/760))#power generated \n", + "print \"\\npower generated hp=%0.2f hp\"%(hp)##calculation error in book" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-34.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-34.ipynb new file mode 100644 index 00000000..d81ca764 --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-34.ipynb @@ -0,0 +1,67 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 34 : Open Ended Problems" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 34.4 Page no 548" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 34.4 page no 548\n", + "\n", + "\n", + "\n", + " KE=990.13 ft.lbf/s\n" + ] + } + ], + "source": [ + "print \"Example 34.4 page no 548\\n\\n\"\n", + "#a gas stream is discharged through a stack\n", + "m_dot =10000#mass flow ratein acfm\n", + "v=50#velcoity in ft/s\n", + "KE=m_dot*v**2*(29/(379*32.2*60))#others are conversion factor for unit\n", + "print \"\\n KE=%.2f ft.lbf/s\"%(KE)##printing mistake in book" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-5.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-5.ipynb new file mode 100644 index 00000000..bb849e95 --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-5.ipynb @@ -0,0 +1,184 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5 : Newtonian Fluids" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2 page no. 42" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.2 page no 42\n", + "\n", + "\n", + "given \n", + " kinamatic viscosity =1.660000 ft**2/hr\n", + " rho=0.080000 lb/ft**3\n", + " d=0.083300 ft\n", + " v1=300.00 ft/hr\n", + " v2=0.000e+00 ft/hr\n", + " gc=4.170e+08 (ft*lb/hr)/lbf*hr\n", + "\n", + " force tou_xy=1.147e-06 lbf/ft**2\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"Example 5.2 page no 42\\n\\n\"\n", + "#To calculate the force to maintain movement of left plate \n", + "#velocity of moving plate is equal to the velocity of the plate and velocity of the gas at the surface of the stationary plate is zero\n", + "k=1.66#kinamatic viscosity of gas\n", + "rho=0.08#density of gas\n", + "d=0.0833#distance between plate\n", + "v1=300#velocity of left plate\n", + "v2=0#velocity of stationary plate\n", + "g_c=4.17*10**(8)#gravitational constant\n", + "print \"given \\n kinamatic viscosity =%2f ft**2/hr\\n rho=%2f lb/ft**3\\n d=%4f ft\\n v1=%0.2f ft/hr\\n v2=%0.3e ft/hr\\n gc=%0.3e (ft*lb/hr)/lbf*hr\"%(k,rho,d,v1,v2,g_c)#\n", + "tou_xy=-k*rho*((v2-v1)/(g_c*d))#the frce necessary to mantain the movement of the left plate\n", + "print \"\\n force tou_xy=%0.3e lbf/ft**2\"%(tou_xy)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3 Page no. 45" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.3 page no. 45\n", + "\n", + "\n", + "Given :\n", + " diameter =0.25 ft\n", + " height =0.500 ft\n", + " Torque=15.300 ft.lbf\n", + "\n", + " force =122.400 lbf\n", + "\n", + " shear stress tou=311.689 psf\n" + ] + } + ], + "source": [ + "from numpy import pi\n", + "print \"Example 5.3 page no. 45\\n\\n\"\n", + "D=0.25#diameter of fixed inner cylinder of viscometer\n", + "L=0.5#height of fixed inner cylinder of viscometer\n", + "T=15.3#measured torque\n", + "print \"Given :\\n diameter =%.2f ft\\n height =%0.3f ft\\n Torque=%0.3f ft.lbf\"%(D,L,T)#\n", + "F=(2*T)/D\n", + "print \"\\n force =%0.3f lbf\"%(F)#\n", + "#the shear stress(force parallel to the surface) using equation 5.11\n", + "tou=F/(pi*D*L)\n", + "print \"\\n shear stress tou=%0.3f psf\"%( tou)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4 page no. 45" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.4 page no. 45\n", + "\n", + "\n", + "\n", + " omega=26.200 rad/s\n", + " diameter D =0.250 ft\n", + " linear velocity =3.275000 ft/s\n", + "\n", + " clearance d=0.001000 ft\n", + " vel. gradient=39300.000 1/s\n", + " gravitational constant gc=32.140000 ft/s*S\n", + "\n", + " tou=311.700 psf\n", + " meu=0.255 lb/ft*s\n", + "\n", + " kinematic viscosity=0.004211 (ft*ft)/s\n" + ] + } + ], + "source": [ + "print \"Example 5.4 page no. 45\\n\\n\"\n", + "#refer to example no 5.3\n", + "#determine dynamic viscosity and kinematic viscosity\n", + "omega=26.2#angular rotation speed \n", + "D=0.25#diameter of fixed inner cylinder of viscometer\n", + "v=omega*D/2\n", + "print \"\\n omega=%0.3f rad/s\\n diameter D =%0.3f ft\\n linear velocity =%2f ft/s\"%(omega,D,v)#\n", + "d=0.001#clearance betwween two cylinder of visometer\n", + "vel_gradient =v/(d/12)#velocity gradient\n", + "gc=32.14#gravitational constant\n", + "print \"\\n clearance d=%5f ft\\n vel. gradient=%0.3f 1/s\\n gravitational constant gc=%3f ft/s*S\"%(d,vel_gradient,gc)#\n", + "tou=311.7#shear stress tou\n", + "meu=gc*tou/vel_gradient\n", + "print \"\\n tou=%0.3f psf\\n meu=%0.3f lb/ft*s\"%(tou,meu)#\n", + "rho=60.528#density of oil\n", + "neu=meu/rho#kinamatic viscosity\n", + "print \"\\n kinematic viscosity=%5f (ft*ft)/s\"%(neu)#" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-7.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-7.ipynb new file mode 100644 index 00000000..b0da56c2 --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-7.ipynb @@ -0,0 +1,307 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7 : Conservation Law for Mass" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.1 Page no. 64" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "example no. 7.1 page no. 64\n", + "\n", + "\n", + "\n", + " Rf=4000.000 kg/hr\n", + " Ra=8000.000 kg/hr\n", + " Rm=550.000 kg/hr\n", + " Rin=12550.000 kg/hr\n", + " Rout=12550.000 kg/hr\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"example no. 7.1 page no. 64\\n\\n\"\n", + "#applying coservation of mass\n", + "# rate of mass in-rate of mass out+rate of mass generated=rate of mass accumlated\n", + "#according to conditions in this example\n", + "#rate of mass in = rate of mass out\n", + "Rf=4000#rate of feed of gaseous waste into an incinerator\n", + "Ra=8000#rate of air feed\n", + "Rm=550#rate of methane added for combustion\n", + "Rin=Rf+Ra+Rm#total rate of mass in\n", + "Rout=Rin#Rout is rate of mass out\n", + "print \"\\n Rf=%0.3f kg/hr\\n Ra=%0.3f kg/hr\\n Rm=%0.3f kg/hr\\n Rin=%0.3f kg/hr\\n Rout=%0.3f kg/hr\"%(Rf,Ra,Rm,Rin,Rout)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2 Page no. 65" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.2 page no. 65\n", + "\n", + "\n", + "\n", + " diameter D1=0.140 m\n", + " diameter D2=0.070 m\n", + " v1=2.000 m/s\n", + " Surface area S1=0.015 m**2\n", + " density of water rho=1000.000 kg/m**3 \n", + "\n", + " volumatric flow rate q1=0.031 m**3/s\n", + " mass flow ratem1=30.788 kg/s\n", + " mass flux G=2000.000 kg/m**2*s\n", + "\n", + " surface areaS1=0.015 m**2\n", + " volumatric flow rate q2=0.031 m**3/s\n", + "\n", + " velocity v2=8.000 m/s\n" + ] + } + ], + "source": [ + "from math import pi\n", + "print \"Example 7.2 page no. 65\\n\\n\"\n", + "#water flowing through a converging circular pipe fig 7.3\n", + "#we have to determine mass and volumatric flow rates, mass flux of water \n", + "D1=.14# diameter of pipe at section 1\n", + "D2=.07#diameter of pipe at section2\n", + "v1=2#velocity at section\n", + "S1=pi*(D1**2)/4#surface area at section 1\n", + "rho=1000#density of water\n", + "print \"\\n diameter D1=%0.3f m\\n diameter D2=%0.3f m\\n v1=%0.3f m/s\\n Surface area S1=%0.3f m**2\\n density of water rho=%0.3f kg/m**3 \"%(D1,D2,v1,S1,rho)# \n", + "q1= S1*v1#volumatric flow rate at section 1\n", + "m1=rho*q1#mass flow rate at section 1\n", + "G=m1/S1#mass flux at section 1\n", + "print \"\\n volumatric flow rate q1=%0.3f m**3/s\\n mass flow ratem1=%0.3f kg/s\\n mass flux G=%0.3f kg/m**2*s\"%(q1,m1,G)#\n", + "S2=(pi*D2**2)/4\n", + "q2=q1#q2 volumatric flow rate at section 2,due to steady flow q1=q2\n", + "print \"\\n surface areaS1=%0.3f m**2\\n volumatric flow rate q2=%0.3f m**3/s\"%(S1,q1)\n", + "v2=(v1*S1)/S2#v2 velocity at section 2\n", + "print \"\\n velocity v2=%0.3f m/s\"%(v2)\n", + "#conclusion :decrease cross section area results in an increase in flow velocity for an incompressible fluid. " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3 Page no 66" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.3 page no 66,fig 7.4\n", + "\n", + "\n", + "\n", + "\n", + " velocity v1=5.000 m/s \n", + " surface area S1=0.200 m**2/s\n", + " velocity v2=7.000 m/s\n", + " surface area S2=0.300 m**2/s\n", + " velocity v3=12.000 m/s\n", + " surface area S3=0.250 m**2/s\n", + " surface area S4=0.150 m**2/s\n", + "\n", + " volumatric flow rate q1=1.000 m**3/s\n", + " volumatric flow rate q2=2.100 m**3/s\n", + " volumatrisc flow rate q3=3.000 m**3/s\n", + "\n", + " volumatric flow rate q4=0.100 m**3/s\n", + " velocity v4=0.667 m/s \n", + "\n", + " mass flow rate m=80.000 kg/s\n" + ] + } + ], + "source": [ + "print \"Example 7.3 page no 66,fig 7.4\\n\\n\\n\"\n", + "#fluid device has four openings as shoen in figure\n", + "#we have to calculate magnitude and direction of velocity,mass flow rate at section 4\n", + "rho=800#density of fluid \n", + "v1=5#velocity at section 1\n", + "S1=0.2#surface area at section 1\n", + "v2=7#velocity at section 2\n", + "S2=0.3#surface area at section 2\n", + "v3=12#velocity at section 3\n", + "S3=0.25#surface area at section 3\n", + "S4=0.15#surface area at section 4\n", + "print \"\\n velocity v1=%0.3f m/s \\n surface area S1=%0.3f m**2/s\\n velocity v2=%0.3f m/s\\n surface area S2=%0.3f m**2/s\\n velocity v3=%0.3f m/s\\n surface area S3=%0.3f m**2/s\\n surface area S4=%0.3f m**2/s\"%(v1,S1,v2,S2,v3,S3,S4)#\n", + "q1=v1*S1#volumatric flow rate at section 1\n", + "q2=v2*S2#volumatric flow rate at section 2\n", + "q3=v3*S3#volumatric flow rate at section 3\n", + "print \"\\n volumatric flow rate q1=%0.3f m**3/s\\n volumatric flow rate q2=%0.3f m**3/s\\n volumatrisc flow rate q3=%0.3f m**3/s\"%(q1,q2,q3)#\n", + "#applying continuity equation\n", + "q4=q1+q2-q3#volumatric flow rate at section 4\n", + "v4=q4/S4#velocity at section 4\n", + "print \"\\n volumatric flow rate q4=%0.3f m**3/s\\n velocity v4=%0.3f m/s \"%(q4,v4)#\n", + "m=rho*q4#mass flow rate at section 4\n", + "print \"\\n mass flow rate m=%0.3f kg/s\"%(m)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4 Page no 67" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.4 page no,fig 7.5\n", + "\n", + "\n", + "\n", + "\n", + " calculation:\n", + " calculation of liquid bypassed B=0.0833 \n" + ] + } + ], + "source": [ + "from sympy import symbols, solve\n", + "print \"Example 7.4 page no,fig 7.5\\n\\n\"\n", + "#Given pollutant in ppm in liquid stream ,some pollutant in discharge volume \n", + "#calculate what fraction of liquid bypass\n", + "#liquid stream having 600 ppm pollutant\n", + "#pollutant in the discharge stream is 50 ppm\n", + "#if B =factio of liquid bypassed,then 1-B= fraction of liquid treated\n", + "#performing a pollutant mass balance around point2 in fig. 7.5\n", + "#B=poly([0],'x')#\n", + "B=symbols('x')\n", + "N=solve((1-B)*0+600*B-50*1,B)\n", + "print \"\\n\\n calculation:\\n calculation of liquid bypassed B=%.4f \"%N[0]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.5 Page no 67" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.5 page no 67\n", + "\n", + "\n", + "\n", + " diameter at inlet d1=0.090 m\n", + " volumatric flow rate at inlet q_in=0.025 m**3/s\n", + " diameter d2=0.040 m\n", + " volumatric flow rate at outlet q_out=0.004 m**3/s\n", + "\n", + " volumatric flow in tank=0.022 m**3/s\n", + " diameter of tank D=1.400 m\n", + " surface area of tank S=1.539 m**2\n", + "\n", + " rate of water level rise R_z=0.014 m/s\n" + ] + } + ], + "source": [ + "from math import pi\n", + "print \"Example 7.5 page no 67\\n\\n\"\n", + "#water flow in tank inletand outlet pipes\n", + "#applying continuity principle to the control volume\n", + "#since generation rate =0\n", + "d1=0.09#diameter of inlet pipe\n", + "v_in=4#velocity,m/s\n", + "v_out=3#velocity,m/s\n", + "q_in=(pi*d1**2)*v_in/4#volumatric flow rate at inlet \n", + "d2=0.04#diameter of outlet pipe\n", + "q_out=(pi*d2**2)*v_out/4\n", + "print \"\\n diameter at inlet d1=%0.3f m\\n volumatric flow rate at inlet q_in=%0.3f m**3/s\\n diameter d2=%0.3f m\\n volumatric flow rate at outlet q_out=%0.3f m**3/s\"%(d1,q_in,d2,q_out)#\n", + "q=q_in-q_out#for an incmpressible fluid of volume v, q=(dv/dt)=q_in-q_out\n", + "D=1.4#diameter of tank\n", + "S=(pi*D**2)/4\n", + "print \"\\n volumatric flow in tank=%0.3f m**3/s\\n diameter of tank D=%0.3f m\\n surface area of tank S=%0.3f m**2\"%( q,D,S)#\n", + "#z=fluid height\n", + "R_z=(q_in-q_out)/S#R_z rate of water level rise\n", + "print \"\\n rate of water level rise R_z=%0.3f m/s\"%(R_z)#\n", + "#R_z is positive ,the water level is rising in the tank from it's initial height of 1.5 m" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-8.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-8.ipynb new file mode 100644 index 00000000..5212c052 --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-8.ipynb @@ -0,0 +1,190 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8 : Conservation Law of Energy" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1 Page no 75" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.1 page no 75\n", + "\n", + "\n", + "\n", + " heat capacity Cp=1090.000 J/kg.deg c\n", + " mass flow rate M_dot=9.000 kg/s\n", + " gas inlet temperature T1=650.000 deg c\n", + " heat transferred Q=5500000.000 W\n", + "\n", + " temperature T2=89 deg c \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"Example 8.1 page no 75\\n\\n\"\n", + "# heat is transferred from a gas \n", + "Cp=1090#average heat capacity of gas\n", + "M_dot=9#mass flow rate \n", + "T1=650#gas inlet temperature\n", + "#kinetic and potential enargy effects are neglected,there is no shaft work\n", + "Q=5.5e+6#heat transferred\n", + "delta_H=Q#since there are no kinetic,potential,and shaft work effects\n", + "print \"\\n heat capacity Cp=%0.3f J/kg.deg c\\n mass flow rate M_dot=%0.3f kg/s\\n gas inlet temperature T1=%0.3f deg c\\n heat transferred Q=%0.3f W\"%(Cp,M_dot,T1,Q)#\n", + "T2=round(-Q/(M_dot*Cp)) + T1\n", + "print \"\\n temperature T2=%0.f deg c \"%(T2)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2 Page no 77 " + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.2 page no 77 fig 8.2 \n", + "\n", + "\n", + "\n", + "\n", + " flow rate q1=8.000 m**3/s\n", + " flow rate q2=6.000 m**3/s\n", + " flow rate q3=14.000 m**3/s\n", + " enthalpy h1=250.000 j/kg\n", + " enthalpy h2=150.000 j/kg\n", + " enthalpy h3=200.000 j/kg\n", + " density of fluid rho=800.000 kg/m**3\n", + "\n", + " enthalpy H=107.239 hp\n", + "\n", + " work W_dot=107.239 hp\n" + ] + } + ], + "source": [ + "print \"Example 8.2 page no 77 fig 8.2 \\n\\n\\n\"\n", + "#fluid flow in a device\n", + "#fluid flow with in the control volume is steady\n", + "q1=8#flow rate at section 1,direction in\n", + "q2=6#flow rate at section 2, direction in\n", + "q3=14#flow rate at section 3,direction out\n", + "h1=250#enthalpy at section 1\n", + "h2=150#enthalpy at section 2\n", + "h3=200#enthalpy at section 3\n", + "rho=800#density of fluid\n", + "print \"\\n flow rate q1=%0.3f m**3/s\\n flow rate q2=%0.3f m**3/s\\n flow rate q3=%0.3f m**3/s\\n enthalpy h1=%0.3f j/kg\\n enthalpy h2=%0.3f j/kg\\n enthalpy h3=%0.3f j/kg\\n density of fluid rho=%0.3f kg/m**3\"%(q1,q2,q3,h1,h2,h3,rho)#\n", + "#applying total energy balance\n", + "hp=746#1 hp=746 kw\n", + "H=rho*(q1*h1+q2*h2-q3*h3)/hp\n", + "print \"\\n enthalpy H=%0.3f hp\"%(H)#\n", + "#for adiabatic steady operation, Q_dot=0\n", + "W_dot=H#W_dot is work \n", + "print \"\\n work W_dot=%0.3f hp\"%(W_dot)#\n", + "#since work is positive ,the surroundings must be doing work on the system through some device" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5 Page no 81" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Example 8.5 page no 81 fig 8.3\n", + "\n", + "\n", + "\n", + "\n", + " elevation head at section 1 z1=9.000 m\n", + " height at section h2=1.000 m\n", + " diameter of cylindrical tank D1=3.000 m\n", + " diameter of outlet hole of tank D2=0.300 m\n", + " gravitational acc. g=9.807 m/s**2\n", + "\n", + " time t=90.319 sec\n", + "\n", + " x=-0.010\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "print \" Example 8.5 page no 81 fig 8.3\\n\\n\\n\"\n", + "#a cylindrical tank filled with water\n", + "#applying bernoulli equation\n", + "z1=9#elevation head at section 1\n", + "h2=1#height at section 2\n", + "D1=3#diameter of cylindrical tank \n", + "D2=.3#diameter of outlet hole of tank\n", + "g=9.807#gravitational acceleration\n", + "print \"\\n elevation head at section 1 z1=%0.3f m\\n height at section h2=%0.3f m\\n diameter of cylindrical tank D1=%0.3f m\\n diameter of outlet hole of tank D2=%0.3f m\\n gravitational acc. g=%0.3f m/s**2\"%(z1,h2,D1,D2,g)#\n", + "t=2*((sqrt(z1)-sqrt(h2))/((sqrt(2*g))*(D2/D1)**2))\n", + "print \"\\n time t=%0.3f sec\"%(t)#\n", + "x=-(D2/D1)**2#ratio of a/g\n", + "print \"\\n x=%0.3f\"%(x)#\n", + "#for this example the maximum acceleration is 1% of g,therefore saftey use Bernoulli equation " + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-9.ipynb b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-9.ipynb new file mode 100644 index 00000000..f97d2dd5 --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/Chapter-9.ipynb @@ -0,0 +1,278 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9 : Conservation law for Momentum" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1 Page no 87" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.1 page no 87\n", + "\n", + "\n", + "\n", + " density rho=62.400 lb/ft**3\n", + " horizontal velocity of water v=100.000 ft/s\n", + " flow rate q=0.500 ft**3/s\n", + "\n", + " momentum rate M_in=96.894 lbf\n", + "\n", + " net horizontal force F=-96.894 lbf\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "print \"Example 9.1 page no 87\\n\\n\"\n", + "#a horizontal water jet impinges on avertical plate\n", + "rho=62.4#density of water\n", + "v=100#horizontal velocity of water\n", + "q=0.5#flow rate\n", + "g=32.2#gravitational constant\n", + "print \"\\n density rho=%0.3f lb/ft**3\\n horizontal velocity of water v=%0.3f ft/s\\n flow rate q=%0.3f ft**3/s\"%(rho,v,q)#\n", + "M_in=(rho*q*v)/g#momentum rate of inlet water in the horizontal direction\n", + "print \"\\n momentum rate M_in=%0.3f lbf\"%(M_in)#\n", + "M_out=0#momentum rate of water out\n", + "F=M_out-M_in\n", + "print \"\\n net horizontal force F=%0.3f lbf\"%(F)#\n", + "#negative sign indicate that to hold the plate in place, a force must be exerted in a direction opposite to that of the water flow" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.2 Page no 87" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.2 page no 87\n", + "\n", + "\n", + "mass flow rate m_dot=0.150 kg/s\n", + " velocity in x direction V_in=420.000 m/s\n", + " velocity out in the x direction=0.000=m/s\n", + "\n", + " force F_x=-63.000 N\n", + "velocity in y dir V_in_y=0.000 m/s\n", + " velocity out y dir V_out_y=420.000 m/s\n", + "\n", + " force in y dir F_y=63.000 N\n", + "\n", + " resultant force F_res=89.095 N\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "print \"Example 9.2 page no 87\\n\\n\"\n", + "#a horizontal line carries saturated steam\n", + "#water is entrained by the steam,and line is bend\n", + "#select the control volume as the fluid in the bend and apply amass balance\n", + "#since m1_dot=m2_dot,v1=v2\n", + "m_dot=0.15#mass flow rate\n", + "V_in_x=420#velocity in horizontal x direction\n", + "V_out_x=0#velocity out ,horizontal direction\n", + "print \"mass flow rate m_dot=%0.3f kg/s\\n velocity in x direction V_in=%0.3f m/s\\n velocity out in the x direction=%0.3f=m/s\"%(m_dot,V_in_x,V_out_x)#\n", + "#applying linear horizontal balance in x direction\n", + "F_x=m_dot*V_out_x-m_dot*V_in_x#force in x-dir\n", + "print \"\\n force F_x=%0.3f N\"%(F_x)#\n", + "#the x-dir force acting on the 90 deg elbow therefore,F_x=+63 N\n", + "V_in_y=0#velocity in vertical in y direction\n", + "V_out_y=420#velocity out vertical in y direction\n", + "print \"velocity in y dir V_in_y=%0.3f m/s\\n velocity out y dir V_out_y=%0.3f m/s\"%(V_in_y,V_out_y)#\n", + "F_y=m_dot*V_out_y-m_dot*V_in_y#force in y dir\n", + "print \"\\n force in y dir F_y=%0.3f N\"%(F_y)#\n", + "#y dir force is acting on the elbow is therefore F_y=-63 N\n", + "F_res=sqrt(F_x*F_x+F_y*F_y)#resultant force F_res\n", + "print \"\\n resultant force F_res=%0.3f N\"%(F_res)#\n", + "#this is the force required to hold the elbow" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.3 Page no 88" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.3 page no 88\n", + "\n", + "\n", + "density rho=62.400 lb/ft**3\n", + " diameter D=0.167 ft\n", + " momentum M_dot_out=0.000 lbf\n", + " forc in x dir F_x=5.000 lbf\n", + "\n", + " momentum M_dot_in=5.000 lbf\n", + "\n", + " surface area S=0.022 ft**2\n", + "\n", + " velocity =10.849 ft/s\n", + "\n", + " volumatric flow rate q=0.238 ft**3/s\n", + " mass flow rate m_dot=14.828 lb/s\n" + ] + } + ], + "source": [ + "from math import pi\n", + "print \"Example 9.3 page no 88\\n\\n\"\n", + "#water flow in a pipe\n", + "rho=62.4#density of water \n", + "D=0.167#diameter of pipe\n", + "g=32.174#gravitational constant\n", + "M_dot_out=0#momentum out in x dir\n", + "F_x=5#foce in the x dir\n", + "print \"density rho=%0.3f lb/ft**3\\n diameter D=%0.3f ft\\n momentum M_dot_out=%0.3f lbf\\n forc in x dir F_x=%0.3f lbf\"%(rho,D,M_dot_out,F_x)#\n", + "M_dot_in=M_dot_out+F_x#momentum in \n", + "print \"\\n momentum M_dot_in=%0.3f lbf\"%(M_dot_in)#\n", + "S=(pi*D**2)/4#surface area \n", + "print \"\\n surface area S=%0.3f ft**2\"%(S)#\n", + "v=sqrt((M_dot_in*g)/(rho*S))\n", + "print \"\\n velocity =%0.3f ft/s\"%(v)#\n", + "q=S*v#volumatric flow rate \n", + "m_dot=rho*q#mass flow rate\n", + "print \"\\n volumatric flow rate q=%0.3f ft**3/s\\n mass flow rate m_dot=%0.3f lb/s\"%(q,m_dot)#" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.4 Page no 89 " + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.4 page no 89 fig. 9.2\n", + "\n", + "\n", + "\n", + "\n", + " density rho=1000.000 kg/m**3\n", + " viscosity meu=0.001000 kg/m.s\n", + " volumatric flow rate q=0.025 m**3/s\n", + " diametetr at section1 D1=0.100 m\n", + " diameter at section2 D2=0.030 m\n", + "\n", + " surface area at section 1 S1=0.008 m**2\n", + " surface area at section 2 S2=0.001 m**2\n", + "\n", + " velocity at sec1 v1=3.183 m/s\n", + " velocity at sec2 v2=35.368 m/s\n", + "\n", + " pressure at point2 P2=0.000 Pag(pascal gauge)\n", + " pressure atpoint1 P1=620373.346 Pag\n", + "\n", + " mass flow rate m_dot1=25.000 kg/s\n", + " mass flow rate m_dot2=25.000 kg/s\n", + "\n", + " momentum rate M_dot1_x=79.577 N\n", + " momentum rate M_dot2_x=884.194 N\n", + "\n", + " force from momentum balance F_x=-4067.784 N\n" + ] + } + ], + "source": [ + "print \"Example 9.4 page no 89 fig. 9.2\\n\\n\\n\"\n", + "#water is discharged through a fire hose\n", + "rho=1000#density of water \n", + "meu=0.001#viscosity of water\n", + "q=0.025#flow rate at section 1\n", + "D1=.1#diameter at section 1\n", + "D2=.03#diameter at section 2\n", + "print \"\\n density rho=%0.3f kg/m**3\\n viscosity meu=%3f kg/m.s\\n volumatric flow rate q=%0.3f m**3/s\\n diametetr at section1 D1=%0.3f m\\n diameter at section2 D2=%0.3f m\"%(rho,meu,q,D1,D2)#\n", + "S1=(pi*D1**2)/4\n", + "S2=(pi*D2**2)/4\n", + "print \"\\n surface area at section 1 S1=%0.3f m**2\\n surface area at section 2 S2=%0.3f m**2\"%(S1,S2)#\n", + "v1=q/S1#velocity at section1\n", + "v2=q/S2#velocity at section2\n", + "print \"\\n velocity at sec1 v1=%0.3f m/s\\n velocity at sec2 v2=%0.3f m/s\"%(v1,v2)#\n", + "#appuing bernoulli's equation between point 1 and 2\n", + "P2=0#pressure at point 2\n", + "P1=(rho/2)*(v2**2-v1**2)#pressure at point 1\n", + "print \"\\n pressure at point2 P2=%0.3f Pag(pascal gauge)\\n pressure atpoint1 P1=%0.3f Pag\"%(P2,P1)#\n", + "m_dot1=25#mass flow rate at section 1\n", + "m_dot2=25#mass flow rate at section 2\n", + "print \"\\n mass flow rate m_dot1=%0.3f kg/s\\n mass flow rate m_dot2=%0.3f kg/s\"%(m_dot1,m_dot2)#\n", + "M_dot1_x=m_dot1*v1#momentum rate in x dir at section 1\n", + "M_dot2_x=m_dot2*v2#momentum rate in x dir at section 2\n", + "print \"\\n momentum rate M_dot1_x=%0.3f N\\n momentum rate M_dot2_x=%0.3f N\"%(M_dot1_x,M_dot2_x)#\n", + "#applying momentum balance in the x direction\n", + "F_x=M_dot2_x-M_dot1_x-P1*S1#force from momentum balance\n", + "print \"\\n force from momentum balance F_x=%0.3f N\"%(F_x)#" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/screenshots/29-6Penetration.png b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/screenshots/29-6Penetration.png Binary files differnew file mode 100644 index 00000000..8baddf47 --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/screenshots/29-6Penetration.png diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/screenshots/29-7MoleFraction.png b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/screenshots/29-7MoleFraction.png Binary files differnew file mode 100644 index 00000000..a225f6c9 --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/screenshots/29-7MoleFraction.png diff --git a/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/screenshots/PressureDrop29_3.png b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/screenshots/PressureDrop29_3.png Binary files differnew file mode 100644 index 00000000..deab77d4 --- /dev/null +++ b/Fluid_Flow_For_The_Practicing_Chemical_Engineer_by_J._P._Abulencia_And_L._Theodore/screenshots/PressureDrop29_3.png diff --git a/sample_notebooks/TanveerAhmad/Chapter6.ipynb b/sample_notebooks/TanveerAhmad/Chapter6.ipynb new file mode 100644 index 00000000..7ed20e47 --- /dev/null +++ b/sample_notebooks/TanveerAhmad/Chapter6.ipynb @@ -0,0 +1,369 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter6 - Oscillators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.1 - page 438" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "Vf= 0.0125 # in volt\n", + "Vo= 0.5 # in volt\n", + "Beta= Vf/Vo \n", + "# For oscillator A*Beta= 1\n", + "A= 1/Beta \n", + "print \"Amplifier Should have a minimum gain of\",A,\"to provide oscillation\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amplifier Should have a minimum gain of 40.0 to provide oscillation\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.2 - page 439" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi, sqrt\n", + "# Given data\n", + "R1= 50 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=R1 # in ohm\n", + "R3=R2 # in ohm\n", + "C1= 60 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2=C1 # in F\n", + "C3=C2 # in F\n", + "f= 1/(2*pi*R1*C1*sqrt(6)) \n", + "print \"Frequency of oscilltions = %0.2f kHz\" %( f*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 21.66 kHz\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.3 - page 445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# Given data\n", + "R1= 200 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=R1 # in ohm\n", + "C1= 200 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2=C1 # in F\n", + "f= 1/(2*pi*R1*C1) # in Hz\n", + "print \"Frequency of oscilltions = %0.2f kHz\" %(f*10**-3)\n", + "\n", + "# Note: Calculation to find the value of f in the book is wrong, so answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 3.98 kHz\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.4 - page 460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi, sqrt\n", + "# Given data\n", + "L= 100 # in \u00b5H\n", + "L= L*10**-6 # in H\n", + "C1= .001 # in \u00b5F\n", + "C1= C1*10**-6 # in F\n", + "C2= .01 # in \u00b5F\n", + "C2= C2*10**-6 # in F\n", + "C= C1*C2/(C1+C2) # in F\n", + "# (i)\n", + "f= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Operating frequency = %0.f kHz\" %(round(f*10**-3))\n", + "# (ii)\n", + "Beta= C1/C2 \n", + "print \"Feedback fraction = %0.1f \" %Beta\n", + "# (iii)\n", + "# A*Bita >=1, so Amin*Bita= 1\n", + "Amin= 1/Beta \n", + "print \"Minimum gain to substain oscillations is\",Amin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Operating frequency = 528 kHz\n", + "Feedback fraction = 0.1 \n", + "Minimum gain to substain oscillations is 10.0\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.5 - page 460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi, sqrt\n", + "# Given data\n", + "L= 15 # in \u00b5H\n", + "L= L*10**-6 # in H\n", + "C1= .004 # in \u00b5F\n", + "C1= C1*10**-6 # in F\n", + "C2= .04 # in \u00b5F\n", + "C2= C2*10**-6 # in F\n", + "C= C1*C2/(C1+C2) # in F\n", + "f= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Frequency of oscilltions = %0.1f kHz\" %(f*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 681.5 kHz\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.6 - page 461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi, sqrt\n", + "# Given data\n", + "L= 0.01 # in H\n", + "C= 10 # in pF\n", + "C= C*10**-12 # in F\n", + "f= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Frequency of oscilltions = %0.2f kHz\" %(f*10**-3)\n", + "# Note: Calculation to find the value of f in the book is wrong, so answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 503.29 kHz\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.7 - page 466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# Given data\n", + "R1= 220 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=R1 # in ohm\n", + "C1= 250 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2=C1 # in F\n", + "f= 1/(2*pi*R1*C1) \n", + "print \"Frequency of oscilltions = %0.2f Hz\" %f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 2893.73 Hz\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.8 - page 467" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "from math import tan\n", + "# Given data\n", + "R= 10 # in kohm\n", + "R=R*10**3 # in ohm\n", + "f=1000 \n", + "fie= 60 # in \u00b0\n", + "# The impedence of given circuit , Z= R+j*1/(omega*C)\n", + "# the phase shift, tan(fie)= imaginary part/ Real part\n", + "# tand(fie) = 1/(omega*R*C)\n", + "C= 1/(2*pi*R*tan(fie*pi/180)) \n", + "print \"The value of C = %0.2f \u00b5F\" %(C*10**6)\n", + "# Note : There is an calculation error to evaluate the value of C, So the answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of C = 9.19 \u00b5F\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.9 - page 467" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi, sqrt\n", + "# Given data\n", + "L= 50 # in \u00b5H\n", + "L= L*10**-6 # in H\n", + "C1= 300 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2= 100 # in pF\n", + "C2= C2*10**-12 # in F\n", + "C_eq= C1*C2/(C1+C2) # in F\n", + "f= 1/(2*pi*sqrt(L*C_eq)) # in Hz\n", + "print \"Frequency of oscillations = %0.1f MHz\" %(f*10**-6)\n", + "Beta= C2/C1 \n", + "# (iii)\n", + "# A*Beta >=1, so A*Bita= 1 (for sustained oscillations)\n", + "Amin= 1/Beta \n", + "print \"Minimum gain to substain oscillations is\",Amin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscillations = 2.6 MHz\n", + "Minimum gain to substain oscillations is 3.0\n" + ] + } + ], + "prompt_number": 33 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |