diff options
author | hardythe1 | 2015-05-05 14:21:39 +0530 |
---|---|---|
committer | hardythe1 | 2015-05-05 14:21:39 +0530 |
commit | fba055ce5aa0955e22bac2413c33493b10ae6532 (patch) | |
tree | be70ef4fccd07c9c88de778014219201b4ea971f /Examples_in_Thermodynamics_Problems/Chapter5.ipynb | |
parent | 67068710030ddd6b6c809518c34af2e04e0bf7ca (diff) | |
download | Python-Textbook-Companions-fba055ce5aa0955e22bac2413c33493b10ae6532.tar.gz Python-Textbook-Companions-fba055ce5aa0955e22bac2413c33493b10ae6532.tar.bz2 Python-Textbook-Companions-fba055ce5aa0955e22bac2413c33493b10ae6532.zip |
add books
Diffstat (limited to 'Examples_in_Thermodynamics_Problems/Chapter5.ipynb')
-rwxr-xr-x | Examples_in_Thermodynamics_Problems/Chapter5.ipynb | 542 |
1 files changed, 542 insertions, 0 deletions
diff --git a/Examples_in_Thermodynamics_Problems/Chapter5.ipynb b/Examples_in_Thermodynamics_Problems/Chapter5.ipynb new file mode 100755 index 00000000..e3603cbc --- /dev/null +++ b/Examples_in_Thermodynamics_Problems/Chapter5.ipynb @@ -0,0 +1,542 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:983f6479fd716219923fc039ee4060b375eda2b85fbdeb1a9e63c25f153f7ec9"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "CHAPTER 5: AIR COMPRESSORS AND MOTORS REFRIGERATIONS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.1 Page 66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import pi,sqrt,acos,asin,atan,cos,sin,tan,log\n",
+ "a=7.0#in\n",
+ "b=10.0#in\n",
+ "c=12.0#in\n",
+ "r=96.0#in\n",
+ "p1=15.0#lb/in^2\n",
+ "p2=100.0#lb/in^2\n",
+ "T=16.0#Degree C\n",
+ "gama=1.4#in\n",
+ "h=120.0#r.p.m\n",
+ "T1=T+273#C absolute\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "v1=(pi/4)*(a/c)**2*(b/c)#ft^3\n",
+ "w=(p1*144*v1)/(r*T1)#lb\n",
+ "w1=h*w#lb\n",
+ "W=1680*(1.72-1)#ft lb\n",
+ "I=144*p1*v1*log(p2/p1)#ft lb\n",
+ "E=I/W*100#percent\n",
+ "\n",
+ "#RESULTS\n",
+ "print\"The ideal efficiency is defined as the ratio of tthis work is\",round(E,4),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The ideal efficiency is defined as the ratio of tthis work is 75.4482 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2 Page 68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import pi,sqrt,acos,asin,atan,cos,sin,tan,log\n",
+ "h1=16#i.h.p\n",
+ "p1=100#lb/in^2\n",
+ "p2=15#lb/in^2\n",
+ "R=275#R.p.m\n",
+ "h=550#ft/min\n",
+ "q=33000#in^2\n",
+ "v1=4.85#lb\n",
+ "B=8.53#in\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "M=(p1/v1)-p2+(p1/v1-p2)*1/0.2\n",
+ "S=h/(2*R)#ft\n",
+ "I=(q*h1)/(M*S*R)#in^2\n",
+ "\n",
+ "#RESULTS\n",
+ "print\"The effect of the clearance volume is\",round(I,3),\"in^2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The effect of the clearance volume is 56.954 in^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3 Page 69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import pi,sqrt,acos,asin,atan,cos,sin,tan,log\n",
+ "h=100#ft^3\n",
+ "t=15#degree C\n",
+ "p=120#lb/in^2\n",
+ "gama=1.3#in\n",
+ "t1=15#Degree C\n",
+ "M=((144*t*h*2.6)/(0.3)*(1.271-1))#ft lb\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "V=sqrt(p/t)#ft lb\n",
+ "\n",
+ "#RESULTS\n",
+ "print\"Compare the values of the two cylinders is\",round(V,3),\"ft lb\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Compare the values of the two cylinders is 2.828 ft lb\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5 Page 71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import pi,sqrt,acos,asin,atan,cos,sin,tan,log\n",
+ "h=0.2#ft^3\n",
+ "v=10#percent\n",
+ "T=15#degree c\n",
+ "p=30#lb/in62\n",
+ "t1=15#Degree C\n",
+ "p1=60#lb/in^2\n",
+ "v1=2.2#ft^3\n",
+ "v3=0.328#ft^3\n",
+ "A=(v1-v3)#ft^3\n",
+ "v2=1.341#ft^3\n",
+ "V=v2-h#ft^\n",
+ "t2=288#Degree C\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "T2=(t2*p*v2)/(t1*v1)#Degree C absolute\n",
+ "v5=(t2/T2)*V#ft^3\n",
+ "v7=0.164#ft^3\n",
+ "v8=v5-(v7/11)*v5\n",
+ "v6=v8/(1-v7/11)#ft^3\n",
+ "\n",
+ "#RESULTS\n",
+ "print\"The required volume of the H.P cylinder including clearance is\",round(v6,3),\"ft^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required volume of the H.P cylinder including clearance is 0.936 ft^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.6 Page 73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import pi,sqrt,acos,asin,atan,cos,sin,tan,log\n",
+ "p1=80#lb/in^2\n",
+ "p2=20#lb/in^2\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "P=sqrt(p1*p2)#lb/in62\n",
+ "V=P/p1#stroke\n",
+ "W=p2/P#stroke\n",
+ "\n",
+ "#RESULTS\n",
+ "print\"the ratio of cut off to length of stroke is\",round(W,3),\"stroke\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the ratio of cut off to length of stroke is 0.5 stroke\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.9 Page 75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import pi,sqrt,acos,asin,atan,cos,sin,tan,log\n",
+ "p1=25.0#lb/in^2\n",
+ "p2=50.0#lb/in^2\n",
+ "p3=75.0#lb/in^2\n",
+ "p4=100.0#lb/in^2\n",
+ "v1=29.2#ft^3\n",
+ "v2=28.8#ft^3\n",
+ "v3=28.1#ft^3\n",
+ "v4=27.2#ft^3\n",
+ "h=14.7#lb/in^2\n",
+ "v=3.0#percent\n",
+ "s=5.0#stroke\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "V=(pi*p1)/(4)*4#in^3\n",
+ "V1=v/p4*V#in^3\n",
+ "\n",
+ "#RESULTS\n",
+ "print\"The volume of efficiency of pressure is\",round(V1,3),\"in^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The volume of efficiency of pressure is 2.356 in^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.12 Page 78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import pi,sqrt,acos,asin,atan,cos,sin,tan,log\n",
+ "p1=15.0#lb/in^2\n",
+ "p2=60.0#lb/in^2\n",
+ "t=16.0#Degree C\n",
+ "Ta=273.0+t#Degree C absolute\n",
+ "T=1.486#lb/in^2\n",
+ "Td=Ta/T#Degree C absolute\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "P=Td/(Ta-Td)#Degree C absolute\n",
+ "\n",
+ "#RESULTS\n",
+ "print\"The lowest temperature and coefficient of per formance is\",round(P,3),\"Degree C absolute\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The lowest temperature and coefficient of per formance is 2.058 Degree C absolute\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.14 Page 79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import pi,sqrt,acos,asin,atan,cos,sin,tan,log\n",
+ "T1=30#Degree c\n",
+ "T2=-10#degree C\n",
+ "t1=263#F\n",
+ "t2=303#F\n",
+ "h1=20#Units\n",
+ "h2=79#C.H.U/lb\n",
+ "h=24#hours\n",
+ "T3=1#Degree C\n",
+ "p=2.2046#C.H.U/sec\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "P=h1*p#C.H.U/sec\n",
+ "T=t1/(t2-t1)#F\n",
+ "H=P*60#C.H.U\n",
+ "W=(H*1400)/T#ft/lb\n",
+ "hp=W/33000#h.p\n",
+ "W1=(H*60*h)/(80*2240)#tons\n",
+ "\n",
+ "#RESULTS\n",
+ "print\"the cycle is a perfect one\",round(W1,3),\"tons\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the cycle is a perfect one 21.259 tons\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.15 Page 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import pi,sqrt,acos,asin,atan,cos,sin,tan,log\n",
+ "p1=930#lb/in^2\n",
+ "p2=440#lb/in^2\n",
+ "T=268#F\n",
+ "t1=25#F\n",
+ "t2=5#F\n",
+ "h1=19.4#C.H.U\n",
+ "h2=-1.8#C.H.U\n",
+ "h3=29#C.H.U\n",
+ "h4=58.6#C.H.U\n",
+ "d=0.6#C.H.U\n",
+ "d1=0.06#lb\n",
+ "d2=-0.01#lb\n",
+ "c=40#percent\n",
+ "h=24#hour\n",
+ "t3=10#C\n",
+ "d3=15#lb\n",
+ "h5=80#C.H.U\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "A=(h1-(h2))-(d1-(d2))*T#C.H.U\n",
+ "FD=A/T#units of entropy\n",
+ "AD=(d*h4/T-0.07-A/T)*T#C.H.U\n",
+ "W=4.28#C.H.U\n",
+ "T=AD/W#C.H.U\n",
+ "P=0.4*T#C.H.U\n",
+ "H=P*W*d3#C.H.U\n",
+ "H1=P*W*d3*60*h#C.H.U\n",
+ "H2=t3+h5#C.H.U\n",
+ "W1=H1/(H2*2240)#tond\n",
+ "\n",
+ "#RESULTS\n",
+ "print\"The many tons of ice would a machine working between the same limit and having a relative coefficient is\",round(W1,3),\"tons\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The many tons of ice would a machine working between the same limit and having a relative coefficient is 0.598 tons\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.16 Page 82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import pi,sqrt,acos,asin,atan,cos,sin,tan,log\n",
+ "t1=20.0#Degeree C\n",
+ "t2=-10.0#degree C\n",
+ "h=0.95#dry\n",
+ "t3=35.0#Degree C\n",
+ "h1=0.066#lb\n",
+ "h2=1.089#lb\n",
+ "v1=-0.033#lb\n",
+ "v2=1.193#lb\n",
+ "v3=0.508#lb\n",
+ "T1=263.0#F\n",
+ "T2=293.0#F\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "T=T1/(T2-T1)#F\n",
+ "E=h1-(v1)#lb\n",
+ "C=0.1079#lb\n",
+ "CP=E/C#lb\n",
+ "A=CP*(T2-T1)-E*T1#C.H.U\n",
+ "F=A/T1#units of entropy\n",
+ "H=254.212#C.H.U\n",
+ "H2=274.447#C.H.U\n",
+ "W=(CP*(T2-T1)+h*1.023*(T2-T1)-E*T1)#C.H.U\n",
+ "P=H/W#C.H.U\n",
+ "V=A+v3*15-T1*v3*0.0507#C.H.U\n",
+ "H1=T1*(v3*0.0507+0.05*1.023)#C.H.U\n",
+ "N=H2/(W+V)#C.H.U\n",
+ "\n",
+ "#RESULTS\n",
+ "print\"The upper and lower temperature limits respectively are\",round(T,4),\"F\"\n",
+ "print\"The vapour compression cycle work done is\",round(H,3),\"C.H.U\"\n",
+ "print\"The vapour is now additional work done is\",round(N,3),\"C.H.U\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The upper and lower temperature limits respectively are 8.7667 F\n",
+ "The vapour compression cycle work done is 254.212 C.H.U\n",
+ "The vapour is now additional work done is 8.322 C.H.U\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.18 Page 85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import pi,sqrt,acos,asin,atan,cos,sin,tan,log\n",
+ "h=0.8#dry\n",
+ "p=120#lb/in^2\n",
+ "p1=1#lb/in^2\n",
+ "t=100#Degree C\n",
+ "A=99.6-38.6-0.178*311.8#C.H.U\n",
+ "G=311.8#units of entropy\n",
+ "AF=440.52#C.H.U\n",
+ "H=399.82#lb/in^2\n",
+ "p=307#lb\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "T=H/p#C.H.U\n",
+ "\n",
+ "#RESULTS\n",
+ "print\"theoretical coefficient pf performance as a refrigeratior is\",round(T,3),\"C.H.U\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "theoretical coefficient pf performance as a refrigeratior is 1.302 C.H.U\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |