summaryrefslogtreecommitdiff
path: root/Elements_of_Thermodynamics_and_heat_transfer/Chapter_5.ipynb
diff options
context:
space:
mode:
authorhardythe12015-06-03 15:27:17 +0530
committerhardythe12015-06-03 15:27:17 +0530
commitdf60071cf1d1c18822d34f943ab8f412a8946b69 (patch)
treeab059cf19bad4a1233a464ccf5d72cf8b3fb323c /Elements_of_Thermodynamics_and_heat_transfer/Chapter_5.ipynb
parentfba055ce5aa0955e22bac2413c33493b10ae6532 (diff)
downloadPython-Textbook-Companions-df60071cf1d1c18822d34f943ab8f412a8946b69.tar.gz
Python-Textbook-Companions-df60071cf1d1c18822d34f943ab8f412a8946b69.tar.bz2
Python-Textbook-Companions-df60071cf1d1c18822d34f943ab8f412a8946b69.zip
add books
Diffstat (limited to 'Elements_of_Thermodynamics_and_heat_transfer/Chapter_5.ipynb')
-rwxr-xr-xElements_of_Thermodynamics_and_heat_transfer/Chapter_5.ipynb146
1 files changed, 146 insertions, 0 deletions
diff --git a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_5.ipynb b/Elements_of_Thermodynamics_and_heat_transfer/Chapter_5.ipynb
new file mode 100755
index 00000000..20adaee3
--- /dev/null
+++ b/Elements_of_Thermodynamics_and_heat_transfer/Chapter_5.ipynb
@@ -0,0 +1,146 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:ce73d802673a1107e52bf47eb7b2328d569cd7caf2e704d6bf5c2e992f46aa53"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5 - The first law and the dynamic open system"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1 - Pg 68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the work done by the system and power\n",
+ "#Initialization of variables\n",
+ "rate= 5 #lbm/sec\n",
+ "Q=50 #Btu/s\n",
+ "h2=1020 #Btu/lbm\n",
+ "h1=1000 #Btu/lbm\n",
+ "V2=50 #ft/s\n",
+ "V1=100 #ft/s\n",
+ "J=778\n",
+ "g=32.2 #ft/s^2\n",
+ "gc=g\n",
+ "Z2=0\n",
+ "Z1=100. #ft\n",
+ "#calculations\n",
+ "dw=Q/rate -(h2-h1) -(V2**2- V1**2)/(2*gc*J) -g/gc *(Z2-Z1)/J\n",
+ "power=dw*rate\n",
+ "#results\n",
+ "print '%s %.1f %s' %(\"work done by the system =\",dw,\"Btu/lbm\")\n",
+ "print '%s %.1f %s' %(\"\\n Power =\",power,\"Btu/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "work done by the system = -9.7 Btu/lbm\n",
+ "\n",
+ " Power = -48.6 Btu/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2 - Pg 69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the area of inlet pipe\n",
+ "#Initialization of variables\n",
+ "V=100 #ft/s\n",
+ "v=15. #lbm/ft^3\n",
+ "m=5. #lbm/s\n",
+ "#calculations\n",
+ "A=m*v/V\n",
+ "#results\n",
+ "print '%s %.2f %s' %(\"Area of inlet pipe =\",A,\"ft^2\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Area of inlet pipe = 0.75 ft^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3 - Pg 79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the final temperature of the steam and change in temperature\n",
+ "#Initialization of variables\n",
+ "P=100. #psia\n",
+ "#calculations\n",
+ "print '%s' %(\"From table B-4\")\n",
+ "h=1187.2 #Btu/lbm\n",
+ "t1=328 #F\n",
+ "t2=540 #F\n",
+ "dt=t2-t1\n",
+ "#results\n",
+ "print '%s %d %s' %(\"Final temperature of the steam =\",t2,\"F\")\n",
+ "print '%s %d %s' %(\"\\n Change in temperature =\",dt,\"F\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "From table B-4\n",
+ "Final temperature of the steam = 540 F\n",
+ "\n",
+ " Change in temperature = 212 F\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file