summaryrefslogtreecommitdiff
path: root/Thermodynamics_for_Engineers/Chapter_7_2.ipynb
diff options
context:
space:
mode:
authorhardythe12015-04-07 15:58:05 +0530
committerhardythe12015-04-07 15:58:05 +0530
commitc7fe425ef3c5e8804f2f5de3d8fffedf5e2f1131 (patch)
tree725a7d43dc1687edf95bc36d39bebc3000f1de8f /Thermodynamics_for_Engineers/Chapter_7_2.ipynb
parent62aa228e2519ac7b7f1aef53001f2f2e988a6eb1 (diff)
downloadPython-Textbook-Companions-c7fe425ef3c5e8804f2f5de3d8fffedf5e2f1131.tar.gz
Python-Textbook-Companions-c7fe425ef3c5e8804f2f5de3d8fffedf5e2f1131.tar.bz2
Python-Textbook-Companions-c7fe425ef3c5e8804f2f5de3d8fffedf5e2f1131.zip
added books
Diffstat (limited to 'Thermodynamics_for_Engineers/Chapter_7_2.ipynb')
-rwxr-xr-xThermodynamics_for_Engineers/Chapter_7_2.ipynb67
1 files changed, 67 insertions, 0 deletions
diff --git a/Thermodynamics_for_Engineers/Chapter_7_2.ipynb b/Thermodynamics_for_Engineers/Chapter_7_2.ipynb
new file mode 100755
index 00000000..a780ec36
--- /dev/null
+++ b/Thermodynamics_for_Engineers/Chapter_7_2.ipynb
@@ -0,0 +1,67 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:7cd10447df19fe2f7f7381338e86fa6208bc3c3a796f2e977240b17e164ee22b"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7 - Entropy"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1 - Pg 115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate the change in entropy\n",
+ "#Initialization of variables\n",
+ "T2=920. #R\n",
+ "T1=520. #R\n",
+ "P1=14. #psia\n",
+ "P2=84. #psia\n",
+ "J=778.\n",
+ "R=53.35\n",
+ "cv=0.1715\n",
+ "N=1\n",
+ "#calculations\n",
+ "k= math.log(T2/T1) /math.log(P2/P1)\n",
+ "n=1/(1-k)\n",
+ "cx=cv+R/(J*(1-n))\n",
+ "dS=N*cx*math.log(T2/T1)\n",
+ "#results\n",
+ "print '%s %.5f %s' %(\"Change in entropy =\",dS,\"unit of entropy\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropy = 0.01411 unit of entropy\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file