diff options
author | Trupti Kini | 2016-10-12 23:31:00 +0600 |
---|---|---|
committer | Trupti Kini | 2016-10-12 23:31:00 +0600 |
commit | dac39944c77a6d7ac435290fcfdcd4b6b8923905 (patch) | |
tree | 2e1a1995587b652cce7417a3396e3c1f83bd3b4b /sample_notebooks | |
parent | 78dde5c39773f5147b79c75861433ece19c31565 (diff) | |
download | Python-Textbook-Companions-dac39944c77a6d7ac435290fcfdcd4b6b8923905.tar.gz Python-Textbook-Companions-dac39944c77a6d7ac435290fcfdcd4b6b8923905.tar.bz2 Python-Textbook-Companions-dac39944c77a6d7ac435290fcfdcd4b6b8923905.zip |
Added(A)/Deleted(D) following books
A Applied_Physics_by_S._Mani_Naidu/Chapter1.ipynb
A Applied_Physics_by_S._Mani_Naidu/Chapter10.ipynb
A Applied_Physics_by_S._Mani_Naidu/Chapter11.ipynb
A Applied_Physics_by_S._Mani_Naidu/Chapter13.ipynb
A Applied_Physics_by_S._Mani_Naidu/Chapter2.ipynb
A Applied_Physics_by_S._Mani_Naidu/Chapter3.ipynb
A Applied_Physics_by_S._Mani_Naidu/Chapter4.ipynb
A Applied_Physics_by_S._Mani_Naidu/Chapter5.ipynb
A Applied_Physics_by_S._Mani_Naidu/Chapter6.ipynb
A Applied_Physics_by_S._Mani_Naidu/Chapter7.ipynb
A Applied_Physics_by_S._Mani_Naidu/Chapter8.ipynb
A Applied_Physics_by_S._Mani_Naidu/Chapter9.ipynb
A Applied_Physics_by_S._Mani_Naidu/screenshots/11.png
A Applied_Physics_by_S._Mani_Naidu/screenshots/22.png
A Applied_Physics_by_S._Mani_Naidu/screenshots/33.png
A "sample_notebooks/ravindra m gowda/Chapter_1_Basics_of_thermodynamics_Rudramani.ipynb"
Diffstat (limited to 'sample_notebooks')
-rw-r--r-- | sample_notebooks/ravindra m gowda/Chapter_1_Basics_of_thermodynamics_Rudramani.ipynb | 461 |
1 files changed, 461 insertions, 0 deletions
diff --git a/sample_notebooks/ravindra m gowda/Chapter_1_Basics_of_thermodynamics_Rudramani.ipynb b/sample_notebooks/ravindra m gowda/Chapter_1_Basics_of_thermodynamics_Rudramani.ipynb new file mode 100644 index 00000000..62799900 --- /dev/null +++ b/sample_notebooks/ravindra m gowda/Chapter_1_Basics_of_thermodynamics_Rudramani.ipynb @@ -0,0 +1,461 @@ +{ + "metadata": { + "name": " Chapter 1 Basics of thermodynamics Rudramani" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Basics of Thermodynamics" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Ex 1.1 # pageno 34" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "f=-40 # medium temperature in -40 degree\nf1=32 # standard value in 32\nT=(f-f1)*5/9 #temperature in degree\nprint \"hence -40 on the fahrenheit scale is equal to \",T,\" on the degree celsius\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "hence -40 on the fahrenheit scale is equal to -40 on the degree celsius\n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Ex 1.2 # pageno 34" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "# to find density\nmass=1600 #mass in kg\nv=2 # volume in 2m3\nd=mass/v # density in kg/m3\nprint 'Density =mass/volume =',d,'kg/m3'\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Density =mass/volume = 800 kg/m3\n" + } + ], + "prompt_number": 107 + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Ex 1.3 # page no 35" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "# to find specific weight of oil\nm=1600 # mass of oil\ng=9.81 # acceleration due to gravity\nv=2 # volume\ns=(m*g)/v # specific gravity\nprint s,\"N/m3\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "7848.0 N/m3\n" + } + ], + "prompt_number": 106 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Ex 1.4 #pageno 35" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "Do=float(800) #Density of oil\nDW=float(1000) #Density of water\n\n#calculation\nSG=float(Do/DW) #Specific grav\n#print SG\n#print ('%.1f' %(SG*.1))\n#output\nprint \"Specific gravity \",SG", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Specific gravity 0.8\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Ex 1.5 # pageno 35" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "# to find kinematic viscosity\nu=0.001 #viscosity of oil\np=800 # specific gravity\nk=u/p # kinematic viscosity\nprint \"kinematic viscosity\", k,\"m2/s\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "kinematic viscosity 1.25e-06 m2/s\n" + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Ex 1.6 # pageno 35" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "# to find the absolute pressure\np1=13600 # atmospheric pressue\ng=9.81# vaccum pressure\nh=0.76 #barometric pressure of mercury\nBa=p1*g*h\nprint 'Barometric pressure',round(Ba/1000,1),'kN/m2'\ngauge= 5000# gauge pressure\nAb=(Ba/1000)+gauge # Absolute pressure=atmospheric pressure + gauge pressure\nprint 'Absoulte pressure',round(Ab,1),'kPa = or ',round(Ab/1000,1),'bar'", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Barometric pressure 101.4 kN/m2\nAbsoulte pressure 5101.4 kPa = or 5.1 bar\n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Ex 1.7 #pageno 35" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "# to find absolute temperature\nbar=760 # barometeric pressure\nvac=700 # vacuum pressure\nab=bar-vac\nprint ab,'mm of Hg'\np=13600 # specific gravity \ng=9.81 # accelration due to gravity\nh=0.06 # N/m2\nAb=(p*g*h)\nprint 'Absolute pressure',Ab,'N/m2'", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "60 mm of Hg\nAbsolute pressure 8004.96 N/m2\n" + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Ex 1.8 #pageno 35" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#page no35 to find heat required \nt2=1300 # temperature in kelvin\nt1=290 # temperature 290k\nc=.49 # mass 0.49 kj/kg k\nm=200 # mass in kg\nH=(m*c)*(t2-t1)\nprint 'Heat required',H,'kJ'", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Heat required 98980.0 kJ\n" + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Ex 1.9 #pageno 36" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "# to find change in internal energy\nm=-0.3 # mechanical stirrer\nt=5 # min\nt1=5*60 # minutes into seconds\nw=m*t1 # work done by mechanical stirrer\nprint 'work done by mechanical stirrer',w,'kJ'\nq=5*300 # charge in t*w\nu=q+w # U=Q-W\nprint 'change in internal energy of water U=Q-W',u,'kJ'", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "work done by mechanical stirrer -90.0 kJ\nchange in internal energy of water U=Q-W 1410.0 kJ\n" + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Ex 1.10 # pageno 36" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "# from tables h=460.545 \nh=460.545 #kJ/kg \nv=0.066484 # m3/kg\np=400 # pressure from table \nu=h-(p*v) # kJ/kg\nprint 'U=',u,'kJ/kg'", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "U= 433.9514 kJ/kg\n" + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Ex 1.11 #pageno 36" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "# to calculate total work done\np1=4 # bar 1\np2=1 # bar2\ng=1.4 # gamma\nt1=425 # t1 in temperature 425k\nte=(g-1)/g #gamma-1/gamma\ng1=(p1/p2)**te\nt2=t1/g1 # temperature T2\nprint 'T2 =',round(t2,1),'K'\nv1=0.2 # volume of 0.2 m3\nv3=1/g # 1/gamma\nv2=(0.25)**v3\nprint 'V1/V2',round(v2,4)\nvol=v1/v2\nprint 'V2 = ',round(vol,4),'m3'\nR=1-v3\nprint 'R=cp-cv=',round(R*1000,1),'J/kg K'\nm=(p1*v1*10**5)/(t2*t1)\nprint round(m,3),'kg'\nen=70\nt3=(en/m)+(t2)\nprint 'T3 =',round(t3,1),'K'\nV3=vol*t3/t2\nprint 'V3 =',round(V3,3),'m3'\nW=((p1*v1*10**5)-(p2*vol*10**5))/0.4\nprint 'W1-2 =',round(W/1000,3),'kJ'\nW2=p2*10**5*(V3-vol)\nprint 'W2-3 = ',round(W2*100,2),'kJ'\nW1=W+W2\nprint 'W =W1-2+W2-3 =',round(W1/1000,3),'kJ'", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "T2 = 286.0 K\nV1/V2 0.3715\nV2 = 0.5384 m3\nR=cp-cv= 285.7 J/kg K\n0.658 kg\nT3 = 392.4 K\nV3 = 0.739 m3\nW1-2 = 65.41 kJ\nW2-3 = 2002026.54 kJ\nW =W1-2+W2-3 = 85.43 kJ\n" + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Ex1.12\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "# pageno 36 to find final temperature\n#from figure ddepicts the process given in book\nT1=300 # temperature in 300K\nv2=float(0.003) #volume in 0.003m3\nv1=float(0.03)\nn=float(1.3)#n\nt=(v2/v1)**(n-1)\nprint round(t,3)\nT2=T1/t # temperature in degree c\np=2\nprint 'T2 =',round(T2),'=' ,round(T2-273),' degree C'\np1=(v2/v1)**n\np2=p/p1\nprint 'P2 =',round(p2),'bar=',round(p2),'10**5 N/m2'\nw=((p2*10**5*v2)-(p*10**5*v1))/(n-1)# work done during compression\nprint 'W1-2= ',round(w),'J',round(w,1)/1000,'kJ' ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "0.501\nT2 = 599.0 = 326.0 degree C\nP2 = 40.0 bar= 40.0 10**5 N/m2\nW1-2= 19905.0 J 19.9052 kJ\n" + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "EX 1.13 #pageno 38" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "Thigh=float(1200) # temperature in high\nK=float(273) # 273 in kelvin\nth=float(Thigh+K) #convert degree into kelvin\nTlow = float(150) # temperature in low\ntl=float(Tlow+K) #convert degree into kelvin\nn=float((th-tl)/th) #effiency in percentage of engine\nprint 'Effiency = ',round(n,3),'=',round(n*100,3),'%'\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Effiency = 0.713 = 71.283 %\n" + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Ex1.14 #pageno 38" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#to find heat supplied by each source and to effiency of the engine\n# to find reversible engine mentioned in figure in the textbook\nt1=float(1000) # constant temperature\nt2=float(310)# constant temperature\nn1=float((t1-t2)/t1)\nprint 'n1 =',n1\nt3=float(800)# constant temperature\nn2=float((t3-t2)/t3)\nprint 'n2 =',n2\nQ1=25.8 \nQ2=134.2\nW=100# work obtained\nth=W/(Q1+Q2) # heat supllied from the source\nprint 'Thermal efficiency of the engine = ',th,'=',th*100,'%'\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "n1 = 0.69\nn2 = 0.6125\nThermal efficiency of the engine = 0.625 = 62.5 %\n" + } + ], + "prompt_number": 104 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Ex 1.15 " + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#to find power required to drive the plant\ntlow=float(263) # low temperature\nthigh=float(300) # high temperature\ncop=float(tlow/(thigh-tlow)) #coefficient of performance ideal\nprint 'COP ideal =',round(cop,2)\np=0.6\ncopac=cop*p #coefficient of performance actual\nprint 'COP actual =',round(copac,3)\nhe= 30*10**3\nw=he/copac # power required to drive plant\nprint 'power required to run the plant = ',round(w/1000,3),'kW'", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "COP ideal = 7.11\nCOP actual = 4.265\npower required to run the plant = 7.034 kW\n" + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "\nEx 1.16 \n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "# to find conduction heat transfer rate through the plate\nT2=600 # high temperature\nT1=100# low temperature\nL=0.1 # thickness of slab\nK=20 # thermal conductivity \nA=1 # area in m2\nQ=(K*A)*(T2-T1)/L\nprint 'Q =',Q/1000,'kW'", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Q = 100.0 kW\n" + } + ], + "prompt_number": 88 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Ex1.17" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "# To find heat conduction \nt1=1300 #temperature at 1300 degree c\nt3=115 # temperature at 115 degree c\nl1=0.5 # thickneess of slab\nk1=1.4 # thermal conductivity\na=1 # constant a=1\nl2=0.161 # thickness of slab 2\nk2=0.35 # thermal conductivity of second slab\nQ=(t1-t3)/((l1/(a*k1))+(l2/(a*k2))) # conduction of heat transfer\nprint 'Q=',round(Q,1),'W =',round(Q/1000,2),'kW'\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Q= 1450.2 W = 1.45 kW\n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Ex 1.18 pageno 40" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "# to find conduction transfer\nimport math\nt1=float(300)\nt2=float(200)\nl=float(2)\nk=float(70)\nr2=float(0.1)\nr1=float(0.05)\nQ=float((k*2*3.14*l*(t1-t2))/(math.log((r2/r1))))\nprint 'Q= ',round(Q,2),'W =',round(Q/1000,2),'kW'", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Q= 126841.75 W = 126.84 kW\n" + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "EX 1.19 pageno 40" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "# to find internal temperature and conduction transfer rate\nimport math\nt1=float(225)# temperature in degree\nt4=float(25) # temperature in degree\nL=1 #length in m\nk1=float(50) #thermal conductivity constant\nr1=float(5)#thermal conductivity constant\nr2=float(5.5)#thermal conductivity constant\nk2=float(0.06) #thermal conductivity constant\nr3=float(10.0)#thermal conductivity constant\nr4=float(15.5)#thermal conductivity constant\nk4=float(1/(k1)) #1/k1\nk3=0.12 #thermal conductivity constant\np=float(1/(2*math.pi*L)) #1/2pil\nk5=float(1/(k2)) #1/k2\nk6=float(1/(k3)) #1/k3\nQ=float((t1-t4)/(p*((k4*math.log(r1/r2))+(k5*math.log(r3/r2))+(k6*math.log(r4/r3))))) #Conduction transfer\nprint 'Q= ',round(Q,2),'W'\nprint 'calculation error in textbook' # error in textbook\nT2=(t1-float(Q*p*(k4*math.log(r2/r1)))) # internal temperature T2\nprint 'T2 = ',round(T2,1),'Degree C' \nT3 =(T2-float(Q*p*(k5*math.log(r3/r2)))) # internal temperature T3\nprint 'T3 =',round(T3,2),'Degree C'", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Q= 92.3 W\ncalculation error in textbook\nT2 = 225.0 Degree C\nT3 = 78.6 Degree C\n" + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Ex 1.20 pageno 41" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "# to find conduction heat transfer rate through hallow sphere\nimport math3\nt1=290 # inner surface temperature\nt3=20 # outter surface temperature\nk1=float(70) # thermal conductivity k1\nr2=float(0.15) # radius r2\nr1=0.05 # radius r1\nk2=float(15) # thermal conductivity k2\nr3= float(0.2) # radius r3\np=float(1/(4*3.14)) #1/4pi\nr5=float((1)/(k1)) # 1/k1\nr4=float((1)/(k2)) #1/k2\nQ=float((t1-t3)/((p)*((r5*((r2-r1)/(r1*r2)))+(r4*((r3-r2)/(r3*r2)))))) # thermal conductivity\nprint 'Q= ',round(Q,2),'W'\n ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Q= 11244.51 W\n" + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Ex 1.21 #page no 41" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "# to determine radiation heat exchange between to plates\nsigma=0.567*10**-7 # surface density of square plate\nt1=1273# temperature of plate1\nt2=773 # temperature of plate 2\nf12=0.415 # shape factor\na1=1 # area of size 1mx1m\nQ=a1*f12*sigma*((t1**4)-(t2**4)) # thermal conductivity\nprint 'Q=',round(Q,2),'W =',round(Q/1000,2),'kW'", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Q= 53392.43 W = 53.39 kW\n" + } + ], + "prompt_number": 44 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |