summaryrefslogtreecommitdiff
path: root/Concepts_of_Thermodynamics/Chapter5.ipynb
diff options
context:
space:
mode:
authorhardythe12015-01-28 14:31:21 +0530
committerhardythe12015-01-28 14:31:21 +0530
commit53f72e6790ff23b43c8f6a0b69d6386940671429 (patch)
tree7745af6dbf2f5b2972b23f9f5a7a19c695a27321 /Concepts_of_Thermodynamics/Chapter5.ipynb
parent7b78be04fe05bf240417e22f74b3fc22e7a77d19 (diff)
downloadPython-Textbook-Companions-53f72e6790ff23b43c8f6a0b69d6386940671429.tar.gz
Python-Textbook-Companions-53f72e6790ff23b43c8f6a0b69d6386940671429.tar.bz2
Python-Textbook-Companions-53f72e6790ff23b43c8f6a0b69d6386940671429.zip
added books
Diffstat (limited to 'Concepts_of_Thermodynamics/Chapter5.ipynb')
-rwxr-xr-xConcepts_of_Thermodynamics/Chapter5.ipynb104
1 files changed, 104 insertions, 0 deletions
diff --git a/Concepts_of_Thermodynamics/Chapter5.ipynb b/Concepts_of_Thermodynamics/Chapter5.ipynb
new file mode 100755
index 00000000..e463b7a8
--- /dev/null
+++ b/Concepts_of_Thermodynamics/Chapter5.ipynb
@@ -0,0 +1,104 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "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 2 - Pg 86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate the work done and power of the system\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*V2- V1*V1)/(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 3 - Pg 87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the area of the 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
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file