summaryrefslogtreecommitdiff
path: root/Elements_of_Thermodynamics_and_heat_transfer/Chapter_10.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_10.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_10.ipynb')
-rwxr-xr-xElements_of_Thermodynamics_and_heat_transfer/Chapter_10.ipynb151
1 files changed, 151 insertions, 0 deletions
diff --git a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_10.ipynb b/Elements_of_Thermodynamics_and_heat_transfer/Chapter_10.ipynb
new file mode 100755
index 00000000..ff3609da
--- /dev/null
+++ b/Elements_of_Thermodynamics_and_heat_transfer/Chapter_10.ipynb
@@ -0,0 +1,151 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:1bfddf04d127361fe3f8fbf16a545bcc1144ba2e77c1a2b0127e1628ecf77a23"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 10 - The pvT relationships"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1 - Pg 164"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the pressure in ideal gas and vanderwaals case\n",
+ "#Initialization of variables\n",
+ "m=1 #lbm\n",
+ "T1=212+460. #R\n",
+ "sv=0.193 #ft^3/lbm\n",
+ "M=44\n",
+ "a=924.2 #atm ft^2 /mole^2\n",
+ "b=0.685 #ft^3/mol\n",
+ "R=0.73 #atm ft^3/R mol\n",
+ "#calculations\n",
+ "v=sv*M\n",
+ "p=R*T1/v\n",
+ "p2=R*T1/(v-b) -a/v**2\n",
+ "#results\n",
+ "print '%s %.1f %s' %(\"In ideal gas case, pressure =\",p,\" atm\")\n",
+ "print '%s %.1f %s' %(\"\\n In vanderwaals equation, pressure =\",p2,\" atm\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "In ideal gas case, pressure = 57.8 atm\n",
+ "\n",
+ " In vanderwaals equation, pressure = 50.0 atm\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2 - Pg 166"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the volume\n",
+ "#Initialization of variables\n",
+ "m=1 #lbm\n",
+ "p=50.9 #atm\n",
+ "t=212+460 #R\n",
+ "R=0.73\n",
+ "#calculations\n",
+ "pc=72.9 #atm\n",
+ "tc=87.9 +460 #R\n",
+ "pr=p/pc\n",
+ "Tr=t/tc\n",
+ "z=0.88\n",
+ "v=z*R*t/p\n",
+ "#results\n",
+ "print '%s %.3f %s' %(\"volume =\",v,\"ft^3/mole\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "volume = 8.481 ft^3/mole\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3 - Pg 167"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the Pressure\n",
+ "#Initialization of variables\n",
+ "t=212+460. #R\n",
+ "v=0.193 #ft^3/lbm\n",
+ "M=44.\n",
+ "R=0.73\n",
+ "#calculations\n",
+ "tc=87.9+460 #F\n",
+ "zc=0.275\n",
+ "vc=1.51 #ft^3/mol\n",
+ "tr=t/tc\n",
+ "vr=v*M/vc\n",
+ "vrd=vr*zc\n",
+ "z=0.88\n",
+ "p=z*R*t/(M*v)\n",
+ "#results\n",
+ "print '%s %.1f %s' %(\"Pressure =\",p,\"atm\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure = 50.8 atm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file