diff options
author | hardythe1 | 2015-01-28 14:31:21 +0530 |
---|---|---|
committer | hardythe1 | 2015-01-28 14:31:21 +0530 |
commit | 9add422993fb2649287260bc91d429a07d1810d5 (patch) | |
tree | ef48c2b2579e65b982d3f700c4fa76b81d2496c1 /Mechanical_Engineering_Thermodynamics/Chapter_8.ipynb | |
parent | 6e3407ba85ae84e1cee1ae0c972fd32c5504d827 (diff) | |
download | Python-Textbook-Companions-9add422993fb2649287260bc91d429a07d1810d5.tar.gz Python-Textbook-Companions-9add422993fb2649287260bc91d429a07d1810d5.tar.bz2 Python-Textbook-Companions-9add422993fb2649287260bc91d429a07d1810d5.zip |
added books
Diffstat (limited to 'Mechanical_Engineering_Thermodynamics/Chapter_8.ipynb')
-rwxr-xr-x | Mechanical_Engineering_Thermodynamics/Chapter_8.ipynb | 244 |
1 files changed, 244 insertions, 0 deletions
diff --git a/Mechanical_Engineering_Thermodynamics/Chapter_8.ipynb b/Mechanical_Engineering_Thermodynamics/Chapter_8.ipynb new file mode 100755 index 00000000..fe970912 --- /dev/null +++ b/Mechanical_Engineering_Thermodynamics/Chapter_8.ipynb @@ -0,0 +1,244 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8 - Basic Applications of the Second Law"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1 - Pg 130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the Max Efficiency possible\n",
+ "#initialization of varaibles\n",
+ "T1=85+460. #R\n",
+ "T2=50+460. #R\n",
+ "#calculations\n",
+ "eta=(T1-T2)/T1\n",
+ "#results\n",
+ "print '%s %.1f %s' %(\"Max. efficiency =\",eta*100,\"percent\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Max. efficiency = 6.4 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2 - Pg 130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the Max Efficiency possible\n",
+ "#initialization of varaibles\n",
+ "T1=1050+460. #R\n",
+ "T2=90+460. #R\n",
+ "#calculations\n",
+ "eta=(T1-T2)/T1\n",
+ "#results\n",
+ "print '%s %d %s' %(\"Max. possible efficiency = \",eta*100,\"percent\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Max. possible efficiency = 63 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3 - Pg 130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the change in entropy\n",
+ "#initialization of varaibles\n",
+ "import math\n",
+ "T1=50+460. \t#R\n",
+ "T2=150+460. #R\n",
+ "m=1.\n",
+ "cp=0.240\n",
+ "#calculations\n",
+ "ds=m*cp*(math.log(T2) - math.log(T1))\n",
+ "#results\n",
+ "print '%s %.4f %s' %(\"Change in entropy =\",ds,\"B/ F abs\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropy = 0.0430 B/ F abs\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4 - Pg 131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the change in entropy\n",
+ "#initialization of varaibles\n",
+ "import math\n",
+ "T1=50+460. #R\n",
+ "T2=150+460. #R\n",
+ "m=1\n",
+ "cp=0.240\n",
+ "#calculations\n",
+ "ds=m*cp*(math.log(T2) - math.log(T1))\n",
+ "#results\n",
+ "print '%s %.4f %s' %(\"Change in entropy = \",ds,\"B/ F abs\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropy = 0.0430 B/ F abs\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5 - Pg 131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate the total change in entropy\n",
+ "#initialization of varaibles\n",
+ "import math\n",
+ "Q=826. #B/lb\n",
+ "T=860. #R\n",
+ "T1=2000+460. #R\n",
+ "T2=1000+460. #R\n",
+ "#calculations\n",
+ "ds=Q/T\n",
+ "dsgas=Q*(math.log(T2)-math.log(T1))/(T1-T2)\n",
+ "dst=ds+dsgas\n",
+ "#results\n",
+ "print '%s %.3f %s' %(\"Total entropy change =\",dst,\"B/R\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total entropy change = 0.530 B/R\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6 - Pg 132"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate the loss in energy and increase in unavailable energy\n",
+ "#initialization of varaibles\n",
+ "T0=540. #R\n",
+ "Q=826. #B/lb\n",
+ "ds=0.534\n",
+ "ds2=0.431\n",
+ "#calculations\n",
+ "tds=T0*ds\n",
+ "tds2=T0*ds2\n",
+ "H=Q-tds2\n",
+ "Loss=tds/H\n",
+ "#results\n",
+ "print '%s %.1f %s' %(\"Increase in unavailable energy = \",tds,\"Btu\")\n",
+ "print '%s %.1f %s' %(\"Loss =\",Loss*100,\"percent\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Increase in unavailable energy = 288.4 Btu\n",
+ "Loss = 48.6 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |