diff options
author | debashisdeb | 2014-06-20 15:42:42 +0530 |
---|---|---|
committer | debashisdeb | 2014-06-20 15:42:42 +0530 |
commit | 83c1bfceb1b681b4bb7253b47491be2d8b2014a1 (patch) | |
tree | f54eab21dd3d725d64a495fcd47c00d37abed004 /Introduction_To_Chemical_Engineering/ch4.ipynb | |
parent | a78126bbe4443e9526a64df9d8245c4af8843044 (diff) | |
download | Python-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.tar.gz Python-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.tar.bz2 Python-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.zip |
removing problem statements
Diffstat (limited to 'Introduction_To_Chemical_Engineering/ch4.ipynb')
-rw-r--r-- | Introduction_To_Chemical_Engineering/ch4.ipynb | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/Introduction_To_Chemical_Engineering/ch4.ipynb b/Introduction_To_Chemical_Engineering/ch4.ipynb index 4c312cd2..3a5046ad 100644 --- a/Introduction_To_Chemical_Engineering/ch4.ipynb +++ b/Introduction_To_Chemical_Engineering/ch4.ipynb @@ -27,18 +27,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#to find water compressibility\n", "\n", "import math \n", "\n", - "# Variables\n", "delta_p=70.; #in bar\n", "Et=20680. #in bar\n", "\n", - "# Calculations\n", "compressibility = delta_p/Et;\n", "\n", - "# Results\n", "print \"compressibilty of water = %f\"%(compressibility)\n" ], "language": "python", @@ -66,14 +62,11 @@ "cell_type": "code", "collapsed": false, "input": [ - "#to find the viscosity of oil\n", "\n", "import math \n", - "# Variables\n", "F=0.5*9.8; #in N\n", "A=3.14*0.05*0.15; #in m2\n", "\n", - "# Calculations and Results\n", "shear_stress=F/A; #in Pa\n", "print \"shear_stress = %f Pa\"%(shear_stress)\n", "\n", @@ -107,17 +100,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#to find variation of losses with velocity\n", "\n", "import math \n", - "# Variables\n", "loss_ratio=3.6; #delta_P2/delta_P1=3.6\n", "velocity_ratio=2.; #u2/u1=2\n", "\n", - "# Calculations\n", "n=math.log(loss_ratio,2); #delta_P2/delta_P1=(u2/u1)**n\n", "\n", - "# Results\n", "print \"power constant = %f flow is turbulent\"%(n)\n" ], "language": "python", @@ -145,16 +134,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#to find the boundary layer properties\n", "\n", "import math \n", "print ('part 1')\n", "\n", - "# Variables\n", "x=0.05 #in m\n", "density=1000. #in kg/m3\n", "\n", - "# Calculations and Results\n", "viscosity=1.*10**-3 #in Pa-s\n", "u=1. #in m/s\n", "Re=(density*u*x)/viscosity;\n", @@ -210,10 +196,8 @@ "cell_type": "code", "collapsed": false, "input": [ - "#to find the flow properties\n", "\n", "import math \n", - "# Variables\n", "d1=0.05 #in m\n", "A1=(3.14*d1**2)/4.;\n", "density_1=2.1 #in kg/m3\n", @@ -221,7 +205,6 @@ "P1=1.8; #in bar\n", "P2=1.3; #in bar\n", "\n", - "# Calculations and Results\n", "w=density_1*A1*u1;\n", "density_2=density_1*(P2/P1);\n", "print \"density at section 2 = %f kg/cubic meter\"%(density_2)\n", @@ -255,19 +238,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#to find the temperature increase\n", "\n", "import math \n", - "# Variables\n", "Q=0.001*10**5 #in J/s\n", "w=0.001*1000 #in kg/s\n", "density=1000. #in kg/m3\n", "cp=4.19*10**3 #in J/kg K\n", "\n", - "# Calculations\n", "delta_T=Q/(w*cp);\n", "\n", - "# Results\n", "print \"Temperature increase = %f degree celcius\"%(delta_T)\n" ], "language": "python", @@ -295,17 +274,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#to find the pressure\n", "\n", "import math \n", - "# Variables\n", "u1=0; #in m/s\n", "ws=0;\n", "P1=0.7*10**5 #in Pa\n", "P3=0\n", "density=1000 #in kg/m3\n", "\n", - "# Calculations and Results\n", "u3=((2*(P1-P3))/density)**0.5;\n", "print \"u3 = %f m/s\"%(u3)\n", "\n", @@ -313,7 +289,6 @@ "u2=u3/ratio_area;\n", "print \"u2 = %f m/s\"%(u2)\n", "\n", - "#applying bernoulli's equation\n", "P2=1.7*10**5-((density*u2**2)/2)\n", "print \"P2 = %f Pa\"%(P2)\n", "print \"this flow is physically unreal\"\n" @@ -346,15 +321,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#to find the power requirements\n", "\n", "import math \n", "\n", - "# Variables\n", "Q=3800./(24*3600) #in m3/s\n", "d=0.202 #in m\n", "\n", - "# Calculations\n", "u=Q/((3.14/4)*d**2); #in m/s\n", "delta_P=5.3*10**6 #in Pa\n", "density=897. #in kg/m3\n", @@ -363,7 +335,6 @@ "mass_flow_rate= Q*density;\n", "power=(ws*mass_flow_rate)/0.6;\n", "\n", - "# Results\n", "print \"power required = %f kW\"%(power/1000)\n", "\n" ], @@ -392,15 +363,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#to find the tube length\n", "\n", "import math \n", - "# Variables\n", "density=1000 #in kg/m3\n", "viscosity=1*10**-3 #in Pa s\n", "P=100*1000 #in Pa\n", "\n", - "# Calculations and Results\n", "vdP=P/density;\n", "\n", "Q=2.5*10**-3/(24*3600)\n", @@ -411,7 +379,6 @@ "Re=density*u*0.0005/viscosity;\n", "print \"Re = %f\"%(Re)\n", "\n", - "#F=18.86*L\n", "L=(-u**2+vdP)/18.86;\n", "print \"L = %f m\"%(L)\n" ], @@ -442,16 +409,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#to find the discharge pressure\n", "\n", "import math \n", - "# Variables\n", "d=0.025 #in m\n", "u=3. #in m/s\n", "density=894. #in kg/m3\n", "viscosity=6.2*10**4 #in Pa-s\n", "\n", - "# Calculations and Results\n", "Re=(u*d*density)/viscosity;\n", "f=0.0045;\n", "L=50.;\n", @@ -489,15 +453,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#to find the level difference\n", "\n", "import math \n", - "# Variables\n", "Q=0.8*10**-3; #in m3/s\n", "d=0.026 #in m\n", "A=(3.14*(d**2))/4 #in m2\n", "\n", - "# Calculations\n", "u=Q/A; #in m/s\n", "density=800 #in kg/m3\n", "viscosity=0.0005 #in Pa-s\n", @@ -507,7 +468,6 @@ "L=60\n", "h_f=2*f*((u**2)/9.8)*(L/d);\n", "\n", - "# Results\n", "print \"level difference = %f m\"%(h_f)\n" ], "language": "python", @@ -535,16 +495,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#to find the engery cost\n", "\n", "import math \n", - "# Variables\n", "delta_z=50; #in m\n", "L=290.36 #in m\n", "d=0.18 #in m\n", "Q=0.05 #in m3/s\n", "\n", - "# Calculations\n", "A=(3.14*d**2)/4; #in m2\n", "u=Q/A; #in m/s\n", "density=1180; #in kg/m3\n", @@ -558,7 +515,6 @@ "power=mass_flow_rate*ws/1000; #in KW\n", "energy_cost=power*24*0.8;\n", "\n", - "# Results\n", "print \"Energy cost = Rs %f\"%(energy_cost)\n" ], "language": "python", @@ -586,16 +542,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#to find the pressure loss\n", "\n", "import math \n", - "# Variables\n", "density=998 #in kg/m3\n", "viscosity=0.0008 #in Pa-s\n", "d=0.03 #in m\n", "u=1.2 #in m/s\n", "\n", - "# Calculations\n", "Re=density*d*u/viscosity;\n", "\n", "f=0.0088;\n", @@ -605,7 +558,6 @@ "delta_P=(2*f*u**2*L)/d; #in Pa\n", "delta_P_coil=delta_P*(1+(3.54*(d/D)));\n", "\n", - "# Results\n", "print \"frictional pressure drop = %f kPa\"%(delta_P_coil)\n" ], "language": "python", @@ -633,11 +585,9 @@ "cell_type": "code", "collapsed": false, "input": [ - "#to find pressure drop per unit length\n", "\n", "import math \n", "\n", - "# Variables\n", "b=0.050 #in m\n", "a=0.025 #in m\n", "d_eq=b-a #in m\n", @@ -645,14 +595,12 @@ "u=3 #in m/s\n", "viscosity = 0.001\n", "\n", - "# Calculations\n", "Re=d_eq*u*density/viscosity;\n", "\n", "e=40*10**6 #in m\n", "f=0.0062;\n", "P_perunit_length=2*f*density*u**2/d_eq; #in Pa/m\n", "\n", - "# Results\n", "print \"pressure per unit length = %f Pa/m\"%(P_perunit_length)\n" ], "language": "python", @@ -680,17 +628,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#to find the flow rate\n", "\n", "import math \n", - "# Variables\n", "d = 0.3 #in m\n", "u = 17.63 #avg velocity in m/s\n", "\n", - "# Calculations\n", "q = (3.14/4)*d**2*u;\n", "\n", - "# Results\n", "print \"volumetric flow rate = %f cubic meter per second\"%(q)\n" ], "language": "python", @@ -718,18 +662,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#to find the size of pipe required\n", "\n", "import math \n", "\n", - "# Variables\n", "d = 0.15 #in m\n", "\n", - "# Calculations\n", "u = (0.0191/0.15**2); #in m/s\n", "q = (3.14/4)*d**2*u;\n", "\n", - "# Results\n", "print \"volumetric flow rate = %f cubic meter/s\"%(q)\n" ], "language": "python", @@ -757,15 +697,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#to find the pressure gradient\n", "\n", "import math \n", - "# Variables\n", "Q=0.0003 #in m3/s\n", "d=0.05 #in m\n", "A=(3.14*d**2)/4;\n", "\n", - "# Calculations\n", "u=Q/A;\n", "\n", "density=1000; #in kg/m3\n", @@ -778,11 +715,9 @@ "L=0.5 #in m\n", "delta_Pf=fm*((density*L*u**2)/dp)*((1-e)/e**3); #in Pa\n", "\n", - "#applying bernoulli's equation, we get\n", "delta_P=delta_Pf-(density*9.8*L);\n", "pressure_gradient=delta_P/(L*1000); #in kPa/m\n", "\n", - "# Results\n", "print \"required pressure gradient = %f kPa/m of packed height\"%(pressure_gradient)\n" ], "language": "python", @@ -810,18 +745,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#to find minimum fluidization velocity\n", "\n", "from scipy.optimize import fsolve \n", "import math \n", "\n", - "# Variables\n", "d=120*10**-6 #in m\n", "density=2500 #particle density in kg/m3\n", "e_min=0.45;\n", "density_water=1000 #in kg/m3\n", "\n", - "# Calculations and Results\n", "viscosity=0.9*10**-3; #in Pa-s\n", "umf=(d**2*(density-density_water)*9.8*e_min**3)/(150*viscosity*(1-e_min));\n", "print \"minimum fludization velocity = %f m/s\"%(umf)\n", @@ -829,11 +761,9 @@ "Re_mf=(d*umf*density_water)/(viscosity*(1-e_min));\n", "\n", "\n", - "#given that uo/umf=10\n", "def F(e):\n", " return e**3+1.657*e-1.675;\n", "\n", - "#initial guess\n", "x = 10.;\n", "e = fsolve(F,x)\n", "\n", @@ -868,21 +798,17 @@ "cell_type": "code", "collapsed": false, "input": [ - "#to find the power requirements\n", "\n", "import math \n", - "# Variables\n", "P=9807. #in Pa\n", "density=1000. #in kg/m3\n", "Q=250./(60.*density)\n", "head=25. #in m\n", "\n", - "# Calculations\n", "w= head*Q*P; #in kW\n", "power_delivered=w/0.65;\n", "power_taken=power_delivered/0.9;\n", "\n", - "# Results\n", "print \"power_delivered = %f kW\"%(power_delivered/1000)\n", "print \"power taken by motor = %f kW\"%(power_taken/1000)\n", "\n" |