diff options
author | kinitrupti | 2017-05-12 18:53:46 +0530 |
---|---|---|
committer | kinitrupti | 2017-05-12 18:53:46 +0530 |
commit | 6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d (patch) | |
tree | 22789c9dbe468dae6697dcd12d8e97de4bcf94a2 /Mechanical_Engineering_Thermodynamics_by_Mooney_D_A/Chapter_6.ipynb | |
parent | d36fc3b8f88cc3108ffff6151e376b619b9abb01 (diff) | |
download | Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.tar.gz Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.tar.bz2 Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.zip |
Removed duplicates
Diffstat (limited to 'Mechanical_Engineering_Thermodynamics_by_Mooney_D_A/Chapter_6.ipynb')
-rwxr-xr-x | Mechanical_Engineering_Thermodynamics_by_Mooney_D_A/Chapter_6.ipynb | 154 |
1 files changed, 154 insertions, 0 deletions
diff --git a/Mechanical_Engineering_Thermodynamics_by_Mooney_D_A/Chapter_6.ipynb b/Mechanical_Engineering_Thermodynamics_by_Mooney_D_A/Chapter_6.ipynb new file mode 100755 index 00000000..49800538 --- /dev/null +++ b/Mechanical_Engineering_Thermodynamics_by_Mooney_D_A/Chapter_6.ipynb @@ -0,0 +1,154 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6 - Flow processes : First law analysis"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1 - Pg 76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate the power output of the machine\n",
+ "#initialization of varaibles\n",
+ "import math\n",
+ "u1=1111.9 #Btu/lb\n",
+ "P1=170. #psia\n",
+ "v1=2.675 #cu ft/lb\n",
+ "v2=100.9 #cu ft/lb\n",
+ "z1=10. #ft\n",
+ "V1=6000./60. #ft/sec\n",
+ "Q=-1000.\n",
+ "u2=914.6 #B/lb\n",
+ "P2=3. #psia\n",
+ "V2=300. #ft/sec\n",
+ "rate=2500. #lb/hr\n",
+ "#calculations\n",
+ "Wx=rate*(u1-u2 + (P1*v1-P2*v2)*144/778 +(V1*V1 -V2*V2)/(2*32.2*778.) +z1/778. +Q/rate)\n",
+ "f=3.92*math.pow(10,-4)\n",
+ "power = Wx*f\n",
+ "#results\n",
+ "print '%s %d %s' %(\"Power output of turbine = \",Wx,\"B/hr\")\n",
+ "print '%s %.1f %s' %(\"\\n Power output in hp =\",power,\"hp\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power output of turbine = 558647 B/hr\n",
+ "\n",
+ " Power output in hp = 219.0 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2 - Pg 78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the flow rate\n",
+ "#initialization of varaibles\n",
+ "w1=500. #lb/min\n",
+ "h1=132.9 #lb/min\n",
+ "h2=1150. #B/lb\n",
+ "h3=180. #B/lb\n",
+ "#calculations\n",
+ "w2=(w1*h1-w1*h3)/(h3-h2)\n",
+ "#results\n",
+ "print '%s %.1f %s' %(\"Flow rate =\",w2,\"lb/min\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Flow rate = 24.3 lb/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3 - Pg 79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate the average velocity and rate of flow\n",
+ "#initialization of varaibles\n",
+ "import math\n",
+ "v2=5.434 #cu ft/lb\n",
+ "v1=4.937 #cu ft/lb\n",
+ "h1=1227.6\n",
+ "h2=1223.9\n",
+ "A1=math.pi/144\n",
+ "#calculations\n",
+ "Vratio=v2/v1\n",
+ "V1=math.sqrt(64.4*(h1-h2)*778./(Vratio*Vratio -1))\n",
+ "V2=V1*Vratio\n",
+ "w=A1*V1/v1\n",
+ "#results\n",
+ "print '%s %d %s' %(\"Average velocity at 1 =\",V1,\"fps\")\n",
+ "print '%s %d %s' %(\"\\n Average velocity at 2 =\",V2,\"fps\")\n",
+ "print '%s %.2f %s' %(\"\\n Rate of flow = \",w,\"lb/sec\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average velocity at 1 = 936 fps\n",
+ "\n",
+ " Average velocity at 2 = 1030 fps\n",
+ "\n",
+ " Rate of flow = 4.14 lb/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |