diff options
Diffstat (limited to 'sample_notebooks')
-rw-r--r-- | sample_notebooks/Ashish Kumar/Ch13.ipynb | 351 | ||||
-rw-r--r-- | sample_notebooks/Babita./Ch5.ipynb | 290 | ||||
-rw-r--r-- | sample_notebooks/NareshKumar/Ch2.ipynb | 441 | ||||
-rw-r--r-- | sample_notebooks/Suhaib Alam/Ch14.ipynb | 569 | ||||
-rw-r--r-- | sample_notebooks/hemanth/Untitled1.ipynb | 27 | ||||
-rw-r--r-- | sample_notebooks/hemanth/Untitled1_1.ipynb | 27 |
6 files changed, 1705 insertions, 0 deletions
diff --git a/sample_notebooks/Ashish Kumar/Ch13.ipynb b/sample_notebooks/Ashish Kumar/Ch13.ipynb new file mode 100644 index 00000000..e7941a67 --- /dev/null +++ b/sample_notebooks/Ashish Kumar/Ch13.ipynb @@ -0,0 +1,351 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter13 - Cathode Ray Oscilloscope" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Page No : 578 example 1" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "power to electrons = 8.0 watts\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "quanti=3*10**17#\n", + "voltag=10*10**3##volt\n", + "distan=40*10**-3##metre per minute\n", + "w=quanti*1.6*10**-19*voltag\n", + "w=w/60##per second\n", + "\n", + "print \"power to electrons = \",round((w),2),\"watts\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Page No : 578 example 2" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "input voltage = 9.55 volt\n", + "frequency = 4761.9 hertz\n", + "vm1coswt vm2sinwt squaring and adding gives ellipse\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "sensit=5## per centimetre\n", + "q=50*10**-6##second per centimetre\n", + "petope=5.4##centimetre\n", + "horiax=8.4##centimetre\n", + "voltag=petope*sensit#\n", + "voltag=voltag/((2)*sqrt(2))#\n", + "#one cycle\n", + "horiax=(horiax/2)*q#\n", + "freque=1/horiax#\n", + "print \"input voltage = \",round((voltag),2),\"volt\"\n", + "print \"frequency = \",round((freque),2),\"hertz\"\n", + "\n", + "\n", + "print \"vm1coswt vm2sinwt squaring and adding gives ellipse\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Page No : 579 example 3" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity x = 1.874e+07 metre per second\n", + "velocity x = 3.10e+05 metre per second\n" + ] + } + ], + "source": [ + "voltag=1000##volt\n", + "#(1) velocity\n", + "vx=sqrt(2*1.6*10**-19*(voltag)/(9.11*10**-31))#\n", + "print \"velocity x = %0.3e\"%vx,\"metre per second\"\n", + "vox=1*10**5##metre per second intial velocity\n", + "vx=sqrt((vox)+((2*1.6*10**-19*voltag)/(2.01*1.66*10**-27)))#\n", + "\n", + "print \"velocity x = %0.2e\"%vx,\"metre per second\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Page No : 580 example 4" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transverse magnetic field = 3.87e-04 weber per metre square\n" + ] + } + ], + "source": [ + "voltag=2000##volt\n", + "d=15##centimetre\n", + "d1=3##centimetre\n", + "r1=((d**2+d1**2)/(6))*10**-2##centimetre to metre\n", + "vox=sqrt(2*1.6*10**-19*(voltag)/(9.11*10**-31))#\n", + "b=vox/((1.6*10**-19*r1)/(9.11*10**-31))#\n", + "\n", + "print \"transverse magnetic field = %0.2e\"%b,\"weber per metre square\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Page No : 581 example 5" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "max frequency = 6.63e+08 hertz\n", + "duration electron between the plates = 4.53e-08 second\n" + ] + } + ], + "source": [ + "voltag=2000##volt\n", + "d=2*10**-2##metre\n", + "#(1) frequency\n", + "vx=sqrt(2*1.6*10**-19*(voltag)/(9.11*10**-31))#\n", + "durati=d/vx#\n", + "freque=1/(2*durati)#\n", + "print \"max frequency = %0.2e\"%freque,\"hertz\"\n", + "#(2)\n", + "durati=60*durati#\n", + "print \"duration electron between the plates = %0.2e\"%durati,\"second\"#correction in book" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Page No : 582 example 7" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "max velocity = 1.68e+07 metre per second\n" + ] + } + ], + "source": [ + "voltag=800##volt\n", + "\n", + "\n", + "q=1.6*10**-19##coulomb\n", + "m=9.11*10**-31##kilogram\n", + "vox=sqrt(2*q*voltag/m)#\n", + "\n", + "print \"max velocity = %0.2e\"%vox,\"metre per second\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Page No : 582 example 8" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity = 2.65e+07 metre per second\n", + "sensitivity = 3.75e-04 metre per volt\n", + "deflection factor = 2666.67 volt per metre\n" + ] + } + ], + "source": [ + "voltag=2000##volt\n", + "d=1.5*10**-2##centimetre\n", + "d1=5*10**-3##metre\n", + "distan=50*10**-2##metre\n", + "#(1) velocity\n", + "vox=sqrt(2*1.6*10**-19*(voltag)/(9.11*10**-31))#\n", + "#(2) sensitivity\n", + "defsen=distan*d/(2*d1*voltag)#\n", + "#deflection factor\n", + "g=1/defsen#\n", + "print \"velocity = %0.2e\"%vox,\"metre per second\"\n", + "print \"sensitivity = %0.2e\"%defsen,\"metre per volt\"\n", + "\n", + "print \"deflection factor = \",round((g),2),\"volt per metre\"#correction in the book" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Page No : 582 example 9" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity = 2.65e+07 metre per second\n", + "fc = 1.33e+08 hertz\n" + ] + } + ], + "source": [ + "voltag=2000##volt\n", + "d=50*10**-3##metre\n", + "#(1) velocity\n", + "vox=sqrt(2*1.6*10**-19*(voltag)/(9.11*10**-31))#\n", + "print \"velocity = %0.2e\"%vox,\"metre per second\"\n", + "#(2) fc\n", + "fc=vox/(4*d)#\n", + "\n", + "print \"fc = %0.2e\"%fc,\"hertz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Page No : 582 example 10" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "phase angle = 30.0 degre\n" + ] + } + ], + "source": [ + "y=2.5##divisions\n", + "y1=1.25##divisions\n", + "y=y1/y#\n", + "from math import asin, degrees\n", + "w=degrees(asin(y))\n", + "\n", + "print \"phase angle = \",round((w),2),\"degre\"" + ] + } + ], + "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/sample_notebooks/Babita./Ch5.ipynb b/sample_notebooks/Babita./Ch5.ipynb new file mode 100644 index 00000000..9df5e9fa --- /dev/null +++ b/sample_notebooks/Babita./Ch5.ipynb @@ -0,0 +1,290 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Ch-5 Combustion Mechanism, Combustion Equipment And Firing Methods" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 5.1 Page 308" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " The total surface area of the particles in the bed As = 8423 m**2 \n" + ] + } + ], + "source": [ + "#Input data\n", + "Vs=2500##The mass of a bed of solid particles in kg\n", + "p=2650##The density of the solid in kg/m**3\n", + "d=800*10**-6##The mean particle size in m\n", + "s=0.84##The sphericity of the particle\n", + "\n", + "#Calculations\n", + "As=(6*Vs)/(p*d*s)##The total surface area of the particles in the bed\n", + "\n", + "#Output\n", + "print \" The total surface area of the particles in the bed As = %3.0f m**2 \"%(As)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 5.2 Page 309" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " (a) The voidage of the bed = 0.417 \n", + " (b) The minimum fluidization velocity Umf = 0.187 m/s \n" + ] + } + ], + "source": [ + "#Input data\n", + "d=427*10**-6##The mean particle size in m\n", + "pg=1.21##The density of air in kg/m**3\n", + "v=1.82*10**-5##The viscosity of air in kg/ms\n", + "pl=1620##The density of the loosely packed bed in kg/m**3\n", + "ps=2780##The density of the solids in kg/m**3\n", + "c1=27.2##(Grace,1982)constant value.\n", + "c2=0.0408##(Grace,1982)constant value\n", + "g=9.812##Gravitational forc constant in m/s**2\n", + "\n", + "#Calculations\n", + "E=1-(pl/ps)##The voidage of the bed\n", + "Ar=((pg)*(ps-pg)*g*(d**3))/v**2##Archimedes number\n", + "Re=(c1**2+(c2*Ar))**(0.5)-c1##Reynolds number\n", + "Umf=Re*v/(pg*d)##Minimum superficial velocity in m/s\n", + "\n", + "#Output\n", + "print \" (a) The voidage of the bed = %3.3f \\n (b) The minimum fluidization velocity Umf = %3.3f m/s \"%(E,Umf)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 5.3 Page 309" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The sphericity of particles is = 0.811 \n" + ] + } + ], + "source": [ + "from scipy.optimize import fsolve\n", + "#Input data\n", + "d=427*10**-6##The mean particle size in m\n", + "pg=1.21##The density of air in kg/m**3\n", + "v=1.82*10**-5##The viscosity of air in kg/ms\n", + "Umf=0.14##Minimum superficial velocity in m/s\n", + "Ar=7753##Archimedes number from previous example problem\n", + "\n", + "#Calculations\n", + "\n", + "Re=(Umf*pg*d)/v##Reynolds number\n", + "def F(x):##function definition\n", + " f = 7753*x**2- 381.1*x -4793#\n", + " return f\n", + "x = 100##Initial guss\n", + "y = fsolve(F,x)#\n", + "\n", + "#Output\n", + "print \"The sphericity of particles is = %3.3f \"%(y)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 5.4 Page 310" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The required flow rate of limestone is 2405.3 kg/h \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "#Input data\n", + "O=35##The output of the fluidized bed combustion system in MW\n", + "n=0.80##Efficiency of the fluidized bed combustion system \n", + "H=26##The heating value of coal in MJ/kg\n", + "S=3.6##Sulphur content in the coal in %\n", + "C=3##The calcium sulphur ratio \n", + "Ca=85##The amount of calcium carbonate in the limestone in %\n", + "CaCO3=100##The molecular weight of CaCO3\n", + "\n", + "#Calculations\n", + "Cb=O/(n*H)##Coal burning rate in kg/s\n", + "Cb1=Cb*3600##Coal burning rate in kg/h\n", + "Sf=(Cb1*(S/100))/32##Flow rate of sulphur in Kmol/h\n", + "Cf=Sf*C##The flow rate of calcium in Kmol/h\n", + "Caf=Cf*CaCO3##Mass flow rate of CaCO3 in kg/h\n", + "L=Caf/(Ca/100)##Mass flow rate of limestone in kg/h\n", + "\n", + "#Output\n", + "print \"The required flow rate of limestone is %3.1f kg/h \"%(L)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 5.5 Page 310" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " (a) The rate of heat removal from the bed = 6405 kW \n", + " (b) The rate of heat removal from the above bed zone = 16333 kW \n" + ] + } + ], + "source": [ + "#Input data\n", + "CV=24##The calorific value of the fuel in MJ/kg\n", + "C=0.65##The amount of calorific value released in the bed in %\n", + "to=850##Temperature at which products leave in degree centigrade\n", + "ti=30##The inlet temperature in degree centigrade\n", + "tb=850##The bed temperature in degree centigrade\n", + "A=14.5##The air fuel ratio by mass\n", + "Cp=1.035##The specific heat of the products leaving the bed surface in kJ/kgK\n", + "B=7000##The burning rate of coal in kg/h\n", + "\n", + "#Calculations\n", + "H=(C*CV*1000)-(A*Cp*(to-ti))##Heat removal from the bed per kg fuel in kJ/kg fuel\n", + "Hr=(H*B)/3600##Rate of heat removal from the bed in kW\n", + "Hb=(B/3600)*(1-C)*CV*1000##The rate of heat removal from the above bed zone in kW\n", + "\n", + "#Output\n", + "print \" (a) The rate of heat removal from the bed = %3.0f kW \\n (b) The rate of heat removal from the above bed zone = %3.0f kW \"%(Hr,Hb)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 5.6 Page 311" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " (a) The planform area = 2.4 m**2 \n", + " (b) Fuel burning rate = 0.192 kg/s \n", + " Air flow rate = 2.1888 kg/s \n", + " Planform area = 2.58 m**2 \n" + ] + } + ], + "source": [ + "#Input data\n", + "tb=850##The bed temperature in degree centigrade\n", + "CV=25##The calorific value of the fuel in MJ/kg\n", + "A=9.5##The stoichiometric air fuel ratio by mass\n", + "E=20##The amount of excess air used in %\n", + "F=4.8##The total fueling rate in MW\n", + "p=0.3145##The density of air at bed temperature in kg/m**3\n", + "f=2##The firing rate in MW/m**2\n", + "v=2.7##The fluidizing velocity in m/s\n", + "\n", + "#Calculations\n", + "P=F/f##Planform area in m**2\n", + "m=(F*1000)/(CV*1000)##Fuel burning rate in kg/s\n", + "ma=A*(1+(E/100))*m##Mass flow rate of air in kg/s\n", + "Pa=ma/(p*v)##Planform area in m**2\n", + "\n", + "#Output\n", + "print \" (a) The planform area = %3.1f m**2 \\n (b) Fuel burning rate = %3.3f kg/s \\n Air flow rate = %3.4f kg/s \\n Planform area = %3.2f m**2 \"%(P,m,ma,Pa)" + ] + } + ], + "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/sample_notebooks/NareshKumar/Ch2.ipynb b/sample_notebooks/NareshKumar/Ch2.ipynb new file mode 100644 index 00000000..c06aa566 --- /dev/null +++ b/sample_notebooks/NareshKumar/Ch2.ipynb @@ -0,0 +1,441 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2 Switched communication systems" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.2, page no 125" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum auxillary current is:10.00 mA\n", + "\n", + "MMF in the auxillary winding is:2.00AT \n", + "\n", + "MMF in main winding is:40.00 AT \n", + "\n", + "net MMF required in main winding is:44.00 AT \n", + "\n", + "operating current needed is:4.40 mA \n", + "\n", + "working voltage is:2.84 volts \n", + "\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "#given\n", + "Io=4*10**-3 #rqueired operating current\n", + "N1=10000 #no of turns in the main winding\n", + "R1=645 #resistence of the main winding in ohms\n", + "N2=200 #no of turns in auxillary winding\n", + "B=2 #spacing bias\n", + "Iaux=B/N2 #maximum auxillary current\n", + "print \"maximum auxillary current is:%0.2f mA\\n\"%(Iaux*1e3)\n", + "MMFaux=N2*Iaux #MMF in the auxillary winding\n", + "print \"MMF in the auxillary winding is:%0.2fAT \\n\"%(MMFaux)\n", + "MMFop=Io*N1 #operating MFF in main winding\n", + "print \"MMF in main winding is:%0.2f AT \\n\"%(MMFop)\n", + "MMFnet=MMFop+(0.1*MMFop) #net MMF required in main winding\n", + "print \"net MMF required in main winding is:%0.2f AT \\n\"%(MMFnet)\n", + "Iop=MMFnet/N1 #operating current needed\n", + "print \"operating current needed is:%0.2f mA \\n\"%(Iop*1e3)\n", + "V=Iop*R1 #working voltage in volts\n", + "print \"working voltage is:%0.2f volts \\n\"%(V)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.3,page no 125" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Busy hour calling rate is:1.20 \n", + "\n", + "Rate of traffic flow is 250.00 traffic unit \n" + ] + } + ], + "source": [ + "#given\n", + "C=6000#Tatol no of call in busy hour\n", + "SC=5000#no of subscribers\n", + "CR=C/SC#busy hour calling rate\n", + "print \"Busy hour calling rate is:%0.2f \\n\"%(CR)\n", + "T=2.5/60#avarage duration of calls in hours\n", + "\n", + "A=C*T#rate of traffic flow\n", + "print \"Rate of traffic flow is %0.2f traffic unit \"%(A)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4,page no 126" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maxixmum current is 33.33 mamps \n", + "\n", + "operate lag is 1.83 msec \n", + "\n", + "release lag is 2.85 msec \n", + "\n" + ] + } + ], + "source": [ + "from math import log\n", + "#given\n", + "L=3#relay inductance in henry\n", + "R=1500#relay resistance in ohm\n", + "Io=20e-3#oparating current in amps\n", + "Ir=8e-3#release current in amps\n", + "\n", + "V=50#supply volatage in volts\n", + "Im=V/R#maxixmum current in amps\n", + "print \"maxixmum current is %0.2f mamps \\n\"%(Im*1e3)\n", + "to=(L/R)*log(1/(1-(Io/Im)))#operate lag in sec\n", + "print \"operate lag is %0.2f msec \\n\"%(to*1000)\n", + "tr=(L/R)*log(Im/Ir)#release lag in sec\n", + "print \"release lag is %0.2f msec \\n\"%(tr*1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4.1,page no 126" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a)\n", + "periods per character is:150.00 msec\n", + "\n", + "period per element is:20.00 msec\n", + "\n", + "speed is:50.00 bauds\n", + "\n", + "\n", + "(b)\n", + "periods per character is:100.00 msec\n", + "\n", + "period per element is:13.33 msec\n", + "\n", + "speed is 75.00 bauds\n", + "\n", + "\n", + "(c)\n", + "periods per character is:100.00 msec\n", + "\n", + "period per element is:10.00 msec\n", + "\n", + "speed is 100.00 bauds\n", + "\n" + ] + } + ], + "source": [ + "#given\n", + "#a\n", + "C_S1=20/3#speed in characters per second\n", + "P_C1=1/C_S1#periods per character\n", + "print \"(a)\\nperiods per character is:%0.2f msec\\n\"%(P_C1*1e3)\n", + "E_C1=7.5#elements per character\n", + "P_E1=P_C1/E_C1#period per element\n", + "print \"period per element is:%0.2f msec\\n\"%(P_E1*1e3)\n", + "Sb1=1/P_E1#speed in bauds\n", + "print \"speed is:%0.2f bauds\\n\\n\"%(Sb1)\n", + "#b\n", + "C_S2=10#speed in characters per second\n", + "P_C2=1/C_S2#periods per character\n", + "print \"(b)\\nperiods per character is:%0.2f msec\\n\"%(P_C2*1e3)\n", + "E_C2=7.5#elements per character\n", + "P_E2=P_C2/E_C2#period per element\n", + "print \"period per element is:%0.2f msec\\n\"%(P_E2*1e3)\n", + "Sb2=1/P_E2#speed in bauds\n", + "print \"speed is %0.2f bauds\\n\\n\"%( Sb2)\n", + "#c\n", + "C_S3=10#speed in characters per second\n", + "P_C3=1/C_S3#periods per character\n", + "print \"(c)\\nperiods per character is:%0.2f msec\\n\"%(P_C3*1e3)\n", + "E_C3=10#elements per character\n", + "P_E3=P_C3/E_C3#period per element\n", + "print \"period per element is:%0.2f msec\\n\"%(P_E3*1e3)\n", + "Sb3=1/P_E3#speed in bauds\n", + "print \"speed is %0.2f bauds\\n\"%(Sb3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.5,page no 127" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total inductance is 0.05 H \n", + "\n", + "maximum current is 10.00 mA \n", + "\n", + "operating current is 5.00 mA \n", + "\n", + "operate lag is 0.35 msec \n", + "\n" + ] + } + ], + "source": [ + "#given\n", + "N=1000#no of turns\n", + "L1=5e-8#inductance per turn\n", + "L=N**2*L1#total inductance\n", + "print \"total inductance is %0.2f H \\n\"%(L)\n", + "R=100#resistance of winding in ohm\n", + "MMF=5#operating MMF in amp. turn\n", + "V=1#voltage of received signal in volts\n", + "Im=V/R#maximum current\n", + "print \"maximum current is %0.2f mA \\n\"%(Im*1e3)\n", + "Io=MMF/N#operating current\n", + "print \"operating current is %0.2f mA \\n\"%(Io*1e3)\n", + "to=(L/R)*log(1/(1-(Io/Im)))#operate lag\n", + "print \"operate lag is %0.2f msec \\n\"%(to*1e3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.6,page no 128" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Busy hour calling rate is:1.60 \n", + "\n", + "Rate of traffic flow is 693.33 traffic unit \n" + ] + } + ], + "source": [ + "#given\n", + "S=10000#no of subscribers\n", + "C=16000#Tatol no of call in busy hour\n", + "CR=C/S#busy hour calling rate\n", + "print \"Busy hour calling rate is:%0.2f \\n\"%(CR)\n", + "T=2.6#avarage duration of calls in min\n", + "\n", + "A=C*(T/60)#rate of traffic flow\n", + "print \"Rate of traffic flow is %0.2f traffic unit \"%(A)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.7,page no 135" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "duration of each element is:10.00 msec\n", + "\n", + "speed is 100.00 bauds\n", + "\n", + "total possible combinations are:128.00\n" + ] + } + ], + "source": [ + "#given\n", + "N=7#no of character elements\n", + "E_C=10#elements per character (1+7+1+1)\n", + "To=100e-3#duration of one character\n", + "Te=To/E_C#duration of each element\n", + "print \"duration of each element is:%0.2f msec\\n\"%(Te*1e3)\n", + "Sb=1/Te#speed in bauds\n", + "print \"speed is %0.2f bauds\\n\"%(Sb)\n", + "C=2**N#total possible combinations\n", + "print \"total possible combinations are:%0.2f\"%(C)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.8,page no 129" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total no of call in busy hour is:1500.00 calls per Hour\n", + "\n", + "Busy hour calling rate is:1.50 \n", + "\n", + "grade of service is: 0.02\n" + ] + } + ], + "source": [ + "#given\n", + "S=1000#no of subscribers\n", + "T=2.4/60#avarage duration of calls in hours\n", + "A=60#rate of traffic flow\n", + "C=A/T#Tatol no of call in busy hour\n", + "print \"Total no of call in busy hour is:%0.2f calls per Hour\\n\"%(C)\n", + "CR=C/S#busy hour calling rate\n", + "print \"Busy hour calling rate is:%0.2f \\n\"%(CR)\n", + "SCL=30#no of call lost per hour\n", + "\n", + "B=SCL/(C+SCL)#grade of service\n", + "print \"grade of service is: %0.2f\"%(B)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.9,page no 129" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "grade of service is: 2.00e-03\n", + "\n", + "traffic lost is: 1.80e-03\n" + ] + } + ], + "source": [ + "from math import factorial\n", + "#given\n", + "N=5#no of switches\n", + "A=0.9#traffic offered \n", + "#grade of service B=(A**N/N!)/(1+A+A**2/2!+A**3/3!+...+A**N/N!)\n", + "#here\n", + "B=(A**N/factorial(N))/(1+A+(A**2/factorial(2))+(A**3/factorial(3))+(A**4/factorial(4))+(A**5/factorial(5)))\n", + "print \"grade of service is: %0.2e\\n\"%(B)\n", + "Tl=A*B#traffic lost\n", + "print \"traffic lost is: %0.2e\"%(Tl)" + ] + } + ], + "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/sample_notebooks/Suhaib Alam/Ch14.ipynb b/sample_notebooks/Suhaib Alam/Ch14.ipynb new file mode 100644 index 00000000..f4ee9c8b --- /dev/null +++ b/sample_notebooks/Suhaib Alam/Ch14.ipynb @@ -0,0 +1,569 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter14 - Turbulent Flow in Pipe" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.1 page no 148" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "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": [ + "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": 22, + "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": 23, + "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": 24, + "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": 25, + "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": 26, + "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": 27, + "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": 28, + "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": 29, + "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": 30, + "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": 31, + "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/sample_notebooks/hemanth/Untitled1.ipynb b/sample_notebooks/hemanth/Untitled1.ipynb new file mode 100644 index 00000000..9684d917 --- /dev/null +++ b/sample_notebooks/hemanth/Untitled1.ipynb @@ -0,0 +1,27 @@ + +# coding: utf-8 + +# # UNIT 3 : ELECTRICAL CONDUCTIVITY IN METALS + +# +# +# # Example number 1 , page number 208 + +# In[ ]: + +#importing module +from __future__ import division +import math + + +#Variable declaration +u= 7*10**-3 # mobility of an electron +E= 100 # applied field + + +#Calculations +Vd=u*E + +#Result +print"the drift velocity = %.1f m/s" %Vd +print"the correct choice is B" diff --git a/sample_notebooks/hemanth/Untitled1_1.ipynb b/sample_notebooks/hemanth/Untitled1_1.ipynb new file mode 100644 index 00000000..9684d917 --- /dev/null +++ b/sample_notebooks/hemanth/Untitled1_1.ipynb @@ -0,0 +1,27 @@ + +# coding: utf-8 + +# # UNIT 3 : ELECTRICAL CONDUCTIVITY IN METALS + +# +# +# # Example number 1 , page number 208 + +# In[ ]: + +#importing module +from __future__ import division +import math + + +#Variable declaration +u= 7*10**-3 # mobility of an electron +E= 100 # applied field + + +#Calculations +Vd=u*E + +#Result +print"the drift velocity = %.1f m/s" %Vd +print"the correct choice is B" |