summaryrefslogtreecommitdiff
path: root/sample_notebooks/Mohdarif/chapter9.ipynb
diff options
context:
space:
mode:
authorThomas Stephen Lee2015-08-28 16:53:23 +0530
committerThomas Stephen Lee2015-08-28 16:53:23 +0530
commit4a1f703f1c1808d390ebf80e80659fe161f69fab (patch)
tree31b43ae8895599f2d13cf19395d84164463615d9 /sample_notebooks/Mohdarif/chapter9.ipynb
parent9d260e6fae7328d816a514130b691fbd0e9ef81d (diff)
downloadPython-Textbook-Companions-4a1f703f1c1808d390ebf80e80659fe161f69fab.tar.gz
Python-Textbook-Companions-4a1f703f1c1808d390ebf80e80659fe161f69fab.tar.bz2
Python-Textbook-Companions-4a1f703f1c1808d390ebf80e80659fe161f69fab.zip
add books
Diffstat (limited to 'sample_notebooks/Mohdarif/chapter9.ipynb')
-rwxr-xr-xsample_notebooks/Mohdarif/chapter9.ipynb445
1 files changed, 445 insertions, 0 deletions
diff --git a/sample_notebooks/Mohdarif/chapter9.ipynb b/sample_notebooks/Mohdarif/chapter9.ipynb
new file mode 100755
index 00000000..d7050fa1
--- /dev/null
+++ b/sample_notebooks/Mohdarif/chapter9.ipynb
@@ -0,0 +1,445 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:efded2f677db2675356cffa3b1053d25367de2f521a0cbcad887abf7b22a8cb7"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter - 09 : Hydraulic Turbines"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Ex9.1, page 305"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#input data\n",
+ "H=91.5#Head of the pelton wheel at inlet in m\n",
+ "Q=0.04#Discharge of the pelton wheel in m**3/s\n",
+ "N=720#Rotating speed of the wheel in rpm\n",
+ "Cv=0.98#Velocity coefficient of the nozzle \n",
+ "n0=0.8#Efficiency of the wheel\n",
+ "UC1=0.46#Ratio of bucket speed to jet speed\n",
+ "g=9.81#Acceleration due to gravity in m/s**2\n",
+ "dw=1000#Density of water in kg/m**3\n",
+ "\n",
+ "#calculations\n",
+ "P=dw*g*H*Q*n0*10**-3#Power developed in kw\n",
+ "C1=Cv*(2*g*H)**(1/2)#Jet speed in m/s\n",
+ "U=UC1*C1#Wheel speed in m/s\n",
+ "w=(2*3.1415*N)/60#Angular velocity of the wheel in rad/s\n",
+ "D=(2*U)/w#Diameter of the wheel in m\n",
+ "A=Q/C1#Jet area in m**2\n",
+ "d=((4*A)/3.1415)**(1/2)#Jet diameter in m\n",
+ "Dd=D/d#Wheel to jet diameter ratio at centre line of the buckets\n",
+ "Nsp=((1/(g*H))**(5/4))*(((P*10**3)/dw)**(1/2))*(N/60)*2*3.1415#Dimensionless power specific speed in rad\n",
+ "\n",
+ "#output\n",
+ "print '''(a)Wheel-to-jet diameter ratio at the centre line of the buckets is %3.1f\n",
+ "(b)The jet speed of the wheel is %3.2f m/s\n",
+ " Wheel speed is %3.1f m/s\n",
+ "(c)Dimensionless power specific speed is %3.3f rad'''%(Dd,C1,U,Nsp)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)Wheel-to-jet diameter ratio at the centre line of the buckets is 0.0\n",
+ "(b)The jet speed of the wheel is 0.98 m/s\n",
+ " Wheel speed is 0.5 m/s\n",
+ "(c)Dimensionless power specific speed is 0.084 rad\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex9.2, page 306"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import atan, degrees\n",
+ "#input data\n",
+ "D=1.4#Diameter of the turbine in m\n",
+ "N=430#Speed of the turbine in rpm\n",
+ "Cr1=9.5#Flow velocity without shock at runner in m/s\n",
+ "C2=7#Absolute velocity at the exit without whirl in /s\n",
+ "dSPH=62#Difference between the sum of static and potential heads at entrance to runner and at exit from runner in m\n",
+ "W=12250#Power given to runner in kW\n",
+ "Q=12#Flow rate of water from the turbine in m**3/s\n",
+ "H=115#Net head from the turbine in m\n",
+ "g=9.81#Acceleration due to gravity in m/s**2\n",
+ "dw=1000#Density of water in kg/m**3\n",
+ "\n",
+ "#calculations\n",
+ "U1=(3.1415*D*N)/60#Runner tip speed in m/s\n",
+ "Cx1=(W*10**3)/(dw*Q*U1)#Absolute inlet velocity in m/s as flow is radial at outlet Cx2=0 in m/s as Cx2=0 as zero whirl at outlet\n",
+ "a1=atan(degrees(Cr1/Cx1))#Guide vane angle in degree\n",
+ "C1=(Cr1**2+Cx1**2)**(1/2)#Inlet velocity in m/s\n",
+ "b1=atan(degrees(Cr1/(Cx1-U1)))#Runner blade entry angle in degree\n",
+ "dHr=dSPH+(((C1**2)-(C2**2))/(2*g))-(U1*Cx1/g)#Loss of head in the runner in m\n",
+ "\n",
+ "#output\n",
+ "print '''(a)\n",
+ " (1)Guide vane angle at inlet is %3.1f degree\n",
+ " (2)Inlet absolute velocity of water at entry to runner is %3.1f m/s\n",
+ "(b)Runner blade entry angle is %3.1f degree\n",
+ "(c)Total Loss of head in the runner is %3.2f m'''%(a1,C1,b1,dHr)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ " (1)Guide vane angle at inlet is 1.5 degree\n",
+ " (2)Inlet absolute velocity of water at entry to runner is 1.0 m/s\n",
+ "(b)Runner blade entry angle is 1.6 degree\n",
+ "(c)Total Loss of head in the runner is -44.51 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex9.3, page 308"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sin, tan, pi, atan\n",
+ "#input data\n",
+ "D1=0.9#External diameter of the turbine in m\n",
+ "D2=0.45#Internal diameter of the turbine in m\n",
+ "N=200#Speed of turbine running in rpm\n",
+ "b1=0.2#Width of turbine at inlet in m\n",
+ "Cr1=1.8#Velocity of flow through runner at inlet in m/s\n",
+ "Cr2=Cr1#Velocity of flow through runner at outlet in m/s\n",
+ "a11=10#Guide blade angle to the tangent of the wheel in degree\n",
+ "a22=90#Discharge angle at outlet of turbine in degree\n",
+ "g=9.81#Acceleration due to gravity in m/s**2\n",
+ "dw=1000#Density of water in kg/m**3\n",
+ "\n",
+ "#calculations\n",
+ "C1=Cr1/sin(a11*pi/180)#Absolute velocity of water at inlet of runner in m/s\n",
+ "Cx1=Cr1/tan(a11*pi/180)#Velocity of whirl at inlet in m/s\n",
+ "U1=(3.1415*D1*N)/60#Runner tip speed at inlet in m/s\n",
+ "Wx1=Cx1-U1#Inlet whirl velocity component in m/s\n",
+ "W1=(Wx1**2+Cr1**2)**(1/2)#Relative velocity at inlet in m/s\n",
+ "b11=atan(degrees(Cr1/Wx1))#Runner blade entry angle in degree\n",
+ "U2=(3.1415*D2*N)/60#Runner tip speed at exit in m/s\n",
+ "b22=atan(degrees(Cr2/U2))#Runner blade exit angle in degree\n",
+ "b2=D1*b1/D2#Width of runner at outlet in m\n",
+ "Q=3.1415*D1*b1*Cr1#Discharge of water in turbine in m**3/s\n",
+ "m=dw*Q#Mass of water flowing through runner per second in kg/s\n",
+ "V2=Cr2#Velocity of water at exit in m/s \n",
+ "H=(U1*Cx1/g)+(V2**2/(2*g))#Head at the turbine inlet in m\n",
+ "W=m*U1*Cx1*10**-3#Power developed in kW\n",
+ "nH=(U1*Cx1/(g*H))#Hydraulic efficiency\n",
+ "\n",
+ "#output\n",
+ "print '''(a)Absolute velocity of water at inlet of runner is %3.3f m/s\n",
+ "(b)Velocity of whirl at inlet is %3.3f m/s\n",
+ "(c)Relative velocity at inlet is %3.3f m/s\n",
+ "(d)Runner blade entry angle is %3.2f degree\n",
+ " Runner blade exit angle is %3.2f degree\n",
+ "(e)Width of runner at outlet is %3.1f m\n",
+ "(f)Mass of water flowing through runner per second is %3.f kg/s\n",
+ "(g)Head at the turbine inlet is %3.3f m\n",
+ "(h)Power developed is %3.3f kW\n",
+ "(i)Hydraulic efficiency is %3.4f'''%(C1,Cx1,W1,b11,b22,b2,m,H,W,nH)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)Absolute velocity of water at inlet of runner is 10.366 m/s\n",
+ "(b)Velocity of whirl at inlet is 10.208 m/s\n",
+ "(c)Relative velocity at inlet is 1.000 m/s\n",
+ "(d)Runner blade entry angle is 1.56 degree\n",
+ " Runner blade exit angle is 1.53 degree\n",
+ "(e)Width of runner at outlet is 0.4 m\n",
+ "(f)Mass of water flowing through runner per second is 1018 kg/s\n",
+ "(g)Head at the turbine inlet is 9.972 m\n",
+ "(h)Power developed is 97.925 kW\n",
+ "(i)Hydraulic efficiency is 0.9834\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex9.4, page 312"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import atan\n",
+ "#input data\n",
+ "P=330#Power output from the turbine is kW\n",
+ "H=70#Head of operating turbine in m\n",
+ "N=750#Speed of the turbine in rpm\n",
+ "nH=0.94#Hydraulic efficiency\n",
+ "n0=0.85#Overall efficiency\n",
+ "FR=0.15#Flow ratio \n",
+ "BR=0.1#Breadth ratio\n",
+ "D1D2=2#Ratio inner and outer diameter of runner\n",
+ "g=9.81#Acceleration due to gravity in m/s**2\n",
+ "dw=1000#Density of water in kg/m**3\n",
+ "\n",
+ "#calculations\n",
+ "Cr1=FR*(2*g*H)**(1/2)#Flow velocity at inlet in m/s\n",
+ "Q=(P*10**3)/(dw*g*H*n0)#Discharge at outlet in m**3/s\n",
+ "D1=(Q/(nH*3.1415*BR*Cr1))**(1/2)#Runner inlet diameter in m\n",
+ "b1=BR*D1#Height of the runner vanes at inlet in m\n",
+ "U1=(3.1415*D1*N)/60#Runner tip speed at inlet in m/s\n",
+ "Cx1=(nH*g*H)/(U1)#Velocity of whirl at inlet in m/s\n",
+ "a11=atan(degrees(Cr1/Cx1))#Guide blade angle in degree\n",
+ "b11=atan(degrees(Cr1/(Cx1-U1)))#Runner vane angle at inlet in degree\n",
+ "D2=D1/D1D2#Runner outlet diameter in m\n",
+ "U2=(3.1415*D2*N)/60#Runner tip speed at outlet in m/s\n",
+ "Cr2=Cr1#Flow velocity at outlet in m/s\n",
+ "b22=atan(degrees(Cr2/U2))#Runner vane angle at outlet in degree\n",
+ "b2=D1*b1/D2#Width at outlet in m\n",
+ "\n",
+ "#output\n",
+ "print '''(a)Flow velocity at inlet is %3.2f m/s\n",
+ "(b)Discharge at outlet is %3.3f m**3/s\n",
+ "(c)Runner inlet diameter is %3.3f m\n",
+ "(d)Height of the runner vanes at inlet is %3.4f m\n",
+ "(e)Guide blade angle is %3.2f degree\n",
+ "(f)Runner vane angle at inlet is %3.2f degree\n",
+ " Runner vane angle at outlet is %3.2f degree\n",
+ "(g)Runner outlet diameter is %3.4f m\n",
+ "(h)Width at outlet is %3.4f m\n",
+ "(i)Runner tip speed at inlet is %3.2f m/s\n",
+ "(j)Velocity of whirl at inlet is %3.f m/s'''%(Cr1,Q,D1,b1,a11,b11,b22,D2,b2,U1,Cx1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)Flow velocity at inlet is 0.15 m/s\n",
+ "(b)Discharge at outlet is 0.565 m**3/s\n",
+ "(c)Runner inlet diameter is 1.000 m\n",
+ "(d)Height of the runner vanes at inlet is 0.1000 m\n",
+ "(e)Guide blade angle is 0.48 degree\n",
+ "(f)Runner vane angle at inlet is -0.36 degree\n",
+ " Runner vane angle at outlet is 0.41 degree\n",
+ "(g)Runner outlet diameter is 0.5000 m\n",
+ "(h)Width at outlet is 0.2000 m\n",
+ "(i)Runner tip speed at inlet is 39.27 m/s\n",
+ "(j)Velocity of whirl at inlet is 16 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex9.5, page 316"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#input data\n",
+ "H=30#Working head of the turbine in m\n",
+ "D1=1.2#Inlet wheel diameter in m\n",
+ "D2=0.6#Outlet wheel diameter in m\n",
+ "b11=90#Vane angle at entrance in degree\n",
+ "a11=15#Guide blade angle in degree\n",
+ "Cx2=0#Velocity of whirl at inlet in m/s\n",
+ "g=9.81#Acceleration due to gravity in m/s**2\n",
+ "dw=1000#Density of water in kg/m**3\n",
+ "\n",
+ "#calculations\n",
+ "U11=1/tan(a11*pi/180)#Runner tip speed at inlet in m/s in terms of Cr1\n",
+ "Cr1=(H/((U11**2/g)+(1/(2*g))))**(1/2)#Flow velocity at inlet in m/s\n",
+ "Cr2=Cr1#Flow velocity at outlet in m/s\n",
+ "U1=Cr1*U11#Runner tip speed at inlet in m/s \n",
+ "N=(60*U1)/(3.1415*D1)#Speed of the wheel in rpm\n",
+ "U2=(3.1415*D2*N)/60#Runner tip speed at inlet in m/s \n",
+ "b22=atan(degrees(Cr2/U2))#Vane angle at exit in degree\n",
+ "\n",
+ "#output\n",
+ "print '''(a)Speed of the wheel is %3.2f rpm\n",
+ "(b)Vane angle at exit is %3.2f degree'''%(N,b22)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)Speed of the wheel is 59.40 rpm\n",
+ "(b)Vane angle at exit is 1.54 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex9.6, page 321"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#input data\n",
+ "D1=0.6#Internal runner diameter in m\n",
+ "D2=1.2#External runner diameter in m\n",
+ "a11=15#Guide blade angle in degree\n",
+ "Cr1=4#Flow velocity at inlet in m/s\n",
+ "Cr2=Cr1#Flow velocity at outlet in m/s\n",
+ "N=200#Speed of the turbine in rpm\n",
+ "H=10#Head of the turbine in m\n",
+ "a22=90#Discharge angle at outlet in degree\n",
+ "g=9.81#Acceleration due to gravity in m/s**2\n",
+ "dw=1000#Density of water in kg/m**3\n",
+ "\n",
+ "#calculations\n",
+ "U1=(3.1415*D1*N)/60#Runner tip speed at inlet in m/s \n",
+ "U2=(3.1415*D2*N)/60#Runner tip speed at outlet in m/s \n",
+ "Cx1=Cr1/tan(a11*pi/180)#Velocity of whirl at inlet in m/s\n",
+ "Wx1=Cx1-U1#Inlet whirl velocity component in m/s\n",
+ "b11=atan(degrees(Cr1/Wx1))#Vane angle at entrance in degree\n",
+ "b22=atan(degrees(Cr2/U2))#Vane angle at exit in degree\n",
+ "Wm=U1*Cx1#Work one per unit mass flow rate in W/(kg/s) as Cx2=0 in m/s\n",
+ "nH=(U1*Cx1/(g*H))#Hydraulic efficiency \n",
+ "\n",
+ "#output\n",
+ "print '''(a)Inlet vane angle is %3.2f degree\n",
+ " Outlet vane angle is %3.2f degree\n",
+ "(b)Work done by the water on the runner per kg of water is %3.2f W/(kg/s)\n",
+ "(c)Hydraulic efficiency is %3.4f'''%(b11,b22,Wm,nH)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)Inlet vane angle is 1.53 degree\n",
+ " Outlet vane angle is 1.52 degree\n",
+ "(b)Work done by the water on the runner per kg of water is 93.79 W/(kg/s)\n",
+ "(c)Hydraulic efficiency is 0.9561\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex9.7, page 326"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#input data\n",
+ "H=23#Net head across the turbine in m\n",
+ "N=150#Speed of the turbine in rpm\n",
+ "P=23#Power developed by the turbine in MW\n",
+ "D=4.75#Blade tip diameter in m\n",
+ "d=2#Blade hub diameter in m\n",
+ "nH=0.93#Hydraulic efficiency\n",
+ "n0=0.85#Overall efficiency\n",
+ "g=9.81#Acceleration due to gravity in m/s**2\n",
+ "dw=1000#Density of water in kg/m**3\n",
+ "\n",
+ "#calculations\n",
+ "dm=(D+d)/2#Mean diameter of the turbine in m\n",
+ "Pa=(P*10**6)/n0#Power available in MW\n",
+ "Q=(Pa/(dw*g*H))#Flow rate in the turbine in m**3/s\n",
+ "Um=(3.1415*dm*N)/60#Rotor speed at mean diameter in m/s\n",
+ "Pr=Pa*nH*10**-6#Power given to runner in MW\n",
+ "Cx1=Pr*10**6/(dw*Q*Um)#Velocity of whirl at inlet in m/s as Cx2=0 in m/s\n",
+ "Ca=Q/((3.1415/4)*(D**2-d**2))#Axial velocity in m/s\n",
+ "b11=180-(atan(degrees(Ca/(Um-Cx1))))#Inlet blade angle in degree\n",
+ "Wx2=Um#Outlet whirl velocity component in m/s\n",
+ "b22=atan(degrees(Ca/Wx2))#Outlet blade angle in degree\n",
+ "\n",
+ "#output\n",
+ "print '''(a)The inlet blade angle at mean radius is %3.1f degree\n",
+ "(b)The outlet blade angle at mean radius is %3.1f degree'''%(b11,b22)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The inlet blade angle at mean radius is 178.5 degree\n",
+ "(b)The outlet blade angle at mean radius is 1.5 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}