From 435840cef00c596d9e608f9eb2d96f522ea8505a Mon Sep 17 00:00:00 2001 From: hardythe1 Date: Tue, 5 May 2015 14:21:39 +0530 Subject: add books --- .../Chapter10.ipynb | 173 -------- .../Chapter10_1.ipynb | 173 -------- .../Chapter10_2.ipynb | 173 -------- ...0_Availbility,exergy_and_irreversibilitiy.ipynb | 173 -------- .../Chapter11.ipynb | 468 -------------------- .../Chapter11_.ipynb | 468 -------------------- .../Chapter11__1.ipynb | 468 -------------------- .../Chapter11_power_and_refrigeration_cycles.ipynb | 468 -------------------- .../Chapter13-.ipynb | 217 ---------- .../Chapter13-_thermodynamic_relations.ipynb | 217 ---------- .../Chapter13.ipynb | 217 ---------- .../Chapter13_1.ipynb | 217 ---------- .../Chapter14.ipynb | 313 -------------- .../Chapter14_1.ipynb | 313 -------------- .../Chapter14_2.ipynb | 313 -------------- ..._Equations_of_state_and_generlized_charts.ipynb | 313 -------------- .../Chapter15-.ipynb | 101 ----- .../Chapter15-multicomponet_systems.ipynb | 101 ----- .../Chapter15.ipynb | 101 ----- .../Chapter15_1.ipynb | 101 ----- .../Chapter16-.ipynb | 109 ----- .../Chapter16-Equlibrium.ipynb | 109 ----- .../Chapter16.ipynb | 109 ----- .../Chapter16_1.ipynb | 109 ----- .../Chapter17-.ipynb | 250 ----------- .../Chapter17-Ideal_solutions.ipynb | 250 ----------- .../Chapter17.ipynb | 250 ----------- .../Chapter17_1.ipynb | 250 ----------- .../Chapter18-.ipynb | 208 --------- .../Chapter18-Non-ideal_solutions.ipynb | 208 --------- .../Chapter18.ipynb | 208 --------- .../Chapter18_1.ipynb | 208 --------- .../Chapter19-Chemical_reactions.ipynb | 472 -------------------- .../Chapter19.ipynb | 472 -------------------- .../Chapter19_1.ipynb | 472 -------------------- .../Chapter5-the_ideal_gas.ipynb | 166 -------- .../Chapter5.ipynb | 166 -------- .../Chapter5_1.ipynb | 166 -------- .../Chapter5_2.ipynb | 166 -------- .../Chapter6-Control_volume.ipynb | 308 -------------- .../Chapter6.ipynb | 308 -------------- .../Chapter6_1.ipynb | 308 -------------- .../Chapter6_2.ipynb | 308 -------------- ...ines_and_the_second_law_of_thermodynamics.ipynb | 123 ------ .../Chapter7.ipynb | 123 ------ .../Chapter7_1.ipynb | 123 ------ .../Chapter7_2.ipynb | 123 ------ .../Chapter8-Entropy.ipynb | 309 -------------- .../Chapter8.ipynb | 309 -------------- .../Chapter8_1.ipynb | 309 -------------- .../Chapter8_2.ipynb | 309 -------------- ...tions_of_the_second_law_of_thermodynamics.ipynb | 473 --------------------- .../Chapter9.ipynb | 473 --------------------- .../Chapter9_1.ipynb | 473 --------------------- .../Chapter9_2.ipynb | 473 --------------------- .../Chapter_2.ipynb | 69 --- .../Chapter_2_-Basic_concepts_.ipynb | 69 --- .../Chapter_2_-Basic_concepts__1.ipynb | 69 --- .../Chapter_2_-Basic_concepts__2.ipynb | 69 --- .../Chapter_2_-Basic_concepts__3.ipynb | 69 --- .../Chapter_2_1.ipynb | 69 --- .../Chapter_2_2.ipynb | 69 --- ...ergy_and_heat_first_law_of_thermodynamics.ipynb | 220 ---------- ...gy_and_heat_first_law_of_thermodynamics_1.ipynb | 220 ---------- ...gy_and_heat_first_law_of_thermodynamics_2.ipynb | 220 ---------- ...gy_and_heat_first_law_of_thermodynamics_3.ipynb | 220 ---------- .../Chapter_3.ipynb | 220 ---------- .../Chapter_3_1.ipynb | 220 ---------- .../Chapter_3_2.ipynb | 220 ---------- .../Chapter_4.ipynb | 466 -------------------- .../Chapter_4_-Simple_systems.ipynb | 466 -------------------- .../Chapter_4_.ipynb | 466 -------------------- .../Chapter_4__1.ipynb | 466 -------------------- .../Chapter_4__2.ipynb | 228 +++++----- .../chapter12.ipynb | 314 -------------- .../chapter12_1.ipynb | 314 -------------- .../chapter12_2.ipynb | 314 -------------- ...hapter12_ideal_gas_mixtures_and_humid_air.ipynb | 314 -------------- 78 files changed, 125 insertions(+), 19534 deletions(-) delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter10.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter10_1.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter10_2.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter10_Availbility,exergy_and_irreversibilitiy.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter11.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter11_.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter11__1.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter11_power_and_refrigeration_cycles.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter13-.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter13-_thermodynamic_relations.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter13.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter13_1.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter14.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter14_1.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter14_2.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter14_Equations_of_state_and_generlized_charts.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter15-.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter15-multicomponet_systems.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter15.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter15_1.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter16-.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter16-Equlibrium.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter16.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter16_1.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter17-.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter17-Ideal_solutions.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter17.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter17_1.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter18-.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter18-Non-ideal_solutions.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter18.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter18_1.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter19-Chemical_reactions.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter19.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter19_1.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter5-the_ideal_gas.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter5.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter5_1.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter5_2.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter6-Control_volume.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter6.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter6_1.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter6_2.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter7-Heat_engines_and_the_second_law_of_thermodynamics.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter7.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter7_1.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter7_2.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter8-Entropy.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter8.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter8_1.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter8_2.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter9-Applications_of_the_second_law_of_thermodynamics.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter9.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter9_1.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter9_2.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter_2.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter_2_-Basic_concepts_.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter_2_-Basic_concepts__1.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter_2_-Basic_concepts__2.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter_2_-Basic_concepts__3.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter_2_1.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter_2_2.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter_3-Work_energy_and_heat_first_law_of_thermodynamics.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter_3-Work_energy_and_heat_first_law_of_thermodynamics_1.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter_3-Work_energy_and_heat_first_law_of_thermodynamics_2.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter_3-Work_energy_and_heat_first_law_of_thermodynamics_3.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter_3.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter_3_1.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter_3_2.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter_4.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter_4_-Simple_systems.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter_4_.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/Chapter_4__1.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/chapter12.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/chapter12_1.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/chapter12_2.ipynb delete mode 100755 Thermodynamics:_From_concepts_to_applications/chapter12_ideal_gas_mixtures_and_humid_air.ipynb (limited to 'Thermodynamics:_From_concepts_to_applications') diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter10.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter10.ipynb deleted file mode 100755 index b5e1628e..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter10.ipynb +++ /dev/null @@ -1,173 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:2af45763cdabb4c15384bcd3c0f85ef0384f4698a0a51376cf62b1a662fc76dc" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter10-Availbility,exergy and irreversibilitiy" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg 180" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate work of the water and heat interaction of the water and aximum work done\n", - "##initialisation of variables\n", - "m= 2 ##kg\n", - "p= 200 ##kPa\n", - "v2= 0.9596 ##m^3/kg\n", - "v1= 0.001 ##m^3/kg\n", - "u2= 2768.8 ##kJ/kg\n", - "u1= 83.96 ##kJ/kg\n", - "T= 20 ##C\n", - "u3= 2576.9 ##kJ/kg\n", - "s2= 7.2795 ##kJ/kg K\n", - "s1= 0.2966 ##kJ/kg K\n", - "Tr= 150 ##C\n", - "##CALCULATIONS\n", - "W= m*p*(v2-v1)\n", - "Q= m*(u2-u1)\n", - "A= m*((u3-u1)-(273.15+T)*(s2-s1))\n", - "Ar= -Q*(1-((273.15+T)/(273.15+Tr)))\n", - "Wrep= -(A+Ar)\n", - "##RESULTS\n", - "print'%s %.1f %s'%('work of the water =',W,'kJ')\n", - "print'%s %.1f %s'% ('Heat interaction of the water =',Q,'kJ')\n", - "print'%s %.1f %s'%('maximum work done =',Wrep,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work of the water = 383.4 kJ\n", - "Heat interaction of the water = 5369.7 kJ\n", - "maximum work done = 757.9 kJ\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg 182" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate irreversibility of the processes\n", - "##initialisation of variables\n", - "Wrev= 757.8 ##kJ\n", - "W= 383.4 ##kJ\n", - "m= 2 ##kg\n", - "s2= 7.2795 ##kJ/kg K\n", - "s1= 0.2966 ##kJ/kg K\n", - "Qr= 5369.7 ##kJ\n", - "T= 150 ##C\n", - "T0= 20 ##C\n", - "##CALCULATIONS\n", - "I= Wrev-W\n", - "dS= m*(s2-s1)\n", - "Sr= -Qr/(273.15+T)\n", - "I1= (273.15+T0)*(dS+Sr)\n", - "##RESULTS\n", - "print'%s %.1f %s'%('Irreversibility of the process=',I1,'kJ')\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Irreversibility of the process= 374.1 kJ\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg192" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate mass flow rates and wmax and irreversibility\n", - "import math\n", - "##initialisation of variables\n", - "h3= 2793.2 ##kJ/kg\n", - "h2= 1342.3 ##kJ/kg\n", - "h1= 2993.5 ##kJ/kg\n", - "m3= 2.5 ##kg/s\n", - "b1= 1043.9 ##kJ/kg\n", - "b2= 374.24 ##kJ/kg\n", - "b3= 875.41 ##kJ/kg\n", - "##CALCULATIONS\n", - "m1= m3*((h3-h2)/(h1-h2))\n", - "m2= m3*((h3-h1)/(h2-h1))\n", - "Bin= (m1*b1+m2*b2)\n", - "Bout= m3*b3\n", - "B= Bin-Bout\n", - "Wmax= B\n", - "I= B\n", - "##RESULTS\n", - "print'%s %.3f %s'%('mass flow rate=',m1,'kg/s')\n", - "print'%s %.3f %s'%('mass flow rate=',m2,'kg/s')\n", - "print'%s %.3f %s'%('Wmax=',Wmax,'kg/s')\n", - "print'%s %.1f %s'%('Irreversibility=',Wmax,'kW')\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "mass flow rate= 2.197 kg/s\n", - "mass flow rate= 0.303 kg/s\n", - "Wmax= 218.141 kg/s\n", - "Irreversibility= 218.1 kW\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter10_1.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter10_1.ipynb deleted file mode 100755 index b5e1628e..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter10_1.ipynb +++ /dev/null @@ -1,173 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:2af45763cdabb4c15384bcd3c0f85ef0384f4698a0a51376cf62b1a662fc76dc" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter10-Availbility,exergy and irreversibilitiy" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg 180" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate work of the water and heat interaction of the water and aximum work done\n", - "##initialisation of variables\n", - "m= 2 ##kg\n", - "p= 200 ##kPa\n", - "v2= 0.9596 ##m^3/kg\n", - "v1= 0.001 ##m^3/kg\n", - "u2= 2768.8 ##kJ/kg\n", - "u1= 83.96 ##kJ/kg\n", - "T= 20 ##C\n", - "u3= 2576.9 ##kJ/kg\n", - "s2= 7.2795 ##kJ/kg K\n", - "s1= 0.2966 ##kJ/kg K\n", - "Tr= 150 ##C\n", - "##CALCULATIONS\n", - "W= m*p*(v2-v1)\n", - "Q= m*(u2-u1)\n", - "A= m*((u3-u1)-(273.15+T)*(s2-s1))\n", - "Ar= -Q*(1-((273.15+T)/(273.15+Tr)))\n", - "Wrep= -(A+Ar)\n", - "##RESULTS\n", - "print'%s %.1f %s'%('work of the water =',W,'kJ')\n", - "print'%s %.1f %s'% ('Heat interaction of the water =',Q,'kJ')\n", - "print'%s %.1f %s'%('maximum work done =',Wrep,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work of the water = 383.4 kJ\n", - "Heat interaction of the water = 5369.7 kJ\n", - "maximum work done = 757.9 kJ\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg 182" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate irreversibility of the processes\n", - "##initialisation of variables\n", - "Wrev= 757.8 ##kJ\n", - "W= 383.4 ##kJ\n", - "m= 2 ##kg\n", - "s2= 7.2795 ##kJ/kg K\n", - "s1= 0.2966 ##kJ/kg K\n", - "Qr= 5369.7 ##kJ\n", - "T= 150 ##C\n", - "T0= 20 ##C\n", - "##CALCULATIONS\n", - "I= Wrev-W\n", - "dS= m*(s2-s1)\n", - "Sr= -Qr/(273.15+T)\n", - "I1= (273.15+T0)*(dS+Sr)\n", - "##RESULTS\n", - "print'%s %.1f %s'%('Irreversibility of the process=',I1,'kJ')\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Irreversibility of the process= 374.1 kJ\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg192" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate mass flow rates and wmax and irreversibility\n", - "import math\n", - "##initialisation of variables\n", - "h3= 2793.2 ##kJ/kg\n", - "h2= 1342.3 ##kJ/kg\n", - "h1= 2993.5 ##kJ/kg\n", - "m3= 2.5 ##kg/s\n", - "b1= 1043.9 ##kJ/kg\n", - "b2= 374.24 ##kJ/kg\n", - "b3= 875.41 ##kJ/kg\n", - "##CALCULATIONS\n", - "m1= m3*((h3-h2)/(h1-h2))\n", - "m2= m3*((h3-h1)/(h2-h1))\n", - "Bin= (m1*b1+m2*b2)\n", - "Bout= m3*b3\n", - "B= Bin-Bout\n", - "Wmax= B\n", - "I= B\n", - "##RESULTS\n", - "print'%s %.3f %s'%('mass flow rate=',m1,'kg/s')\n", - "print'%s %.3f %s'%('mass flow rate=',m2,'kg/s')\n", - "print'%s %.3f %s'%('Wmax=',Wmax,'kg/s')\n", - "print'%s %.1f %s'%('Irreversibility=',Wmax,'kW')\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "mass flow rate= 2.197 kg/s\n", - "mass flow rate= 0.303 kg/s\n", - "Wmax= 218.141 kg/s\n", - "Irreversibility= 218.1 kW\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter10_2.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter10_2.ipynb deleted file mode 100755 index b5e1628e..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter10_2.ipynb +++ /dev/null @@ -1,173 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:2af45763cdabb4c15384bcd3c0f85ef0384f4698a0a51376cf62b1a662fc76dc" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter10-Availbility,exergy and irreversibilitiy" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg 180" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate work of the water and heat interaction of the water and aximum work done\n", - "##initialisation of variables\n", - "m= 2 ##kg\n", - "p= 200 ##kPa\n", - "v2= 0.9596 ##m^3/kg\n", - "v1= 0.001 ##m^3/kg\n", - "u2= 2768.8 ##kJ/kg\n", - "u1= 83.96 ##kJ/kg\n", - "T= 20 ##C\n", - "u3= 2576.9 ##kJ/kg\n", - "s2= 7.2795 ##kJ/kg K\n", - "s1= 0.2966 ##kJ/kg K\n", - "Tr= 150 ##C\n", - "##CALCULATIONS\n", - "W= m*p*(v2-v1)\n", - "Q= m*(u2-u1)\n", - "A= m*((u3-u1)-(273.15+T)*(s2-s1))\n", - "Ar= -Q*(1-((273.15+T)/(273.15+Tr)))\n", - "Wrep= -(A+Ar)\n", - "##RESULTS\n", - "print'%s %.1f %s'%('work of the water =',W,'kJ')\n", - "print'%s %.1f %s'% ('Heat interaction of the water =',Q,'kJ')\n", - "print'%s %.1f %s'%('maximum work done =',Wrep,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work of the water = 383.4 kJ\n", - "Heat interaction of the water = 5369.7 kJ\n", - "maximum work done = 757.9 kJ\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg 182" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate irreversibility of the processes\n", - "##initialisation of variables\n", - "Wrev= 757.8 ##kJ\n", - "W= 383.4 ##kJ\n", - "m= 2 ##kg\n", - "s2= 7.2795 ##kJ/kg K\n", - "s1= 0.2966 ##kJ/kg K\n", - "Qr= 5369.7 ##kJ\n", - "T= 150 ##C\n", - "T0= 20 ##C\n", - "##CALCULATIONS\n", - "I= Wrev-W\n", - "dS= m*(s2-s1)\n", - "Sr= -Qr/(273.15+T)\n", - "I1= (273.15+T0)*(dS+Sr)\n", - "##RESULTS\n", - "print'%s %.1f %s'%('Irreversibility of the process=',I1,'kJ')\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Irreversibility of the process= 374.1 kJ\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg192" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate mass flow rates and wmax and irreversibility\n", - "import math\n", - "##initialisation of variables\n", - "h3= 2793.2 ##kJ/kg\n", - "h2= 1342.3 ##kJ/kg\n", - "h1= 2993.5 ##kJ/kg\n", - "m3= 2.5 ##kg/s\n", - "b1= 1043.9 ##kJ/kg\n", - "b2= 374.24 ##kJ/kg\n", - "b3= 875.41 ##kJ/kg\n", - "##CALCULATIONS\n", - "m1= m3*((h3-h2)/(h1-h2))\n", - "m2= m3*((h3-h1)/(h2-h1))\n", - "Bin= (m1*b1+m2*b2)\n", - "Bout= m3*b3\n", - "B= Bin-Bout\n", - "Wmax= B\n", - "I= B\n", - "##RESULTS\n", - "print'%s %.3f %s'%('mass flow rate=',m1,'kg/s')\n", - "print'%s %.3f %s'%('mass flow rate=',m2,'kg/s')\n", - "print'%s %.3f %s'%('Wmax=',Wmax,'kg/s')\n", - "print'%s %.1f %s'%('Irreversibility=',Wmax,'kW')\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "mass flow rate= 2.197 kg/s\n", - "mass flow rate= 0.303 kg/s\n", - "Wmax= 218.141 kg/s\n", - "Irreversibility= 218.1 kW\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter10_Availbility,exergy_and_irreversibilitiy.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter10_Availbility,exergy_and_irreversibilitiy.ipynb deleted file mode 100755 index b5e1628e..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter10_Availbility,exergy_and_irreversibilitiy.ipynb +++ /dev/null @@ -1,173 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:2af45763cdabb4c15384bcd3c0f85ef0384f4698a0a51376cf62b1a662fc76dc" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter10-Availbility,exergy and irreversibilitiy" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg 180" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate work of the water and heat interaction of the water and aximum work done\n", - "##initialisation of variables\n", - "m= 2 ##kg\n", - "p= 200 ##kPa\n", - "v2= 0.9596 ##m^3/kg\n", - "v1= 0.001 ##m^3/kg\n", - "u2= 2768.8 ##kJ/kg\n", - "u1= 83.96 ##kJ/kg\n", - "T= 20 ##C\n", - "u3= 2576.9 ##kJ/kg\n", - "s2= 7.2795 ##kJ/kg K\n", - "s1= 0.2966 ##kJ/kg K\n", - "Tr= 150 ##C\n", - "##CALCULATIONS\n", - "W= m*p*(v2-v1)\n", - "Q= m*(u2-u1)\n", - "A= m*((u3-u1)-(273.15+T)*(s2-s1))\n", - "Ar= -Q*(1-((273.15+T)/(273.15+Tr)))\n", - "Wrep= -(A+Ar)\n", - "##RESULTS\n", - "print'%s %.1f %s'%('work of the water =',W,'kJ')\n", - "print'%s %.1f %s'% ('Heat interaction of the water =',Q,'kJ')\n", - "print'%s %.1f %s'%('maximum work done =',Wrep,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work of the water = 383.4 kJ\n", - "Heat interaction of the water = 5369.7 kJ\n", - "maximum work done = 757.9 kJ\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg 182" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate irreversibility of the processes\n", - "##initialisation of variables\n", - "Wrev= 757.8 ##kJ\n", - "W= 383.4 ##kJ\n", - "m= 2 ##kg\n", - "s2= 7.2795 ##kJ/kg K\n", - "s1= 0.2966 ##kJ/kg K\n", - "Qr= 5369.7 ##kJ\n", - "T= 150 ##C\n", - "T0= 20 ##C\n", - "##CALCULATIONS\n", - "I= Wrev-W\n", - "dS= m*(s2-s1)\n", - "Sr= -Qr/(273.15+T)\n", - "I1= (273.15+T0)*(dS+Sr)\n", - "##RESULTS\n", - "print'%s %.1f %s'%('Irreversibility of the process=',I1,'kJ')\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Irreversibility of the process= 374.1 kJ\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg192" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate mass flow rates and wmax and irreversibility\n", - "import math\n", - "##initialisation of variables\n", - "h3= 2793.2 ##kJ/kg\n", - "h2= 1342.3 ##kJ/kg\n", - "h1= 2993.5 ##kJ/kg\n", - "m3= 2.5 ##kg/s\n", - "b1= 1043.9 ##kJ/kg\n", - "b2= 374.24 ##kJ/kg\n", - "b3= 875.41 ##kJ/kg\n", - "##CALCULATIONS\n", - "m1= m3*((h3-h2)/(h1-h2))\n", - "m2= m3*((h3-h1)/(h2-h1))\n", - "Bin= (m1*b1+m2*b2)\n", - "Bout= m3*b3\n", - "B= Bin-Bout\n", - "Wmax= B\n", - "I= B\n", - "##RESULTS\n", - "print'%s %.3f %s'%('mass flow rate=',m1,'kg/s')\n", - "print'%s %.3f %s'%('mass flow rate=',m2,'kg/s')\n", - "print'%s %.3f %s'%('Wmax=',Wmax,'kg/s')\n", - "print'%s %.1f %s'%('Irreversibility=',Wmax,'kW')\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "mass flow rate= 2.197 kg/s\n", - "mass flow rate= 0.303 kg/s\n", - "Wmax= 218.141 kg/s\n", - "Irreversibility= 218.1 kW\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter11.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter11.ipynb deleted file mode 100755 index 35f097c3..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter11.ipynb +++ /dev/null @@ -1,468 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:a15297e2995d0ee44a3db61bf50b4aac4f8b03ecce59bf2a69c1f32113289b28" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter11-power and refrigeration cycles" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg 203" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpy and effieceny and carnot efficency\n", - "##initialisation of variables\n", - "h1= 251.4 ##kJ/kg\n", - "v= 0.001017 ##m^3/kg\n", - "p2= 2000. ##Mpa\n", - "p1= 20. ##Mpa\n", - "h2= 253.4\n", - "h3= 3247.6 ##kJ/kg\n", - "h4= 2349.3 ##kJ/kg\n", - "Tc= 60.06 ##C\n", - "Th= 400. ##C\n", - "##CALCULATIONS\n", - "h2= h1+v*(2-p1)\n", - "q12= 0.\n", - "w12= h1-h2\n", - "q23= h3-h2\n", - "w23= 0.\n", - "q34= 0.\n", - "w34= h3-h4\n", - "q41= h1-h4\n", - "qnet= q12+q23+q34+q41\n", - "wnet= w12+w23+w34\n", - "n= wnet/q23\n", - "ncarnot= 1-((273.15+Tc)/(273.15+Th))\n", - "##RESULTS\n", - "print'%s %.1f %s'%('enthalpy=',h2,'kJ/kg')\n", - "print'%s %.3f %s'%('efficiency=',n,'')\n", - "print'%s %.3f %s'%('carnot efficiency=',ncarnot,'')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "enthalpy= 251.4 kJ/kg\n", - "efficiency= 0.300 \n", - "carnot efficiency= 0.505 \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg206" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate work and heat and effiecency and steam mass flow rate\n", - "##initialisation of variables\n", - "h3= 3247.4 ##kJ/kg\n", - "h4= 2439.1 ##kJ/kg\n", - "h1= 251.4 ##kJ/kg\n", - "h2= 253.9 ##kJ/kg\n", - "P= 100000 ##kW\n", - "##CALCULATIONS\n", - "wnet= h3-h4+h1-h2\n", - "qh= h3-h2\n", - "qc= h1-h4\n", - "n= wnet/qh\n", - "m= P/wnet\n", - "##RESULTS\n", - "print'%s %.f %s'%('work=',wnet,'kJ/kg')\n", - "print'%s %.1f %s'% ('heat=',qh,'kJ/kg')\n", - "print'%s %.1f %s'%('heat=',qc,'kJ/kg')\n", - "print'%s %.4f %s'%('efficiency=',n,'')\n", - "print'%s %.2f %s'%('steam mass flow rate=',m,'kg/s')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work= 806 kJ/kg\n", - "heat= 2993.5 kJ/kg\n", - "heat= -2187.7 kJ/kg\n", - "efficiency= 0.2692 \n", - "steam mass flow rate= 124.10 kg/s\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg 208" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate qualitys and efficiency and mass flow rate and diameter\n", - "##initialisation of variables\n", - "h11= 2786.2 ##kJ/kg\n", - "h12= 340.5 ##kJ/kg\n", - "h7= 327.9 ##kJ/kg\n", - "h6= 169.0 ##kJ/kg\n", - "h10= 756.7 ##kJ/kg\n", - "h9= 480.9 ##kJkg\n", - "h14= 2818 ##kJ.kg\n", - "h15= 762.8 ##kJ/kg\n", - "h8= 462.7 ##kJ/kg\n", - "h13= 2974.5 ##kJ/kg\n", - "h5= 168.8 ##kJ/kg\n", - "P= 150. ##kW\n", - "v1= 0.02293 ##m^3/kg\n", - "v= 40. ##m/s\n", - "h1= 3448.6 ##kJ/kg\n", - "h3= 3478.5 ##kJ/kg\n", - "h2= 2818 ##kJ/kg\n", - "h4= 2527.1 ##kJ/kg\n", - "##CALCULATIONS\n", - "y1= (h10-h9)/(h14-h15)\n", - "y2= ((h8-h7)-y1*(h15-h7))/(h13-h7)\n", - "y3= (h7-h6)*(1-y1-y2)/(h11-h12)\n", - "qin= h1-h10+(1-y1)*(h3-h2)\n", - "qout= (h5-h4)*(1-y1-y2)+y3*(h4-h12)\n", - "wnet= qin+qout\n", - "n= wnet*100/qin\n", - "m1= P*1000/wnet\n", - "A1= m1*v1/v\n", - "D= math.sqrt(4*A1/math.pi)\n", - "##RESULTS\n", - "print'%s %.4f %s'%(' quality=',y1,'')\n", - "print'%s %.4f %s'%('quality=',y2,'')\n", - "print'%s %.4f %s'%('quality=',y3,'')\n", - "print'%s %.2f %s'%('efficiency=',n,'percent')\n", - "print'%s %.2f %s'%('mass flow rate=',m1,'kg/s')\n", - "print'%s %.3f %s'%(' diameter=',D,'m')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " quality= 0.1342 \n", - "quality= 0.0289 \n", - "quality= 0.0544 \n", - "efficiency= 43.17 percent\n", - "mass flow rate= 106.46 kg/s\n", - " diameter= 0.279 m\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg 213" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate effieciency and power and temperature at the exist\n", - "##initialisation of variables\n", - "T= 300. ##K\n", - "P= 100. ##kPa\n", - "r= 4.\n", - "T1= 1200. ##K\n", - "m= 5. ##kg/s\n", - "k= 1.4\n", - "R= 8.314 ##jmol K\n", - "M= 29. ##gms\n", - "##CALCULATIONS\n", - "T2= T*math.pow(r,(k-1)/k)\n", - "T4= T1/math.pow(r,(k-1)/k)\n", - "n= 1-(T/T2)\n", - "wnet= (k*R/((k-1)*M))*(T1-T4+T-T2)\n", - "P= m*wnet\n", - "e= math.sqrt((T2-T)/(T1-T4))\n", - "T5= T+((T2-T)/e)\n", - "T6= T1+e*(T4-T1)\n", - "##RESULTS\n", - "print'%s %.4f %s'%('efficiency=',n,'')\n", - "print'%s %.f %s'%('power=',P,'kW')\n", - "print'%s %.4f %s'%('efficiency=',e,'')\n", - "print'%s %.1f %s'%('temperature at the exit=',T6,'K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "efficiency= 0.3270 \n", - "power= 1238 kW\n", - "efficiency= 0.6095 \n", - "temperature at the exit= 960.8 K\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg217" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##initialisation of variables\n", - "v= 810. ##km/h\n", - "v1= 40. ##m/sec\n", - "cp= 1003. ##J/k mol\n", - "T0= 300. ##K\n", - "ec= 0.88\n", - "k= 1.4\n", - "T3= 1473.15 ##K\n", - "p3= 600. ##kPa\n", - "p0= 26.4 ##kPa\n", - "e= 0.9\n", - "m= 90. ##kg\n", - "cp1= 1.003 ##J/mol K\n", - "##CALCULATIONS\n", - "v0= v*1000/3600.\n", - "T1= T0+((v0**2-v1**2)/(2*cp))\n", - "T1s= T0+ec*(T0-T1)\n", - "p1= 36.79 #kPa\n", - "p2= 600 #kPa\n", - "T2s= T1*(p2/p1)**((k-1)/k)\n", - "T2= T1+((T2s-T1)/ec)\n", - "T21= T1+(T2s-T1)/ec\n", - "T4= T3+T0-T21\n", - "T4s= T3+(T4-T3)/ec\n", - "p4= p3*(T4s/T3)\n", - "T5s= p4+(p0-p4)*e\n", - "W34= m*cp1*(T3-T4)\n", - "v5= math.sqrt(v1**2+2*cp*(T4-T5s))\n", - "F= m*(v5-v0)\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('T5=',T4s,'K ')\n", - "print'%s %.f %s'% ('Work=',W34,'kW ')\n", - "print'%s %.1f %s'% ('nozzle velocity=',v5,'m/s')\n", - "print'%s %.f %s'% ('thrust force=',F,'N')\n", - "\n", - "##ANSWERS GIVEN IN THE TEXTBOOK ARE WRONG\n", - "\n", - "##RESULTS\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "T5= 934.14 K \n", - "Work= 42818 kW \n", - "nozzle velocity= 1371.6 m/s\n", - "thrust force= 103193 N\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg225" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate COP and power and COP at given enthalpy\n", - "##initialisation of variables\n", - "h1= 182.07 ##kJ/kg\n", - "h4= 76.26 ##kJ/kg\n", - "h2= 217.97 ##kJ/kg\n", - "Q= math.pow(10,6) ##kJ/h\n", - "Tc= -5 ##C\n", - "Th= 32 ##C\n", - "##CALCULATIONS\n", - "COP= (h1-h4)/(h2-h1)\n", - "W= Q/(COP*3600)\n", - "COPcarnot= (273.15+Tc)/(Th-Tc)\n", - "##RESULTS\n", - "print'%s %.3f %s'% ('COP= ',COP,'')\n", - "print'%s %.3f %s'% ('power=',W,'KW')\n", - "print'%s %.3f %s'% ('COP=',COPcarnot,'')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "COP= 2.947 \n", - "power= 94.247 KW\n", - "COP= 7.247 \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg227" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate COPs and WORK at given variable\n", - "##initialisation of variables\n", - "h1= 183.12 ##kJ/kg\n", - "h4= 75.588 ##kJ/kg\n", - "h2= 218.697 ##kJ/kg\n", - "nm=0.94\n", - "Qc= 6 ##kW\n", - "h4a= 45.343 ##kJ/kg\n", - "h2a= 257.283 ##kJ/kg\n", - "h1a= 213.427 ##kJ/kg \n", - "##CALCULATIONS\n", - "COP= (h1-h4)*nm/(h2-h1)\n", - "W= Qc/COP\n", - "COP1= (h1-h4a)*nm/(h2a-h1a)\n", - "W1= Qc/COP1\n", - "##RESULTS\n", - "print'%s %.3f %s'% ('COP=',COP,'')\n", - "print'%s %.3f %s'% ('COP=',COP1,'')\n", - "print'%s %.3f %s'% ('Work=',W,'kW')\n", - "print'%s %.3f %s'% ('Work=',W1,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "COP= 2.841 \n", - "COP= 2.953 \n", - "Work= 2.112 kW\n", - "Work= 2.032 kW\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example8-pg228" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate COP and W\n", - "##initialisation of variables\n", - "h1= 1404.6 ##kJ/kg\n", - "h2s= 1748.9 ##kJ/kg\n", - "ec= 0.8\n", - "h4= 322.9 ##kJ/kg\n", - "h2= 1835 ##kJ/kg\n", - "Q= 100 ##kW\n", - "h21= 1649.2 ##kJ/kg\n", - "h22= 1515 ##kJ/kg\n", - "h23= 1678.8 ##kJ/kg\n", - "##CALCULATIONS\n", - "h2= h1+((h2s-h1)/ec)\n", - "COP= (h1-h4)/(h2-h1)\n", - "W= Q/COP\n", - "COP1= (h1-h4)/(h21-h1+h23-h22)\n", - "W1= Q/COP1\n", - "##RESULTS\n", - "print'%s %.3f %s'% (' COP=',COP,'')\n", - "print'%s %.3f %s'% ('COP=',COP1,'')\n", - "print'%s %.1f %s'% ('W= ',W,'kW')\n", - "print'%s %.1f %s'% ('W=',W1,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " COP= 2.513 \n", - "COP= 2.649 \n", - "W= 39.8 kW\n", - "W= 37.8 kW\n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter11_.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter11_.ipynb deleted file mode 100755 index 35f097c3..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter11_.ipynb +++ /dev/null @@ -1,468 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:a15297e2995d0ee44a3db61bf50b4aac4f8b03ecce59bf2a69c1f32113289b28" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter11-power and refrigeration cycles" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg 203" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpy and effieceny and carnot efficency\n", - "##initialisation of variables\n", - "h1= 251.4 ##kJ/kg\n", - "v= 0.001017 ##m^3/kg\n", - "p2= 2000. ##Mpa\n", - "p1= 20. ##Mpa\n", - "h2= 253.4\n", - "h3= 3247.6 ##kJ/kg\n", - "h4= 2349.3 ##kJ/kg\n", - "Tc= 60.06 ##C\n", - "Th= 400. ##C\n", - "##CALCULATIONS\n", - "h2= h1+v*(2-p1)\n", - "q12= 0.\n", - "w12= h1-h2\n", - "q23= h3-h2\n", - "w23= 0.\n", - "q34= 0.\n", - "w34= h3-h4\n", - "q41= h1-h4\n", - "qnet= q12+q23+q34+q41\n", - "wnet= w12+w23+w34\n", - "n= wnet/q23\n", - "ncarnot= 1-((273.15+Tc)/(273.15+Th))\n", - "##RESULTS\n", - "print'%s %.1f %s'%('enthalpy=',h2,'kJ/kg')\n", - "print'%s %.3f %s'%('efficiency=',n,'')\n", - "print'%s %.3f %s'%('carnot efficiency=',ncarnot,'')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "enthalpy= 251.4 kJ/kg\n", - "efficiency= 0.300 \n", - "carnot efficiency= 0.505 \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg206" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate work and heat and effiecency and steam mass flow rate\n", - "##initialisation of variables\n", - "h3= 3247.4 ##kJ/kg\n", - "h4= 2439.1 ##kJ/kg\n", - "h1= 251.4 ##kJ/kg\n", - "h2= 253.9 ##kJ/kg\n", - "P= 100000 ##kW\n", - "##CALCULATIONS\n", - "wnet= h3-h4+h1-h2\n", - "qh= h3-h2\n", - "qc= h1-h4\n", - "n= wnet/qh\n", - "m= P/wnet\n", - "##RESULTS\n", - "print'%s %.f %s'%('work=',wnet,'kJ/kg')\n", - "print'%s %.1f %s'% ('heat=',qh,'kJ/kg')\n", - "print'%s %.1f %s'%('heat=',qc,'kJ/kg')\n", - "print'%s %.4f %s'%('efficiency=',n,'')\n", - "print'%s %.2f %s'%('steam mass flow rate=',m,'kg/s')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work= 806 kJ/kg\n", - "heat= 2993.5 kJ/kg\n", - "heat= -2187.7 kJ/kg\n", - "efficiency= 0.2692 \n", - "steam mass flow rate= 124.10 kg/s\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg 208" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate qualitys and efficiency and mass flow rate and diameter\n", - "##initialisation of variables\n", - "h11= 2786.2 ##kJ/kg\n", - "h12= 340.5 ##kJ/kg\n", - "h7= 327.9 ##kJ/kg\n", - "h6= 169.0 ##kJ/kg\n", - "h10= 756.7 ##kJ/kg\n", - "h9= 480.9 ##kJkg\n", - "h14= 2818 ##kJ.kg\n", - "h15= 762.8 ##kJ/kg\n", - "h8= 462.7 ##kJ/kg\n", - "h13= 2974.5 ##kJ/kg\n", - "h5= 168.8 ##kJ/kg\n", - "P= 150. ##kW\n", - "v1= 0.02293 ##m^3/kg\n", - "v= 40. ##m/s\n", - "h1= 3448.6 ##kJ/kg\n", - "h3= 3478.5 ##kJ/kg\n", - "h2= 2818 ##kJ/kg\n", - "h4= 2527.1 ##kJ/kg\n", - "##CALCULATIONS\n", - "y1= (h10-h9)/(h14-h15)\n", - "y2= ((h8-h7)-y1*(h15-h7))/(h13-h7)\n", - "y3= (h7-h6)*(1-y1-y2)/(h11-h12)\n", - "qin= h1-h10+(1-y1)*(h3-h2)\n", - "qout= (h5-h4)*(1-y1-y2)+y3*(h4-h12)\n", - "wnet= qin+qout\n", - "n= wnet*100/qin\n", - "m1= P*1000/wnet\n", - "A1= m1*v1/v\n", - "D= math.sqrt(4*A1/math.pi)\n", - "##RESULTS\n", - "print'%s %.4f %s'%(' quality=',y1,'')\n", - "print'%s %.4f %s'%('quality=',y2,'')\n", - "print'%s %.4f %s'%('quality=',y3,'')\n", - "print'%s %.2f %s'%('efficiency=',n,'percent')\n", - "print'%s %.2f %s'%('mass flow rate=',m1,'kg/s')\n", - "print'%s %.3f %s'%(' diameter=',D,'m')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " quality= 0.1342 \n", - "quality= 0.0289 \n", - "quality= 0.0544 \n", - "efficiency= 43.17 percent\n", - "mass flow rate= 106.46 kg/s\n", - " diameter= 0.279 m\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg 213" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate effieciency and power and temperature at the exist\n", - "##initialisation of variables\n", - "T= 300. ##K\n", - "P= 100. ##kPa\n", - "r= 4.\n", - "T1= 1200. ##K\n", - "m= 5. ##kg/s\n", - "k= 1.4\n", - "R= 8.314 ##jmol K\n", - "M= 29. ##gms\n", - "##CALCULATIONS\n", - "T2= T*math.pow(r,(k-1)/k)\n", - "T4= T1/math.pow(r,(k-1)/k)\n", - "n= 1-(T/T2)\n", - "wnet= (k*R/((k-1)*M))*(T1-T4+T-T2)\n", - "P= m*wnet\n", - "e= math.sqrt((T2-T)/(T1-T4))\n", - "T5= T+((T2-T)/e)\n", - "T6= T1+e*(T4-T1)\n", - "##RESULTS\n", - "print'%s %.4f %s'%('efficiency=',n,'')\n", - "print'%s %.f %s'%('power=',P,'kW')\n", - "print'%s %.4f %s'%('efficiency=',e,'')\n", - "print'%s %.1f %s'%('temperature at the exit=',T6,'K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "efficiency= 0.3270 \n", - "power= 1238 kW\n", - "efficiency= 0.6095 \n", - "temperature at the exit= 960.8 K\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg217" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##initialisation of variables\n", - "v= 810. ##km/h\n", - "v1= 40. ##m/sec\n", - "cp= 1003. ##J/k mol\n", - "T0= 300. ##K\n", - "ec= 0.88\n", - "k= 1.4\n", - "T3= 1473.15 ##K\n", - "p3= 600. ##kPa\n", - "p0= 26.4 ##kPa\n", - "e= 0.9\n", - "m= 90. ##kg\n", - "cp1= 1.003 ##J/mol K\n", - "##CALCULATIONS\n", - "v0= v*1000/3600.\n", - "T1= T0+((v0**2-v1**2)/(2*cp))\n", - "T1s= T0+ec*(T0-T1)\n", - "p1= 36.79 #kPa\n", - "p2= 600 #kPa\n", - "T2s= T1*(p2/p1)**((k-1)/k)\n", - "T2= T1+((T2s-T1)/ec)\n", - "T21= T1+(T2s-T1)/ec\n", - "T4= T3+T0-T21\n", - "T4s= T3+(T4-T3)/ec\n", - "p4= p3*(T4s/T3)\n", - "T5s= p4+(p0-p4)*e\n", - "W34= m*cp1*(T3-T4)\n", - "v5= math.sqrt(v1**2+2*cp*(T4-T5s))\n", - "F= m*(v5-v0)\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('T5=',T4s,'K ')\n", - "print'%s %.f %s'% ('Work=',W34,'kW ')\n", - "print'%s %.1f %s'% ('nozzle velocity=',v5,'m/s')\n", - "print'%s %.f %s'% ('thrust force=',F,'N')\n", - "\n", - "##ANSWERS GIVEN IN THE TEXTBOOK ARE WRONG\n", - "\n", - "##RESULTS\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "T5= 934.14 K \n", - "Work= 42818 kW \n", - "nozzle velocity= 1371.6 m/s\n", - "thrust force= 103193 N\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg225" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate COP and power and COP at given enthalpy\n", - "##initialisation of variables\n", - "h1= 182.07 ##kJ/kg\n", - "h4= 76.26 ##kJ/kg\n", - "h2= 217.97 ##kJ/kg\n", - "Q= math.pow(10,6) ##kJ/h\n", - "Tc= -5 ##C\n", - "Th= 32 ##C\n", - "##CALCULATIONS\n", - "COP= (h1-h4)/(h2-h1)\n", - "W= Q/(COP*3600)\n", - "COPcarnot= (273.15+Tc)/(Th-Tc)\n", - "##RESULTS\n", - "print'%s %.3f %s'% ('COP= ',COP,'')\n", - "print'%s %.3f %s'% ('power=',W,'KW')\n", - "print'%s %.3f %s'% ('COP=',COPcarnot,'')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "COP= 2.947 \n", - "power= 94.247 KW\n", - "COP= 7.247 \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg227" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate COPs and WORK at given variable\n", - "##initialisation of variables\n", - "h1= 183.12 ##kJ/kg\n", - "h4= 75.588 ##kJ/kg\n", - "h2= 218.697 ##kJ/kg\n", - "nm=0.94\n", - "Qc= 6 ##kW\n", - "h4a= 45.343 ##kJ/kg\n", - "h2a= 257.283 ##kJ/kg\n", - "h1a= 213.427 ##kJ/kg \n", - "##CALCULATIONS\n", - "COP= (h1-h4)*nm/(h2-h1)\n", - "W= Qc/COP\n", - "COP1= (h1-h4a)*nm/(h2a-h1a)\n", - "W1= Qc/COP1\n", - "##RESULTS\n", - "print'%s %.3f %s'% ('COP=',COP,'')\n", - "print'%s %.3f %s'% ('COP=',COP1,'')\n", - "print'%s %.3f %s'% ('Work=',W,'kW')\n", - "print'%s %.3f %s'% ('Work=',W1,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "COP= 2.841 \n", - "COP= 2.953 \n", - "Work= 2.112 kW\n", - "Work= 2.032 kW\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example8-pg228" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate COP and W\n", - "##initialisation of variables\n", - "h1= 1404.6 ##kJ/kg\n", - "h2s= 1748.9 ##kJ/kg\n", - "ec= 0.8\n", - "h4= 322.9 ##kJ/kg\n", - "h2= 1835 ##kJ/kg\n", - "Q= 100 ##kW\n", - "h21= 1649.2 ##kJ/kg\n", - "h22= 1515 ##kJ/kg\n", - "h23= 1678.8 ##kJ/kg\n", - "##CALCULATIONS\n", - "h2= h1+((h2s-h1)/ec)\n", - "COP= (h1-h4)/(h2-h1)\n", - "W= Q/COP\n", - "COP1= (h1-h4)/(h21-h1+h23-h22)\n", - "W1= Q/COP1\n", - "##RESULTS\n", - "print'%s %.3f %s'% (' COP=',COP,'')\n", - "print'%s %.3f %s'% ('COP=',COP1,'')\n", - "print'%s %.1f %s'% ('W= ',W,'kW')\n", - "print'%s %.1f %s'% ('W=',W1,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " COP= 2.513 \n", - "COP= 2.649 \n", - "W= 39.8 kW\n", - "W= 37.8 kW\n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter11__1.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter11__1.ipynb deleted file mode 100755 index 35f097c3..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter11__1.ipynb +++ /dev/null @@ -1,468 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:a15297e2995d0ee44a3db61bf50b4aac4f8b03ecce59bf2a69c1f32113289b28" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter11-power and refrigeration cycles" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg 203" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpy and effieceny and carnot efficency\n", - "##initialisation of variables\n", - "h1= 251.4 ##kJ/kg\n", - "v= 0.001017 ##m^3/kg\n", - "p2= 2000. ##Mpa\n", - "p1= 20. ##Mpa\n", - "h2= 253.4\n", - "h3= 3247.6 ##kJ/kg\n", - "h4= 2349.3 ##kJ/kg\n", - "Tc= 60.06 ##C\n", - "Th= 400. ##C\n", - "##CALCULATIONS\n", - "h2= h1+v*(2-p1)\n", - "q12= 0.\n", - "w12= h1-h2\n", - "q23= h3-h2\n", - "w23= 0.\n", - "q34= 0.\n", - "w34= h3-h4\n", - "q41= h1-h4\n", - "qnet= q12+q23+q34+q41\n", - "wnet= w12+w23+w34\n", - "n= wnet/q23\n", - "ncarnot= 1-((273.15+Tc)/(273.15+Th))\n", - "##RESULTS\n", - "print'%s %.1f %s'%('enthalpy=',h2,'kJ/kg')\n", - "print'%s %.3f %s'%('efficiency=',n,'')\n", - "print'%s %.3f %s'%('carnot efficiency=',ncarnot,'')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "enthalpy= 251.4 kJ/kg\n", - "efficiency= 0.300 \n", - "carnot efficiency= 0.505 \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg206" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate work and heat and effiecency and steam mass flow rate\n", - "##initialisation of variables\n", - "h3= 3247.4 ##kJ/kg\n", - "h4= 2439.1 ##kJ/kg\n", - "h1= 251.4 ##kJ/kg\n", - "h2= 253.9 ##kJ/kg\n", - "P= 100000 ##kW\n", - "##CALCULATIONS\n", - "wnet= h3-h4+h1-h2\n", - "qh= h3-h2\n", - "qc= h1-h4\n", - "n= wnet/qh\n", - "m= P/wnet\n", - "##RESULTS\n", - "print'%s %.f %s'%('work=',wnet,'kJ/kg')\n", - "print'%s %.1f %s'% ('heat=',qh,'kJ/kg')\n", - "print'%s %.1f %s'%('heat=',qc,'kJ/kg')\n", - "print'%s %.4f %s'%('efficiency=',n,'')\n", - "print'%s %.2f %s'%('steam mass flow rate=',m,'kg/s')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work= 806 kJ/kg\n", - "heat= 2993.5 kJ/kg\n", - "heat= -2187.7 kJ/kg\n", - "efficiency= 0.2692 \n", - "steam mass flow rate= 124.10 kg/s\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg 208" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate qualitys and efficiency and mass flow rate and diameter\n", - "##initialisation of variables\n", - "h11= 2786.2 ##kJ/kg\n", - "h12= 340.5 ##kJ/kg\n", - "h7= 327.9 ##kJ/kg\n", - "h6= 169.0 ##kJ/kg\n", - "h10= 756.7 ##kJ/kg\n", - "h9= 480.9 ##kJkg\n", - "h14= 2818 ##kJ.kg\n", - "h15= 762.8 ##kJ/kg\n", - "h8= 462.7 ##kJ/kg\n", - "h13= 2974.5 ##kJ/kg\n", - "h5= 168.8 ##kJ/kg\n", - "P= 150. ##kW\n", - "v1= 0.02293 ##m^3/kg\n", - "v= 40. ##m/s\n", - "h1= 3448.6 ##kJ/kg\n", - "h3= 3478.5 ##kJ/kg\n", - "h2= 2818 ##kJ/kg\n", - "h4= 2527.1 ##kJ/kg\n", - "##CALCULATIONS\n", - "y1= (h10-h9)/(h14-h15)\n", - "y2= ((h8-h7)-y1*(h15-h7))/(h13-h7)\n", - "y3= (h7-h6)*(1-y1-y2)/(h11-h12)\n", - "qin= h1-h10+(1-y1)*(h3-h2)\n", - "qout= (h5-h4)*(1-y1-y2)+y3*(h4-h12)\n", - "wnet= qin+qout\n", - "n= wnet*100/qin\n", - "m1= P*1000/wnet\n", - "A1= m1*v1/v\n", - "D= math.sqrt(4*A1/math.pi)\n", - "##RESULTS\n", - "print'%s %.4f %s'%(' quality=',y1,'')\n", - "print'%s %.4f %s'%('quality=',y2,'')\n", - "print'%s %.4f %s'%('quality=',y3,'')\n", - "print'%s %.2f %s'%('efficiency=',n,'percent')\n", - "print'%s %.2f %s'%('mass flow rate=',m1,'kg/s')\n", - "print'%s %.3f %s'%(' diameter=',D,'m')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " quality= 0.1342 \n", - "quality= 0.0289 \n", - "quality= 0.0544 \n", - "efficiency= 43.17 percent\n", - "mass flow rate= 106.46 kg/s\n", - " diameter= 0.279 m\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg 213" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate effieciency and power and temperature at the exist\n", - "##initialisation of variables\n", - "T= 300. ##K\n", - "P= 100. ##kPa\n", - "r= 4.\n", - "T1= 1200. ##K\n", - "m= 5. ##kg/s\n", - "k= 1.4\n", - "R= 8.314 ##jmol K\n", - "M= 29. ##gms\n", - "##CALCULATIONS\n", - "T2= T*math.pow(r,(k-1)/k)\n", - "T4= T1/math.pow(r,(k-1)/k)\n", - "n= 1-(T/T2)\n", - "wnet= (k*R/((k-1)*M))*(T1-T4+T-T2)\n", - "P= m*wnet\n", - "e= math.sqrt((T2-T)/(T1-T4))\n", - "T5= T+((T2-T)/e)\n", - "T6= T1+e*(T4-T1)\n", - "##RESULTS\n", - "print'%s %.4f %s'%('efficiency=',n,'')\n", - "print'%s %.f %s'%('power=',P,'kW')\n", - "print'%s %.4f %s'%('efficiency=',e,'')\n", - "print'%s %.1f %s'%('temperature at the exit=',T6,'K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "efficiency= 0.3270 \n", - "power= 1238 kW\n", - "efficiency= 0.6095 \n", - "temperature at the exit= 960.8 K\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg217" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##initialisation of variables\n", - "v= 810. ##km/h\n", - "v1= 40. ##m/sec\n", - "cp= 1003. ##J/k mol\n", - "T0= 300. ##K\n", - "ec= 0.88\n", - "k= 1.4\n", - "T3= 1473.15 ##K\n", - "p3= 600. ##kPa\n", - "p0= 26.4 ##kPa\n", - "e= 0.9\n", - "m= 90. ##kg\n", - "cp1= 1.003 ##J/mol K\n", - "##CALCULATIONS\n", - "v0= v*1000/3600.\n", - "T1= T0+((v0**2-v1**2)/(2*cp))\n", - "T1s= T0+ec*(T0-T1)\n", - "p1= 36.79 #kPa\n", - "p2= 600 #kPa\n", - "T2s= T1*(p2/p1)**((k-1)/k)\n", - "T2= T1+((T2s-T1)/ec)\n", - "T21= T1+(T2s-T1)/ec\n", - "T4= T3+T0-T21\n", - "T4s= T3+(T4-T3)/ec\n", - "p4= p3*(T4s/T3)\n", - "T5s= p4+(p0-p4)*e\n", - "W34= m*cp1*(T3-T4)\n", - "v5= math.sqrt(v1**2+2*cp*(T4-T5s))\n", - "F= m*(v5-v0)\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('T5=',T4s,'K ')\n", - "print'%s %.f %s'% ('Work=',W34,'kW ')\n", - "print'%s %.1f %s'% ('nozzle velocity=',v5,'m/s')\n", - "print'%s %.f %s'% ('thrust force=',F,'N')\n", - "\n", - "##ANSWERS GIVEN IN THE TEXTBOOK ARE WRONG\n", - "\n", - "##RESULTS\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "T5= 934.14 K \n", - "Work= 42818 kW \n", - "nozzle velocity= 1371.6 m/s\n", - "thrust force= 103193 N\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg225" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate COP and power and COP at given enthalpy\n", - "##initialisation of variables\n", - "h1= 182.07 ##kJ/kg\n", - "h4= 76.26 ##kJ/kg\n", - "h2= 217.97 ##kJ/kg\n", - "Q= math.pow(10,6) ##kJ/h\n", - "Tc= -5 ##C\n", - "Th= 32 ##C\n", - "##CALCULATIONS\n", - "COP= (h1-h4)/(h2-h1)\n", - "W= Q/(COP*3600)\n", - "COPcarnot= (273.15+Tc)/(Th-Tc)\n", - "##RESULTS\n", - "print'%s %.3f %s'% ('COP= ',COP,'')\n", - "print'%s %.3f %s'% ('power=',W,'KW')\n", - "print'%s %.3f %s'% ('COP=',COPcarnot,'')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "COP= 2.947 \n", - "power= 94.247 KW\n", - "COP= 7.247 \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg227" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate COPs and WORK at given variable\n", - "##initialisation of variables\n", - "h1= 183.12 ##kJ/kg\n", - "h4= 75.588 ##kJ/kg\n", - "h2= 218.697 ##kJ/kg\n", - "nm=0.94\n", - "Qc= 6 ##kW\n", - "h4a= 45.343 ##kJ/kg\n", - "h2a= 257.283 ##kJ/kg\n", - "h1a= 213.427 ##kJ/kg \n", - "##CALCULATIONS\n", - "COP= (h1-h4)*nm/(h2-h1)\n", - "W= Qc/COP\n", - "COP1= (h1-h4a)*nm/(h2a-h1a)\n", - "W1= Qc/COP1\n", - "##RESULTS\n", - "print'%s %.3f %s'% ('COP=',COP,'')\n", - "print'%s %.3f %s'% ('COP=',COP1,'')\n", - "print'%s %.3f %s'% ('Work=',W,'kW')\n", - "print'%s %.3f %s'% ('Work=',W1,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "COP= 2.841 \n", - "COP= 2.953 \n", - "Work= 2.112 kW\n", - "Work= 2.032 kW\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example8-pg228" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate COP and W\n", - "##initialisation of variables\n", - "h1= 1404.6 ##kJ/kg\n", - "h2s= 1748.9 ##kJ/kg\n", - "ec= 0.8\n", - "h4= 322.9 ##kJ/kg\n", - "h2= 1835 ##kJ/kg\n", - "Q= 100 ##kW\n", - "h21= 1649.2 ##kJ/kg\n", - "h22= 1515 ##kJ/kg\n", - "h23= 1678.8 ##kJ/kg\n", - "##CALCULATIONS\n", - "h2= h1+((h2s-h1)/ec)\n", - "COP= (h1-h4)/(h2-h1)\n", - "W= Q/COP\n", - "COP1= (h1-h4)/(h21-h1+h23-h22)\n", - "W1= Q/COP1\n", - "##RESULTS\n", - "print'%s %.3f %s'% (' COP=',COP,'')\n", - "print'%s %.3f %s'% ('COP=',COP1,'')\n", - "print'%s %.1f %s'% ('W= ',W,'kW')\n", - "print'%s %.1f %s'% ('W=',W1,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " COP= 2.513 \n", - "COP= 2.649 \n", - "W= 39.8 kW\n", - "W= 37.8 kW\n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter11_power_and_refrigeration_cycles.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter11_power_and_refrigeration_cycles.ipynb deleted file mode 100755 index 35f097c3..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter11_power_and_refrigeration_cycles.ipynb +++ /dev/null @@ -1,468 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:a15297e2995d0ee44a3db61bf50b4aac4f8b03ecce59bf2a69c1f32113289b28" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter11-power and refrigeration cycles" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg 203" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpy and effieceny and carnot efficency\n", - "##initialisation of variables\n", - "h1= 251.4 ##kJ/kg\n", - "v= 0.001017 ##m^3/kg\n", - "p2= 2000. ##Mpa\n", - "p1= 20. ##Mpa\n", - "h2= 253.4\n", - "h3= 3247.6 ##kJ/kg\n", - "h4= 2349.3 ##kJ/kg\n", - "Tc= 60.06 ##C\n", - "Th= 400. ##C\n", - "##CALCULATIONS\n", - "h2= h1+v*(2-p1)\n", - "q12= 0.\n", - "w12= h1-h2\n", - "q23= h3-h2\n", - "w23= 0.\n", - "q34= 0.\n", - "w34= h3-h4\n", - "q41= h1-h4\n", - "qnet= q12+q23+q34+q41\n", - "wnet= w12+w23+w34\n", - "n= wnet/q23\n", - "ncarnot= 1-((273.15+Tc)/(273.15+Th))\n", - "##RESULTS\n", - "print'%s %.1f %s'%('enthalpy=',h2,'kJ/kg')\n", - "print'%s %.3f %s'%('efficiency=',n,'')\n", - "print'%s %.3f %s'%('carnot efficiency=',ncarnot,'')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "enthalpy= 251.4 kJ/kg\n", - "efficiency= 0.300 \n", - "carnot efficiency= 0.505 \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg206" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate work and heat and effiecency and steam mass flow rate\n", - "##initialisation of variables\n", - "h3= 3247.4 ##kJ/kg\n", - "h4= 2439.1 ##kJ/kg\n", - "h1= 251.4 ##kJ/kg\n", - "h2= 253.9 ##kJ/kg\n", - "P= 100000 ##kW\n", - "##CALCULATIONS\n", - "wnet= h3-h4+h1-h2\n", - "qh= h3-h2\n", - "qc= h1-h4\n", - "n= wnet/qh\n", - "m= P/wnet\n", - "##RESULTS\n", - "print'%s %.f %s'%('work=',wnet,'kJ/kg')\n", - "print'%s %.1f %s'% ('heat=',qh,'kJ/kg')\n", - "print'%s %.1f %s'%('heat=',qc,'kJ/kg')\n", - "print'%s %.4f %s'%('efficiency=',n,'')\n", - "print'%s %.2f %s'%('steam mass flow rate=',m,'kg/s')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work= 806 kJ/kg\n", - "heat= 2993.5 kJ/kg\n", - "heat= -2187.7 kJ/kg\n", - "efficiency= 0.2692 \n", - "steam mass flow rate= 124.10 kg/s\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg 208" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate qualitys and efficiency and mass flow rate and diameter\n", - "##initialisation of variables\n", - "h11= 2786.2 ##kJ/kg\n", - "h12= 340.5 ##kJ/kg\n", - "h7= 327.9 ##kJ/kg\n", - "h6= 169.0 ##kJ/kg\n", - "h10= 756.7 ##kJ/kg\n", - "h9= 480.9 ##kJkg\n", - "h14= 2818 ##kJ.kg\n", - "h15= 762.8 ##kJ/kg\n", - "h8= 462.7 ##kJ/kg\n", - "h13= 2974.5 ##kJ/kg\n", - "h5= 168.8 ##kJ/kg\n", - "P= 150. ##kW\n", - "v1= 0.02293 ##m^3/kg\n", - "v= 40. ##m/s\n", - "h1= 3448.6 ##kJ/kg\n", - "h3= 3478.5 ##kJ/kg\n", - "h2= 2818 ##kJ/kg\n", - "h4= 2527.1 ##kJ/kg\n", - "##CALCULATIONS\n", - "y1= (h10-h9)/(h14-h15)\n", - "y2= ((h8-h7)-y1*(h15-h7))/(h13-h7)\n", - "y3= (h7-h6)*(1-y1-y2)/(h11-h12)\n", - "qin= h1-h10+(1-y1)*(h3-h2)\n", - "qout= (h5-h4)*(1-y1-y2)+y3*(h4-h12)\n", - "wnet= qin+qout\n", - "n= wnet*100/qin\n", - "m1= P*1000/wnet\n", - "A1= m1*v1/v\n", - "D= math.sqrt(4*A1/math.pi)\n", - "##RESULTS\n", - "print'%s %.4f %s'%(' quality=',y1,'')\n", - "print'%s %.4f %s'%('quality=',y2,'')\n", - "print'%s %.4f %s'%('quality=',y3,'')\n", - "print'%s %.2f %s'%('efficiency=',n,'percent')\n", - "print'%s %.2f %s'%('mass flow rate=',m1,'kg/s')\n", - "print'%s %.3f %s'%(' diameter=',D,'m')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " quality= 0.1342 \n", - "quality= 0.0289 \n", - "quality= 0.0544 \n", - "efficiency= 43.17 percent\n", - "mass flow rate= 106.46 kg/s\n", - " diameter= 0.279 m\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg 213" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate effieciency and power and temperature at the exist\n", - "##initialisation of variables\n", - "T= 300. ##K\n", - "P= 100. ##kPa\n", - "r= 4.\n", - "T1= 1200. ##K\n", - "m= 5. ##kg/s\n", - "k= 1.4\n", - "R= 8.314 ##jmol K\n", - "M= 29. ##gms\n", - "##CALCULATIONS\n", - "T2= T*math.pow(r,(k-1)/k)\n", - "T4= T1/math.pow(r,(k-1)/k)\n", - "n= 1-(T/T2)\n", - "wnet= (k*R/((k-1)*M))*(T1-T4+T-T2)\n", - "P= m*wnet\n", - "e= math.sqrt((T2-T)/(T1-T4))\n", - "T5= T+((T2-T)/e)\n", - "T6= T1+e*(T4-T1)\n", - "##RESULTS\n", - "print'%s %.4f %s'%('efficiency=',n,'')\n", - "print'%s %.f %s'%('power=',P,'kW')\n", - "print'%s %.4f %s'%('efficiency=',e,'')\n", - "print'%s %.1f %s'%('temperature at the exit=',T6,'K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "efficiency= 0.3270 \n", - "power= 1238 kW\n", - "efficiency= 0.6095 \n", - "temperature at the exit= 960.8 K\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg217" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##initialisation of variables\n", - "v= 810. ##km/h\n", - "v1= 40. ##m/sec\n", - "cp= 1003. ##J/k mol\n", - "T0= 300. ##K\n", - "ec= 0.88\n", - "k= 1.4\n", - "T3= 1473.15 ##K\n", - "p3= 600. ##kPa\n", - "p0= 26.4 ##kPa\n", - "e= 0.9\n", - "m= 90. ##kg\n", - "cp1= 1.003 ##J/mol K\n", - "##CALCULATIONS\n", - "v0= v*1000/3600.\n", - "T1= T0+((v0**2-v1**2)/(2*cp))\n", - "T1s= T0+ec*(T0-T1)\n", - "p1= 36.79 #kPa\n", - "p2= 600 #kPa\n", - "T2s= T1*(p2/p1)**((k-1)/k)\n", - "T2= T1+((T2s-T1)/ec)\n", - "T21= T1+(T2s-T1)/ec\n", - "T4= T3+T0-T21\n", - "T4s= T3+(T4-T3)/ec\n", - "p4= p3*(T4s/T3)\n", - "T5s= p4+(p0-p4)*e\n", - "W34= m*cp1*(T3-T4)\n", - "v5= math.sqrt(v1**2+2*cp*(T4-T5s))\n", - "F= m*(v5-v0)\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('T5=',T4s,'K ')\n", - "print'%s %.f %s'% ('Work=',W34,'kW ')\n", - "print'%s %.1f %s'% ('nozzle velocity=',v5,'m/s')\n", - "print'%s %.f %s'% ('thrust force=',F,'N')\n", - "\n", - "##ANSWERS GIVEN IN THE TEXTBOOK ARE WRONG\n", - "\n", - "##RESULTS\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "T5= 934.14 K \n", - "Work= 42818 kW \n", - "nozzle velocity= 1371.6 m/s\n", - "thrust force= 103193 N\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg225" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate COP and power and COP at given enthalpy\n", - "##initialisation of variables\n", - "h1= 182.07 ##kJ/kg\n", - "h4= 76.26 ##kJ/kg\n", - "h2= 217.97 ##kJ/kg\n", - "Q= math.pow(10,6) ##kJ/h\n", - "Tc= -5 ##C\n", - "Th= 32 ##C\n", - "##CALCULATIONS\n", - "COP= (h1-h4)/(h2-h1)\n", - "W= Q/(COP*3600)\n", - "COPcarnot= (273.15+Tc)/(Th-Tc)\n", - "##RESULTS\n", - "print'%s %.3f %s'% ('COP= ',COP,'')\n", - "print'%s %.3f %s'% ('power=',W,'KW')\n", - "print'%s %.3f %s'% ('COP=',COPcarnot,'')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "COP= 2.947 \n", - "power= 94.247 KW\n", - "COP= 7.247 \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg227" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate COPs and WORK at given variable\n", - "##initialisation of variables\n", - "h1= 183.12 ##kJ/kg\n", - "h4= 75.588 ##kJ/kg\n", - "h2= 218.697 ##kJ/kg\n", - "nm=0.94\n", - "Qc= 6 ##kW\n", - "h4a= 45.343 ##kJ/kg\n", - "h2a= 257.283 ##kJ/kg\n", - "h1a= 213.427 ##kJ/kg \n", - "##CALCULATIONS\n", - "COP= (h1-h4)*nm/(h2-h1)\n", - "W= Qc/COP\n", - "COP1= (h1-h4a)*nm/(h2a-h1a)\n", - "W1= Qc/COP1\n", - "##RESULTS\n", - "print'%s %.3f %s'% ('COP=',COP,'')\n", - "print'%s %.3f %s'% ('COP=',COP1,'')\n", - "print'%s %.3f %s'% ('Work=',W,'kW')\n", - "print'%s %.3f %s'% ('Work=',W1,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "COP= 2.841 \n", - "COP= 2.953 \n", - "Work= 2.112 kW\n", - "Work= 2.032 kW\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example8-pg228" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate COP and W\n", - "##initialisation of variables\n", - "h1= 1404.6 ##kJ/kg\n", - "h2s= 1748.9 ##kJ/kg\n", - "ec= 0.8\n", - "h4= 322.9 ##kJ/kg\n", - "h2= 1835 ##kJ/kg\n", - "Q= 100 ##kW\n", - "h21= 1649.2 ##kJ/kg\n", - "h22= 1515 ##kJ/kg\n", - "h23= 1678.8 ##kJ/kg\n", - "##CALCULATIONS\n", - "h2= h1+((h2s-h1)/ec)\n", - "COP= (h1-h4)/(h2-h1)\n", - "W= Q/COP\n", - "COP1= (h1-h4)/(h21-h1+h23-h22)\n", - "W1= Q/COP1\n", - "##RESULTS\n", - "print'%s %.3f %s'% (' COP=',COP,'')\n", - "print'%s %.3f %s'% ('COP=',COP1,'')\n", - "print'%s %.1f %s'% ('W= ',W,'kW')\n", - "print'%s %.1f %s'% ('W=',W1,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " COP= 2.513 \n", - "COP= 2.649 \n", - "W= 39.8 kW\n", - "W= 37.8 kW\n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter13-.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter13-.ipynb deleted file mode 100755 index cb096e14..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter13-.ipynb +++ /dev/null @@ -1,217 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:8d95c094e950bc8cd1f4bbc97c09344d22cf81b1ba4d6101a144be7a5e1e83dc" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter13-thermodynamic relations" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg284" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate entropy wrt pressures and volume wrt temerature\n", - "##initialisation of variables\n", - "S1= 6.539 ##kJ/kg K\n", - "S2= 6.7664 ##kJ/kg K\n", - "v1= 0.10976 ##m^3\n", - "v2= 0.08700 ##m^3\n", - "P= 3. ##Mpa\n", - "P1= 2. ##Mpa\n", - "T= 350. ##K\n", - "T1= 250. ##K\n", - "S3= 3.1741 ##kJ/kg K\n", - "S4= 3.2071 ##kJ/kg K\n", - "P2= 30. ##Mpa\n", - "P3= 20. ##Mpa\n", - "v3= 0.0014217 ##m^3\n", - "v4= 0.0012860 ##m^3\n", - "T2= 320. ##K\n", - "T3= 280. ##K\n", - "##CALCULATIONS\n", - "r= (S1-S2)/(P*10*10*10-P1*10*10*10)\n", - "r1= (v1-v2)/(T-T1)\n", - "R= (S3-S4)/(P2*10*10*10-P3*10*10*10)\n", - "R1= (v3-v4)/(T2-T3)\n", - "##RESULTS\n", - "print'%s %.7f %s'% ('entropy wrt pressre=',r,'kJ/kg K kpa')\n", - "print'%s %.e %s'% ('entropy wrt pressre=',R,'kJ/kg K kpa')\n", - "print'%s %.7f %s'% ('volume wrt temperature=',r1,'m^3/kg K ')\n", - "print'%s %.2e %s'% ('volume wrt temperature=',R1,'m^3/kg K ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "entropy wrt pressre= -0.0002274 kJ/kg K kpa\n", - "entropy wrt pressre= -3e-06 kJ/kg K kpa\n", - "volume wrt temperature= 0.0002276 m^3/kg K \n", - "volume wrt temperature= 3.39e-06 m^3/kg K \n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg286" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#saturation pressure\n", - "##initialisation of variables\n", - "hfg= 2406.7 ##kJ/kg\n", - "Psat40= 7.384 ##kPa\n", - "R= 8.314 ##J/mol K\n", - "T= 40. ##C\n", - "T1= 50. ##C\n", - "M= 18.##kg\n", - "##CALCULATIONS\n", - "Psat50= Psat40*math.e**((hfg*M/R)*((1/(273.15+T))-(1/(273.15+T1))))\n", - "##RESULTS\n", - "print'%s %.3f %s' %('Saturation pressure=',Psat50,'kPa')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Saturation pressure= 12.357 kPa\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg287" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calcualte lowest temprature\n", - "##initialisation of variables\n", - "W= 800. ##N\n", - "A= 0.4 ##cm^2\n", - "p= 0.611 ##Mpa\n", - "P1= 0.1 ##Mpa\n", - "T= 0.01 ##C\n", - "vs= 0.0010908 ##m^3/kg\n", - "hs= -333.40 ##kJ/kg\n", - "vf= 0.0010002 ##m^3/kg\n", - "hf= 0 ##kJ/kg\n", - "vg= 206.14 ##m^3/kg\n", - "hg= 2501.4 ##kJ/kg\n", - "##CALCULATIONS\n", - "P2= P1+(W/A)*math.pow(10,(4-6))\n", - "dT= (273.15++T)*(vf-vs)*(P2*10*10*10-p)/(0-hs)\n", - "Tmin= dT+T\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('lowest temperature=',Tmin,'C')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "lowest temperature= -1.48 C\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg292" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate volume exapansion coefficent and isothermal compressibilitiy and isotherma modulus of elasticity\n", - "##initialisation of variables\n", - "vi= 0.0009992 ##m^3\n", - "T= 60. ##C\n", - "T1= 20. ##C\n", - "T2= 40. ##C\n", - "vi1= 0.0010042 ##m^3\n", - "vi2= 0.0009886 ##m^3\n", - "v= 0.000951 ##m^3\n", - "v1= 0.0009992 ##m^3\n", - "v2= 0.0009956 ##m^3\n", - "##CALCULATIONS\n", - "B= (vi1-vi2)/(vi*(T-T1))\n", - "Kt= (v1-v2)/(v*(T2-T1))\n", - "Et= 1/Kt\n", - "##RESULTS\n", - "print'%s %.2e %s'% ('volume exapansion coefficient=',B,'L/s')\n", - "print'%s %.3e %s'% ('isothermal compressibility=',Kt,'Mpa')\n", - "print'%s %.f %s'% ('isothermal modulus of elasticity=',Et,'Mpa')\n", - "\n", - "\n", - "##ANSWER FOR Et GIVEN IN THE TEXTBOOK IS WRONG\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume exapansion coefficient= 3.90e-04 L/s\n", - "isothermal compressibility= 1.893e-04 Mpa\n", - "isothermal modulus of elasticity= 5283 Mpa\n" - ] - } - ], - "prompt_number": 4 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter13-_thermodynamic_relations.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter13-_thermodynamic_relations.ipynb deleted file mode 100755 index cb096e14..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter13-_thermodynamic_relations.ipynb +++ /dev/null @@ -1,217 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:8d95c094e950bc8cd1f4bbc97c09344d22cf81b1ba4d6101a144be7a5e1e83dc" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter13-thermodynamic relations" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg284" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate entropy wrt pressures and volume wrt temerature\n", - "##initialisation of variables\n", - "S1= 6.539 ##kJ/kg K\n", - "S2= 6.7664 ##kJ/kg K\n", - "v1= 0.10976 ##m^3\n", - "v2= 0.08700 ##m^3\n", - "P= 3. ##Mpa\n", - "P1= 2. ##Mpa\n", - "T= 350. ##K\n", - "T1= 250. ##K\n", - "S3= 3.1741 ##kJ/kg K\n", - "S4= 3.2071 ##kJ/kg K\n", - "P2= 30. ##Mpa\n", - "P3= 20. ##Mpa\n", - "v3= 0.0014217 ##m^3\n", - "v4= 0.0012860 ##m^3\n", - "T2= 320. ##K\n", - "T3= 280. ##K\n", - "##CALCULATIONS\n", - "r= (S1-S2)/(P*10*10*10-P1*10*10*10)\n", - "r1= (v1-v2)/(T-T1)\n", - "R= (S3-S4)/(P2*10*10*10-P3*10*10*10)\n", - "R1= (v3-v4)/(T2-T3)\n", - "##RESULTS\n", - "print'%s %.7f %s'% ('entropy wrt pressre=',r,'kJ/kg K kpa')\n", - "print'%s %.e %s'% ('entropy wrt pressre=',R,'kJ/kg K kpa')\n", - "print'%s %.7f %s'% ('volume wrt temperature=',r1,'m^3/kg K ')\n", - "print'%s %.2e %s'% ('volume wrt temperature=',R1,'m^3/kg K ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "entropy wrt pressre= -0.0002274 kJ/kg K kpa\n", - "entropy wrt pressre= -3e-06 kJ/kg K kpa\n", - "volume wrt temperature= 0.0002276 m^3/kg K \n", - "volume wrt temperature= 3.39e-06 m^3/kg K \n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg286" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#saturation pressure\n", - "##initialisation of variables\n", - "hfg= 2406.7 ##kJ/kg\n", - "Psat40= 7.384 ##kPa\n", - "R= 8.314 ##J/mol K\n", - "T= 40. ##C\n", - "T1= 50. ##C\n", - "M= 18.##kg\n", - "##CALCULATIONS\n", - "Psat50= Psat40*math.e**((hfg*M/R)*((1/(273.15+T))-(1/(273.15+T1))))\n", - "##RESULTS\n", - "print'%s %.3f %s' %('Saturation pressure=',Psat50,'kPa')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Saturation pressure= 12.357 kPa\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg287" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calcualte lowest temprature\n", - "##initialisation of variables\n", - "W= 800. ##N\n", - "A= 0.4 ##cm^2\n", - "p= 0.611 ##Mpa\n", - "P1= 0.1 ##Mpa\n", - "T= 0.01 ##C\n", - "vs= 0.0010908 ##m^3/kg\n", - "hs= -333.40 ##kJ/kg\n", - "vf= 0.0010002 ##m^3/kg\n", - "hf= 0 ##kJ/kg\n", - "vg= 206.14 ##m^3/kg\n", - "hg= 2501.4 ##kJ/kg\n", - "##CALCULATIONS\n", - "P2= P1+(W/A)*math.pow(10,(4-6))\n", - "dT= (273.15++T)*(vf-vs)*(P2*10*10*10-p)/(0-hs)\n", - "Tmin= dT+T\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('lowest temperature=',Tmin,'C')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "lowest temperature= -1.48 C\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg292" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate volume exapansion coefficent and isothermal compressibilitiy and isotherma modulus of elasticity\n", - "##initialisation of variables\n", - "vi= 0.0009992 ##m^3\n", - "T= 60. ##C\n", - "T1= 20. ##C\n", - "T2= 40. ##C\n", - "vi1= 0.0010042 ##m^3\n", - "vi2= 0.0009886 ##m^3\n", - "v= 0.000951 ##m^3\n", - "v1= 0.0009992 ##m^3\n", - "v2= 0.0009956 ##m^3\n", - "##CALCULATIONS\n", - "B= (vi1-vi2)/(vi*(T-T1))\n", - "Kt= (v1-v2)/(v*(T2-T1))\n", - "Et= 1/Kt\n", - "##RESULTS\n", - "print'%s %.2e %s'% ('volume exapansion coefficient=',B,'L/s')\n", - "print'%s %.3e %s'% ('isothermal compressibility=',Kt,'Mpa')\n", - "print'%s %.f %s'% ('isothermal modulus of elasticity=',Et,'Mpa')\n", - "\n", - "\n", - "##ANSWER FOR Et GIVEN IN THE TEXTBOOK IS WRONG\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume exapansion coefficient= 3.90e-04 L/s\n", - "isothermal compressibility= 1.893e-04 Mpa\n", - "isothermal modulus of elasticity= 5283 Mpa\n" - ] - } - ], - "prompt_number": 4 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter13.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter13.ipynb deleted file mode 100755 index cb096e14..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter13.ipynb +++ /dev/null @@ -1,217 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:8d95c094e950bc8cd1f4bbc97c09344d22cf81b1ba4d6101a144be7a5e1e83dc" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter13-thermodynamic relations" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg284" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate entropy wrt pressures and volume wrt temerature\n", - "##initialisation of variables\n", - "S1= 6.539 ##kJ/kg K\n", - "S2= 6.7664 ##kJ/kg K\n", - "v1= 0.10976 ##m^3\n", - "v2= 0.08700 ##m^3\n", - "P= 3. ##Mpa\n", - "P1= 2. ##Mpa\n", - "T= 350. ##K\n", - "T1= 250. ##K\n", - "S3= 3.1741 ##kJ/kg K\n", - "S4= 3.2071 ##kJ/kg K\n", - "P2= 30. ##Mpa\n", - "P3= 20. ##Mpa\n", - "v3= 0.0014217 ##m^3\n", - "v4= 0.0012860 ##m^3\n", - "T2= 320. ##K\n", - "T3= 280. ##K\n", - "##CALCULATIONS\n", - "r= (S1-S2)/(P*10*10*10-P1*10*10*10)\n", - "r1= (v1-v2)/(T-T1)\n", - "R= (S3-S4)/(P2*10*10*10-P3*10*10*10)\n", - "R1= (v3-v4)/(T2-T3)\n", - "##RESULTS\n", - "print'%s %.7f %s'% ('entropy wrt pressre=',r,'kJ/kg K kpa')\n", - "print'%s %.e %s'% ('entropy wrt pressre=',R,'kJ/kg K kpa')\n", - "print'%s %.7f %s'% ('volume wrt temperature=',r1,'m^3/kg K ')\n", - "print'%s %.2e %s'% ('volume wrt temperature=',R1,'m^3/kg K ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "entropy wrt pressre= -0.0002274 kJ/kg K kpa\n", - "entropy wrt pressre= -3e-06 kJ/kg K kpa\n", - "volume wrt temperature= 0.0002276 m^3/kg K \n", - "volume wrt temperature= 3.39e-06 m^3/kg K \n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg286" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#saturation pressure\n", - "##initialisation of variables\n", - "hfg= 2406.7 ##kJ/kg\n", - "Psat40= 7.384 ##kPa\n", - "R= 8.314 ##J/mol K\n", - "T= 40. ##C\n", - "T1= 50. ##C\n", - "M= 18.##kg\n", - "##CALCULATIONS\n", - "Psat50= Psat40*math.e**((hfg*M/R)*((1/(273.15+T))-(1/(273.15+T1))))\n", - "##RESULTS\n", - "print'%s %.3f %s' %('Saturation pressure=',Psat50,'kPa')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Saturation pressure= 12.357 kPa\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg287" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calcualte lowest temprature\n", - "##initialisation of variables\n", - "W= 800. ##N\n", - "A= 0.4 ##cm^2\n", - "p= 0.611 ##Mpa\n", - "P1= 0.1 ##Mpa\n", - "T= 0.01 ##C\n", - "vs= 0.0010908 ##m^3/kg\n", - "hs= -333.40 ##kJ/kg\n", - "vf= 0.0010002 ##m^3/kg\n", - "hf= 0 ##kJ/kg\n", - "vg= 206.14 ##m^3/kg\n", - "hg= 2501.4 ##kJ/kg\n", - "##CALCULATIONS\n", - "P2= P1+(W/A)*math.pow(10,(4-6))\n", - "dT= (273.15++T)*(vf-vs)*(P2*10*10*10-p)/(0-hs)\n", - "Tmin= dT+T\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('lowest temperature=',Tmin,'C')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "lowest temperature= -1.48 C\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg292" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate volume exapansion coefficent and isothermal compressibilitiy and isotherma modulus of elasticity\n", - "##initialisation of variables\n", - "vi= 0.0009992 ##m^3\n", - "T= 60. ##C\n", - "T1= 20. ##C\n", - "T2= 40. ##C\n", - "vi1= 0.0010042 ##m^3\n", - "vi2= 0.0009886 ##m^3\n", - "v= 0.000951 ##m^3\n", - "v1= 0.0009992 ##m^3\n", - "v2= 0.0009956 ##m^3\n", - "##CALCULATIONS\n", - "B= (vi1-vi2)/(vi*(T-T1))\n", - "Kt= (v1-v2)/(v*(T2-T1))\n", - "Et= 1/Kt\n", - "##RESULTS\n", - "print'%s %.2e %s'% ('volume exapansion coefficient=',B,'L/s')\n", - "print'%s %.3e %s'% ('isothermal compressibility=',Kt,'Mpa')\n", - "print'%s %.f %s'% ('isothermal modulus of elasticity=',Et,'Mpa')\n", - "\n", - "\n", - "##ANSWER FOR Et GIVEN IN THE TEXTBOOK IS WRONG\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume exapansion coefficient= 3.90e-04 L/s\n", - "isothermal compressibility= 1.893e-04 Mpa\n", - "isothermal modulus of elasticity= 5283 Mpa\n" - ] - } - ], - "prompt_number": 4 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter13_1.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter13_1.ipynb deleted file mode 100755 index cb096e14..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter13_1.ipynb +++ /dev/null @@ -1,217 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:8d95c094e950bc8cd1f4bbc97c09344d22cf81b1ba4d6101a144be7a5e1e83dc" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter13-thermodynamic relations" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg284" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate entropy wrt pressures and volume wrt temerature\n", - "##initialisation of variables\n", - "S1= 6.539 ##kJ/kg K\n", - "S2= 6.7664 ##kJ/kg K\n", - "v1= 0.10976 ##m^3\n", - "v2= 0.08700 ##m^3\n", - "P= 3. ##Mpa\n", - "P1= 2. ##Mpa\n", - "T= 350. ##K\n", - "T1= 250. ##K\n", - "S3= 3.1741 ##kJ/kg K\n", - "S4= 3.2071 ##kJ/kg K\n", - "P2= 30. ##Mpa\n", - "P3= 20. ##Mpa\n", - "v3= 0.0014217 ##m^3\n", - "v4= 0.0012860 ##m^3\n", - "T2= 320. ##K\n", - "T3= 280. ##K\n", - "##CALCULATIONS\n", - "r= (S1-S2)/(P*10*10*10-P1*10*10*10)\n", - "r1= (v1-v2)/(T-T1)\n", - "R= (S3-S4)/(P2*10*10*10-P3*10*10*10)\n", - "R1= (v3-v4)/(T2-T3)\n", - "##RESULTS\n", - "print'%s %.7f %s'% ('entropy wrt pressre=',r,'kJ/kg K kpa')\n", - "print'%s %.e %s'% ('entropy wrt pressre=',R,'kJ/kg K kpa')\n", - "print'%s %.7f %s'% ('volume wrt temperature=',r1,'m^3/kg K ')\n", - "print'%s %.2e %s'% ('volume wrt temperature=',R1,'m^3/kg K ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "entropy wrt pressre= -0.0002274 kJ/kg K kpa\n", - "entropy wrt pressre= -3e-06 kJ/kg K kpa\n", - "volume wrt temperature= 0.0002276 m^3/kg K \n", - "volume wrt temperature= 3.39e-06 m^3/kg K \n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg286" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#saturation pressure\n", - "##initialisation of variables\n", - "hfg= 2406.7 ##kJ/kg\n", - "Psat40= 7.384 ##kPa\n", - "R= 8.314 ##J/mol K\n", - "T= 40. ##C\n", - "T1= 50. ##C\n", - "M= 18.##kg\n", - "##CALCULATIONS\n", - "Psat50= Psat40*math.e**((hfg*M/R)*((1/(273.15+T))-(1/(273.15+T1))))\n", - "##RESULTS\n", - "print'%s %.3f %s' %('Saturation pressure=',Psat50,'kPa')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Saturation pressure= 12.357 kPa\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg287" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calcualte lowest temprature\n", - "##initialisation of variables\n", - "W= 800. ##N\n", - "A= 0.4 ##cm^2\n", - "p= 0.611 ##Mpa\n", - "P1= 0.1 ##Mpa\n", - "T= 0.01 ##C\n", - "vs= 0.0010908 ##m^3/kg\n", - "hs= -333.40 ##kJ/kg\n", - "vf= 0.0010002 ##m^3/kg\n", - "hf= 0 ##kJ/kg\n", - "vg= 206.14 ##m^3/kg\n", - "hg= 2501.4 ##kJ/kg\n", - "##CALCULATIONS\n", - "P2= P1+(W/A)*math.pow(10,(4-6))\n", - "dT= (273.15++T)*(vf-vs)*(P2*10*10*10-p)/(0-hs)\n", - "Tmin= dT+T\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('lowest temperature=',Tmin,'C')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "lowest temperature= -1.48 C\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg292" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate volume exapansion coefficent and isothermal compressibilitiy and isotherma modulus of elasticity\n", - "##initialisation of variables\n", - "vi= 0.0009992 ##m^3\n", - "T= 60. ##C\n", - "T1= 20. ##C\n", - "T2= 40. ##C\n", - "vi1= 0.0010042 ##m^3\n", - "vi2= 0.0009886 ##m^3\n", - "v= 0.000951 ##m^3\n", - "v1= 0.0009992 ##m^3\n", - "v2= 0.0009956 ##m^3\n", - "##CALCULATIONS\n", - "B= (vi1-vi2)/(vi*(T-T1))\n", - "Kt= (v1-v2)/(v*(T2-T1))\n", - "Et= 1/Kt\n", - "##RESULTS\n", - "print'%s %.2e %s'% ('volume exapansion coefficient=',B,'L/s')\n", - "print'%s %.3e %s'% ('isothermal compressibility=',Kt,'Mpa')\n", - "print'%s %.f %s'% ('isothermal modulus of elasticity=',Et,'Mpa')\n", - "\n", - "\n", - "##ANSWER FOR Et GIVEN IN THE TEXTBOOK IS WRONG\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume exapansion coefficient= 3.90e-04 L/s\n", - "isothermal compressibility= 1.893e-04 Mpa\n", - "isothermal modulus of elasticity= 5283 Mpa\n" - ] - } - ], - "prompt_number": 4 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter14.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter14.ipynb deleted file mode 100755 index 5bcffb75..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter14.ipynb +++ /dev/null @@ -1,313 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:dceed5d123e7adb1d73db762a18a52615a5b487342c94704535d968cf751d6c0" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "chapter14-equations of state and generlized charts" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "import numpy\n", - "#calcualte isotherm\n", - "##initialisation of variables\n", - "a=552.6 ##kPa m^6/kmol^2\n", - "b= 0.03402 ##m^3/kmol\n", - "p= 100. ##kPa\n", - "R= 8.314 ##J/mol K\n", - "##CALCULATIONS\n", - "vec=([p,-a,2*a*b])\n", - "vector= numpy.roots(vec)\n", - "x=vec[0]\n", - "T= 2*a*(x-b)*(x-b)/(R*x*x*x)\n", - "##RESULTS\n", - "print'%s %.1f %s'% (' isotherm=',T,'K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " isotherm= 1.3 K\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg307" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate volumes of given temperatures\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "T= 400. ##C\n", - "T1= 500. ##C\n", - "M= 18.015 ##kg/k mol\n", - "p1= 30. ##Mpa\n", - "##CALCULATIONS\n", - "v1= R*(273.15+T)/(M*p1*10*10*10)\n", - "v2= R*(273.15+T1)/(M*p1*10*10*10)\n", - "##RESULTS\n", - "print'%s %.5f %s'% ('volume=',v1,'m^3/kg')\n", - "print'%s %.5f %s'% ('volume=',v2,'m^3/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume= 0.01036 m^3/kg\n", - "volume= 0.01189 m^3/kg\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg310" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate specific enthalpy at each and every point their differences\n", - "##initialisation of variables\n", - "h1= 3892.2 ##kJ/kg\n", - "h2= 4102.2 ##kJ/kg\n", - "dh= 1015.4 ##kJ/kg\n", - "dh1= 448. ##kJ/kg\n", - "h3= 2151.1 ##kJ/kg\n", - "h4= 3081.1 ##kJ/kg\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('Specific Enthalpy=',h1,'kJ/kg')\n", - "print'%s %.1f %s'% ('Specific Enthalpy=',h2,'kJ/kg')\n", - "print'%s %.1f %s'% ('Specific Enthalpy=',h3,'kJ/kg')\n", - "print'%s %.1f %s'% ('Specific Enthalpy=',h4,'kJ/kg')\n", - "print'%s %.f %s'% ('Enthalpy difference=',dh,'kJ/kg')\n", - "print'%s %.f %s'% ('Enthalpy difference=',dh1,'kJ/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Specific Enthalpy= 3892.2 kJ/kg\n", - "Specific Enthalpy= 4102.2 kJ/kg\n", - "Specific Enthalpy= 2151.1 kJ/kg\n", - "Specific Enthalpy= 3081.1 kJ/kg\n", - "Enthalpy difference= 1015 kJ/kg\n", - "Enthalpy difference= 448 kJ/kg\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg313" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate entropy at every point\n", - "##initialisation of variables\n", - "s2= 5.7905 ##kJ/kg K\n", - "s1= 4.4728 ##kJ/kg K\n", - "s3= 4.64437 ##kJ/kg K\n", - "s4= 5.7883 ##kJ/kg K\n", - "s5= 6.2036 ##kJ/kg K\n", - "s6= 5.9128 ##kJ/kg K\n", - "##CALCULATIONS\n", - "S1= s2-s1\n", - "S2= s4-s3\n", - "S3= s5-s6\n", - "##RESULTS\n", - "print'%s %.4f %s'% ('Entropy=',S1,'kJ/kg K')\n", - "print'%s %.4f %s'% ('Entropy=',S2,'kJ/kg K')\n", - "print'%s %.4f %s'% ('Entropy=',S3,'kJ/kg K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Entropy= 1.3177 kJ/kg K\n", - "Entropy= 1.1439 kJ/kg K\n", - "Entropy= 0.2908 kJ/kg K\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg315" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate entrance velocity and exit velocity heat and maximum power and irreversibility\n", - "##initialisation of variables\n", - "m= 100. ##kg/s\n", - "M= 58. ##kg/kmol\n", - "v1= 0.164 ##m^3/kmol\n", - "r= 0.1 ##m\n", - "v2= 2.675 ##m^3/kmol \n", - "T= 175. ##C\n", - "T1= 80. ##C\n", - "cp= 1.75 ##kJ/kg\n", - "R= 8.314 ##J/mol K\n", - "dh= 3.6 ##kJ/kg\n", - "dh1= 0.5 ##kJ/kg\n", - "T2= 425 ##K\n", - "p2= 0.9 ##Mpa\n", - "p1= 7.5 ##Mpa\n", - "ds= 2.7*R \n", - "ds1= 0.4*R\n", - "##CAULATIONS\n", - "A= math.pi*r*r\n", - "n= m/M\n", - "V1= v1*n/A\n", - "V2= v2*n/A\n", - "Cp= M*cp\n", - "H= -(Cp*(T1-T)+(dh-dh1)*R*T2)\n", - "Q= n*(H+((M/1000)*((V2*V2-V1*V1)/2)))\n", - "dS= Cp*math.log((273.51+T1)/(273.15+T))+R*(-math.log(p2/p1)+((ds/R)-(ds1/R)))\n", - "Wmax= (Q-12)-n*(273.15+27)*(-dS)\n", - "I= Wmax\n", - "##RESULTS\n", - "print'%s %.f %s'% ('entrance velocity=',V1,'m/s')\n", - "print'%s %.1f %s'% ('exit velocity=',V2,'m/s')\n", - "print'%s %.1f %s'% ('Heat=',Q-12,'kW')\n", - "print'%s %.1f %s'% ('maximum power=',Wmax-54,'kW')\n", - "print'%s %.1f %s'% ('irreversiblity=',I-54,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "entrance velocity= 9 m/s\n", - "exit velocity= 146.8 m/s\n", - "Heat= -1199.1 kW\n", - "maximum power= 5305.0 kW\n", - "irreversiblity= 5305.0 kW\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg319" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calcualate work of compession and work of reversible isthoremal process and work\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "T= 400. ##C\n", - "M= 18.015 ##kg/s\n", - "p2= 30. ##Mpa\n", - "p1= 5. ##Mpa\n", - "f2= 17.7\n", - "f1=4.85\n", - "s1= 6.6459 ##kJ/kg K\n", - "s2= 4.4728 ##kJ/kg K\n", - "h1= 3195.7 ##kJ/kg\n", - "h2= 2151.1 ##kJ/kg\n", - "##CALCULATIONS\n", - "W= -R*(273.15+T)*math.log(p2/p1)/M\n", - "W1= -R*(273.15+T)*math.log(f2/f1)/M\n", - "W2= h1-h2-(273.15+T)*(s1-s2)\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('Work of compression=',W,'kJ/kg')\n", - "print'%s %.1f %s'% ('Work of reversible isothermal process=',W1,'kJ/kg')\n", - "print'%s %.1f %s'% ('Work =',W2,'kJ/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Work of compression= -556.6 kJ/kg\n", - "Work of reversible isothermal process= -402.2 kJ/kg\n", - "Work = -418.2 kJ/kg\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter14_1.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter14_1.ipynb deleted file mode 100755 index 5bcffb75..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter14_1.ipynb +++ /dev/null @@ -1,313 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:dceed5d123e7adb1d73db762a18a52615a5b487342c94704535d968cf751d6c0" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "chapter14-equations of state and generlized charts" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "import numpy\n", - "#calcualte isotherm\n", - "##initialisation of variables\n", - "a=552.6 ##kPa m^6/kmol^2\n", - "b= 0.03402 ##m^3/kmol\n", - "p= 100. ##kPa\n", - "R= 8.314 ##J/mol K\n", - "##CALCULATIONS\n", - "vec=([p,-a,2*a*b])\n", - "vector= numpy.roots(vec)\n", - "x=vec[0]\n", - "T= 2*a*(x-b)*(x-b)/(R*x*x*x)\n", - "##RESULTS\n", - "print'%s %.1f %s'% (' isotherm=',T,'K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " isotherm= 1.3 K\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg307" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate volumes of given temperatures\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "T= 400. ##C\n", - "T1= 500. ##C\n", - "M= 18.015 ##kg/k mol\n", - "p1= 30. ##Mpa\n", - "##CALCULATIONS\n", - "v1= R*(273.15+T)/(M*p1*10*10*10)\n", - "v2= R*(273.15+T1)/(M*p1*10*10*10)\n", - "##RESULTS\n", - "print'%s %.5f %s'% ('volume=',v1,'m^3/kg')\n", - "print'%s %.5f %s'% ('volume=',v2,'m^3/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume= 0.01036 m^3/kg\n", - "volume= 0.01189 m^3/kg\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg310" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate specific enthalpy at each and every point their differences\n", - "##initialisation of variables\n", - "h1= 3892.2 ##kJ/kg\n", - "h2= 4102.2 ##kJ/kg\n", - "dh= 1015.4 ##kJ/kg\n", - "dh1= 448. ##kJ/kg\n", - "h3= 2151.1 ##kJ/kg\n", - "h4= 3081.1 ##kJ/kg\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('Specific Enthalpy=',h1,'kJ/kg')\n", - "print'%s %.1f %s'% ('Specific Enthalpy=',h2,'kJ/kg')\n", - "print'%s %.1f %s'% ('Specific Enthalpy=',h3,'kJ/kg')\n", - "print'%s %.1f %s'% ('Specific Enthalpy=',h4,'kJ/kg')\n", - "print'%s %.f %s'% ('Enthalpy difference=',dh,'kJ/kg')\n", - "print'%s %.f %s'% ('Enthalpy difference=',dh1,'kJ/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Specific Enthalpy= 3892.2 kJ/kg\n", - "Specific Enthalpy= 4102.2 kJ/kg\n", - "Specific Enthalpy= 2151.1 kJ/kg\n", - "Specific Enthalpy= 3081.1 kJ/kg\n", - "Enthalpy difference= 1015 kJ/kg\n", - "Enthalpy difference= 448 kJ/kg\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg313" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate entropy at every point\n", - "##initialisation of variables\n", - "s2= 5.7905 ##kJ/kg K\n", - "s1= 4.4728 ##kJ/kg K\n", - "s3= 4.64437 ##kJ/kg K\n", - "s4= 5.7883 ##kJ/kg K\n", - "s5= 6.2036 ##kJ/kg K\n", - "s6= 5.9128 ##kJ/kg K\n", - "##CALCULATIONS\n", - "S1= s2-s1\n", - "S2= s4-s3\n", - "S3= s5-s6\n", - "##RESULTS\n", - "print'%s %.4f %s'% ('Entropy=',S1,'kJ/kg K')\n", - "print'%s %.4f %s'% ('Entropy=',S2,'kJ/kg K')\n", - "print'%s %.4f %s'% ('Entropy=',S3,'kJ/kg K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Entropy= 1.3177 kJ/kg K\n", - "Entropy= 1.1439 kJ/kg K\n", - "Entropy= 0.2908 kJ/kg K\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg315" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate entrance velocity and exit velocity heat and maximum power and irreversibility\n", - "##initialisation of variables\n", - "m= 100. ##kg/s\n", - "M= 58. ##kg/kmol\n", - "v1= 0.164 ##m^3/kmol\n", - "r= 0.1 ##m\n", - "v2= 2.675 ##m^3/kmol \n", - "T= 175. ##C\n", - "T1= 80. ##C\n", - "cp= 1.75 ##kJ/kg\n", - "R= 8.314 ##J/mol K\n", - "dh= 3.6 ##kJ/kg\n", - "dh1= 0.5 ##kJ/kg\n", - "T2= 425 ##K\n", - "p2= 0.9 ##Mpa\n", - "p1= 7.5 ##Mpa\n", - "ds= 2.7*R \n", - "ds1= 0.4*R\n", - "##CAULATIONS\n", - "A= math.pi*r*r\n", - "n= m/M\n", - "V1= v1*n/A\n", - "V2= v2*n/A\n", - "Cp= M*cp\n", - "H= -(Cp*(T1-T)+(dh-dh1)*R*T2)\n", - "Q= n*(H+((M/1000)*((V2*V2-V1*V1)/2)))\n", - "dS= Cp*math.log((273.51+T1)/(273.15+T))+R*(-math.log(p2/p1)+((ds/R)-(ds1/R)))\n", - "Wmax= (Q-12)-n*(273.15+27)*(-dS)\n", - "I= Wmax\n", - "##RESULTS\n", - "print'%s %.f %s'% ('entrance velocity=',V1,'m/s')\n", - "print'%s %.1f %s'% ('exit velocity=',V2,'m/s')\n", - "print'%s %.1f %s'% ('Heat=',Q-12,'kW')\n", - "print'%s %.1f %s'% ('maximum power=',Wmax-54,'kW')\n", - "print'%s %.1f %s'% ('irreversiblity=',I-54,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "entrance velocity= 9 m/s\n", - "exit velocity= 146.8 m/s\n", - "Heat= -1199.1 kW\n", - "maximum power= 5305.0 kW\n", - "irreversiblity= 5305.0 kW\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg319" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calcualate work of compession and work of reversible isthoremal process and work\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "T= 400. ##C\n", - "M= 18.015 ##kg/s\n", - "p2= 30. ##Mpa\n", - "p1= 5. ##Mpa\n", - "f2= 17.7\n", - "f1=4.85\n", - "s1= 6.6459 ##kJ/kg K\n", - "s2= 4.4728 ##kJ/kg K\n", - "h1= 3195.7 ##kJ/kg\n", - "h2= 2151.1 ##kJ/kg\n", - "##CALCULATIONS\n", - "W= -R*(273.15+T)*math.log(p2/p1)/M\n", - "W1= -R*(273.15+T)*math.log(f2/f1)/M\n", - "W2= h1-h2-(273.15+T)*(s1-s2)\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('Work of compression=',W,'kJ/kg')\n", - "print'%s %.1f %s'% ('Work of reversible isothermal process=',W1,'kJ/kg')\n", - "print'%s %.1f %s'% ('Work =',W2,'kJ/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Work of compression= -556.6 kJ/kg\n", - "Work of reversible isothermal process= -402.2 kJ/kg\n", - "Work = -418.2 kJ/kg\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter14_2.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter14_2.ipynb deleted file mode 100755 index 5bcffb75..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter14_2.ipynb +++ /dev/null @@ -1,313 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:dceed5d123e7adb1d73db762a18a52615a5b487342c94704535d968cf751d6c0" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "chapter14-equations of state and generlized charts" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "import numpy\n", - "#calcualte isotherm\n", - "##initialisation of variables\n", - "a=552.6 ##kPa m^6/kmol^2\n", - "b= 0.03402 ##m^3/kmol\n", - "p= 100. ##kPa\n", - "R= 8.314 ##J/mol K\n", - "##CALCULATIONS\n", - "vec=([p,-a,2*a*b])\n", - "vector= numpy.roots(vec)\n", - "x=vec[0]\n", - "T= 2*a*(x-b)*(x-b)/(R*x*x*x)\n", - "##RESULTS\n", - "print'%s %.1f %s'% (' isotherm=',T,'K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " isotherm= 1.3 K\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg307" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate volumes of given temperatures\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "T= 400. ##C\n", - "T1= 500. ##C\n", - "M= 18.015 ##kg/k mol\n", - "p1= 30. ##Mpa\n", - "##CALCULATIONS\n", - "v1= R*(273.15+T)/(M*p1*10*10*10)\n", - "v2= R*(273.15+T1)/(M*p1*10*10*10)\n", - "##RESULTS\n", - "print'%s %.5f %s'% ('volume=',v1,'m^3/kg')\n", - "print'%s %.5f %s'% ('volume=',v2,'m^3/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume= 0.01036 m^3/kg\n", - "volume= 0.01189 m^3/kg\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg310" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate specific enthalpy at each and every point their differences\n", - "##initialisation of variables\n", - "h1= 3892.2 ##kJ/kg\n", - "h2= 4102.2 ##kJ/kg\n", - "dh= 1015.4 ##kJ/kg\n", - "dh1= 448. ##kJ/kg\n", - "h3= 2151.1 ##kJ/kg\n", - "h4= 3081.1 ##kJ/kg\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('Specific Enthalpy=',h1,'kJ/kg')\n", - "print'%s %.1f %s'% ('Specific Enthalpy=',h2,'kJ/kg')\n", - "print'%s %.1f %s'% ('Specific Enthalpy=',h3,'kJ/kg')\n", - "print'%s %.1f %s'% ('Specific Enthalpy=',h4,'kJ/kg')\n", - "print'%s %.f %s'% ('Enthalpy difference=',dh,'kJ/kg')\n", - "print'%s %.f %s'% ('Enthalpy difference=',dh1,'kJ/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Specific Enthalpy= 3892.2 kJ/kg\n", - "Specific Enthalpy= 4102.2 kJ/kg\n", - "Specific Enthalpy= 2151.1 kJ/kg\n", - "Specific Enthalpy= 3081.1 kJ/kg\n", - "Enthalpy difference= 1015 kJ/kg\n", - "Enthalpy difference= 448 kJ/kg\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg313" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate entropy at every point\n", - "##initialisation of variables\n", - "s2= 5.7905 ##kJ/kg K\n", - "s1= 4.4728 ##kJ/kg K\n", - "s3= 4.64437 ##kJ/kg K\n", - "s4= 5.7883 ##kJ/kg K\n", - "s5= 6.2036 ##kJ/kg K\n", - "s6= 5.9128 ##kJ/kg K\n", - "##CALCULATIONS\n", - "S1= s2-s1\n", - "S2= s4-s3\n", - "S3= s5-s6\n", - "##RESULTS\n", - "print'%s %.4f %s'% ('Entropy=',S1,'kJ/kg K')\n", - "print'%s %.4f %s'% ('Entropy=',S2,'kJ/kg K')\n", - "print'%s %.4f %s'% ('Entropy=',S3,'kJ/kg K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Entropy= 1.3177 kJ/kg K\n", - "Entropy= 1.1439 kJ/kg K\n", - "Entropy= 0.2908 kJ/kg K\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg315" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate entrance velocity and exit velocity heat and maximum power and irreversibility\n", - "##initialisation of variables\n", - "m= 100. ##kg/s\n", - "M= 58. ##kg/kmol\n", - "v1= 0.164 ##m^3/kmol\n", - "r= 0.1 ##m\n", - "v2= 2.675 ##m^3/kmol \n", - "T= 175. ##C\n", - "T1= 80. ##C\n", - "cp= 1.75 ##kJ/kg\n", - "R= 8.314 ##J/mol K\n", - "dh= 3.6 ##kJ/kg\n", - "dh1= 0.5 ##kJ/kg\n", - "T2= 425 ##K\n", - "p2= 0.9 ##Mpa\n", - "p1= 7.5 ##Mpa\n", - "ds= 2.7*R \n", - "ds1= 0.4*R\n", - "##CAULATIONS\n", - "A= math.pi*r*r\n", - "n= m/M\n", - "V1= v1*n/A\n", - "V2= v2*n/A\n", - "Cp= M*cp\n", - "H= -(Cp*(T1-T)+(dh-dh1)*R*T2)\n", - "Q= n*(H+((M/1000)*((V2*V2-V1*V1)/2)))\n", - "dS= Cp*math.log((273.51+T1)/(273.15+T))+R*(-math.log(p2/p1)+((ds/R)-(ds1/R)))\n", - "Wmax= (Q-12)-n*(273.15+27)*(-dS)\n", - "I= Wmax\n", - "##RESULTS\n", - "print'%s %.f %s'% ('entrance velocity=',V1,'m/s')\n", - "print'%s %.1f %s'% ('exit velocity=',V2,'m/s')\n", - "print'%s %.1f %s'% ('Heat=',Q-12,'kW')\n", - "print'%s %.1f %s'% ('maximum power=',Wmax-54,'kW')\n", - "print'%s %.1f %s'% ('irreversiblity=',I-54,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "entrance velocity= 9 m/s\n", - "exit velocity= 146.8 m/s\n", - "Heat= -1199.1 kW\n", - "maximum power= 5305.0 kW\n", - "irreversiblity= 5305.0 kW\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg319" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calcualate work of compession and work of reversible isthoremal process and work\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "T= 400. ##C\n", - "M= 18.015 ##kg/s\n", - "p2= 30. ##Mpa\n", - "p1= 5. ##Mpa\n", - "f2= 17.7\n", - "f1=4.85\n", - "s1= 6.6459 ##kJ/kg K\n", - "s2= 4.4728 ##kJ/kg K\n", - "h1= 3195.7 ##kJ/kg\n", - "h2= 2151.1 ##kJ/kg\n", - "##CALCULATIONS\n", - "W= -R*(273.15+T)*math.log(p2/p1)/M\n", - "W1= -R*(273.15+T)*math.log(f2/f1)/M\n", - "W2= h1-h2-(273.15+T)*(s1-s2)\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('Work of compression=',W,'kJ/kg')\n", - "print'%s %.1f %s'% ('Work of reversible isothermal process=',W1,'kJ/kg')\n", - "print'%s %.1f %s'% ('Work =',W2,'kJ/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Work of compression= -556.6 kJ/kg\n", - "Work of reversible isothermal process= -402.2 kJ/kg\n", - "Work = -418.2 kJ/kg\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter14_Equations_of_state_and_generlized_charts.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter14_Equations_of_state_and_generlized_charts.ipynb deleted file mode 100755 index 5bcffb75..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter14_Equations_of_state_and_generlized_charts.ipynb +++ /dev/null @@ -1,313 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:dceed5d123e7adb1d73db762a18a52615a5b487342c94704535d968cf751d6c0" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "chapter14-equations of state and generlized charts" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "import numpy\n", - "#calcualte isotherm\n", - "##initialisation of variables\n", - "a=552.6 ##kPa m^6/kmol^2\n", - "b= 0.03402 ##m^3/kmol\n", - "p= 100. ##kPa\n", - "R= 8.314 ##J/mol K\n", - "##CALCULATIONS\n", - "vec=([p,-a,2*a*b])\n", - "vector= numpy.roots(vec)\n", - "x=vec[0]\n", - "T= 2*a*(x-b)*(x-b)/(R*x*x*x)\n", - "##RESULTS\n", - "print'%s %.1f %s'% (' isotherm=',T,'K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " isotherm= 1.3 K\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg307" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate volumes of given temperatures\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "T= 400. ##C\n", - "T1= 500. ##C\n", - "M= 18.015 ##kg/k mol\n", - "p1= 30. ##Mpa\n", - "##CALCULATIONS\n", - "v1= R*(273.15+T)/(M*p1*10*10*10)\n", - "v2= R*(273.15+T1)/(M*p1*10*10*10)\n", - "##RESULTS\n", - "print'%s %.5f %s'% ('volume=',v1,'m^3/kg')\n", - "print'%s %.5f %s'% ('volume=',v2,'m^3/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume= 0.01036 m^3/kg\n", - "volume= 0.01189 m^3/kg\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg310" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate specific enthalpy at each and every point their differences\n", - "##initialisation of variables\n", - "h1= 3892.2 ##kJ/kg\n", - "h2= 4102.2 ##kJ/kg\n", - "dh= 1015.4 ##kJ/kg\n", - "dh1= 448. ##kJ/kg\n", - "h3= 2151.1 ##kJ/kg\n", - "h4= 3081.1 ##kJ/kg\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('Specific Enthalpy=',h1,'kJ/kg')\n", - "print'%s %.1f %s'% ('Specific Enthalpy=',h2,'kJ/kg')\n", - "print'%s %.1f %s'% ('Specific Enthalpy=',h3,'kJ/kg')\n", - "print'%s %.1f %s'% ('Specific Enthalpy=',h4,'kJ/kg')\n", - "print'%s %.f %s'% ('Enthalpy difference=',dh,'kJ/kg')\n", - "print'%s %.f %s'% ('Enthalpy difference=',dh1,'kJ/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Specific Enthalpy= 3892.2 kJ/kg\n", - "Specific Enthalpy= 4102.2 kJ/kg\n", - "Specific Enthalpy= 2151.1 kJ/kg\n", - "Specific Enthalpy= 3081.1 kJ/kg\n", - "Enthalpy difference= 1015 kJ/kg\n", - "Enthalpy difference= 448 kJ/kg\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg313" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate entropy at every point\n", - "##initialisation of variables\n", - "s2= 5.7905 ##kJ/kg K\n", - "s1= 4.4728 ##kJ/kg K\n", - "s3= 4.64437 ##kJ/kg K\n", - "s4= 5.7883 ##kJ/kg K\n", - "s5= 6.2036 ##kJ/kg K\n", - "s6= 5.9128 ##kJ/kg K\n", - "##CALCULATIONS\n", - "S1= s2-s1\n", - "S2= s4-s3\n", - "S3= s5-s6\n", - "##RESULTS\n", - "print'%s %.4f %s'% ('Entropy=',S1,'kJ/kg K')\n", - "print'%s %.4f %s'% ('Entropy=',S2,'kJ/kg K')\n", - "print'%s %.4f %s'% ('Entropy=',S3,'kJ/kg K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Entropy= 1.3177 kJ/kg K\n", - "Entropy= 1.1439 kJ/kg K\n", - "Entropy= 0.2908 kJ/kg K\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg315" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate entrance velocity and exit velocity heat and maximum power and irreversibility\n", - "##initialisation of variables\n", - "m= 100. ##kg/s\n", - "M= 58. ##kg/kmol\n", - "v1= 0.164 ##m^3/kmol\n", - "r= 0.1 ##m\n", - "v2= 2.675 ##m^3/kmol \n", - "T= 175. ##C\n", - "T1= 80. ##C\n", - "cp= 1.75 ##kJ/kg\n", - "R= 8.314 ##J/mol K\n", - "dh= 3.6 ##kJ/kg\n", - "dh1= 0.5 ##kJ/kg\n", - "T2= 425 ##K\n", - "p2= 0.9 ##Mpa\n", - "p1= 7.5 ##Mpa\n", - "ds= 2.7*R \n", - "ds1= 0.4*R\n", - "##CAULATIONS\n", - "A= math.pi*r*r\n", - "n= m/M\n", - "V1= v1*n/A\n", - "V2= v2*n/A\n", - "Cp= M*cp\n", - "H= -(Cp*(T1-T)+(dh-dh1)*R*T2)\n", - "Q= n*(H+((M/1000)*((V2*V2-V1*V1)/2)))\n", - "dS= Cp*math.log((273.51+T1)/(273.15+T))+R*(-math.log(p2/p1)+((ds/R)-(ds1/R)))\n", - "Wmax= (Q-12)-n*(273.15+27)*(-dS)\n", - "I= Wmax\n", - "##RESULTS\n", - "print'%s %.f %s'% ('entrance velocity=',V1,'m/s')\n", - "print'%s %.1f %s'% ('exit velocity=',V2,'m/s')\n", - "print'%s %.1f %s'% ('Heat=',Q-12,'kW')\n", - "print'%s %.1f %s'% ('maximum power=',Wmax-54,'kW')\n", - "print'%s %.1f %s'% ('irreversiblity=',I-54,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "entrance velocity= 9 m/s\n", - "exit velocity= 146.8 m/s\n", - "Heat= -1199.1 kW\n", - "maximum power= 5305.0 kW\n", - "irreversiblity= 5305.0 kW\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg319" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calcualate work of compession and work of reversible isthoremal process and work\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "T= 400. ##C\n", - "M= 18.015 ##kg/s\n", - "p2= 30. ##Mpa\n", - "p1= 5. ##Mpa\n", - "f2= 17.7\n", - "f1=4.85\n", - "s1= 6.6459 ##kJ/kg K\n", - "s2= 4.4728 ##kJ/kg K\n", - "h1= 3195.7 ##kJ/kg\n", - "h2= 2151.1 ##kJ/kg\n", - "##CALCULATIONS\n", - "W= -R*(273.15+T)*math.log(p2/p1)/M\n", - "W1= -R*(273.15+T)*math.log(f2/f1)/M\n", - "W2= h1-h2-(273.15+T)*(s1-s2)\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('Work of compression=',W,'kJ/kg')\n", - "print'%s %.1f %s'% ('Work of reversible isothermal process=',W1,'kJ/kg')\n", - "print'%s %.1f %s'% ('Work =',W2,'kJ/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Work of compression= -556.6 kJ/kg\n", - "Work of reversible isothermal process= -402.2 kJ/kg\n", - "Work = -418.2 kJ/kg\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter15-.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter15-.ipynb deleted file mode 100755 index 7474279a..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter15-.ipynb +++ /dev/null @@ -1,101 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:80d64855fab39260827744b179bb4ae70aaba7b386517244e3cbca404875a81d" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter15-multicomponet systems" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg332" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate volume of the phase\n", - "##initialisation of variables\n", - "m2= 50. ##gms\n", - "M= 46. ##gms\n", - "m1= 50. ##gms\n", - "M1= 18. ##gms\n", - "v1= 17402. ##cm^3/kmol\n", - "v2= 56090. ##cm^3/kmol\n", - "##CALCULATIONS\n", - "x2= (m2/M)/((m2/M)+(m1/M1))\n", - "V= (v1*(m1/M1)+v2*(m2/M))*math.pow(10,-3)\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('volume of the phase=',V,'cm^3')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume of the phase= 109.3 cm^3\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-337" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calcualte difference in enthalpy and amount of heat removed\n", - "##initialisation of variables\n", - "nw= 9 ##kmol\n", - "na= 1 ##kmol\n", - "##CALCULATIONS\n", - "dh= 75*nw*nw/math.pow(na+1.8*nw,2)\n", - "Q= -75*na*nw/(nw+1.8*na)\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('difference in enthalpy=',dh,'kJ/kg')\n", - "print'%s %.1f %s'% ('amount of heat removed=',Q,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "difference in enthalpy= 20.53 kJ/kg\n", - "amount of heat removed= -62.5 kJ\n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter15-multicomponet_systems.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter15-multicomponet_systems.ipynb deleted file mode 100755 index 7474279a..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter15-multicomponet_systems.ipynb +++ /dev/null @@ -1,101 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:80d64855fab39260827744b179bb4ae70aaba7b386517244e3cbca404875a81d" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter15-multicomponet systems" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg332" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate volume of the phase\n", - "##initialisation of variables\n", - "m2= 50. ##gms\n", - "M= 46. ##gms\n", - "m1= 50. ##gms\n", - "M1= 18. ##gms\n", - "v1= 17402. ##cm^3/kmol\n", - "v2= 56090. ##cm^3/kmol\n", - "##CALCULATIONS\n", - "x2= (m2/M)/((m2/M)+(m1/M1))\n", - "V= (v1*(m1/M1)+v2*(m2/M))*math.pow(10,-3)\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('volume of the phase=',V,'cm^3')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume of the phase= 109.3 cm^3\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-337" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calcualte difference in enthalpy and amount of heat removed\n", - "##initialisation of variables\n", - "nw= 9 ##kmol\n", - "na= 1 ##kmol\n", - "##CALCULATIONS\n", - "dh= 75*nw*nw/math.pow(na+1.8*nw,2)\n", - "Q= -75*na*nw/(nw+1.8*na)\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('difference in enthalpy=',dh,'kJ/kg')\n", - "print'%s %.1f %s'% ('amount of heat removed=',Q,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "difference in enthalpy= 20.53 kJ/kg\n", - "amount of heat removed= -62.5 kJ\n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter15.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter15.ipynb deleted file mode 100755 index 7474279a..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter15.ipynb +++ /dev/null @@ -1,101 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:80d64855fab39260827744b179bb4ae70aaba7b386517244e3cbca404875a81d" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter15-multicomponet systems" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg332" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate volume of the phase\n", - "##initialisation of variables\n", - "m2= 50. ##gms\n", - "M= 46. ##gms\n", - "m1= 50. ##gms\n", - "M1= 18. ##gms\n", - "v1= 17402. ##cm^3/kmol\n", - "v2= 56090. ##cm^3/kmol\n", - "##CALCULATIONS\n", - "x2= (m2/M)/((m2/M)+(m1/M1))\n", - "V= (v1*(m1/M1)+v2*(m2/M))*math.pow(10,-3)\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('volume of the phase=',V,'cm^3')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume of the phase= 109.3 cm^3\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-337" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calcualte difference in enthalpy and amount of heat removed\n", - "##initialisation of variables\n", - "nw= 9 ##kmol\n", - "na= 1 ##kmol\n", - "##CALCULATIONS\n", - "dh= 75*nw*nw/math.pow(na+1.8*nw,2)\n", - "Q= -75*na*nw/(nw+1.8*na)\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('difference in enthalpy=',dh,'kJ/kg')\n", - "print'%s %.1f %s'% ('amount of heat removed=',Q,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "difference in enthalpy= 20.53 kJ/kg\n", - "amount of heat removed= -62.5 kJ\n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter15_1.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter15_1.ipynb deleted file mode 100755 index 7474279a..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter15_1.ipynb +++ /dev/null @@ -1,101 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:80d64855fab39260827744b179bb4ae70aaba7b386517244e3cbca404875a81d" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter15-multicomponet systems" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg332" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate volume of the phase\n", - "##initialisation of variables\n", - "m2= 50. ##gms\n", - "M= 46. ##gms\n", - "m1= 50. ##gms\n", - "M1= 18. ##gms\n", - "v1= 17402. ##cm^3/kmol\n", - "v2= 56090. ##cm^3/kmol\n", - "##CALCULATIONS\n", - "x2= (m2/M)/((m2/M)+(m1/M1))\n", - "V= (v1*(m1/M1)+v2*(m2/M))*math.pow(10,-3)\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('volume of the phase=',V,'cm^3')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume of the phase= 109.3 cm^3\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-337" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calcualte difference in enthalpy and amount of heat removed\n", - "##initialisation of variables\n", - "nw= 9 ##kmol\n", - "na= 1 ##kmol\n", - "##CALCULATIONS\n", - "dh= 75*nw*nw/math.pow(na+1.8*nw,2)\n", - "Q= -75*na*nw/(nw+1.8*na)\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('difference in enthalpy=',dh,'kJ/kg')\n", - "print'%s %.1f %s'% ('amount of heat removed=',Q,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "difference in enthalpy= 20.53 kJ/kg\n", - "amount of heat removed= -62.5 kJ\n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter16-.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter16-.ipynb deleted file mode 100755 index b1fb1e8a..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter16-.ipynb +++ /dev/null @@ -1,109 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:e59b2fd71b4552cea44cac8d6a7db5757cb1bae32cfc202beb06aefa6735b63c" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter16-equlibrium" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg349" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate entropy at the equllibrium state\n", - "##initialisation of variables\n", - "m= 10. ##kg\n", - "R= 8.314 ##J/mol K\n", - "k= 1.4\n", - "M= 29. ##kg\n", - "TA= 20. ##C\n", - "TB= 200. ##C\n", - "##CALCULATIONS\n", - "T= (TA+TB)/2\n", - "dS= 0.5*m*R*(math.log(273.15+T)*math.log(273.15+T))/((273.15+TA)*(273.15+TB))/((k-1)*M)\n", - "##RESULTS\n", - "print'%s %.4f %s'% ('entropy at the equillibrium state=',dS,'kJ/K')\n", - "\n", - "\n", - "##answer GIVEN IN THE TEXTBOOK IS WRONG\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "entropy at the equillibrium state= 0.0009 kJ/K\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg357" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calcualte equlibrium pressure and diameter of droplet\n", - "##initialisation of variables\n", - "psat= 143.3 ##kPa\n", - "R= 8.314 ##J/mol K\n", - "T= 110. ##C\n", - "m= 18.02 ##gms\n", - "pv= 150. ##kPa\n", - "v= 0.001052 ##m^3/kg\n", - "s= math.pow(10,-3)\n", - "##CALCULATIONS\n", - "PL= psat+((R*(273.15+T)/(m*0.0010502))*math.log(pv/psat))\n", - "D= (4*s/(PL-pv))*(75.64-13.91*(T/100)-3*(T/100)*(T/100))*10*10*10\n", - "##RESULTS\n", - "print'%s %.f %s'% ('equilibrium pressure=',PL-13,'kPa')\n", - "print'%s %.4f %s'% ('diameter of droplet=',D,'mm')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "equilibrium pressure= 7822 kPa\n", - "diameter of droplet= 0.0295 mm\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter16-Equlibrium.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter16-Equlibrium.ipynb deleted file mode 100755 index b1fb1e8a..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter16-Equlibrium.ipynb +++ /dev/null @@ -1,109 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:e59b2fd71b4552cea44cac8d6a7db5757cb1bae32cfc202beb06aefa6735b63c" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter16-equlibrium" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg349" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate entropy at the equllibrium state\n", - "##initialisation of variables\n", - "m= 10. ##kg\n", - "R= 8.314 ##J/mol K\n", - "k= 1.4\n", - "M= 29. ##kg\n", - "TA= 20. ##C\n", - "TB= 200. ##C\n", - "##CALCULATIONS\n", - "T= (TA+TB)/2\n", - "dS= 0.5*m*R*(math.log(273.15+T)*math.log(273.15+T))/((273.15+TA)*(273.15+TB))/((k-1)*M)\n", - "##RESULTS\n", - "print'%s %.4f %s'% ('entropy at the equillibrium state=',dS,'kJ/K')\n", - "\n", - "\n", - "##answer GIVEN IN THE TEXTBOOK IS WRONG\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "entropy at the equillibrium state= 0.0009 kJ/K\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg357" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calcualte equlibrium pressure and diameter of droplet\n", - "##initialisation of variables\n", - "psat= 143.3 ##kPa\n", - "R= 8.314 ##J/mol K\n", - "T= 110. ##C\n", - "m= 18.02 ##gms\n", - "pv= 150. ##kPa\n", - "v= 0.001052 ##m^3/kg\n", - "s= math.pow(10,-3)\n", - "##CALCULATIONS\n", - "PL= psat+((R*(273.15+T)/(m*0.0010502))*math.log(pv/psat))\n", - "D= (4*s/(PL-pv))*(75.64-13.91*(T/100)-3*(T/100)*(T/100))*10*10*10\n", - "##RESULTS\n", - "print'%s %.f %s'% ('equilibrium pressure=',PL-13,'kPa')\n", - "print'%s %.4f %s'% ('diameter of droplet=',D,'mm')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "equilibrium pressure= 7822 kPa\n", - "diameter of droplet= 0.0295 mm\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter16.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter16.ipynb deleted file mode 100755 index b1fb1e8a..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter16.ipynb +++ /dev/null @@ -1,109 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:e59b2fd71b4552cea44cac8d6a7db5757cb1bae32cfc202beb06aefa6735b63c" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter16-equlibrium" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg349" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate entropy at the equllibrium state\n", - "##initialisation of variables\n", - "m= 10. ##kg\n", - "R= 8.314 ##J/mol K\n", - "k= 1.4\n", - "M= 29. ##kg\n", - "TA= 20. ##C\n", - "TB= 200. ##C\n", - "##CALCULATIONS\n", - "T= (TA+TB)/2\n", - "dS= 0.5*m*R*(math.log(273.15+T)*math.log(273.15+T))/((273.15+TA)*(273.15+TB))/((k-1)*M)\n", - "##RESULTS\n", - "print'%s %.4f %s'% ('entropy at the equillibrium state=',dS,'kJ/K')\n", - "\n", - "\n", - "##answer GIVEN IN THE TEXTBOOK IS WRONG\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "entropy at the equillibrium state= 0.0009 kJ/K\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg357" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calcualte equlibrium pressure and diameter of droplet\n", - "##initialisation of variables\n", - "psat= 143.3 ##kPa\n", - "R= 8.314 ##J/mol K\n", - "T= 110. ##C\n", - "m= 18.02 ##gms\n", - "pv= 150. ##kPa\n", - "v= 0.001052 ##m^3/kg\n", - "s= math.pow(10,-3)\n", - "##CALCULATIONS\n", - "PL= psat+((R*(273.15+T)/(m*0.0010502))*math.log(pv/psat))\n", - "D= (4*s/(PL-pv))*(75.64-13.91*(T/100)-3*(T/100)*(T/100))*10*10*10\n", - "##RESULTS\n", - "print'%s %.f %s'% ('equilibrium pressure=',PL-13,'kPa')\n", - "print'%s %.4f %s'% ('diameter of droplet=',D,'mm')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "equilibrium pressure= 7822 kPa\n", - "diameter of droplet= 0.0295 mm\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter16_1.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter16_1.ipynb deleted file mode 100755 index b1fb1e8a..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter16_1.ipynb +++ /dev/null @@ -1,109 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:e59b2fd71b4552cea44cac8d6a7db5757cb1bae32cfc202beb06aefa6735b63c" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter16-equlibrium" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg349" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate entropy at the equllibrium state\n", - "##initialisation of variables\n", - "m= 10. ##kg\n", - "R= 8.314 ##J/mol K\n", - "k= 1.4\n", - "M= 29. ##kg\n", - "TA= 20. ##C\n", - "TB= 200. ##C\n", - "##CALCULATIONS\n", - "T= (TA+TB)/2\n", - "dS= 0.5*m*R*(math.log(273.15+T)*math.log(273.15+T))/((273.15+TA)*(273.15+TB))/((k-1)*M)\n", - "##RESULTS\n", - "print'%s %.4f %s'% ('entropy at the equillibrium state=',dS,'kJ/K')\n", - "\n", - "\n", - "##answer GIVEN IN THE TEXTBOOK IS WRONG\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "entropy at the equillibrium state= 0.0009 kJ/K\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg357" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calcualte equlibrium pressure and diameter of droplet\n", - "##initialisation of variables\n", - "psat= 143.3 ##kPa\n", - "R= 8.314 ##J/mol K\n", - "T= 110. ##C\n", - "m= 18.02 ##gms\n", - "pv= 150. ##kPa\n", - "v= 0.001052 ##m^3/kg\n", - "s= math.pow(10,-3)\n", - "##CALCULATIONS\n", - "PL= psat+((R*(273.15+T)/(m*0.0010502))*math.log(pv/psat))\n", - "D= (4*s/(PL-pv))*(75.64-13.91*(T/100)-3*(T/100)*(T/100))*10*10*10\n", - "##RESULTS\n", - "print'%s %.f %s'% ('equilibrium pressure=',PL-13,'kPa')\n", - "print'%s %.4f %s'% ('diameter of droplet=',D,'mm')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "equilibrium pressure= 7822 kPa\n", - "diameter of droplet= 0.0295 mm\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter17-.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter17-.ipynb deleted file mode 100755 index 2d6dc101..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter17-.ipynb +++ /dev/null @@ -1,250 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:0bd1584504a5182c99f46d576a77cfaa07f83a047faf3b55eaafd0cea74518f2" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter17-Ideal solutions" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg367" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate Total pressure and composition of vapour phases and composition of last drop liquids\n", - "##initialisation of variables\n", - "Pa= 40. ##kPa\n", - "Pb= 50. ##kPa\n", - "na= 2. ##moles\n", - "nb= 6. ##moles\n", - "##CALCULATIONS\n", - "a= Pb/Pa\n", - "xa= na/(na+nb)\n", - "xb= 1.-xa\n", - "p= xa*Pa+xb*Pb\n", - "y= (xa*Pa)/p\n", - "ya= 1.-y\n", - "Xa= a*xa/(1+(a-1)*xa)\n", - "Xb= 1.-Xa\n", - "##RESULTS\n", - "print'%s %.1f %s'%('Total pressure=',p,'kPa')\n", - "print'%s %.4f %s'%('composition of vapour phase=',y,'')\n", - "print'%s %.4f %s'%('composition of vapour phase=',ya,'')\n", - "print'%s %.4f %s'%('composition of last drop of liquid=',Xa,'')\n", - "print'%s %.4f %s'%('composition of last drop of liquid=',Xb,'')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total pressure= 47.5 kPa\n", - "composition of vapour phase= 0.2105 \n", - "composition of vapour phase= 0.7895 \n", - "composition of last drop of liquid= 0.2941 \n", - "composition of last drop of liquid= 0.7059 \n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg371" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\t\n", - "#calculate pressure of the phase of pure A\n", - "##initialisation of variables\n", - "p0= 10. ##Mpa\n", - "R= 8.314 ##J/mol K\n", - "T= 30. ##C\n", - "va= 0.02 ##m^3/kmol\n", - "xa= 0.98\n", - "##CALCULATIONS\n", - "p= p0+(R*(273.15+T)*math.log(xa)/(va*1000.))\n", - "##RESULTS\n", - "print'%s %.2f %s'%('Pressure of the phase of pure A=',p,'Mpa')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pressure of the phase of pure A= 7.45 Mpa\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg373" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate the boiling point elevation\n", - "##initialisation of variables\n", - "hfg= 2257.0 ##kJ/kg\n", - "Tb= 100 ##C\n", - "R= 8.314 ##J/mol K\n", - "m2= 10 ##gms\n", - "M2= 58.5 ##gms\n", - "m1= 90. ##gms\n", - "M1= 18. ##gms\n", - "##CALCULATIONS\n", - "x2= (m2/M2)/((m2/M2)+(m1/M1))\n", - "dT= R*math.pow(273.15+Tb,2)*x2/(M1*hfg)\n", - "##RESULTS\n", - "print'%s %.3f %s'%(' Boiling point elevation=',dT,'C')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Boiling point elevation= 0.942 C\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg376" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate Osomatic pressures\n", - "##initialisation of variables\n", - "M1= 18.02 ##gms\n", - "m1= 0.965 ##gms\n", - "m2= 0.035 ##gms\n", - "M2= 58.5 ##gms\n", - "R= 8.314 ##J/mol K\n", - "M= 18.02 ##kg\n", - "T= 20. ##C\n", - "vf= 0.001002 ##m^3\n", - "x21= 0.021856 ##m^3\n", - "##CALCULATIONS\n", - "n1= m1/M1\n", - "n2= m2/M2\n", - "x1= n1/(n1+n2)\n", - "x2= n2/(n2+n1)\n", - "P= R*(273.15+T)*x2/(M*vf)\n", - "P1= R*(273.15+T)*x21/(M*vf)\n", - "##RESULTS\n", - "print'%s %.1f %s'%('Osmotic pressure=',P,'kpa')\n", - "print'%s %.1f %s'%('Osmotic pressure=',P1,'kpa')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Osmotic pressure= 1491.4 kpa\n", - "Osmotic pressure= 2950.2 kpa\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg377" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#what is useful work in the process and heat interaction and maximum work and irreversibility\n", - "##initialisation of variables\n", - "W= 0.\n", - "Q= 0.\n", - "R= 8.314 ##J/mol K\n", - "T0= 300. ##K\n", - "x= 5./13.\n", - "n1= 0.5 ##kmol/s\n", - "n2= 0.8 ##kmol/s\n", - "##CALCULATIONS\n", - "W1= (n1+n2)*R*T0*(x*math.log(1/x)+(1-x)*math.log(1/(1-x)))\n", - "I= W1\n", - "##RESULTS\n", - "print'%s %.f %s'%('useful work of the process=',W,'kW') \n", - "print'%s %.f %s'%('heat interaction=',Q,'kW') \n", - "print'%s %.1f %s'%('maximum work=',W1,'kW') \n", - "print'%s %.1f %s'%('irreversibility=',I,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "useful work of the process= 0 kW\n", - "heat interaction= 0 kW\n", - "maximum work= 2160.4 kW\n", - "irreversibility= 2160.4 kW\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter17-Ideal_solutions.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter17-Ideal_solutions.ipynb deleted file mode 100755 index 2d6dc101..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter17-Ideal_solutions.ipynb +++ /dev/null @@ -1,250 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:0bd1584504a5182c99f46d576a77cfaa07f83a047faf3b55eaafd0cea74518f2" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter17-Ideal solutions" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg367" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate Total pressure and composition of vapour phases and composition of last drop liquids\n", - "##initialisation of variables\n", - "Pa= 40. ##kPa\n", - "Pb= 50. ##kPa\n", - "na= 2. ##moles\n", - "nb= 6. ##moles\n", - "##CALCULATIONS\n", - "a= Pb/Pa\n", - "xa= na/(na+nb)\n", - "xb= 1.-xa\n", - "p= xa*Pa+xb*Pb\n", - "y= (xa*Pa)/p\n", - "ya= 1.-y\n", - "Xa= a*xa/(1+(a-1)*xa)\n", - "Xb= 1.-Xa\n", - "##RESULTS\n", - "print'%s %.1f %s'%('Total pressure=',p,'kPa')\n", - "print'%s %.4f %s'%('composition of vapour phase=',y,'')\n", - "print'%s %.4f %s'%('composition of vapour phase=',ya,'')\n", - "print'%s %.4f %s'%('composition of last drop of liquid=',Xa,'')\n", - "print'%s %.4f %s'%('composition of last drop of liquid=',Xb,'')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total pressure= 47.5 kPa\n", - "composition of vapour phase= 0.2105 \n", - "composition of vapour phase= 0.7895 \n", - "composition of last drop of liquid= 0.2941 \n", - "composition of last drop of liquid= 0.7059 \n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg371" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\t\n", - "#calculate pressure of the phase of pure A\n", - "##initialisation of variables\n", - "p0= 10. ##Mpa\n", - "R= 8.314 ##J/mol K\n", - "T= 30. ##C\n", - "va= 0.02 ##m^3/kmol\n", - "xa= 0.98\n", - "##CALCULATIONS\n", - "p= p0+(R*(273.15+T)*math.log(xa)/(va*1000.))\n", - "##RESULTS\n", - "print'%s %.2f %s'%('Pressure of the phase of pure A=',p,'Mpa')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pressure of the phase of pure A= 7.45 Mpa\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg373" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate the boiling point elevation\n", - "##initialisation of variables\n", - "hfg= 2257.0 ##kJ/kg\n", - "Tb= 100 ##C\n", - "R= 8.314 ##J/mol K\n", - "m2= 10 ##gms\n", - "M2= 58.5 ##gms\n", - "m1= 90. ##gms\n", - "M1= 18. ##gms\n", - "##CALCULATIONS\n", - "x2= (m2/M2)/((m2/M2)+(m1/M1))\n", - "dT= R*math.pow(273.15+Tb,2)*x2/(M1*hfg)\n", - "##RESULTS\n", - "print'%s %.3f %s'%(' Boiling point elevation=',dT,'C')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Boiling point elevation= 0.942 C\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg376" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate Osomatic pressures\n", - "##initialisation of variables\n", - "M1= 18.02 ##gms\n", - "m1= 0.965 ##gms\n", - "m2= 0.035 ##gms\n", - "M2= 58.5 ##gms\n", - "R= 8.314 ##J/mol K\n", - "M= 18.02 ##kg\n", - "T= 20. ##C\n", - "vf= 0.001002 ##m^3\n", - "x21= 0.021856 ##m^3\n", - "##CALCULATIONS\n", - "n1= m1/M1\n", - "n2= m2/M2\n", - "x1= n1/(n1+n2)\n", - "x2= n2/(n2+n1)\n", - "P= R*(273.15+T)*x2/(M*vf)\n", - "P1= R*(273.15+T)*x21/(M*vf)\n", - "##RESULTS\n", - "print'%s %.1f %s'%('Osmotic pressure=',P,'kpa')\n", - "print'%s %.1f %s'%('Osmotic pressure=',P1,'kpa')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Osmotic pressure= 1491.4 kpa\n", - "Osmotic pressure= 2950.2 kpa\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg377" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#what is useful work in the process and heat interaction and maximum work and irreversibility\n", - "##initialisation of variables\n", - "W= 0.\n", - "Q= 0.\n", - "R= 8.314 ##J/mol K\n", - "T0= 300. ##K\n", - "x= 5./13.\n", - "n1= 0.5 ##kmol/s\n", - "n2= 0.8 ##kmol/s\n", - "##CALCULATIONS\n", - "W1= (n1+n2)*R*T0*(x*math.log(1/x)+(1-x)*math.log(1/(1-x)))\n", - "I= W1\n", - "##RESULTS\n", - "print'%s %.f %s'%('useful work of the process=',W,'kW') \n", - "print'%s %.f %s'%('heat interaction=',Q,'kW') \n", - "print'%s %.1f %s'%('maximum work=',W1,'kW') \n", - "print'%s %.1f %s'%('irreversibility=',I,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "useful work of the process= 0 kW\n", - "heat interaction= 0 kW\n", - "maximum work= 2160.4 kW\n", - "irreversibility= 2160.4 kW\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter17.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter17.ipynb deleted file mode 100755 index 2d6dc101..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter17.ipynb +++ /dev/null @@ -1,250 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:0bd1584504a5182c99f46d576a77cfaa07f83a047faf3b55eaafd0cea74518f2" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter17-Ideal solutions" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg367" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate Total pressure and composition of vapour phases and composition of last drop liquids\n", - "##initialisation of variables\n", - "Pa= 40. ##kPa\n", - "Pb= 50. ##kPa\n", - "na= 2. ##moles\n", - "nb= 6. ##moles\n", - "##CALCULATIONS\n", - "a= Pb/Pa\n", - "xa= na/(na+nb)\n", - "xb= 1.-xa\n", - "p= xa*Pa+xb*Pb\n", - "y= (xa*Pa)/p\n", - "ya= 1.-y\n", - "Xa= a*xa/(1+(a-1)*xa)\n", - "Xb= 1.-Xa\n", - "##RESULTS\n", - "print'%s %.1f %s'%('Total pressure=',p,'kPa')\n", - "print'%s %.4f %s'%('composition of vapour phase=',y,'')\n", - "print'%s %.4f %s'%('composition of vapour phase=',ya,'')\n", - "print'%s %.4f %s'%('composition of last drop of liquid=',Xa,'')\n", - "print'%s %.4f %s'%('composition of last drop of liquid=',Xb,'')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total pressure= 47.5 kPa\n", - "composition of vapour phase= 0.2105 \n", - "composition of vapour phase= 0.7895 \n", - "composition of last drop of liquid= 0.2941 \n", - "composition of last drop of liquid= 0.7059 \n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg371" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\t\n", - "#calculate pressure of the phase of pure A\n", - "##initialisation of variables\n", - "p0= 10. ##Mpa\n", - "R= 8.314 ##J/mol K\n", - "T= 30. ##C\n", - "va= 0.02 ##m^3/kmol\n", - "xa= 0.98\n", - "##CALCULATIONS\n", - "p= p0+(R*(273.15+T)*math.log(xa)/(va*1000.))\n", - "##RESULTS\n", - "print'%s %.2f %s'%('Pressure of the phase of pure A=',p,'Mpa')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pressure of the phase of pure A= 7.45 Mpa\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg373" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate the boiling point elevation\n", - "##initialisation of variables\n", - "hfg= 2257.0 ##kJ/kg\n", - "Tb= 100 ##C\n", - "R= 8.314 ##J/mol K\n", - "m2= 10 ##gms\n", - "M2= 58.5 ##gms\n", - "m1= 90. ##gms\n", - "M1= 18. ##gms\n", - "##CALCULATIONS\n", - "x2= (m2/M2)/((m2/M2)+(m1/M1))\n", - "dT= R*math.pow(273.15+Tb,2)*x2/(M1*hfg)\n", - "##RESULTS\n", - "print'%s %.3f %s'%(' Boiling point elevation=',dT,'C')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Boiling point elevation= 0.942 C\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg376" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate Osomatic pressures\n", - "##initialisation of variables\n", - "M1= 18.02 ##gms\n", - "m1= 0.965 ##gms\n", - "m2= 0.035 ##gms\n", - "M2= 58.5 ##gms\n", - "R= 8.314 ##J/mol K\n", - "M= 18.02 ##kg\n", - "T= 20. ##C\n", - "vf= 0.001002 ##m^3\n", - "x21= 0.021856 ##m^3\n", - "##CALCULATIONS\n", - "n1= m1/M1\n", - "n2= m2/M2\n", - "x1= n1/(n1+n2)\n", - "x2= n2/(n2+n1)\n", - "P= R*(273.15+T)*x2/(M*vf)\n", - "P1= R*(273.15+T)*x21/(M*vf)\n", - "##RESULTS\n", - "print'%s %.1f %s'%('Osmotic pressure=',P,'kpa')\n", - "print'%s %.1f %s'%('Osmotic pressure=',P1,'kpa')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Osmotic pressure= 1491.4 kpa\n", - "Osmotic pressure= 2950.2 kpa\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg377" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#what is useful work in the process and heat interaction and maximum work and irreversibility\n", - "##initialisation of variables\n", - "W= 0.\n", - "Q= 0.\n", - "R= 8.314 ##J/mol K\n", - "T0= 300. ##K\n", - "x= 5./13.\n", - "n1= 0.5 ##kmol/s\n", - "n2= 0.8 ##kmol/s\n", - "##CALCULATIONS\n", - "W1= (n1+n2)*R*T0*(x*math.log(1/x)+(1-x)*math.log(1/(1-x)))\n", - "I= W1\n", - "##RESULTS\n", - "print'%s %.f %s'%('useful work of the process=',W,'kW') \n", - "print'%s %.f %s'%('heat interaction=',Q,'kW') \n", - "print'%s %.1f %s'%('maximum work=',W1,'kW') \n", - "print'%s %.1f %s'%('irreversibility=',I,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "useful work of the process= 0 kW\n", - "heat interaction= 0 kW\n", - "maximum work= 2160.4 kW\n", - "irreversibility= 2160.4 kW\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter17_1.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter17_1.ipynb deleted file mode 100755 index 2d6dc101..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter17_1.ipynb +++ /dev/null @@ -1,250 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:0bd1584504a5182c99f46d576a77cfaa07f83a047faf3b55eaafd0cea74518f2" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter17-Ideal solutions" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg367" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate Total pressure and composition of vapour phases and composition of last drop liquids\n", - "##initialisation of variables\n", - "Pa= 40. ##kPa\n", - "Pb= 50. ##kPa\n", - "na= 2. ##moles\n", - "nb= 6. ##moles\n", - "##CALCULATIONS\n", - "a= Pb/Pa\n", - "xa= na/(na+nb)\n", - "xb= 1.-xa\n", - "p= xa*Pa+xb*Pb\n", - "y= (xa*Pa)/p\n", - "ya= 1.-y\n", - "Xa= a*xa/(1+(a-1)*xa)\n", - "Xb= 1.-Xa\n", - "##RESULTS\n", - "print'%s %.1f %s'%('Total pressure=',p,'kPa')\n", - "print'%s %.4f %s'%('composition of vapour phase=',y,'')\n", - "print'%s %.4f %s'%('composition of vapour phase=',ya,'')\n", - "print'%s %.4f %s'%('composition of last drop of liquid=',Xa,'')\n", - "print'%s %.4f %s'%('composition of last drop of liquid=',Xb,'')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Total pressure= 47.5 kPa\n", - "composition of vapour phase= 0.2105 \n", - "composition of vapour phase= 0.7895 \n", - "composition of last drop of liquid= 0.2941 \n", - "composition of last drop of liquid= 0.7059 \n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg371" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\t\n", - "#calculate pressure of the phase of pure A\n", - "##initialisation of variables\n", - "p0= 10. ##Mpa\n", - "R= 8.314 ##J/mol K\n", - "T= 30. ##C\n", - "va= 0.02 ##m^3/kmol\n", - "xa= 0.98\n", - "##CALCULATIONS\n", - "p= p0+(R*(273.15+T)*math.log(xa)/(va*1000.))\n", - "##RESULTS\n", - "print'%s %.2f %s'%('Pressure of the phase of pure A=',p,'Mpa')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pressure of the phase of pure A= 7.45 Mpa\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg373" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate the boiling point elevation\n", - "##initialisation of variables\n", - "hfg= 2257.0 ##kJ/kg\n", - "Tb= 100 ##C\n", - "R= 8.314 ##J/mol K\n", - "m2= 10 ##gms\n", - "M2= 58.5 ##gms\n", - "m1= 90. ##gms\n", - "M1= 18. ##gms\n", - "##CALCULATIONS\n", - "x2= (m2/M2)/((m2/M2)+(m1/M1))\n", - "dT= R*math.pow(273.15+Tb,2)*x2/(M1*hfg)\n", - "##RESULTS\n", - "print'%s %.3f %s'%(' Boiling point elevation=',dT,'C')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Boiling point elevation= 0.942 C\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg376" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate Osomatic pressures\n", - "##initialisation of variables\n", - "M1= 18.02 ##gms\n", - "m1= 0.965 ##gms\n", - "m2= 0.035 ##gms\n", - "M2= 58.5 ##gms\n", - "R= 8.314 ##J/mol K\n", - "M= 18.02 ##kg\n", - "T= 20. ##C\n", - "vf= 0.001002 ##m^3\n", - "x21= 0.021856 ##m^3\n", - "##CALCULATIONS\n", - "n1= m1/M1\n", - "n2= m2/M2\n", - "x1= n1/(n1+n2)\n", - "x2= n2/(n2+n1)\n", - "P= R*(273.15+T)*x2/(M*vf)\n", - "P1= R*(273.15+T)*x21/(M*vf)\n", - "##RESULTS\n", - "print'%s %.1f %s'%('Osmotic pressure=',P,'kpa')\n", - "print'%s %.1f %s'%('Osmotic pressure=',P1,'kpa')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Osmotic pressure= 1491.4 kpa\n", - "Osmotic pressure= 2950.2 kpa\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg377" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#what is useful work in the process and heat interaction and maximum work and irreversibility\n", - "##initialisation of variables\n", - "W= 0.\n", - "Q= 0.\n", - "R= 8.314 ##J/mol K\n", - "T0= 300. ##K\n", - "x= 5./13.\n", - "n1= 0.5 ##kmol/s\n", - "n2= 0.8 ##kmol/s\n", - "##CALCULATIONS\n", - "W1= (n1+n2)*R*T0*(x*math.log(1/x)+(1-x)*math.log(1/(1-x)))\n", - "I= W1\n", - "##RESULTS\n", - "print'%s %.f %s'%('useful work of the process=',W,'kW') \n", - "print'%s %.f %s'%('heat interaction=',Q,'kW') \n", - "print'%s %.1f %s'%('maximum work=',W1,'kW') \n", - "print'%s %.1f %s'%('irreversibility=',I,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "useful work of the process= 0 kW\n", - "heat interaction= 0 kW\n", - "maximum work= 2160.4 kW\n", - "irreversibility= 2160.4 kW\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter18-.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter18-.ipynb deleted file mode 100755 index 86e6ded4..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter18-.ipynb +++ /dev/null @@ -1,208 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:388411b55217b773ab745745bb0334d4f921763a66e2059d0e5fb20a6dddb702" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter18-Non-ideal solutions" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg 385" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#what is saturation pressure\n", - "##initialisation of variables\n", - "T= 80. ##C\n", - "p= 30. ##percent\n", - "pw= 47.39 ##kPa\n", - "psat= 36 ##kPa\n", - "##RESULTS\n", - "print'%s %.1f %s'%(' Saturation pressure=',psat,'kPa')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Saturation pressure= 36.0 kPa\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg 385" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#what is temperature of pure water and saturation pressure\n", - "##initialisation of variables\n", - "T= 120. ##C\n", - "p= 30. ##percent\n", - "T2= 80. ##C\n", - "psat= 36. ##kPa\n", - "Tw= 73. ##C\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('Temperature of pure water=',Tw,'C')\n", - "print'%s %.1f %s'% ('Saturation pressure=',psat,'kPa')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Temperature of pure water= 73.0 C\n", - "Saturation pressure= 36.0 kPa\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg 395" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpys at 4 point and maximum temperature and new enthalpy\n", - "##initialisation of variables\n", - "p= 10. ##bar\n", - "P= 40. ##percent\n", - "x= 0.4\n", - "H1= 16. ##kcal/kg\n", - "H2= 31. ##kcal/kg\n", - "H3= 64. ##kcal/kg\n", - "H4= 140. ##kcal/kg\n", - "T= 157. ##C\n", - "He= 580. ##kcal/kg\n", - "##RESULTS\n", - "print'%s %.f %s'% ('Enthalpy=',H1,'kcal/kg')\n", - "print'%s %.f %s'% ('Enthalpy=',H2,'kcal/kg')\n", - "print'%s %.f %s'% ('Enthalpy=',H3,'kcal/kg')\n", - "print'%s %.f %s'% ('Enthalpy=',H4,'kcal/kg')\n", - "print'%s %.f %s'% ('Maximum temperature=',T,'C')\n", - "print'%s %.f %s'% ('Enthalpy =',He,'kcal/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enthalpy= 16 kcal/kg\n", - "Enthalpy= 31 kcal/kg\n", - "Enthalpy= 64 kcal/kg\n", - "Enthalpy= 140 kcal/kg\n", - "Maximum temperature= 157 C\n", - "Enthalpy = 580 kcal/kg\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg 397" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#what is enthalpy and circulation ratio and COP and COPcarnot\n", - "##initialisation of variables\n", - "v= 0.0011 ##m^3\n", - "P1= 1200 ##Mpa\n", - "P2= 140 ##Mpa\n", - "h5= -103 ##kJ/kg\n", - "x4= 0.860\n", - "x7= 0.253\n", - "x5= 0.337\n", - "h1= 1658.1 ##kJ/kg\n", - "h7= 343.7 ##kJ/kg\n", - "h6= -1008 ##kJ/kg\n", - "h4= 639. ##kJ/kg\n", - "h3= 40. ##kJ/kg\n", - "Tc= -10. ##C\n", - "Th= 125. ##C\n", - "Ta= 25. ##C\n", - "m1= 1. ##kg/s\n", - "m7= 6.23 ##kg/s\n", - "m6= 7.23 ##kg/s\n", - "##CALCULATIONS\n", - "h6= h5+v*(P1-P2)\n", - "cr= (x4-x7)/(x5-x7)\n", - "Qhbym= h1+(m7/m1)*h7-(m6/m1)*h6\n", - "Qcbym= h4-h3\n", - "COP= Qcbym/Qhbym\n", - "COPcarnot= ((273.15+Tc)/(273.15+Th))*((Th-Ta)/(Ta-Tc))\n", - "##RESULTS\n", - "print'%s %.1f %s'% (' Enthalpy=',h6,'kJ/kg')\n", - "print'%s %.3f %s'% (' circulation ratio=',cr,'')\n", - "print'%s %.3f %s'% (' COP=',COP,'')\n", - "print'%s %.3f %s'% (' COP carnot=',COPcarnot,'')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Enthalpy= -101.8 kJ/kg\n", - " circulation ratio= 7.226 \n", - " COP= 0.132 \n", - " COP carnot= 1.888 \n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter18-Non-ideal_solutions.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter18-Non-ideal_solutions.ipynb deleted file mode 100755 index 86e6ded4..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter18-Non-ideal_solutions.ipynb +++ /dev/null @@ -1,208 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:388411b55217b773ab745745bb0334d4f921763a66e2059d0e5fb20a6dddb702" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter18-Non-ideal solutions" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg 385" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#what is saturation pressure\n", - "##initialisation of variables\n", - "T= 80. ##C\n", - "p= 30. ##percent\n", - "pw= 47.39 ##kPa\n", - "psat= 36 ##kPa\n", - "##RESULTS\n", - "print'%s %.1f %s'%(' Saturation pressure=',psat,'kPa')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Saturation pressure= 36.0 kPa\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg 385" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#what is temperature of pure water and saturation pressure\n", - "##initialisation of variables\n", - "T= 120. ##C\n", - "p= 30. ##percent\n", - "T2= 80. ##C\n", - "psat= 36. ##kPa\n", - "Tw= 73. ##C\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('Temperature of pure water=',Tw,'C')\n", - "print'%s %.1f %s'% ('Saturation pressure=',psat,'kPa')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Temperature of pure water= 73.0 C\n", - "Saturation pressure= 36.0 kPa\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg 395" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpys at 4 point and maximum temperature and new enthalpy\n", - "##initialisation of variables\n", - "p= 10. ##bar\n", - "P= 40. ##percent\n", - "x= 0.4\n", - "H1= 16. ##kcal/kg\n", - "H2= 31. ##kcal/kg\n", - "H3= 64. ##kcal/kg\n", - "H4= 140. ##kcal/kg\n", - "T= 157. ##C\n", - "He= 580. ##kcal/kg\n", - "##RESULTS\n", - "print'%s %.f %s'% ('Enthalpy=',H1,'kcal/kg')\n", - "print'%s %.f %s'% ('Enthalpy=',H2,'kcal/kg')\n", - "print'%s %.f %s'% ('Enthalpy=',H3,'kcal/kg')\n", - "print'%s %.f %s'% ('Enthalpy=',H4,'kcal/kg')\n", - "print'%s %.f %s'% ('Maximum temperature=',T,'C')\n", - "print'%s %.f %s'% ('Enthalpy =',He,'kcal/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enthalpy= 16 kcal/kg\n", - "Enthalpy= 31 kcal/kg\n", - "Enthalpy= 64 kcal/kg\n", - "Enthalpy= 140 kcal/kg\n", - "Maximum temperature= 157 C\n", - "Enthalpy = 580 kcal/kg\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg 397" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#what is enthalpy and circulation ratio and COP and COPcarnot\n", - "##initialisation of variables\n", - "v= 0.0011 ##m^3\n", - "P1= 1200 ##Mpa\n", - "P2= 140 ##Mpa\n", - "h5= -103 ##kJ/kg\n", - "x4= 0.860\n", - "x7= 0.253\n", - "x5= 0.337\n", - "h1= 1658.1 ##kJ/kg\n", - "h7= 343.7 ##kJ/kg\n", - "h6= -1008 ##kJ/kg\n", - "h4= 639. ##kJ/kg\n", - "h3= 40. ##kJ/kg\n", - "Tc= -10. ##C\n", - "Th= 125. ##C\n", - "Ta= 25. ##C\n", - "m1= 1. ##kg/s\n", - "m7= 6.23 ##kg/s\n", - "m6= 7.23 ##kg/s\n", - "##CALCULATIONS\n", - "h6= h5+v*(P1-P2)\n", - "cr= (x4-x7)/(x5-x7)\n", - "Qhbym= h1+(m7/m1)*h7-(m6/m1)*h6\n", - "Qcbym= h4-h3\n", - "COP= Qcbym/Qhbym\n", - "COPcarnot= ((273.15+Tc)/(273.15+Th))*((Th-Ta)/(Ta-Tc))\n", - "##RESULTS\n", - "print'%s %.1f %s'% (' Enthalpy=',h6,'kJ/kg')\n", - "print'%s %.3f %s'% (' circulation ratio=',cr,'')\n", - "print'%s %.3f %s'% (' COP=',COP,'')\n", - "print'%s %.3f %s'% (' COP carnot=',COPcarnot,'')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Enthalpy= -101.8 kJ/kg\n", - " circulation ratio= 7.226 \n", - " COP= 0.132 \n", - " COP carnot= 1.888 \n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter18.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter18.ipynb deleted file mode 100755 index 86e6ded4..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter18.ipynb +++ /dev/null @@ -1,208 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:388411b55217b773ab745745bb0334d4f921763a66e2059d0e5fb20a6dddb702" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter18-Non-ideal solutions" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg 385" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#what is saturation pressure\n", - "##initialisation of variables\n", - "T= 80. ##C\n", - "p= 30. ##percent\n", - "pw= 47.39 ##kPa\n", - "psat= 36 ##kPa\n", - "##RESULTS\n", - "print'%s %.1f %s'%(' Saturation pressure=',psat,'kPa')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Saturation pressure= 36.0 kPa\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg 385" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#what is temperature of pure water and saturation pressure\n", - "##initialisation of variables\n", - "T= 120. ##C\n", - "p= 30. ##percent\n", - "T2= 80. ##C\n", - "psat= 36. ##kPa\n", - "Tw= 73. ##C\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('Temperature of pure water=',Tw,'C')\n", - "print'%s %.1f %s'% ('Saturation pressure=',psat,'kPa')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Temperature of pure water= 73.0 C\n", - "Saturation pressure= 36.0 kPa\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg 395" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpys at 4 point and maximum temperature and new enthalpy\n", - "##initialisation of variables\n", - "p= 10. ##bar\n", - "P= 40. ##percent\n", - "x= 0.4\n", - "H1= 16. ##kcal/kg\n", - "H2= 31. ##kcal/kg\n", - "H3= 64. ##kcal/kg\n", - "H4= 140. ##kcal/kg\n", - "T= 157. ##C\n", - "He= 580. ##kcal/kg\n", - "##RESULTS\n", - "print'%s %.f %s'% ('Enthalpy=',H1,'kcal/kg')\n", - "print'%s %.f %s'% ('Enthalpy=',H2,'kcal/kg')\n", - "print'%s %.f %s'% ('Enthalpy=',H3,'kcal/kg')\n", - "print'%s %.f %s'% ('Enthalpy=',H4,'kcal/kg')\n", - "print'%s %.f %s'% ('Maximum temperature=',T,'C')\n", - "print'%s %.f %s'% ('Enthalpy =',He,'kcal/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enthalpy= 16 kcal/kg\n", - "Enthalpy= 31 kcal/kg\n", - "Enthalpy= 64 kcal/kg\n", - "Enthalpy= 140 kcal/kg\n", - "Maximum temperature= 157 C\n", - "Enthalpy = 580 kcal/kg\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg 397" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#what is enthalpy and circulation ratio and COP and COPcarnot\n", - "##initialisation of variables\n", - "v= 0.0011 ##m^3\n", - "P1= 1200 ##Mpa\n", - "P2= 140 ##Mpa\n", - "h5= -103 ##kJ/kg\n", - "x4= 0.860\n", - "x7= 0.253\n", - "x5= 0.337\n", - "h1= 1658.1 ##kJ/kg\n", - "h7= 343.7 ##kJ/kg\n", - "h6= -1008 ##kJ/kg\n", - "h4= 639. ##kJ/kg\n", - "h3= 40. ##kJ/kg\n", - "Tc= -10. ##C\n", - "Th= 125. ##C\n", - "Ta= 25. ##C\n", - "m1= 1. ##kg/s\n", - "m7= 6.23 ##kg/s\n", - "m6= 7.23 ##kg/s\n", - "##CALCULATIONS\n", - "h6= h5+v*(P1-P2)\n", - "cr= (x4-x7)/(x5-x7)\n", - "Qhbym= h1+(m7/m1)*h7-(m6/m1)*h6\n", - "Qcbym= h4-h3\n", - "COP= Qcbym/Qhbym\n", - "COPcarnot= ((273.15+Tc)/(273.15+Th))*((Th-Ta)/(Ta-Tc))\n", - "##RESULTS\n", - "print'%s %.1f %s'% (' Enthalpy=',h6,'kJ/kg')\n", - "print'%s %.3f %s'% (' circulation ratio=',cr,'')\n", - "print'%s %.3f %s'% (' COP=',COP,'')\n", - "print'%s %.3f %s'% (' COP carnot=',COPcarnot,'')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Enthalpy= -101.8 kJ/kg\n", - " circulation ratio= 7.226 \n", - " COP= 0.132 \n", - " COP carnot= 1.888 \n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter18_1.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter18_1.ipynb deleted file mode 100755 index 86e6ded4..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter18_1.ipynb +++ /dev/null @@ -1,208 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:388411b55217b773ab745745bb0334d4f921763a66e2059d0e5fb20a6dddb702" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter18-Non-ideal solutions" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg 385" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#what is saturation pressure\n", - "##initialisation of variables\n", - "T= 80. ##C\n", - "p= 30. ##percent\n", - "pw= 47.39 ##kPa\n", - "psat= 36 ##kPa\n", - "##RESULTS\n", - "print'%s %.1f %s'%(' Saturation pressure=',psat,'kPa')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Saturation pressure= 36.0 kPa\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg 385" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#what is temperature of pure water and saturation pressure\n", - "##initialisation of variables\n", - "T= 120. ##C\n", - "p= 30. ##percent\n", - "T2= 80. ##C\n", - "psat= 36. ##kPa\n", - "Tw= 73. ##C\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('Temperature of pure water=',Tw,'C')\n", - "print'%s %.1f %s'% ('Saturation pressure=',psat,'kPa')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Temperature of pure water= 73.0 C\n", - "Saturation pressure= 36.0 kPa\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg 395" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpys at 4 point and maximum temperature and new enthalpy\n", - "##initialisation of variables\n", - "p= 10. ##bar\n", - "P= 40. ##percent\n", - "x= 0.4\n", - "H1= 16. ##kcal/kg\n", - "H2= 31. ##kcal/kg\n", - "H3= 64. ##kcal/kg\n", - "H4= 140. ##kcal/kg\n", - "T= 157. ##C\n", - "He= 580. ##kcal/kg\n", - "##RESULTS\n", - "print'%s %.f %s'% ('Enthalpy=',H1,'kcal/kg')\n", - "print'%s %.f %s'% ('Enthalpy=',H2,'kcal/kg')\n", - "print'%s %.f %s'% ('Enthalpy=',H3,'kcal/kg')\n", - "print'%s %.f %s'% ('Enthalpy=',H4,'kcal/kg')\n", - "print'%s %.f %s'% ('Maximum temperature=',T,'C')\n", - "print'%s %.f %s'% ('Enthalpy =',He,'kcal/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enthalpy= 16 kcal/kg\n", - "Enthalpy= 31 kcal/kg\n", - "Enthalpy= 64 kcal/kg\n", - "Enthalpy= 140 kcal/kg\n", - "Maximum temperature= 157 C\n", - "Enthalpy = 580 kcal/kg\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg 397" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#what is enthalpy and circulation ratio and COP and COPcarnot\n", - "##initialisation of variables\n", - "v= 0.0011 ##m^3\n", - "P1= 1200 ##Mpa\n", - "P2= 140 ##Mpa\n", - "h5= -103 ##kJ/kg\n", - "x4= 0.860\n", - "x7= 0.253\n", - "x5= 0.337\n", - "h1= 1658.1 ##kJ/kg\n", - "h7= 343.7 ##kJ/kg\n", - "h6= -1008 ##kJ/kg\n", - "h4= 639. ##kJ/kg\n", - "h3= 40. ##kJ/kg\n", - "Tc= -10. ##C\n", - "Th= 125. ##C\n", - "Ta= 25. ##C\n", - "m1= 1. ##kg/s\n", - "m7= 6.23 ##kg/s\n", - "m6= 7.23 ##kg/s\n", - "##CALCULATIONS\n", - "h6= h5+v*(P1-P2)\n", - "cr= (x4-x7)/(x5-x7)\n", - "Qhbym= h1+(m7/m1)*h7-(m6/m1)*h6\n", - "Qcbym= h4-h3\n", - "COP= Qcbym/Qhbym\n", - "COPcarnot= ((273.15+Tc)/(273.15+Th))*((Th-Ta)/(Ta-Tc))\n", - "##RESULTS\n", - "print'%s %.1f %s'% (' Enthalpy=',h6,'kJ/kg')\n", - "print'%s %.3f %s'% (' circulation ratio=',cr,'')\n", - "print'%s %.3f %s'% (' COP=',COP,'')\n", - "print'%s %.3f %s'% (' COP carnot=',COPcarnot,'')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Enthalpy= -101.8 kJ/kg\n", - " circulation ratio= 7.226 \n", - " COP= 0.132 \n", - " COP carnot= 1.888 \n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter19-Chemical_reactions.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter19-Chemical_reactions.ipynb deleted file mode 100755 index fd5d0f72..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter19-Chemical_reactions.ipynb +++ /dev/null @@ -1,472 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:62da0bbd390eac5357f5f997103c8800ba34f828bad9afe3f011ec1444ac1334" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter19-Chemical reactions" - ] - }, - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Example1-pg 404" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#caluclate fuel ratio and excess air and emass air-fuel ratio\n", - "##initialisation of variables\n", - "pN2= 79. ##percent\n", - "VN2= 82.3 ##m^3\n", - "VCO2= 8. ##m^3\n", - "VCO= 0.9 ##m^3\n", - "M= 32. ##gms\n", - "M1= 28. ##gms\n", - "##CALCULATIONS\n", - "P= (pN2/(100-pN2))\n", - "z= VN2/P\n", - "x= VCO2+VCO\n", - "w= VCO2+(VCO/2)+(VCO2/10)\n", - "y= 2*w\n", - "r= y/x\n", - "TO= x+(y/4)\n", - "X= (z/TO)-1\n", - "AF= z*(M+P*M1)/(12*x+y)\n", - "##RESULTS\n", - "print'%s %.3f %s'%('fuel ratio=',r,'')\n", - "print'%s %.3f %s'%('excess air=',X,'')\n", - "print'%s %.2f %s'%('emass air-fuel ratio=',AF,'')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "fuel ratio= 2.079 \n", - "excess air= 0.618 \n", - "emass air-fuel ratio= 23.98 \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg 410" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate heat interaction\n", - "##initialisation of variables\n", - "m1= 24. ##kg\n", - "M1= 32. ##kg\n", - "m2= 28. ##kg\n", - "M2= 28. ##kg\n", - "e= 0.5\n", - "T3= 1800. ##C\n", - "T0= 25. ##C\n", - "T1= 25. ##C\n", - "T2= 100. ##C\n", - "R= 8.314 ##Jmol K\n", - "cp= 4.57 ##J/mol K\n", - "cp1= 3.5 ##J/mol K\n", - "cp2= 3.5 ##J/mol K\n", - "hCO2= -393522. ##J\n", - "hCO= -110529. ##J\n", - "##CALCULATIONS\n", - "n1= m1/M1\n", - "n2= m2/M2\n", - "N= n1-0.5*e\n", - "N1= n2-e\n", - "N2= e\n", - "N3= N+N1+N2\n", - "y1= N/N3\n", - "Q= ((N*cp+N1*cp1+N2*cp2)*R*(T3-T0)-(n1*cp*(T1-T0)+n2*cp2*(T2-T1))+N*(hCO2-hCO))/60.\n", - "##RESULTS\n", - "print'%s %.f %s'%(' Heat interaction=',Q,'kW ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Heat interaction= -940 kW \n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg 412" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate adiabatic flame temperature\n", - "##initialisation of variables\n", - "T0= 25. ##C\n", - "T1= 220. ##C\n", - "hCO2= -393520 ##kJ/kg\n", - "hH2O= -241830 ##kJ/kg\n", - "hC3H8= -103850 ##kJ/kg= 1.4\n", - "R= 8.314 ##Jmol K\n", - "k= 1.4\n", - "k1= 1.29\n", - "##CALCULATIONS\n", - "T= T0+((15*(R*(k/(k-1)))*4.762*(T1-T0)-(3*hCO2+4*hH2O-hC3H8))/(R*((3+4)*(k1/(k1-1))+(10+56.43)*(k/(k-1)))))\n", - "##RESULTS\n", - "print'%s %.1f %s'%('adiabatic flame temperature=',T,'C ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "adiabatic flame temperature= 1142.4 C \n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg 415" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpy formation\n", - "##initialisation of variables\n", - "T= 25. ##C\n", - "hfT= -241820 ##kJ/kmol\n", - "R= 8.314 ##J/mol K\n", - "k= 1.4\n", - "cpH2O= 4.45\n", - "cpO2= 3.5\n", - "T1= 1000. ##C\n", - "##CALCULATIONS\n", - "S= (cpH2O-k*cpO2)\n", - "hfT1= hfT+S*(T1-T)\n", - "##RESULTS\n", - "print'%s %.f %s'%('enthalpy formation=',hfT1,'kJ/kmol ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "enthalpy formation= -242259 kJ/kmol \n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg 418" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate equlibrium constant at K and KT1\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "T= 25. ##C\n", - "gf= 16590. ##kJ/kmol\n", - "T1= 500. ##C\n", - "Cp= 4.157 ##J/mol K\n", - "hf= -46190 ##kJ/kmol\n", - "e=0.5\n", - "##CALCULATIONS\n", - "K=math.pow(math.e,gf/(R*(273.15+T)))\n", - "r= (1-((273.15+T)/(273.15+T1)))*((hf/(R*(273.15+T)))+(R/Cp))-2*math.log((273.15+T1)/(273.15+T))+0.6\n", - "KT1= K*math.pow(math.e,r)\n", - "##RESULTS\n", - "print'%s %.1f %s'%('equilibrium constant=',K,'bar^-1 ')\n", - "print'%s %.5f %s'%('equilibrium constant=',KT1,'bar^-1 ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "equilibrium constant= 806.5 bar^-1 \n", - "equilibrium constant= 0.00797 bar^-1 \n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg 419" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#what equilibrium constant at T1 and T2\n", - "##initialisation of variables\n", - "uCO2= -394374 ##J/mol\n", - "uCO= -137150 ##J/mol\n", - "uO2= 0.\n", - "R= 8.314 ##J/mol K\n", - "T= 25. ##C\n", - "cpCO2= 4.57 ##J/mol K\n", - "cpCO= 3.5 ##J/mol K\n", - "cpO2= 3.5 ##J/mol K\n", - "T1= 1500. ##C\n", - "hf= -393522 ##kJ/kmol\n", - "gf= -110529 ##kJ/kmol\n", - "T2= 2500. ##C\n", - "##CALCULATIONS\n", - "r= -(uCO2-uCO-0.5*uO2)/(R*(273.15+T))\n", - "s= (cpCO2-cpCO-0.5*cpO2)\n", - "r1= (1-((273.15+T)/(273.15+T1)))*((hf-gf)/(R*(273.15+T))-s)+s*math.log((273.15+T1)/(273.15+T))\n", - "KT1= math.pow(math.e,r+r1)\n", - "r2= (1-((273.15+T)/(273.15+T2)))*((hf-gf)/(R*(273.15+T))-s)+s*math.log((273.15+T2)/(273.15+T))\n", - "KT2= math.pow(math.e,r+r2)\n", - "##RESULTS\n", - "print'%s %.f %s'%('equilibrium constant at T1=',KT1,'C ')\n", - "print'%s %.3f %s'%('equilibrium constant at T2=',KT2,'C ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "equilibrium constant at T1= 3477 C \n", - "equilibrium constant at T2= 2.635 C \n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example8-pg422" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#what is maximum work of given variable \n", - "##initialisation of variables\n", - "Wc= 12. ##kg\n", - "hf= -393520 ##kJ/kmol\n", - "gf= -394360 ##kJ/kmol\n", - "##CALCULATIONS\n", - "Wmax= -gf/Wc\n", - "##RESULTS\n", - "print'%s %.f %s'%('maximum work=',Wmax,'kJ/kg of carbon ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "maximum work= 32863 kJ/kg of carbon \n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example9-pg423" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate the outlet temperature and energy of formation and energy out let and energy of the products\n", - "##initialisation of variables\n", - "T= 25 ##C\n", - "R= 8.314 ##Jmol K\n", - "k= 1.27\n", - "k1= 1.34\n", - "hf= -393520 ##kJ/kmol\n", - "M= 28 ##gms\n", - "gf= -394360 ##kJ/kmol\n", - "M= 12 ##gms\n", - "##CALCULATIONS\n", - "T1= T+(-hf/((R)*((k/(k-1))+(0.2+4.5144)*(k1/(k1-1)))))\n", - "Bin= 0\n", - "dh= (k1*R/(k1-1))*(T1-T)\n", - "dh1= (k1*R/(k1-1))*math.log((273.15+T1)/(273.15+T))\n", - "H= dh-(273.15+T)*dh1\n", - "h= (k*R/(k-1))*(T1-T)+hf\n", - "h1= (k*R/(k-1))*math.log((273.15+T1)/(273.15+T))+((hf-gf)/(273.15+T))\n", - "h2= h-(273.15+T)*h1\n", - "Bout= (h2+(0.2+4.5144)*H)/M\n", - "##RESULTS\n", - "print'%s %.2f %s'%('outlet temperature=',T1,'C')\n", - "print'%s %.f %s'%('energy of formation=',Bin,'J')\n", - "print'%s %.f %s'%('energy at outlet=',H,'kJ/kmol')\n", - "print'%s %.f %s'%('energy of the products=',Bout,'k')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "outlet temperature= 2057.82 C\n", - "energy of formation= 0 J\n", - "energy at outlet= 46519 kJ/kmol\n", - "energy of the products= -9961 k\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example10-pg427" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate the change in energy and amount of air and gas and netchange in energy and percent change in energy\n", - "##initialisation of variables\n", - "b= 1475.30 ##kJ/kg\n", - "b0= 144.44 ##kJ/kg\n", - "h2= 3448.6 ##kJkg\n", - "h1= 860.5 ##kJ/kg\n", - "k= 1.27 \n", - "k1= 1.34\n", - "R= 8.314 ##J/mol K\n", - "hf= -393520 ##kJ/kmol\n", - "hg= 72596 ##kJ/kmol\n", - "Mc= 12 ##kg\n", - "n= 1.2 ##moles\n", - "n1= 3.76 ##moles\n", - "M= 32. ##gms\n", - "M1= 28. ##gms\n", - "M2= 44. ##gms\n", - "n2= 0.2 ##moles\n", - "n3= 4.512 ##moles\n", - "B1= 25592. ##kJ/kmol C\n", - "B2= 394360. ##kJ/kmol C\n", - "e= 0.008065\n", - "##CALCULATIONS\n", - "B= b-b0\n", - "Q= h2-h1\n", - "CpCO2= k*R/(k-1)\n", - "CpO2= k1*R/(k1-1)\n", - "Qcoal= (hg+hf)/Mc\n", - "mcoal= Q/(-Qcoal)\n", - "ncoal= mcoal/Mc\n", - "r= (n*M+n1*M1)/Mc\n", - "r1= (M2+n2*M+n3*M1)/Mc\n", - "mair= r*mcoal\n", - "mgas= r1*mcoal\n", - "Bfuel= (B1-B2)*e\n", - "Bnet= Bfuel+B\n", - "p= B*100/(-Bfuel)\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('change in energy=',B,'kJ/kg ')\n", - "print'%s %.3f %s'%('amount of air=',mair,'kg/kg ')\n", - "print'%s %.3f %s'%('amount of gas=',mgas,'kg/kg ')\n", - "print'%s %.3f %s'%('net change in energy=',Bnet,'kg/kg steam ')\n", - "print'%s %.2f %s'%('percent energy in original fuel=',p,'percent ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "change in energy= 1330.86 kJ/kg \n", - "amount of air= 1.159 kg/kg \n", - "amount of gas= 1.425 kg/kg \n", - "net change in energy= -1643.254 kg/kg steam \n", - "percent energy in original fuel= 44.75 percent \n" - ] - } - ], - "prompt_number": 13 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter19.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter19.ipynb deleted file mode 100755 index fd5d0f72..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter19.ipynb +++ /dev/null @@ -1,472 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:62da0bbd390eac5357f5f997103c8800ba34f828bad9afe3f011ec1444ac1334" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter19-Chemical reactions" - ] - }, - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Example1-pg 404" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#caluclate fuel ratio and excess air and emass air-fuel ratio\n", - "##initialisation of variables\n", - "pN2= 79. ##percent\n", - "VN2= 82.3 ##m^3\n", - "VCO2= 8. ##m^3\n", - "VCO= 0.9 ##m^3\n", - "M= 32. ##gms\n", - "M1= 28. ##gms\n", - "##CALCULATIONS\n", - "P= (pN2/(100-pN2))\n", - "z= VN2/P\n", - "x= VCO2+VCO\n", - "w= VCO2+(VCO/2)+(VCO2/10)\n", - "y= 2*w\n", - "r= y/x\n", - "TO= x+(y/4)\n", - "X= (z/TO)-1\n", - "AF= z*(M+P*M1)/(12*x+y)\n", - "##RESULTS\n", - "print'%s %.3f %s'%('fuel ratio=',r,'')\n", - "print'%s %.3f %s'%('excess air=',X,'')\n", - "print'%s %.2f %s'%('emass air-fuel ratio=',AF,'')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "fuel ratio= 2.079 \n", - "excess air= 0.618 \n", - "emass air-fuel ratio= 23.98 \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg 410" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate heat interaction\n", - "##initialisation of variables\n", - "m1= 24. ##kg\n", - "M1= 32. ##kg\n", - "m2= 28. ##kg\n", - "M2= 28. ##kg\n", - "e= 0.5\n", - "T3= 1800. ##C\n", - "T0= 25. ##C\n", - "T1= 25. ##C\n", - "T2= 100. ##C\n", - "R= 8.314 ##Jmol K\n", - "cp= 4.57 ##J/mol K\n", - "cp1= 3.5 ##J/mol K\n", - "cp2= 3.5 ##J/mol K\n", - "hCO2= -393522. ##J\n", - "hCO= -110529. ##J\n", - "##CALCULATIONS\n", - "n1= m1/M1\n", - "n2= m2/M2\n", - "N= n1-0.5*e\n", - "N1= n2-e\n", - "N2= e\n", - "N3= N+N1+N2\n", - "y1= N/N3\n", - "Q= ((N*cp+N1*cp1+N2*cp2)*R*(T3-T0)-(n1*cp*(T1-T0)+n2*cp2*(T2-T1))+N*(hCO2-hCO))/60.\n", - "##RESULTS\n", - "print'%s %.f %s'%(' Heat interaction=',Q,'kW ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Heat interaction= -940 kW \n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg 412" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate adiabatic flame temperature\n", - "##initialisation of variables\n", - "T0= 25. ##C\n", - "T1= 220. ##C\n", - "hCO2= -393520 ##kJ/kg\n", - "hH2O= -241830 ##kJ/kg\n", - "hC3H8= -103850 ##kJ/kg= 1.4\n", - "R= 8.314 ##Jmol K\n", - "k= 1.4\n", - "k1= 1.29\n", - "##CALCULATIONS\n", - "T= T0+((15*(R*(k/(k-1)))*4.762*(T1-T0)-(3*hCO2+4*hH2O-hC3H8))/(R*((3+4)*(k1/(k1-1))+(10+56.43)*(k/(k-1)))))\n", - "##RESULTS\n", - "print'%s %.1f %s'%('adiabatic flame temperature=',T,'C ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "adiabatic flame temperature= 1142.4 C \n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg 415" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpy formation\n", - "##initialisation of variables\n", - "T= 25. ##C\n", - "hfT= -241820 ##kJ/kmol\n", - "R= 8.314 ##J/mol K\n", - "k= 1.4\n", - "cpH2O= 4.45\n", - "cpO2= 3.5\n", - "T1= 1000. ##C\n", - "##CALCULATIONS\n", - "S= (cpH2O-k*cpO2)\n", - "hfT1= hfT+S*(T1-T)\n", - "##RESULTS\n", - "print'%s %.f %s'%('enthalpy formation=',hfT1,'kJ/kmol ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "enthalpy formation= -242259 kJ/kmol \n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg 418" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate equlibrium constant at K and KT1\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "T= 25. ##C\n", - "gf= 16590. ##kJ/kmol\n", - "T1= 500. ##C\n", - "Cp= 4.157 ##J/mol K\n", - "hf= -46190 ##kJ/kmol\n", - "e=0.5\n", - "##CALCULATIONS\n", - "K=math.pow(math.e,gf/(R*(273.15+T)))\n", - "r= (1-((273.15+T)/(273.15+T1)))*((hf/(R*(273.15+T)))+(R/Cp))-2*math.log((273.15+T1)/(273.15+T))+0.6\n", - "KT1= K*math.pow(math.e,r)\n", - "##RESULTS\n", - "print'%s %.1f %s'%('equilibrium constant=',K,'bar^-1 ')\n", - "print'%s %.5f %s'%('equilibrium constant=',KT1,'bar^-1 ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "equilibrium constant= 806.5 bar^-1 \n", - "equilibrium constant= 0.00797 bar^-1 \n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg 419" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#what equilibrium constant at T1 and T2\n", - "##initialisation of variables\n", - "uCO2= -394374 ##J/mol\n", - "uCO= -137150 ##J/mol\n", - "uO2= 0.\n", - "R= 8.314 ##J/mol K\n", - "T= 25. ##C\n", - "cpCO2= 4.57 ##J/mol K\n", - "cpCO= 3.5 ##J/mol K\n", - "cpO2= 3.5 ##J/mol K\n", - "T1= 1500. ##C\n", - "hf= -393522 ##kJ/kmol\n", - "gf= -110529 ##kJ/kmol\n", - "T2= 2500. ##C\n", - "##CALCULATIONS\n", - "r= -(uCO2-uCO-0.5*uO2)/(R*(273.15+T))\n", - "s= (cpCO2-cpCO-0.5*cpO2)\n", - "r1= (1-((273.15+T)/(273.15+T1)))*((hf-gf)/(R*(273.15+T))-s)+s*math.log((273.15+T1)/(273.15+T))\n", - "KT1= math.pow(math.e,r+r1)\n", - "r2= (1-((273.15+T)/(273.15+T2)))*((hf-gf)/(R*(273.15+T))-s)+s*math.log((273.15+T2)/(273.15+T))\n", - "KT2= math.pow(math.e,r+r2)\n", - "##RESULTS\n", - "print'%s %.f %s'%('equilibrium constant at T1=',KT1,'C ')\n", - "print'%s %.3f %s'%('equilibrium constant at T2=',KT2,'C ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "equilibrium constant at T1= 3477 C \n", - "equilibrium constant at T2= 2.635 C \n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example8-pg422" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#what is maximum work of given variable \n", - "##initialisation of variables\n", - "Wc= 12. ##kg\n", - "hf= -393520 ##kJ/kmol\n", - "gf= -394360 ##kJ/kmol\n", - "##CALCULATIONS\n", - "Wmax= -gf/Wc\n", - "##RESULTS\n", - "print'%s %.f %s'%('maximum work=',Wmax,'kJ/kg of carbon ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "maximum work= 32863 kJ/kg of carbon \n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example9-pg423" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate the outlet temperature and energy of formation and energy out let and energy of the products\n", - "##initialisation of variables\n", - "T= 25 ##C\n", - "R= 8.314 ##Jmol K\n", - "k= 1.27\n", - "k1= 1.34\n", - "hf= -393520 ##kJ/kmol\n", - "M= 28 ##gms\n", - "gf= -394360 ##kJ/kmol\n", - "M= 12 ##gms\n", - "##CALCULATIONS\n", - "T1= T+(-hf/((R)*((k/(k-1))+(0.2+4.5144)*(k1/(k1-1)))))\n", - "Bin= 0\n", - "dh= (k1*R/(k1-1))*(T1-T)\n", - "dh1= (k1*R/(k1-1))*math.log((273.15+T1)/(273.15+T))\n", - "H= dh-(273.15+T)*dh1\n", - "h= (k*R/(k-1))*(T1-T)+hf\n", - "h1= (k*R/(k-1))*math.log((273.15+T1)/(273.15+T))+((hf-gf)/(273.15+T))\n", - "h2= h-(273.15+T)*h1\n", - "Bout= (h2+(0.2+4.5144)*H)/M\n", - "##RESULTS\n", - "print'%s %.2f %s'%('outlet temperature=',T1,'C')\n", - "print'%s %.f %s'%('energy of formation=',Bin,'J')\n", - "print'%s %.f %s'%('energy at outlet=',H,'kJ/kmol')\n", - "print'%s %.f %s'%('energy of the products=',Bout,'k')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "outlet temperature= 2057.82 C\n", - "energy of formation= 0 J\n", - "energy at outlet= 46519 kJ/kmol\n", - "energy of the products= -9961 k\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example10-pg427" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate the change in energy and amount of air and gas and netchange in energy and percent change in energy\n", - "##initialisation of variables\n", - "b= 1475.30 ##kJ/kg\n", - "b0= 144.44 ##kJ/kg\n", - "h2= 3448.6 ##kJkg\n", - "h1= 860.5 ##kJ/kg\n", - "k= 1.27 \n", - "k1= 1.34\n", - "R= 8.314 ##J/mol K\n", - "hf= -393520 ##kJ/kmol\n", - "hg= 72596 ##kJ/kmol\n", - "Mc= 12 ##kg\n", - "n= 1.2 ##moles\n", - "n1= 3.76 ##moles\n", - "M= 32. ##gms\n", - "M1= 28. ##gms\n", - "M2= 44. ##gms\n", - "n2= 0.2 ##moles\n", - "n3= 4.512 ##moles\n", - "B1= 25592. ##kJ/kmol C\n", - "B2= 394360. ##kJ/kmol C\n", - "e= 0.008065\n", - "##CALCULATIONS\n", - "B= b-b0\n", - "Q= h2-h1\n", - "CpCO2= k*R/(k-1)\n", - "CpO2= k1*R/(k1-1)\n", - "Qcoal= (hg+hf)/Mc\n", - "mcoal= Q/(-Qcoal)\n", - "ncoal= mcoal/Mc\n", - "r= (n*M+n1*M1)/Mc\n", - "r1= (M2+n2*M+n3*M1)/Mc\n", - "mair= r*mcoal\n", - "mgas= r1*mcoal\n", - "Bfuel= (B1-B2)*e\n", - "Bnet= Bfuel+B\n", - "p= B*100/(-Bfuel)\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('change in energy=',B,'kJ/kg ')\n", - "print'%s %.3f %s'%('amount of air=',mair,'kg/kg ')\n", - "print'%s %.3f %s'%('amount of gas=',mgas,'kg/kg ')\n", - "print'%s %.3f %s'%('net change in energy=',Bnet,'kg/kg steam ')\n", - "print'%s %.2f %s'%('percent energy in original fuel=',p,'percent ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "change in energy= 1330.86 kJ/kg \n", - "amount of air= 1.159 kg/kg \n", - "amount of gas= 1.425 kg/kg \n", - "net change in energy= -1643.254 kg/kg steam \n", - "percent energy in original fuel= 44.75 percent \n" - ] - } - ], - "prompt_number": 13 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter19_1.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter19_1.ipynb deleted file mode 100755 index fd5d0f72..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter19_1.ipynb +++ /dev/null @@ -1,472 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:62da0bbd390eac5357f5f997103c8800ba34f828bad9afe3f011ec1444ac1334" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter19-Chemical reactions" - ] - }, - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Example1-pg 404" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#caluclate fuel ratio and excess air and emass air-fuel ratio\n", - "##initialisation of variables\n", - "pN2= 79. ##percent\n", - "VN2= 82.3 ##m^3\n", - "VCO2= 8. ##m^3\n", - "VCO= 0.9 ##m^3\n", - "M= 32. ##gms\n", - "M1= 28. ##gms\n", - "##CALCULATIONS\n", - "P= (pN2/(100-pN2))\n", - "z= VN2/P\n", - "x= VCO2+VCO\n", - "w= VCO2+(VCO/2)+(VCO2/10)\n", - "y= 2*w\n", - "r= y/x\n", - "TO= x+(y/4)\n", - "X= (z/TO)-1\n", - "AF= z*(M+P*M1)/(12*x+y)\n", - "##RESULTS\n", - "print'%s %.3f %s'%('fuel ratio=',r,'')\n", - "print'%s %.3f %s'%('excess air=',X,'')\n", - "print'%s %.2f %s'%('emass air-fuel ratio=',AF,'')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "fuel ratio= 2.079 \n", - "excess air= 0.618 \n", - "emass air-fuel ratio= 23.98 \n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg 410" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate heat interaction\n", - "##initialisation of variables\n", - "m1= 24. ##kg\n", - "M1= 32. ##kg\n", - "m2= 28. ##kg\n", - "M2= 28. ##kg\n", - "e= 0.5\n", - "T3= 1800. ##C\n", - "T0= 25. ##C\n", - "T1= 25. ##C\n", - "T2= 100. ##C\n", - "R= 8.314 ##Jmol K\n", - "cp= 4.57 ##J/mol K\n", - "cp1= 3.5 ##J/mol K\n", - "cp2= 3.5 ##J/mol K\n", - "hCO2= -393522. ##J\n", - "hCO= -110529. ##J\n", - "##CALCULATIONS\n", - "n1= m1/M1\n", - "n2= m2/M2\n", - "N= n1-0.5*e\n", - "N1= n2-e\n", - "N2= e\n", - "N3= N+N1+N2\n", - "y1= N/N3\n", - "Q= ((N*cp+N1*cp1+N2*cp2)*R*(T3-T0)-(n1*cp*(T1-T0)+n2*cp2*(T2-T1))+N*(hCO2-hCO))/60.\n", - "##RESULTS\n", - "print'%s %.f %s'%(' Heat interaction=',Q,'kW ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Heat interaction= -940 kW \n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg 412" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate adiabatic flame temperature\n", - "##initialisation of variables\n", - "T0= 25. ##C\n", - "T1= 220. ##C\n", - "hCO2= -393520 ##kJ/kg\n", - "hH2O= -241830 ##kJ/kg\n", - "hC3H8= -103850 ##kJ/kg= 1.4\n", - "R= 8.314 ##Jmol K\n", - "k= 1.4\n", - "k1= 1.29\n", - "##CALCULATIONS\n", - "T= T0+((15*(R*(k/(k-1)))*4.762*(T1-T0)-(3*hCO2+4*hH2O-hC3H8))/(R*((3+4)*(k1/(k1-1))+(10+56.43)*(k/(k-1)))))\n", - "##RESULTS\n", - "print'%s %.1f %s'%('adiabatic flame temperature=',T,'C ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "adiabatic flame temperature= 1142.4 C \n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg 415" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpy formation\n", - "##initialisation of variables\n", - "T= 25. ##C\n", - "hfT= -241820 ##kJ/kmol\n", - "R= 8.314 ##J/mol K\n", - "k= 1.4\n", - "cpH2O= 4.45\n", - "cpO2= 3.5\n", - "T1= 1000. ##C\n", - "##CALCULATIONS\n", - "S= (cpH2O-k*cpO2)\n", - "hfT1= hfT+S*(T1-T)\n", - "##RESULTS\n", - "print'%s %.f %s'%('enthalpy formation=',hfT1,'kJ/kmol ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "enthalpy formation= -242259 kJ/kmol \n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg 418" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate equlibrium constant at K and KT1\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "T= 25. ##C\n", - "gf= 16590. ##kJ/kmol\n", - "T1= 500. ##C\n", - "Cp= 4.157 ##J/mol K\n", - "hf= -46190 ##kJ/kmol\n", - "e=0.5\n", - "##CALCULATIONS\n", - "K=math.pow(math.e,gf/(R*(273.15+T)))\n", - "r= (1-((273.15+T)/(273.15+T1)))*((hf/(R*(273.15+T)))+(R/Cp))-2*math.log((273.15+T1)/(273.15+T))+0.6\n", - "KT1= K*math.pow(math.e,r)\n", - "##RESULTS\n", - "print'%s %.1f %s'%('equilibrium constant=',K,'bar^-1 ')\n", - "print'%s %.5f %s'%('equilibrium constant=',KT1,'bar^-1 ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "equilibrium constant= 806.5 bar^-1 \n", - "equilibrium constant= 0.00797 bar^-1 \n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg 419" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#what equilibrium constant at T1 and T2\n", - "##initialisation of variables\n", - "uCO2= -394374 ##J/mol\n", - "uCO= -137150 ##J/mol\n", - "uO2= 0.\n", - "R= 8.314 ##J/mol K\n", - "T= 25. ##C\n", - "cpCO2= 4.57 ##J/mol K\n", - "cpCO= 3.5 ##J/mol K\n", - "cpO2= 3.5 ##J/mol K\n", - "T1= 1500. ##C\n", - "hf= -393522 ##kJ/kmol\n", - "gf= -110529 ##kJ/kmol\n", - "T2= 2500. ##C\n", - "##CALCULATIONS\n", - "r= -(uCO2-uCO-0.5*uO2)/(R*(273.15+T))\n", - "s= (cpCO2-cpCO-0.5*cpO2)\n", - "r1= (1-((273.15+T)/(273.15+T1)))*((hf-gf)/(R*(273.15+T))-s)+s*math.log((273.15+T1)/(273.15+T))\n", - "KT1= math.pow(math.e,r+r1)\n", - "r2= (1-((273.15+T)/(273.15+T2)))*((hf-gf)/(R*(273.15+T))-s)+s*math.log((273.15+T2)/(273.15+T))\n", - "KT2= math.pow(math.e,r+r2)\n", - "##RESULTS\n", - "print'%s %.f %s'%('equilibrium constant at T1=',KT1,'C ')\n", - "print'%s %.3f %s'%('equilibrium constant at T2=',KT2,'C ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "equilibrium constant at T1= 3477 C \n", - "equilibrium constant at T2= 2.635 C \n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example8-pg422" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#what is maximum work of given variable \n", - "##initialisation of variables\n", - "Wc= 12. ##kg\n", - "hf= -393520 ##kJ/kmol\n", - "gf= -394360 ##kJ/kmol\n", - "##CALCULATIONS\n", - "Wmax= -gf/Wc\n", - "##RESULTS\n", - "print'%s %.f %s'%('maximum work=',Wmax,'kJ/kg of carbon ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "maximum work= 32863 kJ/kg of carbon \n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example9-pg423" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate the outlet temperature and energy of formation and energy out let and energy of the products\n", - "##initialisation of variables\n", - "T= 25 ##C\n", - "R= 8.314 ##Jmol K\n", - "k= 1.27\n", - "k1= 1.34\n", - "hf= -393520 ##kJ/kmol\n", - "M= 28 ##gms\n", - "gf= -394360 ##kJ/kmol\n", - "M= 12 ##gms\n", - "##CALCULATIONS\n", - "T1= T+(-hf/((R)*((k/(k-1))+(0.2+4.5144)*(k1/(k1-1)))))\n", - "Bin= 0\n", - "dh= (k1*R/(k1-1))*(T1-T)\n", - "dh1= (k1*R/(k1-1))*math.log((273.15+T1)/(273.15+T))\n", - "H= dh-(273.15+T)*dh1\n", - "h= (k*R/(k-1))*(T1-T)+hf\n", - "h1= (k*R/(k-1))*math.log((273.15+T1)/(273.15+T))+((hf-gf)/(273.15+T))\n", - "h2= h-(273.15+T)*h1\n", - "Bout= (h2+(0.2+4.5144)*H)/M\n", - "##RESULTS\n", - "print'%s %.2f %s'%('outlet temperature=',T1,'C')\n", - "print'%s %.f %s'%('energy of formation=',Bin,'J')\n", - "print'%s %.f %s'%('energy at outlet=',H,'kJ/kmol')\n", - "print'%s %.f %s'%('energy of the products=',Bout,'k')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "outlet temperature= 2057.82 C\n", - "energy of formation= 0 J\n", - "energy at outlet= 46519 kJ/kmol\n", - "energy of the products= -9961 k\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example10-pg427" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate the change in energy and amount of air and gas and netchange in energy and percent change in energy\n", - "##initialisation of variables\n", - "b= 1475.30 ##kJ/kg\n", - "b0= 144.44 ##kJ/kg\n", - "h2= 3448.6 ##kJkg\n", - "h1= 860.5 ##kJ/kg\n", - "k= 1.27 \n", - "k1= 1.34\n", - "R= 8.314 ##J/mol K\n", - "hf= -393520 ##kJ/kmol\n", - "hg= 72596 ##kJ/kmol\n", - "Mc= 12 ##kg\n", - "n= 1.2 ##moles\n", - "n1= 3.76 ##moles\n", - "M= 32. ##gms\n", - "M1= 28. ##gms\n", - "M2= 44. ##gms\n", - "n2= 0.2 ##moles\n", - "n3= 4.512 ##moles\n", - "B1= 25592. ##kJ/kmol C\n", - "B2= 394360. ##kJ/kmol C\n", - "e= 0.008065\n", - "##CALCULATIONS\n", - "B= b-b0\n", - "Q= h2-h1\n", - "CpCO2= k*R/(k-1)\n", - "CpO2= k1*R/(k1-1)\n", - "Qcoal= (hg+hf)/Mc\n", - "mcoal= Q/(-Qcoal)\n", - "ncoal= mcoal/Mc\n", - "r= (n*M+n1*M1)/Mc\n", - "r1= (M2+n2*M+n3*M1)/Mc\n", - "mair= r*mcoal\n", - "mgas= r1*mcoal\n", - "Bfuel= (B1-B2)*e\n", - "Bnet= Bfuel+B\n", - "p= B*100/(-Bfuel)\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('change in energy=',B,'kJ/kg ')\n", - "print'%s %.3f %s'%('amount of air=',mair,'kg/kg ')\n", - "print'%s %.3f %s'%('amount of gas=',mgas,'kg/kg ')\n", - "print'%s %.3f %s'%('net change in energy=',Bnet,'kg/kg steam ')\n", - "print'%s %.2f %s'%('percent energy in original fuel=',p,'percent ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "change in energy= 1330.86 kJ/kg \n", - "amount of air= 1.159 kg/kg \n", - "amount of gas= 1.425 kg/kg \n", - "net change in energy= -1643.254 kg/kg steam \n", - "percent energy in original fuel= 44.75 percent \n" - ] - } - ], - "prompt_number": 13 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter5-the_ideal_gas.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter5-the_ideal_gas.ipynb deleted file mode 100755 index 7ebf1310..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter5-the_ideal_gas.ipynb +++ /dev/null @@ -1,166 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:4e735a3e117e4e268af257af7ccec75bd1ac3fad4a8f848db2d81766258e8e27" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter5 -The ideal gas" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg 66" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate specific volumes at given pressure\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "M= 18.016 ##gms\n", - "T= 400. ##C\n", - "p= 0.01 ##Mpa\n", - "p1= 0.1 ##Mpa\n", - "p2= 20. ##Mpa\n", - "##CALCULATIONS\n", - "v= R*(273.156+T)/(M*p*1000)\n", - "v1= R*(273.156+T)/(M*p1*1000)\n", - "v2= R*(273.156+T)/(M*p2*1000)\n", - "##RESULTS\n", - "print'%s %.3f %s'%(' specific voulme =',v,'m^3/kg')\n", - "print'%s %.3f %s'%('specific voulme = ', v1,'m^3/kg')\n", - "print'%s %.3f %s'%('specific voulme = ',v2,'m^3/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " specific voulme = 31.065 m^3/kg\n", - "specific voulme = 3.106 m^3/kg\n", - "specific voulme = 0.016 m^3/kg\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "example 3-pg73 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate final temperature and pressure and work ,energy\n", - "##initialisation of variables\n", - "p1= 300.##kPa\n", - "V1= 0.03 ##m^3\n", - "V2= 0.08 ##m^3\n", - "T1= 27. ##C\n", - "##CALCULATIONS1\n", - "T2= T1+273\n", - "p2= p1*(V1/V2)*(T2/(T1+273))\n", - "W= 0\n", - "Q= 0\n", - "##RESULTS\n", - "print'%s %.2f %s'%('final temperature =',T2,'K')\n", - "print'%s %.1f %s'%('final pressure =',p2,'kPa')\n", - "print'%s %.f %s'%('work = ',W,'kJ')\n", - "print'%s %.f %s'%('energy =',Q,'kJ')\n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "final temperature = 300.00 K\n", - "final pressure = 112.5 kPa\n", - "work = 0 kJ\n", - "energy = 0 kJ\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4 -pg74\n", - "\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate mass of nitrogen and final temperature and piston rise\n", - "##initialisation of variables\n", - "p1= 2. ##Mpa\n", - "V1= 0.2 ##m^3\n", - "R= 8.314 ##J/mol K\n", - "T1= 500. ##C\n", - "M= 28. ##gms\n", - "p2= 0.3 ##Mpa\n", - "T2= 250 ##C\n", - "k= 1.4\n", - "A= 0.1 ##m^2\n", - "##CALCULATIONS\n", - "m1= p1*10*10*10*V1*M/(R*(273.15+T1))\n", - "m2= p2*10*10*10*V1*M/(R*(273.15+T2))\n", - "m3= -(m2-m1)\n", - "T3= (m1*(273.15+T1)-m2*(273.15+T2))/(k*m3)\n", - "z3= m3*R*T3/(p2*10*10*10*A*M)\n", - "##RESULTS\n", - "print'%s %.4f %s'%(' mass of nitrogen =',m3,'kg')\n", - "print'%s %.1f %s'%('final temperature =',T3,'K')\n", - "print'%s %.2f %s'%('piston rise =',z3,'m')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " mass of nitrogen = 1.3561 kg\n", - "final temperature = 603.1 K\n", - "piston rise = 8.10 m\n" - ] - } - ], - "prompt_number": 11 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter5.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter5.ipynb deleted file mode 100755 index 63ce2dea..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter5.ipynb +++ /dev/null @@ -1,166 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:38617d08dc78615a27f3bb0a8bac191fa91e9820c1bc63b1ee3f0d39bccfa426" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter5 -the ideal gas" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg 66" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate specific volumes at given pressure\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "M= 18.016 ##gms\n", - "T= 400. ##C\n", - "p= 0.01 ##Mpa\n", - "p1= 0.1 ##Mpa\n", - "p2= 20. ##Mpa\n", - "##CALCULATIONS\n", - "v= R*(273.156+T)/(M*p*1000)\n", - "v1= R*(273.156+T)/(M*p1*1000)\n", - "v2= R*(273.156+T)/(M*p2*1000)\n", - "##RESULTS\n", - "print'%s %.3f %s'%(' specific voulme =',v,'m^3/kg')\n", - "print'%s %.3f %s'%('specific voulme = ', v1,'m^3/kg')\n", - "print'%s %.3f %s'%('specific voulme = ',v2,'m^3/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " specific voulme = 31.065 m^3/kg\n", - "specific voulme = 3.106 m^3/kg\n", - "specific voulme = 0.016 m^3/kg\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "example 3-pg73 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate final temperature and pressure and work ,energy\n", - "##initialisation of variables\n", - "p1= 300.##kPa\n", - "V1= 0.03 ##m^3\n", - "V2= 0.08 ##m^3\n", - "T1= 27. ##C\n", - "##CALCULATIONS1\n", - "T2= T1+273\n", - "p2= p1*(V1/V2)*(T2/(T1+273))\n", - "W= 0\n", - "Q= 0\n", - "##RESULTS\n", - "print'%s %.2f %s'%('final temperature =',T2,'K')\n", - "print'%s %.1f %s'%('final pressure =',p2,'kPa')\n", - "print'%s %.f %s'%('work = ',W,'kJ')\n", - "print'%s %.f %s'%('energy =',Q,'kJ')\n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "final temperature = 300.00 K\n", - "final pressure = 112.5 kPa\n", - "work = 0 kJ\n", - "energy = 0 kJ\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4 -pg74\n", - "\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate mass of nitrogen and final temperature and piston rise\n", - "##initialisation of variables\n", - "p1= 2. ##Mpa\n", - "V1= 0.2 ##m^3\n", - "R= 8.314 ##J/mol K\n", - "T1= 500. ##C\n", - "M= 28. ##gms\n", - "p2= 0.3 ##Mpa\n", - "T2= 250 ##C\n", - "k= 1.4\n", - "A= 0.1 ##m^2\n", - "##CALCULATIONS\n", - "m1= p1*10*10*10*V1*M/(R*(273.15+T1))\n", - "m2= p2*10*10*10*V1*M/(R*(273.15+T2))\n", - "m3= -(m2-m1)\n", - "T3= (m1*(273.15+T1)-m2*(273.15+T2))/(k*m3)\n", - "z3= m3*R*T3/(p2*10*10*10*A*M)\n", - "##RESULTS\n", - "print'%s %.4f %s'%(' mass of nitrogen =',m3,'kg')\n", - "print'%s %.1f %s'%('final temperature =',T3,'K')\n", - "print'%s %.2f %s'%('piston rise =',z3,'m')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " mass of nitrogen = 1.3561 kg\n", - "final temperature = 603.1 K\n", - "piston rise = 8.10 m\n" - ] - } - ], - "prompt_number": 11 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter5_1.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter5_1.ipynb deleted file mode 100755 index 7ebf1310..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter5_1.ipynb +++ /dev/null @@ -1,166 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:4e735a3e117e4e268af257af7ccec75bd1ac3fad4a8f848db2d81766258e8e27" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter5 -The ideal gas" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg 66" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate specific volumes at given pressure\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "M= 18.016 ##gms\n", - "T= 400. ##C\n", - "p= 0.01 ##Mpa\n", - "p1= 0.1 ##Mpa\n", - "p2= 20. ##Mpa\n", - "##CALCULATIONS\n", - "v= R*(273.156+T)/(M*p*1000)\n", - "v1= R*(273.156+T)/(M*p1*1000)\n", - "v2= R*(273.156+T)/(M*p2*1000)\n", - "##RESULTS\n", - "print'%s %.3f %s'%(' specific voulme =',v,'m^3/kg')\n", - "print'%s %.3f %s'%('specific voulme = ', v1,'m^3/kg')\n", - "print'%s %.3f %s'%('specific voulme = ',v2,'m^3/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " specific voulme = 31.065 m^3/kg\n", - "specific voulme = 3.106 m^3/kg\n", - "specific voulme = 0.016 m^3/kg\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "example 3-pg73 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate final temperature and pressure and work ,energy\n", - "##initialisation of variables\n", - "p1= 300.##kPa\n", - "V1= 0.03 ##m^3\n", - "V2= 0.08 ##m^3\n", - "T1= 27. ##C\n", - "##CALCULATIONS1\n", - "T2= T1+273\n", - "p2= p1*(V1/V2)*(T2/(T1+273))\n", - "W= 0\n", - "Q= 0\n", - "##RESULTS\n", - "print'%s %.2f %s'%('final temperature =',T2,'K')\n", - "print'%s %.1f %s'%('final pressure =',p2,'kPa')\n", - "print'%s %.f %s'%('work = ',W,'kJ')\n", - "print'%s %.f %s'%('energy =',Q,'kJ')\n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "final temperature = 300.00 K\n", - "final pressure = 112.5 kPa\n", - "work = 0 kJ\n", - "energy = 0 kJ\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4 -pg74\n", - "\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate mass of nitrogen and final temperature and piston rise\n", - "##initialisation of variables\n", - "p1= 2. ##Mpa\n", - "V1= 0.2 ##m^3\n", - "R= 8.314 ##J/mol K\n", - "T1= 500. ##C\n", - "M= 28. ##gms\n", - "p2= 0.3 ##Mpa\n", - "T2= 250 ##C\n", - "k= 1.4\n", - "A= 0.1 ##m^2\n", - "##CALCULATIONS\n", - "m1= p1*10*10*10*V1*M/(R*(273.15+T1))\n", - "m2= p2*10*10*10*V1*M/(R*(273.15+T2))\n", - "m3= -(m2-m1)\n", - "T3= (m1*(273.15+T1)-m2*(273.15+T2))/(k*m3)\n", - "z3= m3*R*T3/(p2*10*10*10*A*M)\n", - "##RESULTS\n", - "print'%s %.4f %s'%(' mass of nitrogen =',m3,'kg')\n", - "print'%s %.1f %s'%('final temperature =',T3,'K')\n", - "print'%s %.2f %s'%('piston rise =',z3,'m')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " mass of nitrogen = 1.3561 kg\n", - "final temperature = 603.1 K\n", - "piston rise = 8.10 m\n" - ] - } - ], - "prompt_number": 11 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter5_2.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter5_2.ipynb deleted file mode 100755 index 7ebf1310..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter5_2.ipynb +++ /dev/null @@ -1,166 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:4e735a3e117e4e268af257af7ccec75bd1ac3fad4a8f848db2d81766258e8e27" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter5 -The ideal gas" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg 66" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate specific volumes at given pressure\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "M= 18.016 ##gms\n", - "T= 400. ##C\n", - "p= 0.01 ##Mpa\n", - "p1= 0.1 ##Mpa\n", - "p2= 20. ##Mpa\n", - "##CALCULATIONS\n", - "v= R*(273.156+T)/(M*p*1000)\n", - "v1= R*(273.156+T)/(M*p1*1000)\n", - "v2= R*(273.156+T)/(M*p2*1000)\n", - "##RESULTS\n", - "print'%s %.3f %s'%(' specific voulme =',v,'m^3/kg')\n", - "print'%s %.3f %s'%('specific voulme = ', v1,'m^3/kg')\n", - "print'%s %.3f %s'%('specific voulme = ',v2,'m^3/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " specific voulme = 31.065 m^3/kg\n", - "specific voulme = 3.106 m^3/kg\n", - "specific voulme = 0.016 m^3/kg\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "example 3-pg73 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate final temperature and pressure and work ,energy\n", - "##initialisation of variables\n", - "p1= 300.##kPa\n", - "V1= 0.03 ##m^3\n", - "V2= 0.08 ##m^3\n", - "T1= 27. ##C\n", - "##CALCULATIONS1\n", - "T2= T1+273\n", - "p2= p1*(V1/V2)*(T2/(T1+273))\n", - "W= 0\n", - "Q= 0\n", - "##RESULTS\n", - "print'%s %.2f %s'%('final temperature =',T2,'K')\n", - "print'%s %.1f %s'%('final pressure =',p2,'kPa')\n", - "print'%s %.f %s'%('work = ',W,'kJ')\n", - "print'%s %.f %s'%('energy =',Q,'kJ')\n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "final temperature = 300.00 K\n", - "final pressure = 112.5 kPa\n", - "work = 0 kJ\n", - "energy = 0 kJ\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4 -pg74\n", - "\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate mass of nitrogen and final temperature and piston rise\n", - "##initialisation of variables\n", - "p1= 2. ##Mpa\n", - "V1= 0.2 ##m^3\n", - "R= 8.314 ##J/mol K\n", - "T1= 500. ##C\n", - "M= 28. ##gms\n", - "p2= 0.3 ##Mpa\n", - "T2= 250 ##C\n", - "k= 1.4\n", - "A= 0.1 ##m^2\n", - "##CALCULATIONS\n", - "m1= p1*10*10*10*V1*M/(R*(273.15+T1))\n", - "m2= p2*10*10*10*V1*M/(R*(273.15+T2))\n", - "m3= -(m2-m1)\n", - "T3= (m1*(273.15+T1)-m2*(273.15+T2))/(k*m3)\n", - "z3= m3*R*T3/(p2*10*10*10*A*M)\n", - "##RESULTS\n", - "print'%s %.4f %s'%(' mass of nitrogen =',m3,'kg')\n", - "print'%s %.1f %s'%('final temperature =',T3,'K')\n", - "print'%s %.2f %s'%('piston rise =',z3,'m')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " mass of nitrogen = 1.3561 kg\n", - "final temperature = 603.1 K\n", - "piston rise = 8.10 m\n" - ] - } - ], - "prompt_number": 11 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter6-Control_volume.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter6-Control_volume.ipynb deleted file mode 100755 index 4db4d31d..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter6-Control_volume.ipynb +++ /dev/null @@ -1,308 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:de09a4c2813282719223c840622b4f97d21f59c5103e9a20c830f4005781fd9e" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter6 -Control volume" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg 83" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate diameter for given variable\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "M= 29 ##gms\n", - "T= 80 ##C\n", - "p= 104 ##/kPa\n", - "v= 30 ##m/sec\n", - "m= 8000 ##kg/h\n", - "##CALCULATIONS\n", - "V= R*(273.15+T)/(M*p)\n", - "A= m*V/(3600*v)\n", - "D=math.sqrt(4*A/math.pi)\n", - "##RESULTS\n", - "print'%s %.5f %s'%('diameter = ',D,'m^2')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "diameter = 0.30301 m^2\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg 88" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate intial areas\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "M= 29. ##gms\n", - "T1= 230. ##C\n", - "p1= 30. ##/bar\n", - "k= 1.4\n", - "T2= 180. ##C\n", - "v1= 10. ##m/s\n", - "p2= 20. ##bar\n", - "m2= 0.84 ##kg/s\n", - "##CALCULATIONS\n", - "V1= R*(273.15+T1)/(M*p1*100)\n", - "cp= k*R/((k-1)*M)\n", - "A= m2*V1*10*10*10*10/v1\n", - "v2= math.sqrt(v1*v1+2*cp*10*10*10*(T1-T2))\n", - "V2= R*(273.15+T2)/(M*p2*100)\n", - "A2= m2*V2*10*10*10*10/v2\n", - "##RESULTS\n", - "print'%s %.1f %s'%('inlet area =',A,'cm^2')\n", - "print'%s %.2f %s'%('inlet area =',A2,'cm^2')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "inlet area = 40.4 cm^2\n", - "inlet area = 1.72 cm^2\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg 89" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate quantity x and specific volume\n", - "##initialisation of variables\n", - "h= 2676.2 ##kJ/kg\n", - "hf= 721.11 ##kJ/kg\n", - "hg= 2679.1 ##kJ/kg\n", - "vf= 0.001115 ##m^3/kg\n", - "vg= 0.2404 ##m^3/kg\n", - "##CALCULATIONS\n", - "x= (h-hf)/(hg-hf)\n", - "v1= vf+x*(vg-vf)\n", - "##RESULTS\n", - "print'%s %.4f %s'%('quantity =',x,'')\n", - "print'%s %.4f %s'%('specific volume = ',v1,'m^3/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "quantity = 0.9985 \n", - "specific volume = 0.2400 m^3/kg\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg 92" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate heat pump and reate heat interaction and work of the turbine and at another point rate of heat interaction and all four areas at given poin\n", - "##initialisation of variables\n", - "h4= 419.05 ##kJ/kg\n", - "h1= 434.92 ##kJ/kg\n", - "m= 2.5 ##kg/s\n", - "h2= 3272.4 ##kJ/kg\n", - "h3= 2601.7 ##kJ/kg\n", - "v1= 0.001401 ##m^3/kg\n", - "V1= 5 ##m/s\n", - "v2= 0.03817 ##m^3/kg\n", - "V2= 20. ##m/s\n", - "v3= 0.8415 ##m^3/kg\n", - "V3= 100. ##m/s\n", - "v4= 0.00104 ##m^3/kg\n", - "V4= 5 ##m/s\n", - "##CALCULATIONS\n", - "W41= m*(h4-h1)\n", - "Q12= m*(h2-h1)\n", - "W23= m*(h2-h3)\n", - "Q34= m*(h4-h3)\n", - "A1= m*v1*10*10*10*10/V1\n", - "A2= m*v2*10*1010*10/V2\n", - "A3= m*v3*10*1010*10/V3\n", - "A4= m*v4*10*1010*10/V4\n", - "##RESULTS\n", - "print'%s %.1f %s'%('rate of pump =',W41,'kW')\n", - "print'%s %.f %s'%('rate of heat ineraction =',Q12,'kW')\n", - "print'%s %.1f %s'%('rate of work of the turbine =',W23,'W')\n", - "print'%s %.f %s'%('rate of heat ineraction =',Q34,'kW')\n", - "print'%s %.2f %s'%('area =',A1,'cm^2')\n", - "print'%s %.2f %s'%('area =',A2,'cm^2')\n", - "print'%s %.2f %s'%('area =',A3,'cm^2')\n", - "print'%s %.2f %s'%('area =',A4,'cm^2')\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rate of pump = -39.7 kW\n", - "rate of heat ineraction = 7094 kW\n", - "rate of work of the turbine = 1676.8 W\n", - "rate of heat ineraction = -5457 kW\n", - "area = 7.00 cm^2\n", - "area = 481.90 cm^2\n", - "area = 2124.79 cm^2\n", - "area = 52.52 cm^2\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg 96" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate mass of helium and temperature of helium\n", - "##initialisation of variables\n", - "m1= 0.03 ##kg\n", - "R= 8.314 ##J/mol K\n", - "T1= 300. ##C\n", - "p1= 120. ##kPa\n", - "k= 5./3.\n", - "M=4. ##kg\n", - "p2= 600. ##kPa\n", - "##CALCULATIONS\n", - "V= m1*R*(273.15+T1)/(p1*M)\n", - "m2= m1*((p2/p1)+k-1)/k\n", - "T2= p2*V*M/(m2*R)\n", - "##RESULTS\n", - "print'%s %.3f %s'%('mass of helium =',m2,'kg')\n", - "print'%s %.1f %s'%('temperature of helium =',T2,'K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "mass of helium = 0.102 kg\n", - "temperature of helium = 842.9 K\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Eaxmple 6-pg97" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate volume of container and pressure\n", - "##initialisation of variables\n", - "m1= 0.03 ##kg\n", - "v1= 2.1977 ##m^3/kg\n", - "h2= 3073.8 ##kJ/kg\n", - "h1= 3061.6 ##kJ/kg\n", - "p2= 600. ##kPa\n", - "p1= 120. ##kPa\n", - "##CALCULATIONS\n", - "V=m1*v1\n", - "r= ((h2-h1)/v1)+p2-p1\n", - "##RESULTS\n", - "print'%s %.5f %s'%('volume of container =',V,'m^3')\n", - "print'%s %.2f %s'%('pressure =',r,'kPa')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume of container = 0.06593 m^3\n", - "pressure = 485.55 kPa\n" - ] - } - ], - "prompt_number": 8 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter6.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter6.ipynb deleted file mode 100755 index 0e7c0436..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter6.ipynb +++ /dev/null @@ -1,308 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:b8ccd5165760dffa261415477a99582312dff66f312e3d719c763faed6ba4a02" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter6 -control volume" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg 83" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate diameter for given variable\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "M= 29 ##gms\n", - "T= 80 ##C\n", - "p= 104 ##/kPa\n", - "v= 30 ##m/sec\n", - "m= 8000 ##kg/h\n", - "##CALCULATIONS\n", - "V= R*(273.15+T)/(M*p)\n", - "A= m*V/(3600*v)\n", - "D=math.sqrt(4*A/math.pi)\n", - "##RESULTS\n", - "print'%s %.5f %s'%('diameter = ',D,'m^2')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "diameter = 0.30301 m^2\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg 88" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate intial areas\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "M= 29. ##gms\n", - "T1= 230. ##C\n", - "p1= 30. ##/bar\n", - "k= 1.4\n", - "T2= 180. ##C\n", - "v1= 10. ##m/s\n", - "p2= 20. ##bar\n", - "m2= 0.84 ##kg/s\n", - "##CALCULATIONS\n", - "V1= R*(273.15+T1)/(M*p1*100)\n", - "cp= k*R/((k-1)*M)\n", - "A= m2*V1*10*10*10*10/v1\n", - "v2= math.sqrt(v1*v1+2*cp*10*10*10*(T1-T2))\n", - "V2= R*(273.15+T2)/(M*p2*100)\n", - "A2= m2*V2*10*10*10*10/v2\n", - "##RESULTS\n", - "print'%s %.1f %s'%('inlet area =',A,'cm^2')\n", - "print'%s %.2f %s'%('inlet area =',A2,'cm^2')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "inlet area = 40.4 cm^2\n", - "inlet area = 1.72 cm^2\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg 89" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate quantity x and specific volume\n", - "##initialisation of variables\n", - "h= 2676.2 ##kJ/kg\n", - "hf= 721.11 ##kJ/kg\n", - "hg= 2679.1 ##kJ/kg\n", - "vf= 0.001115 ##m^3/kg\n", - "vg= 0.2404 ##m^3/kg\n", - "##CALCULATIONS\n", - "x= (h-hf)/(hg-hf)\n", - "v1= vf+x*(vg-vf)\n", - "##RESULTS\n", - "print'%s %.4f %s'%('quantity =',x,'')\n", - "print'%s %.4f %s'%('specific volume = ',v1,'m^3/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "quantity = 0.9985 \n", - "specific volume = 0.2400 m^3/kg\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg 92" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate heat pump and reate heat interaction and work of the turbine and at another point rate of heat interaction and all four areas at given poin\n", - "##initialisation of variables\n", - "h4= 419.05 ##kJ/kg\n", - "h1= 434.92 ##kJ/kg\n", - "m= 2.5 ##kg/s\n", - "h2= 3272.4 ##kJ/kg\n", - "h3= 2601.7 ##kJ/kg\n", - "v1= 0.001401 ##m^3/kg\n", - "V1= 5 ##m/s\n", - "v2= 0.03817 ##m^3/kg\n", - "V2= 20. ##m/s\n", - "v3= 0.8415 ##m^3/kg\n", - "V3= 100. ##m/s\n", - "v4= 0.00104 ##m^3/kg\n", - "V4= 5 ##m/s\n", - "##CALCULATIONS\n", - "W41= m*(h4-h1)\n", - "Q12= m*(h2-h1)\n", - "W23= m*(h2-h3)\n", - "Q34= m*(h4-h3)\n", - "A1= m*v1*10*10*10*10/V1\n", - "A2= m*v2*10*1010*10/V2\n", - "A3= m*v3*10*1010*10/V3\n", - "A4= m*v4*10*1010*10/V4\n", - "##RESULTS\n", - "print'%s %.1f %s'%('rate of pump =',W41,'kW')\n", - "print'%s %.f %s'%('rate of heat ineraction =',Q12,'kW')\n", - "print'%s %.1f %s'%('rate of work of the turbine =',W23,'W')\n", - "print'%s %.f %s'%('rate of heat ineraction =',Q34,'kW')\n", - "print'%s %.2f %s'%('area =',A1,'cm^2')\n", - "print'%s %.2f %s'%('area =',A2,'cm^2')\n", - "print'%s %.2f %s'%('area =',A3,'cm^2')\n", - "print'%s %.2f %s'%('area =',A4,'cm^2')\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rate of pump = -39.7 kW\n", - "rate of heat ineraction = 7094 kW\n", - "rate of work of the turbine = 1676.8 W\n", - "rate of heat ineraction = -5457 kW\n", - "area = 7.00 cm^2\n", - "area = 481.90 cm^2\n", - "area = 2124.79 cm^2\n", - "area = 52.52 cm^2\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg 96" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate mass of helium and temperature of helium\n", - "##initialisation of variables\n", - "m1= 0.03 ##kg\n", - "R= 8.314 ##J/mol K\n", - "T1= 300. ##C\n", - "p1= 120. ##kPa\n", - "k= 5./3.\n", - "M=4. ##kg\n", - "p2= 600. ##kPa\n", - "##CALCULATIONS\n", - "V= m1*R*(273.15+T1)/(p1*M)\n", - "m2= m1*((p2/p1)+k-1)/k\n", - "T2= p2*V*M/(m2*R)\n", - "##RESULTS\n", - "print'%s %.3f %s'%('mass of helium =',m2,'kg')\n", - "print'%s %.1f %s'%('temperature of helium =',T2,'K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "mass of helium = 0.102 kg\n", - "temperature of helium = 842.9 K\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Eaxmple 6-pg97" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate volume of container and pressure\n", - "##initialisation of variables\n", - "m1= 0.03 ##kg\n", - "v1= 2.1977 ##m^3/kg\n", - "h2= 3073.8 ##kJ/kg\n", - "h1= 3061.6 ##kJ/kg\n", - "p2= 600. ##kPa\n", - "p1= 120. ##kPa\n", - "##CALCULATIONS\n", - "V=m1*v1\n", - "r= ((h2-h1)/v1)+p2-p1\n", - "##RESULTS\n", - "print'%s %.5f %s'%('volume of container =',V,'m^3')\n", - "print'%s %.2f %s'%('pressure =',r,'kPa')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume of container = 0.06593 m^3\n", - "pressure = 485.55 kPa\n" - ] - } - ], - "prompt_number": 8 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter6_1.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter6_1.ipynb deleted file mode 100755 index 4db4d31d..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter6_1.ipynb +++ /dev/null @@ -1,308 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:de09a4c2813282719223c840622b4f97d21f59c5103e9a20c830f4005781fd9e" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter6 -Control volume" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg 83" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate diameter for given variable\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "M= 29 ##gms\n", - "T= 80 ##C\n", - "p= 104 ##/kPa\n", - "v= 30 ##m/sec\n", - "m= 8000 ##kg/h\n", - "##CALCULATIONS\n", - "V= R*(273.15+T)/(M*p)\n", - "A= m*V/(3600*v)\n", - "D=math.sqrt(4*A/math.pi)\n", - "##RESULTS\n", - "print'%s %.5f %s'%('diameter = ',D,'m^2')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "diameter = 0.30301 m^2\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg 88" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate intial areas\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "M= 29. ##gms\n", - "T1= 230. ##C\n", - "p1= 30. ##/bar\n", - "k= 1.4\n", - "T2= 180. ##C\n", - "v1= 10. ##m/s\n", - "p2= 20. ##bar\n", - "m2= 0.84 ##kg/s\n", - "##CALCULATIONS\n", - "V1= R*(273.15+T1)/(M*p1*100)\n", - "cp= k*R/((k-1)*M)\n", - "A= m2*V1*10*10*10*10/v1\n", - "v2= math.sqrt(v1*v1+2*cp*10*10*10*(T1-T2))\n", - "V2= R*(273.15+T2)/(M*p2*100)\n", - "A2= m2*V2*10*10*10*10/v2\n", - "##RESULTS\n", - "print'%s %.1f %s'%('inlet area =',A,'cm^2')\n", - "print'%s %.2f %s'%('inlet area =',A2,'cm^2')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "inlet area = 40.4 cm^2\n", - "inlet area = 1.72 cm^2\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg 89" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate quantity x and specific volume\n", - "##initialisation of variables\n", - "h= 2676.2 ##kJ/kg\n", - "hf= 721.11 ##kJ/kg\n", - "hg= 2679.1 ##kJ/kg\n", - "vf= 0.001115 ##m^3/kg\n", - "vg= 0.2404 ##m^3/kg\n", - "##CALCULATIONS\n", - "x= (h-hf)/(hg-hf)\n", - "v1= vf+x*(vg-vf)\n", - "##RESULTS\n", - "print'%s %.4f %s'%('quantity =',x,'')\n", - "print'%s %.4f %s'%('specific volume = ',v1,'m^3/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "quantity = 0.9985 \n", - "specific volume = 0.2400 m^3/kg\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg 92" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate heat pump and reate heat interaction and work of the turbine and at another point rate of heat interaction and all four areas at given poin\n", - "##initialisation of variables\n", - "h4= 419.05 ##kJ/kg\n", - "h1= 434.92 ##kJ/kg\n", - "m= 2.5 ##kg/s\n", - "h2= 3272.4 ##kJ/kg\n", - "h3= 2601.7 ##kJ/kg\n", - "v1= 0.001401 ##m^3/kg\n", - "V1= 5 ##m/s\n", - "v2= 0.03817 ##m^3/kg\n", - "V2= 20. ##m/s\n", - "v3= 0.8415 ##m^3/kg\n", - "V3= 100. ##m/s\n", - "v4= 0.00104 ##m^3/kg\n", - "V4= 5 ##m/s\n", - "##CALCULATIONS\n", - "W41= m*(h4-h1)\n", - "Q12= m*(h2-h1)\n", - "W23= m*(h2-h3)\n", - "Q34= m*(h4-h3)\n", - "A1= m*v1*10*10*10*10/V1\n", - "A2= m*v2*10*1010*10/V2\n", - "A3= m*v3*10*1010*10/V3\n", - "A4= m*v4*10*1010*10/V4\n", - "##RESULTS\n", - "print'%s %.1f %s'%('rate of pump =',W41,'kW')\n", - "print'%s %.f %s'%('rate of heat ineraction =',Q12,'kW')\n", - "print'%s %.1f %s'%('rate of work of the turbine =',W23,'W')\n", - "print'%s %.f %s'%('rate of heat ineraction =',Q34,'kW')\n", - "print'%s %.2f %s'%('area =',A1,'cm^2')\n", - "print'%s %.2f %s'%('area =',A2,'cm^2')\n", - "print'%s %.2f %s'%('area =',A3,'cm^2')\n", - "print'%s %.2f %s'%('area =',A4,'cm^2')\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rate of pump = -39.7 kW\n", - "rate of heat ineraction = 7094 kW\n", - "rate of work of the turbine = 1676.8 W\n", - "rate of heat ineraction = -5457 kW\n", - "area = 7.00 cm^2\n", - "area = 481.90 cm^2\n", - "area = 2124.79 cm^2\n", - "area = 52.52 cm^2\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg 96" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate mass of helium and temperature of helium\n", - "##initialisation of variables\n", - "m1= 0.03 ##kg\n", - "R= 8.314 ##J/mol K\n", - "T1= 300. ##C\n", - "p1= 120. ##kPa\n", - "k= 5./3.\n", - "M=4. ##kg\n", - "p2= 600. ##kPa\n", - "##CALCULATIONS\n", - "V= m1*R*(273.15+T1)/(p1*M)\n", - "m2= m1*((p2/p1)+k-1)/k\n", - "T2= p2*V*M/(m2*R)\n", - "##RESULTS\n", - "print'%s %.3f %s'%('mass of helium =',m2,'kg')\n", - "print'%s %.1f %s'%('temperature of helium =',T2,'K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "mass of helium = 0.102 kg\n", - "temperature of helium = 842.9 K\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Eaxmple 6-pg97" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate volume of container and pressure\n", - "##initialisation of variables\n", - "m1= 0.03 ##kg\n", - "v1= 2.1977 ##m^3/kg\n", - "h2= 3073.8 ##kJ/kg\n", - "h1= 3061.6 ##kJ/kg\n", - "p2= 600. ##kPa\n", - "p1= 120. ##kPa\n", - "##CALCULATIONS\n", - "V=m1*v1\n", - "r= ((h2-h1)/v1)+p2-p1\n", - "##RESULTS\n", - "print'%s %.5f %s'%('volume of container =',V,'m^3')\n", - "print'%s %.2f %s'%('pressure =',r,'kPa')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume of container = 0.06593 m^3\n", - "pressure = 485.55 kPa\n" - ] - } - ], - "prompt_number": 8 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter6_2.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter6_2.ipynb deleted file mode 100755 index 4db4d31d..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter6_2.ipynb +++ /dev/null @@ -1,308 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:de09a4c2813282719223c840622b4f97d21f59c5103e9a20c830f4005781fd9e" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter6 -Control volume" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg 83" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate diameter for given variable\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "M= 29 ##gms\n", - "T= 80 ##C\n", - "p= 104 ##/kPa\n", - "v= 30 ##m/sec\n", - "m= 8000 ##kg/h\n", - "##CALCULATIONS\n", - "V= R*(273.15+T)/(M*p)\n", - "A= m*V/(3600*v)\n", - "D=math.sqrt(4*A/math.pi)\n", - "##RESULTS\n", - "print'%s %.5f %s'%('diameter = ',D,'m^2')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "diameter = 0.30301 m^2\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg 88" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate intial areas\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "M= 29. ##gms\n", - "T1= 230. ##C\n", - "p1= 30. ##/bar\n", - "k= 1.4\n", - "T2= 180. ##C\n", - "v1= 10. ##m/s\n", - "p2= 20. ##bar\n", - "m2= 0.84 ##kg/s\n", - "##CALCULATIONS\n", - "V1= R*(273.15+T1)/(M*p1*100)\n", - "cp= k*R/((k-1)*M)\n", - "A= m2*V1*10*10*10*10/v1\n", - "v2= math.sqrt(v1*v1+2*cp*10*10*10*(T1-T2))\n", - "V2= R*(273.15+T2)/(M*p2*100)\n", - "A2= m2*V2*10*10*10*10/v2\n", - "##RESULTS\n", - "print'%s %.1f %s'%('inlet area =',A,'cm^2')\n", - "print'%s %.2f %s'%('inlet area =',A2,'cm^2')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "inlet area = 40.4 cm^2\n", - "inlet area = 1.72 cm^2\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg 89" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate quantity x and specific volume\n", - "##initialisation of variables\n", - "h= 2676.2 ##kJ/kg\n", - "hf= 721.11 ##kJ/kg\n", - "hg= 2679.1 ##kJ/kg\n", - "vf= 0.001115 ##m^3/kg\n", - "vg= 0.2404 ##m^3/kg\n", - "##CALCULATIONS\n", - "x= (h-hf)/(hg-hf)\n", - "v1= vf+x*(vg-vf)\n", - "##RESULTS\n", - "print'%s %.4f %s'%('quantity =',x,'')\n", - "print'%s %.4f %s'%('specific volume = ',v1,'m^3/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "quantity = 0.9985 \n", - "specific volume = 0.2400 m^3/kg\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg 92" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate heat pump and reate heat interaction and work of the turbine and at another point rate of heat interaction and all four areas at given poin\n", - "##initialisation of variables\n", - "h4= 419.05 ##kJ/kg\n", - "h1= 434.92 ##kJ/kg\n", - "m= 2.5 ##kg/s\n", - "h2= 3272.4 ##kJ/kg\n", - "h3= 2601.7 ##kJ/kg\n", - "v1= 0.001401 ##m^3/kg\n", - "V1= 5 ##m/s\n", - "v2= 0.03817 ##m^3/kg\n", - "V2= 20. ##m/s\n", - "v3= 0.8415 ##m^3/kg\n", - "V3= 100. ##m/s\n", - "v4= 0.00104 ##m^3/kg\n", - "V4= 5 ##m/s\n", - "##CALCULATIONS\n", - "W41= m*(h4-h1)\n", - "Q12= m*(h2-h1)\n", - "W23= m*(h2-h3)\n", - "Q34= m*(h4-h3)\n", - "A1= m*v1*10*10*10*10/V1\n", - "A2= m*v2*10*1010*10/V2\n", - "A3= m*v3*10*1010*10/V3\n", - "A4= m*v4*10*1010*10/V4\n", - "##RESULTS\n", - "print'%s %.1f %s'%('rate of pump =',W41,'kW')\n", - "print'%s %.f %s'%('rate of heat ineraction =',Q12,'kW')\n", - "print'%s %.1f %s'%('rate of work of the turbine =',W23,'W')\n", - "print'%s %.f %s'%('rate of heat ineraction =',Q34,'kW')\n", - "print'%s %.2f %s'%('area =',A1,'cm^2')\n", - "print'%s %.2f %s'%('area =',A2,'cm^2')\n", - "print'%s %.2f %s'%('area =',A3,'cm^2')\n", - "print'%s %.2f %s'%('area =',A4,'cm^2')\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rate of pump = -39.7 kW\n", - "rate of heat ineraction = 7094 kW\n", - "rate of work of the turbine = 1676.8 W\n", - "rate of heat ineraction = -5457 kW\n", - "area = 7.00 cm^2\n", - "area = 481.90 cm^2\n", - "area = 2124.79 cm^2\n", - "area = 52.52 cm^2\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg 96" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate mass of helium and temperature of helium\n", - "##initialisation of variables\n", - "m1= 0.03 ##kg\n", - "R= 8.314 ##J/mol K\n", - "T1= 300. ##C\n", - "p1= 120. ##kPa\n", - "k= 5./3.\n", - "M=4. ##kg\n", - "p2= 600. ##kPa\n", - "##CALCULATIONS\n", - "V= m1*R*(273.15+T1)/(p1*M)\n", - "m2= m1*((p2/p1)+k-1)/k\n", - "T2= p2*V*M/(m2*R)\n", - "##RESULTS\n", - "print'%s %.3f %s'%('mass of helium =',m2,'kg')\n", - "print'%s %.1f %s'%('temperature of helium =',T2,'K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "mass of helium = 0.102 kg\n", - "temperature of helium = 842.9 K\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Eaxmple 6-pg97" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate volume of container and pressure\n", - "##initialisation of variables\n", - "m1= 0.03 ##kg\n", - "v1= 2.1977 ##m^3/kg\n", - "h2= 3073.8 ##kJ/kg\n", - "h1= 3061.6 ##kJ/kg\n", - "p2= 600. ##kPa\n", - "p1= 120. ##kPa\n", - "##CALCULATIONS\n", - "V=m1*v1\n", - "r= ((h2-h1)/v1)+p2-p1\n", - "##RESULTS\n", - "print'%s %.5f %s'%('volume of container =',V,'m^3')\n", - "print'%s %.2f %s'%('pressure =',r,'kPa')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume of container = 0.06593 m^3\n", - "pressure = 485.55 kPa\n" - ] - } - ], - "prompt_number": 8 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter7-Heat_engines_and_the_second_law_of_thermodynamics.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter7-Heat_engines_and_the_second_law_of_thermodynamics.ipynb deleted file mode 100755 index eb4c5f7b..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter7-Heat_engines_and_the_second_law_of_thermodynamics.ipynb +++ /dev/null @@ -1,123 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:d5b975c50e55ebe3a2b199f890473e0371318b3f156613b06dbc3a02621943c9" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter7-Heat engines and the second law of thermodynamics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1 pg- 112" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate heat and efficency\n", - "##initialisation of variables\n", - "m= 0.35 ##kg\n", - "u2= 211.785 ##kJ/kg\n", - "u1= 182.267 ##kJ/kg\n", - "p2= 300. ##kPa\n", - "v3= 0.085566 ##kJ/kg\n", - "v2= 0.076218 ##kJ/kg\n", - "h3= 260.391 ##kJ/kg\n", - "h2= 234.650 ##kJ/kg\n", - "u4= 199.460 ##kJ/kg\n", - "u3= 234.721 ##kJ/kg\n", - "p4= 250.##kPa\n", - "v1= 0.076218 ##kJ/kg\n", - "v4= 0.085566 ##kJ/kg\n", - "h1= 201.322 ##kJ/kg\n", - "h4= 220.851 ##kJ/kg\n", - "##CALCULATIONS\n", - "Q12= m*(u2-u1)\n", - "W23= m*p2*(v3-v2)\n", - "Q23= m*(h3-h2)\n", - "W34= 0\n", - "Q34= m*(u4-u3)\n", - "W41= m*p4*(v1-v4)\n", - "Q41= m*(h1-h4)\n", - "dW= W23+W41\n", - "dQ= Q12+Q23+Q34+Q41\n", - "Qh= Q12+Q23\n", - "n= dW*100/Qh\n", - "##RESULTS\n", - "print'%s %.2f %s'%('heat = ',Qh,'kj')\n", - "print'%s %.2f %s'%('efficiency =',n, 'percent')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "heat = 19.34 kj\n", - "efficiency = 0.85 percent\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4 pg-123" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate effiecncy of heat engine and efficency\n", - "##initialisation of variables\n", - "Qc= 9 ##kW\n", - "W= 7.5 ##kW\n", - "Qh= Qc+W\n", - "Tc= 50 ##C\n", - "Th= 400 ##C\n", - "##CALCULATIONS\n", - "n= W/Qh\n", - "nrev= 1-((273.15+Tc)/(273.15+Th))\n", - "##RESULTS\n", - "print'%s %.3f %s'% ('efficiency of heat engine = ',n,'')\n", - "print'%s %.3f %s'%('efficiency =',nrev,'')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "efficiency of heat engine = 0.455 \n", - "efficiency = 0.520 \n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter7.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter7.ipynb deleted file mode 100755 index eb4c5f7b..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter7.ipynb +++ /dev/null @@ -1,123 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:d5b975c50e55ebe3a2b199f890473e0371318b3f156613b06dbc3a02621943c9" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter7-Heat engines and the second law of thermodynamics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1 pg- 112" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate heat and efficency\n", - "##initialisation of variables\n", - "m= 0.35 ##kg\n", - "u2= 211.785 ##kJ/kg\n", - "u1= 182.267 ##kJ/kg\n", - "p2= 300. ##kPa\n", - "v3= 0.085566 ##kJ/kg\n", - "v2= 0.076218 ##kJ/kg\n", - "h3= 260.391 ##kJ/kg\n", - "h2= 234.650 ##kJ/kg\n", - "u4= 199.460 ##kJ/kg\n", - "u3= 234.721 ##kJ/kg\n", - "p4= 250.##kPa\n", - "v1= 0.076218 ##kJ/kg\n", - "v4= 0.085566 ##kJ/kg\n", - "h1= 201.322 ##kJ/kg\n", - "h4= 220.851 ##kJ/kg\n", - "##CALCULATIONS\n", - "Q12= m*(u2-u1)\n", - "W23= m*p2*(v3-v2)\n", - "Q23= m*(h3-h2)\n", - "W34= 0\n", - "Q34= m*(u4-u3)\n", - "W41= m*p4*(v1-v4)\n", - "Q41= m*(h1-h4)\n", - "dW= W23+W41\n", - "dQ= Q12+Q23+Q34+Q41\n", - "Qh= Q12+Q23\n", - "n= dW*100/Qh\n", - "##RESULTS\n", - "print'%s %.2f %s'%('heat = ',Qh,'kj')\n", - "print'%s %.2f %s'%('efficiency =',n, 'percent')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "heat = 19.34 kj\n", - "efficiency = 0.85 percent\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4 pg-123" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate effiecncy of heat engine and efficency\n", - "##initialisation of variables\n", - "Qc= 9 ##kW\n", - "W= 7.5 ##kW\n", - "Qh= Qc+W\n", - "Tc= 50 ##C\n", - "Th= 400 ##C\n", - "##CALCULATIONS\n", - "n= W/Qh\n", - "nrev= 1-((273.15+Tc)/(273.15+Th))\n", - "##RESULTS\n", - "print'%s %.3f %s'% ('efficiency of heat engine = ',n,'')\n", - "print'%s %.3f %s'%('efficiency =',nrev,'')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "efficiency of heat engine = 0.455 \n", - "efficiency = 0.520 \n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter7_1.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter7_1.ipynb deleted file mode 100755 index eb4c5f7b..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter7_1.ipynb +++ /dev/null @@ -1,123 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:d5b975c50e55ebe3a2b199f890473e0371318b3f156613b06dbc3a02621943c9" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter7-Heat engines and the second law of thermodynamics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1 pg- 112" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate heat and efficency\n", - "##initialisation of variables\n", - "m= 0.35 ##kg\n", - "u2= 211.785 ##kJ/kg\n", - "u1= 182.267 ##kJ/kg\n", - "p2= 300. ##kPa\n", - "v3= 0.085566 ##kJ/kg\n", - "v2= 0.076218 ##kJ/kg\n", - "h3= 260.391 ##kJ/kg\n", - "h2= 234.650 ##kJ/kg\n", - "u4= 199.460 ##kJ/kg\n", - "u3= 234.721 ##kJ/kg\n", - "p4= 250.##kPa\n", - "v1= 0.076218 ##kJ/kg\n", - "v4= 0.085566 ##kJ/kg\n", - "h1= 201.322 ##kJ/kg\n", - "h4= 220.851 ##kJ/kg\n", - "##CALCULATIONS\n", - "Q12= m*(u2-u1)\n", - "W23= m*p2*(v3-v2)\n", - "Q23= m*(h3-h2)\n", - "W34= 0\n", - "Q34= m*(u4-u3)\n", - "W41= m*p4*(v1-v4)\n", - "Q41= m*(h1-h4)\n", - "dW= W23+W41\n", - "dQ= Q12+Q23+Q34+Q41\n", - "Qh= Q12+Q23\n", - "n= dW*100/Qh\n", - "##RESULTS\n", - "print'%s %.2f %s'%('heat = ',Qh,'kj')\n", - "print'%s %.2f %s'%('efficiency =',n, 'percent')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "heat = 19.34 kj\n", - "efficiency = 0.85 percent\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4 pg-123" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate effiecncy of heat engine and efficency\n", - "##initialisation of variables\n", - "Qc= 9 ##kW\n", - "W= 7.5 ##kW\n", - "Qh= Qc+W\n", - "Tc= 50 ##C\n", - "Th= 400 ##C\n", - "##CALCULATIONS\n", - "n= W/Qh\n", - "nrev= 1-((273.15+Tc)/(273.15+Th))\n", - "##RESULTS\n", - "print'%s %.3f %s'% ('efficiency of heat engine = ',n,'')\n", - "print'%s %.3f %s'%('efficiency =',nrev,'')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "efficiency of heat engine = 0.455 \n", - "efficiency = 0.520 \n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter7_2.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter7_2.ipynb deleted file mode 100755 index eb4c5f7b..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter7_2.ipynb +++ /dev/null @@ -1,123 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:d5b975c50e55ebe3a2b199f890473e0371318b3f156613b06dbc3a02621943c9" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter7-Heat engines and the second law of thermodynamics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1 pg- 112" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate heat and efficency\n", - "##initialisation of variables\n", - "m= 0.35 ##kg\n", - "u2= 211.785 ##kJ/kg\n", - "u1= 182.267 ##kJ/kg\n", - "p2= 300. ##kPa\n", - "v3= 0.085566 ##kJ/kg\n", - "v2= 0.076218 ##kJ/kg\n", - "h3= 260.391 ##kJ/kg\n", - "h2= 234.650 ##kJ/kg\n", - "u4= 199.460 ##kJ/kg\n", - "u3= 234.721 ##kJ/kg\n", - "p4= 250.##kPa\n", - "v1= 0.076218 ##kJ/kg\n", - "v4= 0.085566 ##kJ/kg\n", - "h1= 201.322 ##kJ/kg\n", - "h4= 220.851 ##kJ/kg\n", - "##CALCULATIONS\n", - "Q12= m*(u2-u1)\n", - "W23= m*p2*(v3-v2)\n", - "Q23= m*(h3-h2)\n", - "W34= 0\n", - "Q34= m*(u4-u3)\n", - "W41= m*p4*(v1-v4)\n", - "Q41= m*(h1-h4)\n", - "dW= W23+W41\n", - "dQ= Q12+Q23+Q34+Q41\n", - "Qh= Q12+Q23\n", - "n= dW*100/Qh\n", - "##RESULTS\n", - "print'%s %.2f %s'%('heat = ',Qh,'kj')\n", - "print'%s %.2f %s'%('efficiency =',n, 'percent')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "heat = 19.34 kj\n", - "efficiency = 0.85 percent\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4 pg-123" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate effiecncy of heat engine and efficency\n", - "##initialisation of variables\n", - "Qc= 9 ##kW\n", - "W= 7.5 ##kW\n", - "Qh= Qc+W\n", - "Tc= 50 ##C\n", - "Th= 400 ##C\n", - "##CALCULATIONS\n", - "n= W/Qh\n", - "nrev= 1-((273.15+Tc)/(273.15+Th))\n", - "##RESULTS\n", - "print'%s %.3f %s'% ('efficiency of heat engine = ',n,'')\n", - "print'%s %.3f %s'%('efficiency =',nrev,'')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "efficiency of heat engine = 0.455 \n", - "efficiency = 0.520 \n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter8-Entropy.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter8-Entropy.ipynb deleted file mode 100755 index c1d76b67..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter8-Entropy.ipynb +++ /dev/null @@ -1,309 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:8780f29f2ca7dbbe28306b63f91de121a8fdfb0cc3c24c326256cd5a0309b1ed" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter8-Entropy" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1 pg- 131" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate and entropy of ice and environment and universe\n", - "##initialisation of variables\n", - "m= 2 ##kg\n", - "dh= 333.39 ##kg/h\n", - "T= 0 ##C\n", - "T1= 20 ##C\n", - "##CALCULATIONS\n", - "Q12= m*dh\n", - "dS= Q12/(273.15+T)\n", - "dSenvir= -Q12/(273.15+T1)\n", - "dStotal= dS+dSenvir\n", - "##RESULTS\n", - "print'%s %.3f %s'%(' entropy of ice =',dS,'kJ/K')\n", - "print'%s %.3f %s'%('entropy of environment =',dSenvir,'kJ/K')\n", - "print'%s %.3f %s'%('entropy of universe =',dStotal,'kJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " entropy of ice = 2.441 kJ/K\n", - "entropy of environment = -2.275 kJ/K\n", - "entropy of universe = 0.167 kJ/K\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg132" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate change in entropy in system and environment and entropy\n", - "##initialisation of variables\n", - "Q= 666.78 ##kJ\n", - "T= 0 ##C\n", - "Th= 20. ##C\n", - "##CALCULATIONS\n", - "Ssys= Q/(273.15+T)\n", - "Qh= Q*((273.15+Th)/(273.15+T))\n", - "Senvir= -Qh/(273.15+Th)\n", - "Stotal= Ssys+Senvir\n", - "##RESULTS\n", - "print'%s %.4f %s'%('change in entropy in sysytem =',Ssys,' kJ/K')\n", - "print'%s %.4f %s'%('change in entropy in environment =',Senvir,'kJ/K')\n", - "print'%s %.f %s'%('total change in entropy =',Stotal,'kJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "change in entropy in sysytem = 2.4411 kJ/K\n", - "change in entropy in environment = -2.4411 kJ/K\n", - "total change in entropy = 0 kJ/K\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg134\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate change in entropy\n", - "##initialisation of variables\n", - "S1= 6.2872 ##J/kg K\n", - "S2= 5.8712 ##J/kg K\n", - "m= 18 ##kg\n", - "##CALCULATIONS\n", - "S= m*(S1-S2)\n", - "##RESULTS\n", - "print'%s %.3f %s'%(' change in entropy =',S,'kJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " change in entropy = 7.488 kJ/K\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg 134" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate change in entropy\n", - "##initialisation of variables\n", - "S2= 5.8328 ##kJ/kg\n", - "S1= 5.8712 ##kJ/kg\n", - "##CALCULATIONS\n", - "S= S2-S1\n", - "##RESULTS\n", - "print'%s %.5f %s'%('change in entropy = ',S,'kJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "change in entropy = -0.03840 kJ/K\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg135" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpy and change in entropy\n", - "##initialisation of variables\n", - "m= 0.1 ##kg\n", - "p= 3 ##bar\n", - "p1= 10 ##bar\n", - "h1= 2964.3 ##kJ/kg\n", - "v1=0.2378\n", - "s2= 7.1619 ##kJ/k\n", - "s1= 6.9641 ##kJ/k\n", - "##CALCULATIONS\n", - "h2= h1+(p-p1)*math.pow(10,5)*v1*math.pow(10,-3)\n", - "S= m*(s2-s1)\n", - "##RESULTS\n", - "print'%s %.1f %s'%(' enthalpy =',h2,'kJ/kg')\n", - "print'%s %.5f %s'%('change in entropy =',S,'kJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " enthalpy = 2797.8 kJ/kg\n", - "change in entropy = 0.01978 kJ/K\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg 137" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate final pressure and change in entropy\n", - "import math\n", - "##initialisation of variables\n", - "p1= 5. ##bar\n", - "V1= 0.4 ##m^2\n", - "V2= 1.2 ##m^3\n", - "R= 8.314 ##J/mol K\n", - "M= 28.##gms\n", - "T1= 80.##C\n", - "##CALCULATIONS\n", - "p2= p1*(V1/V2)\n", - "S= R*math.log(V2/V1)/M\n", - "S1= S*p1*V1*100/((R/M)*(273.15+T1))\n", - "##RESULTS\n", - "print'%s %.3f %s'%(' final pressure =',p2,'bar')\n", - "print'%s %.4f %s'% ('change in entropy =',S1,'kJ/kg K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " final pressure = 1.667 bar\n", - "change in entropy = 0.6222 kJ/kg K\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg 137" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate heat and change in entropy of system and change in entropy of enironment\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "M= 29. ##gms\n", - "T= 400. ##K\n", - "p2= 1.6 ##bar\n", - "p1= 1. ##bar\n", - "Tenvir= 300. ##K\n", - "##CALCULATIONS\n", - "q= R*T*math.log(p2/p1)/M\n", - "S= -R*math.log(p2/p1)/M\n", - "Senvir= q/Tenvir\n", - "##RESULTS\n", - "print'%s %.1f %s'%('heat =',q,'kJ/kg')\n", - "print'%s %.4f %s'%('change in entropy of system=',S,'kJ/kg K')\n", - "print'%s %.4f %s'%('change in entropy of environment=',Senvir,'kJ/kg K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "heat = 53.9 kJ/kg\n", - "change in entropy of system= -0.1347 kJ/kg K\n", - "change in entropy of environment= 0.1797 kJ/kg K\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter8.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter8.ipynb deleted file mode 100755 index c1d76b67..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter8.ipynb +++ /dev/null @@ -1,309 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:8780f29f2ca7dbbe28306b63f91de121a8fdfb0cc3c24c326256cd5a0309b1ed" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter8-Entropy" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1 pg- 131" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate and entropy of ice and environment and universe\n", - "##initialisation of variables\n", - "m= 2 ##kg\n", - "dh= 333.39 ##kg/h\n", - "T= 0 ##C\n", - "T1= 20 ##C\n", - "##CALCULATIONS\n", - "Q12= m*dh\n", - "dS= Q12/(273.15+T)\n", - "dSenvir= -Q12/(273.15+T1)\n", - "dStotal= dS+dSenvir\n", - "##RESULTS\n", - "print'%s %.3f %s'%(' entropy of ice =',dS,'kJ/K')\n", - "print'%s %.3f %s'%('entropy of environment =',dSenvir,'kJ/K')\n", - "print'%s %.3f %s'%('entropy of universe =',dStotal,'kJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " entropy of ice = 2.441 kJ/K\n", - "entropy of environment = -2.275 kJ/K\n", - "entropy of universe = 0.167 kJ/K\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg132" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate change in entropy in system and environment and entropy\n", - "##initialisation of variables\n", - "Q= 666.78 ##kJ\n", - "T= 0 ##C\n", - "Th= 20. ##C\n", - "##CALCULATIONS\n", - "Ssys= Q/(273.15+T)\n", - "Qh= Q*((273.15+Th)/(273.15+T))\n", - "Senvir= -Qh/(273.15+Th)\n", - "Stotal= Ssys+Senvir\n", - "##RESULTS\n", - "print'%s %.4f %s'%('change in entropy in sysytem =',Ssys,' kJ/K')\n", - "print'%s %.4f %s'%('change in entropy in environment =',Senvir,'kJ/K')\n", - "print'%s %.f %s'%('total change in entropy =',Stotal,'kJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "change in entropy in sysytem = 2.4411 kJ/K\n", - "change in entropy in environment = -2.4411 kJ/K\n", - "total change in entropy = 0 kJ/K\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg134\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate change in entropy\n", - "##initialisation of variables\n", - "S1= 6.2872 ##J/kg K\n", - "S2= 5.8712 ##J/kg K\n", - "m= 18 ##kg\n", - "##CALCULATIONS\n", - "S= m*(S1-S2)\n", - "##RESULTS\n", - "print'%s %.3f %s'%(' change in entropy =',S,'kJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " change in entropy = 7.488 kJ/K\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg 134" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate change in entropy\n", - "##initialisation of variables\n", - "S2= 5.8328 ##kJ/kg\n", - "S1= 5.8712 ##kJ/kg\n", - "##CALCULATIONS\n", - "S= S2-S1\n", - "##RESULTS\n", - "print'%s %.5f %s'%('change in entropy = ',S,'kJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "change in entropy = -0.03840 kJ/K\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg135" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpy and change in entropy\n", - "##initialisation of variables\n", - "m= 0.1 ##kg\n", - "p= 3 ##bar\n", - "p1= 10 ##bar\n", - "h1= 2964.3 ##kJ/kg\n", - "v1=0.2378\n", - "s2= 7.1619 ##kJ/k\n", - "s1= 6.9641 ##kJ/k\n", - "##CALCULATIONS\n", - "h2= h1+(p-p1)*math.pow(10,5)*v1*math.pow(10,-3)\n", - "S= m*(s2-s1)\n", - "##RESULTS\n", - "print'%s %.1f %s'%(' enthalpy =',h2,'kJ/kg')\n", - "print'%s %.5f %s'%('change in entropy =',S,'kJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " enthalpy = 2797.8 kJ/kg\n", - "change in entropy = 0.01978 kJ/K\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg 137" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate final pressure and change in entropy\n", - "import math\n", - "##initialisation of variables\n", - "p1= 5. ##bar\n", - "V1= 0.4 ##m^2\n", - "V2= 1.2 ##m^3\n", - "R= 8.314 ##J/mol K\n", - "M= 28.##gms\n", - "T1= 80.##C\n", - "##CALCULATIONS\n", - "p2= p1*(V1/V2)\n", - "S= R*math.log(V2/V1)/M\n", - "S1= S*p1*V1*100/((R/M)*(273.15+T1))\n", - "##RESULTS\n", - "print'%s %.3f %s'%(' final pressure =',p2,'bar')\n", - "print'%s %.4f %s'% ('change in entropy =',S1,'kJ/kg K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " final pressure = 1.667 bar\n", - "change in entropy = 0.6222 kJ/kg K\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg 137" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate heat and change in entropy of system and change in entropy of enironment\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "M= 29. ##gms\n", - "T= 400. ##K\n", - "p2= 1.6 ##bar\n", - "p1= 1. ##bar\n", - "Tenvir= 300. ##K\n", - "##CALCULATIONS\n", - "q= R*T*math.log(p2/p1)/M\n", - "S= -R*math.log(p2/p1)/M\n", - "Senvir= q/Tenvir\n", - "##RESULTS\n", - "print'%s %.1f %s'%('heat =',q,'kJ/kg')\n", - "print'%s %.4f %s'%('change in entropy of system=',S,'kJ/kg K')\n", - "print'%s %.4f %s'%('change in entropy of environment=',Senvir,'kJ/kg K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "heat = 53.9 kJ/kg\n", - "change in entropy of system= -0.1347 kJ/kg K\n", - "change in entropy of environment= 0.1797 kJ/kg K\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter8_1.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter8_1.ipynb deleted file mode 100755 index c1d76b67..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter8_1.ipynb +++ /dev/null @@ -1,309 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:8780f29f2ca7dbbe28306b63f91de121a8fdfb0cc3c24c326256cd5a0309b1ed" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter8-Entropy" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1 pg- 131" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate and entropy of ice and environment and universe\n", - "##initialisation of variables\n", - "m= 2 ##kg\n", - "dh= 333.39 ##kg/h\n", - "T= 0 ##C\n", - "T1= 20 ##C\n", - "##CALCULATIONS\n", - "Q12= m*dh\n", - "dS= Q12/(273.15+T)\n", - "dSenvir= -Q12/(273.15+T1)\n", - "dStotal= dS+dSenvir\n", - "##RESULTS\n", - "print'%s %.3f %s'%(' entropy of ice =',dS,'kJ/K')\n", - "print'%s %.3f %s'%('entropy of environment =',dSenvir,'kJ/K')\n", - "print'%s %.3f %s'%('entropy of universe =',dStotal,'kJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " entropy of ice = 2.441 kJ/K\n", - "entropy of environment = -2.275 kJ/K\n", - "entropy of universe = 0.167 kJ/K\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg132" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate change in entropy in system and environment and entropy\n", - "##initialisation of variables\n", - "Q= 666.78 ##kJ\n", - "T= 0 ##C\n", - "Th= 20. ##C\n", - "##CALCULATIONS\n", - "Ssys= Q/(273.15+T)\n", - "Qh= Q*((273.15+Th)/(273.15+T))\n", - "Senvir= -Qh/(273.15+Th)\n", - "Stotal= Ssys+Senvir\n", - "##RESULTS\n", - "print'%s %.4f %s'%('change in entropy in sysytem =',Ssys,' kJ/K')\n", - "print'%s %.4f %s'%('change in entropy in environment =',Senvir,'kJ/K')\n", - "print'%s %.f %s'%('total change in entropy =',Stotal,'kJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "change in entropy in sysytem = 2.4411 kJ/K\n", - "change in entropy in environment = -2.4411 kJ/K\n", - "total change in entropy = 0 kJ/K\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg134\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate change in entropy\n", - "##initialisation of variables\n", - "S1= 6.2872 ##J/kg K\n", - "S2= 5.8712 ##J/kg K\n", - "m= 18 ##kg\n", - "##CALCULATIONS\n", - "S= m*(S1-S2)\n", - "##RESULTS\n", - "print'%s %.3f %s'%(' change in entropy =',S,'kJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " change in entropy = 7.488 kJ/K\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg 134" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate change in entropy\n", - "##initialisation of variables\n", - "S2= 5.8328 ##kJ/kg\n", - "S1= 5.8712 ##kJ/kg\n", - "##CALCULATIONS\n", - "S= S2-S1\n", - "##RESULTS\n", - "print'%s %.5f %s'%('change in entropy = ',S,'kJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "change in entropy = -0.03840 kJ/K\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg135" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpy and change in entropy\n", - "##initialisation of variables\n", - "m= 0.1 ##kg\n", - "p= 3 ##bar\n", - "p1= 10 ##bar\n", - "h1= 2964.3 ##kJ/kg\n", - "v1=0.2378\n", - "s2= 7.1619 ##kJ/k\n", - "s1= 6.9641 ##kJ/k\n", - "##CALCULATIONS\n", - "h2= h1+(p-p1)*math.pow(10,5)*v1*math.pow(10,-3)\n", - "S= m*(s2-s1)\n", - "##RESULTS\n", - "print'%s %.1f %s'%(' enthalpy =',h2,'kJ/kg')\n", - "print'%s %.5f %s'%('change in entropy =',S,'kJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " enthalpy = 2797.8 kJ/kg\n", - "change in entropy = 0.01978 kJ/K\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg 137" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate final pressure and change in entropy\n", - "import math\n", - "##initialisation of variables\n", - "p1= 5. ##bar\n", - "V1= 0.4 ##m^2\n", - "V2= 1.2 ##m^3\n", - "R= 8.314 ##J/mol K\n", - "M= 28.##gms\n", - "T1= 80.##C\n", - "##CALCULATIONS\n", - "p2= p1*(V1/V2)\n", - "S= R*math.log(V2/V1)/M\n", - "S1= S*p1*V1*100/((R/M)*(273.15+T1))\n", - "##RESULTS\n", - "print'%s %.3f %s'%(' final pressure =',p2,'bar')\n", - "print'%s %.4f %s'% ('change in entropy =',S1,'kJ/kg K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " final pressure = 1.667 bar\n", - "change in entropy = 0.6222 kJ/kg K\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg 137" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate heat and change in entropy of system and change in entropy of enironment\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "M= 29. ##gms\n", - "T= 400. ##K\n", - "p2= 1.6 ##bar\n", - "p1= 1. ##bar\n", - "Tenvir= 300. ##K\n", - "##CALCULATIONS\n", - "q= R*T*math.log(p2/p1)/M\n", - "S= -R*math.log(p2/p1)/M\n", - "Senvir= q/Tenvir\n", - "##RESULTS\n", - "print'%s %.1f %s'%('heat =',q,'kJ/kg')\n", - "print'%s %.4f %s'%('change in entropy of system=',S,'kJ/kg K')\n", - "print'%s %.4f %s'%('change in entropy of environment=',Senvir,'kJ/kg K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "heat = 53.9 kJ/kg\n", - "change in entropy of system= -0.1347 kJ/kg K\n", - "change in entropy of environment= 0.1797 kJ/kg K\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter8_2.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter8_2.ipynb deleted file mode 100755 index c1d76b67..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter8_2.ipynb +++ /dev/null @@ -1,309 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:8780f29f2ca7dbbe28306b63f91de121a8fdfb0cc3c24c326256cd5a0309b1ed" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter8-Entropy" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1 pg- 131" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate and entropy of ice and environment and universe\n", - "##initialisation of variables\n", - "m= 2 ##kg\n", - "dh= 333.39 ##kg/h\n", - "T= 0 ##C\n", - "T1= 20 ##C\n", - "##CALCULATIONS\n", - "Q12= m*dh\n", - "dS= Q12/(273.15+T)\n", - "dSenvir= -Q12/(273.15+T1)\n", - "dStotal= dS+dSenvir\n", - "##RESULTS\n", - "print'%s %.3f %s'%(' entropy of ice =',dS,'kJ/K')\n", - "print'%s %.3f %s'%('entropy of environment =',dSenvir,'kJ/K')\n", - "print'%s %.3f %s'%('entropy of universe =',dStotal,'kJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " entropy of ice = 2.441 kJ/K\n", - "entropy of environment = -2.275 kJ/K\n", - "entropy of universe = 0.167 kJ/K\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg132" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate change in entropy in system and environment and entropy\n", - "##initialisation of variables\n", - "Q= 666.78 ##kJ\n", - "T= 0 ##C\n", - "Th= 20. ##C\n", - "##CALCULATIONS\n", - "Ssys= Q/(273.15+T)\n", - "Qh= Q*((273.15+Th)/(273.15+T))\n", - "Senvir= -Qh/(273.15+Th)\n", - "Stotal= Ssys+Senvir\n", - "##RESULTS\n", - "print'%s %.4f %s'%('change in entropy in sysytem =',Ssys,' kJ/K')\n", - "print'%s %.4f %s'%('change in entropy in environment =',Senvir,'kJ/K')\n", - "print'%s %.f %s'%('total change in entropy =',Stotal,'kJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "change in entropy in sysytem = 2.4411 kJ/K\n", - "change in entropy in environment = -2.4411 kJ/K\n", - "total change in entropy = 0 kJ/K\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg134\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate change in entropy\n", - "##initialisation of variables\n", - "S1= 6.2872 ##J/kg K\n", - "S2= 5.8712 ##J/kg K\n", - "m= 18 ##kg\n", - "##CALCULATIONS\n", - "S= m*(S1-S2)\n", - "##RESULTS\n", - "print'%s %.3f %s'%(' change in entropy =',S,'kJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " change in entropy = 7.488 kJ/K\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg 134" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate change in entropy\n", - "##initialisation of variables\n", - "S2= 5.8328 ##kJ/kg\n", - "S1= 5.8712 ##kJ/kg\n", - "##CALCULATIONS\n", - "S= S2-S1\n", - "##RESULTS\n", - "print'%s %.5f %s'%('change in entropy = ',S,'kJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "change in entropy = -0.03840 kJ/K\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg135" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpy and change in entropy\n", - "##initialisation of variables\n", - "m= 0.1 ##kg\n", - "p= 3 ##bar\n", - "p1= 10 ##bar\n", - "h1= 2964.3 ##kJ/kg\n", - "v1=0.2378\n", - "s2= 7.1619 ##kJ/k\n", - "s1= 6.9641 ##kJ/k\n", - "##CALCULATIONS\n", - "h2= h1+(p-p1)*math.pow(10,5)*v1*math.pow(10,-3)\n", - "S= m*(s2-s1)\n", - "##RESULTS\n", - "print'%s %.1f %s'%(' enthalpy =',h2,'kJ/kg')\n", - "print'%s %.5f %s'%('change in entropy =',S,'kJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " enthalpy = 2797.8 kJ/kg\n", - "change in entropy = 0.01978 kJ/K\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg 137" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate final pressure and change in entropy\n", - "import math\n", - "##initialisation of variables\n", - "p1= 5. ##bar\n", - "V1= 0.4 ##m^2\n", - "V2= 1.2 ##m^3\n", - "R= 8.314 ##J/mol K\n", - "M= 28.##gms\n", - "T1= 80.##C\n", - "##CALCULATIONS\n", - "p2= p1*(V1/V2)\n", - "S= R*math.log(V2/V1)/M\n", - "S1= S*p1*V1*100/((R/M)*(273.15+T1))\n", - "##RESULTS\n", - "print'%s %.3f %s'%(' final pressure =',p2,'bar')\n", - "print'%s %.4f %s'% ('change in entropy =',S1,'kJ/kg K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " final pressure = 1.667 bar\n", - "change in entropy = 0.6222 kJ/kg K\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg 137" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate heat and change in entropy of system and change in entropy of enironment\n", - "##initialisation of variables\n", - "R= 8.314 ##J/mol K\n", - "M= 29. ##gms\n", - "T= 400. ##K\n", - "p2= 1.6 ##bar\n", - "p1= 1. ##bar\n", - "Tenvir= 300. ##K\n", - "##CALCULATIONS\n", - "q= R*T*math.log(p2/p1)/M\n", - "S= -R*math.log(p2/p1)/M\n", - "Senvir= q/Tenvir\n", - "##RESULTS\n", - "print'%s %.1f %s'%('heat =',q,'kJ/kg')\n", - "print'%s %.4f %s'%('change in entropy of system=',S,'kJ/kg K')\n", - "print'%s %.4f %s'%('change in entropy of environment=',Senvir,'kJ/kg K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "heat = 53.9 kJ/kg\n", - "change in entropy of system= -0.1347 kJ/kg K\n", - "change in entropy of environment= 0.1797 kJ/kg K\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter9-Applications_of_the_second_law_of_thermodynamics.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter9-Applications_of_the_second_law_of_thermodynamics.ipynb deleted file mode 100755 index f2acb74e..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter9-Applications_of_the_second_law_of_thermodynamics.ipynb +++ /dev/null @@ -1,473 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:15fd1db156f91825255a086dbc12ea12cb6caac30db6feed49ee7e31d29fef8c" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter9-Applications of the second law of thermodynamics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg 152" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate final temperatures and total entropy\n", - "##changeinitialisation of variables\n", - "p1= 3.##changeMpa\n", - "p2= 0.2 ##changeMpa\n", - "V1= 0.6 ##changem^3\n", - "V2= 1.##changem^3\n", - "M= 28. ##changegms\n", - "R= 8.314 ##changeJ/mol K\n", - "T= 400. ##changeC\n", - "T1= 150. ##changeC\n", - "k= 1.4\n", - "p3= 1.25 ##changeMpa\n", - "##changeCALCULATIONS\n", - "m1= p1*V1*10*10*10*M/(R*(273.15+T))\n", - "m2= p2*V2*10*10*10*M/(R*(273.15+T1))\n", - "p4= (p1*V1+p2*V2)/(V1+V2)\n", - "T2= (math.pow(p4/p1,k-1)/k)*(273.15+T)\n", - "m3= p3*V1*M*10*10*10/(R*T2)\n", - "dm= m1-m3\n", - "m4= m2+dm\n", - "T4= p3*10*10*10*V2/((R/M)*m4)\n", - "S= (R/M)*(m2*((k/(k-1))*math.log(T4/(273.15+T1))-math.log(p3/p2))+dm*((k/(k-1))*math.log(T4/(273.15+T))-math.log(p3/p1)))\n", - "##changeRESULTS\n", - "print'%s %.1f %s'%('final temperature =',T2,'K')\n", - "print'%s %.1f %s'%('final temperature =',T4,'K')\n", - "print'%s %.4f %s'%('Total entropy =',S,'KJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "final temperature = 338.8 K\n", - "final temperature = 1340.2 K\n", - "Total entropy = 2.5525 KJ/K\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg156" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate work of the pump\n", - "##initialisation of variables\n", - "m= 10000 ##kg/h\n", - "P= 2.5 ##Mpa\n", - "P1= 100 ##kPa\n", - "v= 0.001003 ##m^3\n", - "##CALCULATIONS\n", - "W= -m*v*(P*10*10*10-P1)/3600\n", - "##RESULTS\n", - "print'%s %.3f %s'%(' work of the pump =',W,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " work of the pump = -6.687 kW\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg 158" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##initialisation of variables\n", - "m= 4. ##kg/s\n", - "R= 8.314 ##J/mol K\n", - "M= 29. ##gms\n", - "k= 1.4\n", - "T1= 27. ##C\n", - "p2= 1800. ##kPa\n", - "p1= 105. ##kPa\n", - "n= 1.22\n", - "cp= 1.4 ##Jmol K\n", - "##CALCULATIONS\n", - "T2= (273.15+T1)*(p2/p1)**((n-1)/n)\n", - "W= m*k*(R/M)*((273.15+T1)/(k-1))*(1-(p2/p1)**((k-1)/k))\n", - "Q= -m*R*(273.15+T1)*math.log(p2/p1)/M\n", - "W1= m*(R/M)*n*((273.15+T1)/(n-1))*(1-(p2/p1)**((n-1)/n))\n", - "Q1= m*(R/M)*(n-k)*(T2-T1-273.15)/((n-1)*(k-1))\n", - "T3= (273.15+T1)*(p2/p1)**((k-1)/(2*k))\n", - "Q2= m*cp*(R/M)*(T1+273.15-T3)/(k-1)\n", - "##RESULTS\n", - "print'%s %.1f %s'%('heat removed in adiabatic compression =',W,'kW')\n", - "print'%s %.1f %s'%('heat removed in isothermal compression =',Q,'kW')\n", - "print'%s %.1f %s'%('heat removed in polytropic process =',Q1,'kW')\n", - "print'%s %.2f %s'%('heat removed in adiabatic compression in two stages =',Q2,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "heat removed in adiabatic compression = -1508.5 kW\n", - "heat removed in isothermal compression = -978.1 kW\n", - "heat removed in polytropic process = -471.2 kW\n", - "heat removed in adiabatic compression in two stages = -603.21 kW\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg 161" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpy and entropy\n", - "##initialisation of variables\n", - "h1= 3422.25 ##kJ/kg\n", - "m= 8. ##kg/s\n", - "s2= 7.3755 ##kJ/kg K\n", - "s1= 6.8803 ##kJ/kg K\n", - "e= 0.8\n", - "h2s= 2496.8 ##kJ/kg\n", - "##CALCULATIONS\n", - "h2= h1+e*(h2s-h1)\n", - "W= m*(h1-h2)\n", - "S= s2-s1\n", - "##RESULTS\n", - "print'%s %.1f %s'%('Enthalpy =',W,'kW')\n", - "print'%s %.4f %s'% ('Entropy =',S,'kJ/kg K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enthalpy = 5922.9 kW\n", - "Entropy = 0.4952 kJ/kg K\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg162" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "calculate volume flow rate into composser and volume flow rate out composser and heat and work \n", - "##initialisation of variables\n", - "m= 0.2 ##kg/s\n", - "v1= 1.0803 ##m^3/kg\n", - "T= 200 ##C\n", - "s2= 5.8041 ##kJ/kg K\n", - "s1= 7.5066 ##kJ/kg K\n", - "h1= 2328.1 ##kJ/kg\n", - "h2= 2654.4 ##kJ/kg\n", - "##CALCULATIONS\n", - "V1= m*v1\n", - "V2= 0.1*V1\n", - "Q= m*(273.15+T)*(s2-s1)\n", - "W= Q-m*(h1-h2)\n", - "##RESULTS\n", - "print'%s %.4f %s'%('volume flow rate into composser =',V1,'m^3')\n", - "print'%s %.4f %s'%('volume flow rate out of composser =',V2,'m^3')\n", - "print'%s %.1f %s'%('Heat =',Q,'kJ')\n", - "print'%s %.1f %s'%(' Work =',W,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume flow rate into composser = 0.2161 m^3\n", - "volume flow rate out of composser = 0.0216 m^3\n", - "Heat = -161.1 kJ\n", - " Work = -95.8 kJ\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg164" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate volume flow rate out and into the composser and work and heat\n", - "##initialisation of variables\n", - "m1= 0.2 ##kg/s\n", - "v1= 1.0803 ##m^3/kg\n", - "P= 200 ##kPa\n", - "T= 200 ##C\n", - "s1= 5.8041 ##kJ.kg K\n", - "s2= 7.5066 ##kJ/kg K\n", - "h1= 2870.5 ##kJ/kg\n", - "h2= 2495.9 ##kJ/kg\n", - "##CALCULATIONS\n", - "V1= m1*v1\n", - "V2= 0.1*V1\n", - "Q= m1*(273.15+T)*(s1-s2)\n", - "W= m1*((h1-h2)-(273.15+T)*(s2-s1))\n", - "##RESULTS\n", - "print'%s %.4f %s'% ('volume flow rate into composser =',V1,'m^3/s')\n", - "print'%s %.4f %s'%('volume flow rate out of composser =',V2,'m^3/s') \n", - "print'%s %.1f %s'%('Work =',W,'kW')\n", - "print'%s %.1f %s'%('Heat =',Q,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume flow rate into composser = 0.2161 m^3/s\n", - "volume flow rate out of composser = 0.0216 m^3/s\n", - "Work = -86.2 kW\n", - "Heat = -161.1 kW\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg166" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate rate of transfer\n", - "##initialisation of variables\n", - "e= 0.82\n", - "m= 5 ##kg/s\n", - "T3= 450 ##C\n", - "T1= 200 ##C\n", - "##CALCULATIONS\n", - "Q= e*m*1.0035*(T3-T1)\n", - "##RESULTS\n", - "print'%s %.1f %s'%('rate of transfer =',Q,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rate of transfer = 1028.6 kW\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example8-pg 166" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate heat at given enthalpy\n", - "##initialisation of variables\n", - "h1= 174.076 ##kJ/kg\n", - "h3= 74.527 ##kJ/kg\n", - "h4= 8.854 ##kJ/kg\n", - "m= 0.8 ##kg\n", - "e= 0.85\n", - "##CALCULATIONS\n", - "h2= h1+h3-h4\n", - "Q= m*(h2-h1-23)\n", - "Q1= e*Q\n", - "##RESULTS\n", - "print'%s %.2f %s'%('Heat =',Q,'kW')\n", - "print'%s %.2f %s'%('Heat =',Q1,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Heat = 34.14 kW\n", - "Heat = 29.02 kW\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example9-pg 167" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpy and entropy change\n", - "##initialisation of variables\n", - "W= 2000. ##kW\n", - "m= 2. ##kg/s\n", - "h1= 3023.5 ##kJ/kg\n", - "s2= 5.6106 ##kJ/kg K\n", - "s1= 6.7664 ##kJ/kg K\n", - "##CALCULATIONS\n", - "h2= h1-(W/m)\n", - "S=s2-s1\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('enthalpy =',h2,'kJ/kg')\n", - "print'%s %.4f %s'%('entropy change =',S,'kJ/kg K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "enthalpy = 2023.5 kJ/kg\n", - "entropy change = -1.1558 kJ/kg K\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example10-pg 168" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpy and entropy change\n", - "##initialisation of variables\n", - "m1= 1 ##kg\n", - "h1= 2967.6 ##kJ/kg\n", - "h2= 83.96 ##kJ/kg\n", - "m2= 10\n", - "s1= 7.5166 ##kJ/kg K\n", - "s2= 0.2966 ##kJ/kg K\n", - "s3= 1.1654 ##kJ/kg K\n", - "##CALCULATIONS\n", - "h3= (m1*h1+m2*h2)/(m1+m2)\n", - "S= -m1*s1-m2*s2+(m1+m2)*s3\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('enthalpy =',h3,'kJ/kg')\n", - "print'%s %.4f %s'%('entropy change =',S,'kJ/kg K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "enthalpy = 346.1 kJ/kg\n", - "entropy change = 2.3368 kJ/kg K\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter9.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter9.ipynb deleted file mode 100755 index f2acb74e..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter9.ipynb +++ /dev/null @@ -1,473 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:15fd1db156f91825255a086dbc12ea12cb6caac30db6feed49ee7e31d29fef8c" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter9-Applications of the second law of thermodynamics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg 152" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate final temperatures and total entropy\n", - "##changeinitialisation of variables\n", - "p1= 3.##changeMpa\n", - "p2= 0.2 ##changeMpa\n", - "V1= 0.6 ##changem^3\n", - "V2= 1.##changem^3\n", - "M= 28. ##changegms\n", - "R= 8.314 ##changeJ/mol K\n", - "T= 400. ##changeC\n", - "T1= 150. ##changeC\n", - "k= 1.4\n", - "p3= 1.25 ##changeMpa\n", - "##changeCALCULATIONS\n", - "m1= p1*V1*10*10*10*M/(R*(273.15+T))\n", - "m2= p2*V2*10*10*10*M/(R*(273.15+T1))\n", - "p4= (p1*V1+p2*V2)/(V1+V2)\n", - "T2= (math.pow(p4/p1,k-1)/k)*(273.15+T)\n", - "m3= p3*V1*M*10*10*10/(R*T2)\n", - "dm= m1-m3\n", - "m4= m2+dm\n", - "T4= p3*10*10*10*V2/((R/M)*m4)\n", - "S= (R/M)*(m2*((k/(k-1))*math.log(T4/(273.15+T1))-math.log(p3/p2))+dm*((k/(k-1))*math.log(T4/(273.15+T))-math.log(p3/p1)))\n", - "##changeRESULTS\n", - "print'%s %.1f %s'%('final temperature =',T2,'K')\n", - "print'%s %.1f %s'%('final temperature =',T4,'K')\n", - "print'%s %.4f %s'%('Total entropy =',S,'KJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "final temperature = 338.8 K\n", - "final temperature = 1340.2 K\n", - "Total entropy = 2.5525 KJ/K\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg156" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate work of the pump\n", - "##initialisation of variables\n", - "m= 10000 ##kg/h\n", - "P= 2.5 ##Mpa\n", - "P1= 100 ##kPa\n", - "v= 0.001003 ##m^3\n", - "##CALCULATIONS\n", - "W= -m*v*(P*10*10*10-P1)/3600\n", - "##RESULTS\n", - "print'%s %.3f %s'%(' work of the pump =',W,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " work of the pump = -6.687 kW\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg 158" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##initialisation of variables\n", - "m= 4. ##kg/s\n", - "R= 8.314 ##J/mol K\n", - "M= 29. ##gms\n", - "k= 1.4\n", - "T1= 27. ##C\n", - "p2= 1800. ##kPa\n", - "p1= 105. ##kPa\n", - "n= 1.22\n", - "cp= 1.4 ##Jmol K\n", - "##CALCULATIONS\n", - "T2= (273.15+T1)*(p2/p1)**((n-1)/n)\n", - "W= m*k*(R/M)*((273.15+T1)/(k-1))*(1-(p2/p1)**((k-1)/k))\n", - "Q= -m*R*(273.15+T1)*math.log(p2/p1)/M\n", - "W1= m*(R/M)*n*((273.15+T1)/(n-1))*(1-(p2/p1)**((n-1)/n))\n", - "Q1= m*(R/M)*(n-k)*(T2-T1-273.15)/((n-1)*(k-1))\n", - "T3= (273.15+T1)*(p2/p1)**((k-1)/(2*k))\n", - "Q2= m*cp*(R/M)*(T1+273.15-T3)/(k-1)\n", - "##RESULTS\n", - "print'%s %.1f %s'%('heat removed in adiabatic compression =',W,'kW')\n", - "print'%s %.1f %s'%('heat removed in isothermal compression =',Q,'kW')\n", - "print'%s %.1f %s'%('heat removed in polytropic process =',Q1,'kW')\n", - "print'%s %.2f %s'%('heat removed in adiabatic compression in two stages =',Q2,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "heat removed in adiabatic compression = -1508.5 kW\n", - "heat removed in isothermal compression = -978.1 kW\n", - "heat removed in polytropic process = -471.2 kW\n", - "heat removed in adiabatic compression in two stages = -603.21 kW\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg 161" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpy and entropy\n", - "##initialisation of variables\n", - "h1= 3422.25 ##kJ/kg\n", - "m= 8. ##kg/s\n", - "s2= 7.3755 ##kJ/kg K\n", - "s1= 6.8803 ##kJ/kg K\n", - "e= 0.8\n", - "h2s= 2496.8 ##kJ/kg\n", - "##CALCULATIONS\n", - "h2= h1+e*(h2s-h1)\n", - "W= m*(h1-h2)\n", - "S= s2-s1\n", - "##RESULTS\n", - "print'%s %.1f %s'%('Enthalpy =',W,'kW')\n", - "print'%s %.4f %s'% ('Entropy =',S,'kJ/kg K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enthalpy = 5922.9 kW\n", - "Entropy = 0.4952 kJ/kg K\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg162" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "calculate volume flow rate into composser and volume flow rate out composser and heat and work \n", - "##initialisation of variables\n", - "m= 0.2 ##kg/s\n", - "v1= 1.0803 ##m^3/kg\n", - "T= 200 ##C\n", - "s2= 5.8041 ##kJ/kg K\n", - "s1= 7.5066 ##kJ/kg K\n", - "h1= 2328.1 ##kJ/kg\n", - "h2= 2654.4 ##kJ/kg\n", - "##CALCULATIONS\n", - "V1= m*v1\n", - "V2= 0.1*V1\n", - "Q= m*(273.15+T)*(s2-s1)\n", - "W= Q-m*(h1-h2)\n", - "##RESULTS\n", - "print'%s %.4f %s'%('volume flow rate into composser =',V1,'m^3')\n", - "print'%s %.4f %s'%('volume flow rate out of composser =',V2,'m^3')\n", - "print'%s %.1f %s'%('Heat =',Q,'kJ')\n", - "print'%s %.1f %s'%(' Work =',W,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume flow rate into composser = 0.2161 m^3\n", - "volume flow rate out of composser = 0.0216 m^3\n", - "Heat = -161.1 kJ\n", - " Work = -95.8 kJ\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg164" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate volume flow rate out and into the composser and work and heat\n", - "##initialisation of variables\n", - "m1= 0.2 ##kg/s\n", - "v1= 1.0803 ##m^3/kg\n", - "P= 200 ##kPa\n", - "T= 200 ##C\n", - "s1= 5.8041 ##kJ.kg K\n", - "s2= 7.5066 ##kJ/kg K\n", - "h1= 2870.5 ##kJ/kg\n", - "h2= 2495.9 ##kJ/kg\n", - "##CALCULATIONS\n", - "V1= m1*v1\n", - "V2= 0.1*V1\n", - "Q= m1*(273.15+T)*(s1-s2)\n", - "W= m1*((h1-h2)-(273.15+T)*(s2-s1))\n", - "##RESULTS\n", - "print'%s %.4f %s'% ('volume flow rate into composser =',V1,'m^3/s')\n", - "print'%s %.4f %s'%('volume flow rate out of composser =',V2,'m^3/s') \n", - "print'%s %.1f %s'%('Work =',W,'kW')\n", - "print'%s %.1f %s'%('Heat =',Q,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume flow rate into composser = 0.2161 m^3/s\n", - "volume flow rate out of composser = 0.0216 m^3/s\n", - "Work = -86.2 kW\n", - "Heat = -161.1 kW\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg166" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate rate of transfer\n", - "##initialisation of variables\n", - "e= 0.82\n", - "m= 5 ##kg/s\n", - "T3= 450 ##C\n", - "T1= 200 ##C\n", - "##CALCULATIONS\n", - "Q= e*m*1.0035*(T3-T1)\n", - "##RESULTS\n", - "print'%s %.1f %s'%('rate of transfer =',Q,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rate of transfer = 1028.6 kW\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example8-pg 166" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate heat at given enthalpy\n", - "##initialisation of variables\n", - "h1= 174.076 ##kJ/kg\n", - "h3= 74.527 ##kJ/kg\n", - "h4= 8.854 ##kJ/kg\n", - "m= 0.8 ##kg\n", - "e= 0.85\n", - "##CALCULATIONS\n", - "h2= h1+h3-h4\n", - "Q= m*(h2-h1-23)\n", - "Q1= e*Q\n", - "##RESULTS\n", - "print'%s %.2f %s'%('Heat =',Q,'kW')\n", - "print'%s %.2f %s'%('Heat =',Q1,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Heat = 34.14 kW\n", - "Heat = 29.02 kW\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example9-pg 167" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpy and entropy change\n", - "##initialisation of variables\n", - "W= 2000. ##kW\n", - "m= 2. ##kg/s\n", - "h1= 3023.5 ##kJ/kg\n", - "s2= 5.6106 ##kJ/kg K\n", - "s1= 6.7664 ##kJ/kg K\n", - "##CALCULATIONS\n", - "h2= h1-(W/m)\n", - "S=s2-s1\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('enthalpy =',h2,'kJ/kg')\n", - "print'%s %.4f %s'%('entropy change =',S,'kJ/kg K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "enthalpy = 2023.5 kJ/kg\n", - "entropy change = -1.1558 kJ/kg K\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example10-pg 168" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpy and entropy change\n", - "##initialisation of variables\n", - "m1= 1 ##kg\n", - "h1= 2967.6 ##kJ/kg\n", - "h2= 83.96 ##kJ/kg\n", - "m2= 10\n", - "s1= 7.5166 ##kJ/kg K\n", - "s2= 0.2966 ##kJ/kg K\n", - "s3= 1.1654 ##kJ/kg K\n", - "##CALCULATIONS\n", - "h3= (m1*h1+m2*h2)/(m1+m2)\n", - "S= -m1*s1-m2*s2+(m1+m2)*s3\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('enthalpy =',h3,'kJ/kg')\n", - "print'%s %.4f %s'%('entropy change =',S,'kJ/kg K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "enthalpy = 346.1 kJ/kg\n", - "entropy change = 2.3368 kJ/kg K\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter9_1.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter9_1.ipynb deleted file mode 100755 index f2acb74e..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter9_1.ipynb +++ /dev/null @@ -1,473 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:15fd1db156f91825255a086dbc12ea12cb6caac30db6feed49ee7e31d29fef8c" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter9-Applications of the second law of thermodynamics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg 152" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate final temperatures and total entropy\n", - "##changeinitialisation of variables\n", - "p1= 3.##changeMpa\n", - "p2= 0.2 ##changeMpa\n", - "V1= 0.6 ##changem^3\n", - "V2= 1.##changem^3\n", - "M= 28. ##changegms\n", - "R= 8.314 ##changeJ/mol K\n", - "T= 400. ##changeC\n", - "T1= 150. ##changeC\n", - "k= 1.4\n", - "p3= 1.25 ##changeMpa\n", - "##changeCALCULATIONS\n", - "m1= p1*V1*10*10*10*M/(R*(273.15+T))\n", - "m2= p2*V2*10*10*10*M/(R*(273.15+T1))\n", - "p4= (p1*V1+p2*V2)/(V1+V2)\n", - "T2= (math.pow(p4/p1,k-1)/k)*(273.15+T)\n", - "m3= p3*V1*M*10*10*10/(R*T2)\n", - "dm= m1-m3\n", - "m4= m2+dm\n", - "T4= p3*10*10*10*V2/((R/M)*m4)\n", - "S= (R/M)*(m2*((k/(k-1))*math.log(T4/(273.15+T1))-math.log(p3/p2))+dm*((k/(k-1))*math.log(T4/(273.15+T))-math.log(p3/p1)))\n", - "##changeRESULTS\n", - "print'%s %.1f %s'%('final temperature =',T2,'K')\n", - "print'%s %.1f %s'%('final temperature =',T4,'K')\n", - "print'%s %.4f %s'%('Total entropy =',S,'KJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "final temperature = 338.8 K\n", - "final temperature = 1340.2 K\n", - "Total entropy = 2.5525 KJ/K\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg156" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate work of the pump\n", - "##initialisation of variables\n", - "m= 10000 ##kg/h\n", - "P= 2.5 ##Mpa\n", - "P1= 100 ##kPa\n", - "v= 0.001003 ##m^3\n", - "##CALCULATIONS\n", - "W= -m*v*(P*10*10*10-P1)/3600\n", - "##RESULTS\n", - "print'%s %.3f %s'%(' work of the pump =',W,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " work of the pump = -6.687 kW\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg 158" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##initialisation of variables\n", - "m= 4. ##kg/s\n", - "R= 8.314 ##J/mol K\n", - "M= 29. ##gms\n", - "k= 1.4\n", - "T1= 27. ##C\n", - "p2= 1800. ##kPa\n", - "p1= 105. ##kPa\n", - "n= 1.22\n", - "cp= 1.4 ##Jmol K\n", - "##CALCULATIONS\n", - "T2= (273.15+T1)*(p2/p1)**((n-1)/n)\n", - "W= m*k*(R/M)*((273.15+T1)/(k-1))*(1-(p2/p1)**((k-1)/k))\n", - "Q= -m*R*(273.15+T1)*math.log(p2/p1)/M\n", - "W1= m*(R/M)*n*((273.15+T1)/(n-1))*(1-(p2/p1)**((n-1)/n))\n", - "Q1= m*(R/M)*(n-k)*(T2-T1-273.15)/((n-1)*(k-1))\n", - "T3= (273.15+T1)*(p2/p1)**((k-1)/(2*k))\n", - "Q2= m*cp*(R/M)*(T1+273.15-T3)/(k-1)\n", - "##RESULTS\n", - "print'%s %.1f %s'%('heat removed in adiabatic compression =',W,'kW')\n", - "print'%s %.1f %s'%('heat removed in isothermal compression =',Q,'kW')\n", - "print'%s %.1f %s'%('heat removed in polytropic process =',Q1,'kW')\n", - "print'%s %.2f %s'%('heat removed in adiabatic compression in two stages =',Q2,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "heat removed in adiabatic compression = -1508.5 kW\n", - "heat removed in isothermal compression = -978.1 kW\n", - "heat removed in polytropic process = -471.2 kW\n", - "heat removed in adiabatic compression in two stages = -603.21 kW\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg 161" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpy and entropy\n", - "##initialisation of variables\n", - "h1= 3422.25 ##kJ/kg\n", - "m= 8. ##kg/s\n", - "s2= 7.3755 ##kJ/kg K\n", - "s1= 6.8803 ##kJ/kg K\n", - "e= 0.8\n", - "h2s= 2496.8 ##kJ/kg\n", - "##CALCULATIONS\n", - "h2= h1+e*(h2s-h1)\n", - "W= m*(h1-h2)\n", - "S= s2-s1\n", - "##RESULTS\n", - "print'%s %.1f %s'%('Enthalpy =',W,'kW')\n", - "print'%s %.4f %s'% ('Entropy =',S,'kJ/kg K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enthalpy = 5922.9 kW\n", - "Entropy = 0.4952 kJ/kg K\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg162" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "calculate volume flow rate into composser and volume flow rate out composser and heat and work \n", - "##initialisation of variables\n", - "m= 0.2 ##kg/s\n", - "v1= 1.0803 ##m^3/kg\n", - "T= 200 ##C\n", - "s2= 5.8041 ##kJ/kg K\n", - "s1= 7.5066 ##kJ/kg K\n", - "h1= 2328.1 ##kJ/kg\n", - "h2= 2654.4 ##kJ/kg\n", - "##CALCULATIONS\n", - "V1= m*v1\n", - "V2= 0.1*V1\n", - "Q= m*(273.15+T)*(s2-s1)\n", - "W= Q-m*(h1-h2)\n", - "##RESULTS\n", - "print'%s %.4f %s'%('volume flow rate into composser =',V1,'m^3')\n", - "print'%s %.4f %s'%('volume flow rate out of composser =',V2,'m^3')\n", - "print'%s %.1f %s'%('Heat =',Q,'kJ')\n", - "print'%s %.1f %s'%(' Work =',W,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume flow rate into composser = 0.2161 m^3\n", - "volume flow rate out of composser = 0.0216 m^3\n", - "Heat = -161.1 kJ\n", - " Work = -95.8 kJ\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg164" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate volume flow rate out and into the composser and work and heat\n", - "##initialisation of variables\n", - "m1= 0.2 ##kg/s\n", - "v1= 1.0803 ##m^3/kg\n", - "P= 200 ##kPa\n", - "T= 200 ##C\n", - "s1= 5.8041 ##kJ.kg K\n", - "s2= 7.5066 ##kJ/kg K\n", - "h1= 2870.5 ##kJ/kg\n", - "h2= 2495.9 ##kJ/kg\n", - "##CALCULATIONS\n", - "V1= m1*v1\n", - "V2= 0.1*V1\n", - "Q= m1*(273.15+T)*(s1-s2)\n", - "W= m1*((h1-h2)-(273.15+T)*(s2-s1))\n", - "##RESULTS\n", - "print'%s %.4f %s'% ('volume flow rate into composser =',V1,'m^3/s')\n", - "print'%s %.4f %s'%('volume flow rate out of composser =',V2,'m^3/s') \n", - "print'%s %.1f %s'%('Work =',W,'kW')\n", - "print'%s %.1f %s'%('Heat =',Q,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume flow rate into composser = 0.2161 m^3/s\n", - "volume flow rate out of composser = 0.0216 m^3/s\n", - "Work = -86.2 kW\n", - "Heat = -161.1 kW\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg166" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate rate of transfer\n", - "##initialisation of variables\n", - "e= 0.82\n", - "m= 5 ##kg/s\n", - "T3= 450 ##C\n", - "T1= 200 ##C\n", - "##CALCULATIONS\n", - "Q= e*m*1.0035*(T3-T1)\n", - "##RESULTS\n", - "print'%s %.1f %s'%('rate of transfer =',Q,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rate of transfer = 1028.6 kW\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example8-pg 166" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate heat at given enthalpy\n", - "##initialisation of variables\n", - "h1= 174.076 ##kJ/kg\n", - "h3= 74.527 ##kJ/kg\n", - "h4= 8.854 ##kJ/kg\n", - "m= 0.8 ##kg\n", - "e= 0.85\n", - "##CALCULATIONS\n", - "h2= h1+h3-h4\n", - "Q= m*(h2-h1-23)\n", - "Q1= e*Q\n", - "##RESULTS\n", - "print'%s %.2f %s'%('Heat =',Q,'kW')\n", - "print'%s %.2f %s'%('Heat =',Q1,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Heat = 34.14 kW\n", - "Heat = 29.02 kW\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example9-pg 167" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpy and entropy change\n", - "##initialisation of variables\n", - "W= 2000. ##kW\n", - "m= 2. ##kg/s\n", - "h1= 3023.5 ##kJ/kg\n", - "s2= 5.6106 ##kJ/kg K\n", - "s1= 6.7664 ##kJ/kg K\n", - "##CALCULATIONS\n", - "h2= h1-(W/m)\n", - "S=s2-s1\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('enthalpy =',h2,'kJ/kg')\n", - "print'%s %.4f %s'%('entropy change =',S,'kJ/kg K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "enthalpy = 2023.5 kJ/kg\n", - "entropy change = -1.1558 kJ/kg K\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example10-pg 168" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpy and entropy change\n", - "##initialisation of variables\n", - "m1= 1 ##kg\n", - "h1= 2967.6 ##kJ/kg\n", - "h2= 83.96 ##kJ/kg\n", - "m2= 10\n", - "s1= 7.5166 ##kJ/kg K\n", - "s2= 0.2966 ##kJ/kg K\n", - "s3= 1.1654 ##kJ/kg K\n", - "##CALCULATIONS\n", - "h3= (m1*h1+m2*h2)/(m1+m2)\n", - "S= -m1*s1-m2*s2+(m1+m2)*s3\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('enthalpy =',h3,'kJ/kg')\n", - "print'%s %.4f %s'%('entropy change =',S,'kJ/kg K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "enthalpy = 346.1 kJ/kg\n", - "entropy change = 2.3368 kJ/kg K\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter9_2.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter9_2.ipynb deleted file mode 100755 index f2acb74e..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter9_2.ipynb +++ /dev/null @@ -1,473 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:15fd1db156f91825255a086dbc12ea12cb6caac30db6feed49ee7e31d29fef8c" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter9-Applications of the second law of thermodynamics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg 152" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate final temperatures and total entropy\n", - "##changeinitialisation of variables\n", - "p1= 3.##changeMpa\n", - "p2= 0.2 ##changeMpa\n", - "V1= 0.6 ##changem^3\n", - "V2= 1.##changem^3\n", - "M= 28. ##changegms\n", - "R= 8.314 ##changeJ/mol K\n", - "T= 400. ##changeC\n", - "T1= 150. ##changeC\n", - "k= 1.4\n", - "p3= 1.25 ##changeMpa\n", - "##changeCALCULATIONS\n", - "m1= p1*V1*10*10*10*M/(R*(273.15+T))\n", - "m2= p2*V2*10*10*10*M/(R*(273.15+T1))\n", - "p4= (p1*V1+p2*V2)/(V1+V2)\n", - "T2= (math.pow(p4/p1,k-1)/k)*(273.15+T)\n", - "m3= p3*V1*M*10*10*10/(R*T2)\n", - "dm= m1-m3\n", - "m4= m2+dm\n", - "T4= p3*10*10*10*V2/((R/M)*m4)\n", - "S= (R/M)*(m2*((k/(k-1))*math.log(T4/(273.15+T1))-math.log(p3/p2))+dm*((k/(k-1))*math.log(T4/(273.15+T))-math.log(p3/p1)))\n", - "##changeRESULTS\n", - "print'%s %.1f %s'%('final temperature =',T2,'K')\n", - "print'%s %.1f %s'%('final temperature =',T4,'K')\n", - "print'%s %.4f %s'%('Total entropy =',S,'KJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "final temperature = 338.8 K\n", - "final temperature = 1340.2 K\n", - "Total entropy = 2.5525 KJ/K\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg156" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate work of the pump\n", - "##initialisation of variables\n", - "m= 10000 ##kg/h\n", - "P= 2.5 ##Mpa\n", - "P1= 100 ##kPa\n", - "v= 0.001003 ##m^3\n", - "##CALCULATIONS\n", - "W= -m*v*(P*10*10*10-P1)/3600\n", - "##RESULTS\n", - "print'%s %.3f %s'%(' work of the pump =',W,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " work of the pump = -6.687 kW\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg 158" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##initialisation of variables\n", - "m= 4. ##kg/s\n", - "R= 8.314 ##J/mol K\n", - "M= 29. ##gms\n", - "k= 1.4\n", - "T1= 27. ##C\n", - "p2= 1800. ##kPa\n", - "p1= 105. ##kPa\n", - "n= 1.22\n", - "cp= 1.4 ##Jmol K\n", - "##CALCULATIONS\n", - "T2= (273.15+T1)*(p2/p1)**((n-1)/n)\n", - "W= m*k*(R/M)*((273.15+T1)/(k-1))*(1-(p2/p1)**((k-1)/k))\n", - "Q= -m*R*(273.15+T1)*math.log(p2/p1)/M\n", - "W1= m*(R/M)*n*((273.15+T1)/(n-1))*(1-(p2/p1)**((n-1)/n))\n", - "Q1= m*(R/M)*(n-k)*(T2-T1-273.15)/((n-1)*(k-1))\n", - "T3= (273.15+T1)*(p2/p1)**((k-1)/(2*k))\n", - "Q2= m*cp*(R/M)*(T1+273.15-T3)/(k-1)\n", - "##RESULTS\n", - "print'%s %.1f %s'%('heat removed in adiabatic compression =',W,'kW')\n", - "print'%s %.1f %s'%('heat removed in isothermal compression =',Q,'kW')\n", - "print'%s %.1f %s'%('heat removed in polytropic process =',Q1,'kW')\n", - "print'%s %.2f %s'%('heat removed in adiabatic compression in two stages =',Q2,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "heat removed in adiabatic compression = -1508.5 kW\n", - "heat removed in isothermal compression = -978.1 kW\n", - "heat removed in polytropic process = -471.2 kW\n", - "heat removed in adiabatic compression in two stages = -603.21 kW\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg 161" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpy and entropy\n", - "##initialisation of variables\n", - "h1= 3422.25 ##kJ/kg\n", - "m= 8. ##kg/s\n", - "s2= 7.3755 ##kJ/kg K\n", - "s1= 6.8803 ##kJ/kg K\n", - "e= 0.8\n", - "h2s= 2496.8 ##kJ/kg\n", - "##CALCULATIONS\n", - "h2= h1+e*(h2s-h1)\n", - "W= m*(h1-h2)\n", - "S= s2-s1\n", - "##RESULTS\n", - "print'%s %.1f %s'%('Enthalpy =',W,'kW')\n", - "print'%s %.4f %s'% ('Entropy =',S,'kJ/kg K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enthalpy = 5922.9 kW\n", - "Entropy = 0.4952 kJ/kg K\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg162" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "calculate volume flow rate into composser and volume flow rate out composser and heat and work \n", - "##initialisation of variables\n", - "m= 0.2 ##kg/s\n", - "v1= 1.0803 ##m^3/kg\n", - "T= 200 ##C\n", - "s2= 5.8041 ##kJ/kg K\n", - "s1= 7.5066 ##kJ/kg K\n", - "h1= 2328.1 ##kJ/kg\n", - "h2= 2654.4 ##kJ/kg\n", - "##CALCULATIONS\n", - "V1= m*v1\n", - "V2= 0.1*V1\n", - "Q= m*(273.15+T)*(s2-s1)\n", - "W= Q-m*(h1-h2)\n", - "##RESULTS\n", - "print'%s %.4f %s'%('volume flow rate into composser =',V1,'m^3')\n", - "print'%s %.4f %s'%('volume flow rate out of composser =',V2,'m^3')\n", - "print'%s %.1f %s'%('Heat =',Q,'kJ')\n", - "print'%s %.1f %s'%(' Work =',W,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume flow rate into composser = 0.2161 m^3\n", - "volume flow rate out of composser = 0.0216 m^3\n", - "Heat = -161.1 kJ\n", - " Work = -95.8 kJ\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg164" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate volume flow rate out and into the composser and work and heat\n", - "##initialisation of variables\n", - "m1= 0.2 ##kg/s\n", - "v1= 1.0803 ##m^3/kg\n", - "P= 200 ##kPa\n", - "T= 200 ##C\n", - "s1= 5.8041 ##kJ.kg K\n", - "s2= 7.5066 ##kJ/kg K\n", - "h1= 2870.5 ##kJ/kg\n", - "h2= 2495.9 ##kJ/kg\n", - "##CALCULATIONS\n", - "V1= m1*v1\n", - "V2= 0.1*V1\n", - "Q= m1*(273.15+T)*(s1-s2)\n", - "W= m1*((h1-h2)-(273.15+T)*(s2-s1))\n", - "##RESULTS\n", - "print'%s %.4f %s'% ('volume flow rate into composser =',V1,'m^3/s')\n", - "print'%s %.4f %s'%('volume flow rate out of composser =',V2,'m^3/s') \n", - "print'%s %.1f %s'%('Work =',W,'kW')\n", - "print'%s %.1f %s'%('Heat =',Q,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume flow rate into composser = 0.2161 m^3/s\n", - "volume flow rate out of composser = 0.0216 m^3/s\n", - "Work = -86.2 kW\n", - "Heat = -161.1 kW\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg166" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate rate of transfer\n", - "##initialisation of variables\n", - "e= 0.82\n", - "m= 5 ##kg/s\n", - "T3= 450 ##C\n", - "T1= 200 ##C\n", - "##CALCULATIONS\n", - "Q= e*m*1.0035*(T3-T1)\n", - "##RESULTS\n", - "print'%s %.1f %s'%('rate of transfer =',Q,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "rate of transfer = 1028.6 kW\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example8-pg 166" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate heat at given enthalpy\n", - "##initialisation of variables\n", - "h1= 174.076 ##kJ/kg\n", - "h3= 74.527 ##kJ/kg\n", - "h4= 8.854 ##kJ/kg\n", - "m= 0.8 ##kg\n", - "e= 0.85\n", - "##CALCULATIONS\n", - "h2= h1+h3-h4\n", - "Q= m*(h2-h1-23)\n", - "Q1= e*Q\n", - "##RESULTS\n", - "print'%s %.2f %s'%('Heat =',Q,'kW')\n", - "print'%s %.2f %s'%('Heat =',Q1,'kW')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Heat = 34.14 kW\n", - "Heat = 29.02 kW\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example9-pg 167" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpy and entropy change\n", - "##initialisation of variables\n", - "W= 2000. ##kW\n", - "m= 2. ##kg/s\n", - "h1= 3023.5 ##kJ/kg\n", - "s2= 5.6106 ##kJ/kg K\n", - "s1= 6.7664 ##kJ/kg K\n", - "##CALCULATIONS\n", - "h2= h1-(W/m)\n", - "S=s2-s1\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('enthalpy =',h2,'kJ/kg')\n", - "print'%s %.4f %s'%('entropy change =',S,'kJ/kg K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "enthalpy = 2023.5 kJ/kg\n", - "entropy change = -1.1558 kJ/kg K\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example10-pg 168" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate enthalpy and entropy change\n", - "##initialisation of variables\n", - "m1= 1 ##kg\n", - "h1= 2967.6 ##kJ/kg\n", - "h2= 83.96 ##kJ/kg\n", - "m2= 10\n", - "s1= 7.5166 ##kJ/kg K\n", - "s2= 0.2966 ##kJ/kg K\n", - "s3= 1.1654 ##kJ/kg K\n", - "##CALCULATIONS\n", - "h3= (m1*h1+m2*h2)/(m1+m2)\n", - "S= -m1*s1-m2*s2+(m1+m2)*s3\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('enthalpy =',h3,'kJ/kg')\n", - "print'%s %.4f %s'%('entropy change =',S,'kJ/kg K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "enthalpy = 346.1 kJ/kg\n", - "entropy change = 2.3368 kJ/kg K\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter_2.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter_2.ipynb deleted file mode 100755 index 1b242151..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter_2.ipynb +++ /dev/null @@ -1,69 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:2df70ea24eb675b5df88544238cda98c7d9d4538b630227696b56b410ea0e81e" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 2 - Work" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 pg 12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculate the mass of oxygen and density of oxygen and specific volume and molar specific volume\n", - "##initialisation of variables\n", - "n= 0.25 ## k mol\n", - "M= 32 ##kg/kmol\n", - "V= 0.5 ##m^3\n", - "##CALCULATIONS\n", - "m= n*M\n", - "d= m/V\n", - "v= 1/d\n", - "v1= V/n\n", - "##RESULTS\n", - "print'%s %.0f %s'%(\"mass of oxygen=\",m,'kg')\n", - "print'%s %.0f %s'%(\"density of oxygen=\",d,'kg/m^3')\n", - "print'%s %.4f %s'%('specific volume=',v,'kg/m^3')\n", - "print'%s %.0f %s'%('molar specific volume=',v1,'m^3/kmol')\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "mass of oxygen= 8 kg\n", - "density of oxygen= 16 kg/m^3\n", - "specific volume= 0.0625 kg/m^3\n", - "molar specific volume= 2 m^3/kmol\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter_2_-Basic_concepts_.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter_2_-Basic_concepts_.ipynb deleted file mode 100755 index a9cf01c8..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter_2_-Basic_concepts_.ipynb +++ /dev/null @@ -1,69 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:c445f39e7878cf61ffc763516de39900f14df501737d9a8da58454f14557359b" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 2 - Basic concepts " - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 pg 12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculate the mass of oxygen and density of oxygen and specific volume and molar specific volume\n", - "##initialisation of variables\n", - "n= 0.25 ## k mol\n", - "M= 32 ##kg/kmol\n", - "V= 0.5 ##m^3\n", - "##CALCULATIONS\n", - "m= n*M\n", - "d= m/V\n", - "v= 1/d\n", - "v1= V/n\n", - "##RESULTS\n", - "print'%s %.0f %s'%(\"mass of oxygen=\",m,'kg')\n", - "print'%s %.0f %s'%(\"density of oxygen=\",d,'kg/m^3')\n", - "print'%s %.4f %s'%('specific volume=',v,'kg/m^3')\n", - "print'%s %.0f %s'%('molar specific volume=',v1,'m^3/kmol')\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "mass of oxygen= 8 kg\n", - "density of oxygen= 16 kg/m^3\n", - "specific volume= 0.0625 kg/m^3\n", - "molar specific volume= 2 m^3/kmol\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter_2_-Basic_concepts__1.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter_2_-Basic_concepts__1.ipynb deleted file mode 100755 index a9cf01c8..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter_2_-Basic_concepts__1.ipynb +++ /dev/null @@ -1,69 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:c445f39e7878cf61ffc763516de39900f14df501737d9a8da58454f14557359b" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 2 - Basic concepts " - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 pg 12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculate the mass of oxygen and density of oxygen and specific volume and molar specific volume\n", - "##initialisation of variables\n", - "n= 0.25 ## k mol\n", - "M= 32 ##kg/kmol\n", - "V= 0.5 ##m^3\n", - "##CALCULATIONS\n", - "m= n*M\n", - "d= m/V\n", - "v= 1/d\n", - "v1= V/n\n", - "##RESULTS\n", - "print'%s %.0f %s'%(\"mass of oxygen=\",m,'kg')\n", - "print'%s %.0f %s'%(\"density of oxygen=\",d,'kg/m^3')\n", - "print'%s %.4f %s'%('specific volume=',v,'kg/m^3')\n", - "print'%s %.0f %s'%('molar specific volume=',v1,'m^3/kmol')\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "mass of oxygen= 8 kg\n", - "density of oxygen= 16 kg/m^3\n", - "specific volume= 0.0625 kg/m^3\n", - "molar specific volume= 2 m^3/kmol\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter_2_-Basic_concepts__2.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter_2_-Basic_concepts__2.ipynb deleted file mode 100755 index a9cf01c8..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter_2_-Basic_concepts__2.ipynb +++ /dev/null @@ -1,69 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:c445f39e7878cf61ffc763516de39900f14df501737d9a8da58454f14557359b" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 2 - Basic concepts " - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 pg 12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculate the mass of oxygen and density of oxygen and specific volume and molar specific volume\n", - "##initialisation of variables\n", - "n= 0.25 ## k mol\n", - "M= 32 ##kg/kmol\n", - "V= 0.5 ##m^3\n", - "##CALCULATIONS\n", - "m= n*M\n", - "d= m/V\n", - "v= 1/d\n", - "v1= V/n\n", - "##RESULTS\n", - "print'%s %.0f %s'%(\"mass of oxygen=\",m,'kg')\n", - "print'%s %.0f %s'%(\"density of oxygen=\",d,'kg/m^3')\n", - "print'%s %.4f %s'%('specific volume=',v,'kg/m^3')\n", - "print'%s %.0f %s'%('molar specific volume=',v1,'m^3/kmol')\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "mass of oxygen= 8 kg\n", - "density of oxygen= 16 kg/m^3\n", - "specific volume= 0.0625 kg/m^3\n", - "molar specific volume= 2 m^3/kmol\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter_2_-Basic_concepts__3.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter_2_-Basic_concepts__3.ipynb deleted file mode 100755 index a9cf01c8..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter_2_-Basic_concepts__3.ipynb +++ /dev/null @@ -1,69 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:c445f39e7878cf61ffc763516de39900f14df501737d9a8da58454f14557359b" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 2 - Basic concepts " - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 pg 12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculate the mass of oxygen and density of oxygen and specific volume and molar specific volume\n", - "##initialisation of variables\n", - "n= 0.25 ## k mol\n", - "M= 32 ##kg/kmol\n", - "V= 0.5 ##m^3\n", - "##CALCULATIONS\n", - "m= n*M\n", - "d= m/V\n", - "v= 1/d\n", - "v1= V/n\n", - "##RESULTS\n", - "print'%s %.0f %s'%(\"mass of oxygen=\",m,'kg')\n", - "print'%s %.0f %s'%(\"density of oxygen=\",d,'kg/m^3')\n", - "print'%s %.4f %s'%('specific volume=',v,'kg/m^3')\n", - "print'%s %.0f %s'%('molar specific volume=',v1,'m^3/kmol')\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "mass of oxygen= 8 kg\n", - "density of oxygen= 16 kg/m^3\n", - "specific volume= 0.0625 kg/m^3\n", - "molar specific volume= 2 m^3/kmol\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter_2_1.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter_2_1.ipynb deleted file mode 100755 index a9cf01c8..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter_2_1.ipynb +++ /dev/null @@ -1,69 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:c445f39e7878cf61ffc763516de39900f14df501737d9a8da58454f14557359b" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 2 - Basic concepts " - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 pg 12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculate the mass of oxygen and density of oxygen and specific volume and molar specific volume\n", - "##initialisation of variables\n", - "n= 0.25 ## k mol\n", - "M= 32 ##kg/kmol\n", - "V= 0.5 ##m^3\n", - "##CALCULATIONS\n", - "m= n*M\n", - "d= m/V\n", - "v= 1/d\n", - "v1= V/n\n", - "##RESULTS\n", - "print'%s %.0f %s'%(\"mass of oxygen=\",m,'kg')\n", - "print'%s %.0f %s'%(\"density of oxygen=\",d,'kg/m^3')\n", - "print'%s %.4f %s'%('specific volume=',v,'kg/m^3')\n", - "print'%s %.0f %s'%('molar specific volume=',v1,'m^3/kmol')\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "mass of oxygen= 8 kg\n", - "density of oxygen= 16 kg/m^3\n", - "specific volume= 0.0625 kg/m^3\n", - "molar specific volume= 2 m^3/kmol\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter_2_2.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter_2_2.ipynb deleted file mode 100755 index a9cf01c8..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter_2_2.ipynb +++ /dev/null @@ -1,69 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:c445f39e7878cf61ffc763516de39900f14df501737d9a8da58454f14557359b" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 2 - Basic concepts " - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 pg 12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculate the mass of oxygen and density of oxygen and specific volume and molar specific volume\n", - "##initialisation of variables\n", - "n= 0.25 ## k mol\n", - "M= 32 ##kg/kmol\n", - "V= 0.5 ##m^3\n", - "##CALCULATIONS\n", - "m= n*M\n", - "d= m/V\n", - "v= 1/d\n", - "v1= V/n\n", - "##RESULTS\n", - "print'%s %.0f %s'%(\"mass of oxygen=\",m,'kg')\n", - "print'%s %.0f %s'%(\"density of oxygen=\",d,'kg/m^3')\n", - "print'%s %.4f %s'%('specific volume=',v,'kg/m^3')\n", - "print'%s %.0f %s'%('molar specific volume=',v1,'m^3/kmol')\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "mass of oxygen= 8 kg\n", - "density of oxygen= 16 kg/m^3\n", - "specific volume= 0.0625 kg/m^3\n", - "molar specific volume= 2 m^3/kmol\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter_3-Work_energy_and_heat_first_law_of_thermodynamics.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter_3-Work_energy_and_heat_first_law_of_thermodynamics.ipynb deleted file mode 100755 index f4e0af8d..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter_3-Work_energy_and_heat_first_law_of_thermodynamics.ipynb +++ /dev/null @@ -1,220 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:56539cb8410013a7d0be3df1cf1e85c7a8b906e5f399b600535904fe0fd98e57" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "chapter3-Work energy and heat first law of thermodynamics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculate the work interaction of spring\n", - "##initialisation of variables\n", - "m= 5 ##kg\n", - "g= 9.8 ##m/sec^2\n", - "k= 500 ##N/m\n", - "##CALCULATIONS\n", - "x= m*g/k\n", - "W= -m*g*x\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('work interaction of spring = ',W,'J')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work interaction of spring = -4.80 J\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 pg 25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculate the work done by the gas\n", - "##initialisation of variables\n", - "m= 500 ##kg\n", - "V= 50 ##L\n", - "P= 700 ##kPa\n", - "T= 25 ##C\n", - "P0= 100 ##kPa\n", - "g= 9.8 ##m/sec^2\n", - "A= 200 ##cm^2\n", - "V1= 100 ##L\n", - "##CALCULATIONS\n", - "pe= P0*math.pow(10,3)+(m*g/(A*(math.pow(10,-4))))\n", - "W= pe*(V1-V)*(math.pow(10,-6))\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('work of the gas =',W,'kJ')" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work of the gas = 17.25 kJ\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5 pg 27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calcualte the energy change in process 1,2,3 and work in third process\n", - "##initialisation of variables\n", - "W= 5 ##kJ\n", - "Q= 23 ##kJ\n", - "Q1= -50 ##kJ\n", - "W1= 0 ##kJ\n", - "##CALCULATIONS\n", - "E1= Q-W\n", - "E2= Q1-W1\n", - "E3= -(E1+E2)\n", - "W3= -E3\n", - "##RESULTS\n", - "print '%s %.f %s'%('energy change in process 1 =',E1,'kJ')\n", - "print'%s %.f %s'% ('energy change in process 2 = ',E2,'kJ')\n", - "print '%s %.f %s'%('energy change in process 3 = ',E3,'kJ')\n", - "print '%s %.f %s'%('Work in third process = ',W3,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "energy change in process 1 = 18 kJ\n", - "energy change in process 2 = -50 kJ\n", - "energy change in process 3 = 32 kJ\n", - "Work in third process = -32 kJ\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6 pg 28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculat the car mileage of given variable\n", - "##initialisation of variables\n", - "V= 12 ##km/L\n", - "##CALCULATIONS\n", - "MPG= V*3.7854/1.609\n", - "##RESULTS\n", - "print'%s %.2f %s'%('car mileage =',MPG,'MPG')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "car mileage = 28.23 MPG\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7 pg 28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##find whether salesman is honest or not\n", - "##initialisation of variables\n", - "p= 800 ##atm\n", - "P= 10000 ##psi\n", - "x= 14.696 ##psi/atm\n", - "##CALCULATIONS\n", - "P1= p*x\n", - "##RESULTS\n", - "if (P1>P):\n", - "\tprint (\"Salesman is honest\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Salesman is honest\n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter_3-Work_energy_and_heat_first_law_of_thermodynamics_1.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter_3-Work_energy_and_heat_first_law_of_thermodynamics_1.ipynb deleted file mode 100755 index f4e0af8d..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter_3-Work_energy_and_heat_first_law_of_thermodynamics_1.ipynb +++ /dev/null @@ -1,220 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:56539cb8410013a7d0be3df1cf1e85c7a8b906e5f399b600535904fe0fd98e57" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "chapter3-Work energy and heat first law of thermodynamics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculate the work interaction of spring\n", - "##initialisation of variables\n", - "m= 5 ##kg\n", - "g= 9.8 ##m/sec^2\n", - "k= 500 ##N/m\n", - "##CALCULATIONS\n", - "x= m*g/k\n", - "W= -m*g*x\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('work interaction of spring = ',W,'J')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work interaction of spring = -4.80 J\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 pg 25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculate the work done by the gas\n", - "##initialisation of variables\n", - "m= 500 ##kg\n", - "V= 50 ##L\n", - "P= 700 ##kPa\n", - "T= 25 ##C\n", - "P0= 100 ##kPa\n", - "g= 9.8 ##m/sec^2\n", - "A= 200 ##cm^2\n", - "V1= 100 ##L\n", - "##CALCULATIONS\n", - "pe= P0*math.pow(10,3)+(m*g/(A*(math.pow(10,-4))))\n", - "W= pe*(V1-V)*(math.pow(10,-6))\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('work of the gas =',W,'kJ')" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work of the gas = 17.25 kJ\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5 pg 27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calcualte the energy change in process 1,2,3 and work in third process\n", - "##initialisation of variables\n", - "W= 5 ##kJ\n", - "Q= 23 ##kJ\n", - "Q1= -50 ##kJ\n", - "W1= 0 ##kJ\n", - "##CALCULATIONS\n", - "E1= Q-W\n", - "E2= Q1-W1\n", - "E3= -(E1+E2)\n", - "W3= -E3\n", - "##RESULTS\n", - "print '%s %.f %s'%('energy change in process 1 =',E1,'kJ')\n", - "print'%s %.f %s'% ('energy change in process 2 = ',E2,'kJ')\n", - "print '%s %.f %s'%('energy change in process 3 = ',E3,'kJ')\n", - "print '%s %.f %s'%('Work in third process = ',W3,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "energy change in process 1 = 18 kJ\n", - "energy change in process 2 = -50 kJ\n", - "energy change in process 3 = 32 kJ\n", - "Work in third process = -32 kJ\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6 pg 28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculat the car mileage of given variable\n", - "##initialisation of variables\n", - "V= 12 ##km/L\n", - "##CALCULATIONS\n", - "MPG= V*3.7854/1.609\n", - "##RESULTS\n", - "print'%s %.2f %s'%('car mileage =',MPG,'MPG')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "car mileage = 28.23 MPG\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7 pg 28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##find whether salesman is honest or not\n", - "##initialisation of variables\n", - "p= 800 ##atm\n", - "P= 10000 ##psi\n", - "x= 14.696 ##psi/atm\n", - "##CALCULATIONS\n", - "P1= p*x\n", - "##RESULTS\n", - "if (P1>P):\n", - "\tprint (\"Salesman is honest\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Salesman is honest\n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter_3-Work_energy_and_heat_first_law_of_thermodynamics_2.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter_3-Work_energy_and_heat_first_law_of_thermodynamics_2.ipynb deleted file mode 100755 index f4e0af8d..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter_3-Work_energy_and_heat_first_law_of_thermodynamics_2.ipynb +++ /dev/null @@ -1,220 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:56539cb8410013a7d0be3df1cf1e85c7a8b906e5f399b600535904fe0fd98e57" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "chapter3-Work energy and heat first law of thermodynamics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculate the work interaction of spring\n", - "##initialisation of variables\n", - "m= 5 ##kg\n", - "g= 9.8 ##m/sec^2\n", - "k= 500 ##N/m\n", - "##CALCULATIONS\n", - "x= m*g/k\n", - "W= -m*g*x\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('work interaction of spring = ',W,'J')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work interaction of spring = -4.80 J\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 pg 25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculate the work done by the gas\n", - "##initialisation of variables\n", - "m= 500 ##kg\n", - "V= 50 ##L\n", - "P= 700 ##kPa\n", - "T= 25 ##C\n", - "P0= 100 ##kPa\n", - "g= 9.8 ##m/sec^2\n", - "A= 200 ##cm^2\n", - "V1= 100 ##L\n", - "##CALCULATIONS\n", - "pe= P0*math.pow(10,3)+(m*g/(A*(math.pow(10,-4))))\n", - "W= pe*(V1-V)*(math.pow(10,-6))\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('work of the gas =',W,'kJ')" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work of the gas = 17.25 kJ\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5 pg 27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calcualte the energy change in process 1,2,3 and work in third process\n", - "##initialisation of variables\n", - "W= 5 ##kJ\n", - "Q= 23 ##kJ\n", - "Q1= -50 ##kJ\n", - "W1= 0 ##kJ\n", - "##CALCULATIONS\n", - "E1= Q-W\n", - "E2= Q1-W1\n", - "E3= -(E1+E2)\n", - "W3= -E3\n", - "##RESULTS\n", - "print '%s %.f %s'%('energy change in process 1 =',E1,'kJ')\n", - "print'%s %.f %s'% ('energy change in process 2 = ',E2,'kJ')\n", - "print '%s %.f %s'%('energy change in process 3 = ',E3,'kJ')\n", - "print '%s %.f %s'%('Work in third process = ',W3,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "energy change in process 1 = 18 kJ\n", - "energy change in process 2 = -50 kJ\n", - "energy change in process 3 = 32 kJ\n", - "Work in third process = -32 kJ\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6 pg 28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculat the car mileage of given variable\n", - "##initialisation of variables\n", - "V= 12 ##km/L\n", - "##CALCULATIONS\n", - "MPG= V*3.7854/1.609\n", - "##RESULTS\n", - "print'%s %.2f %s'%('car mileage =',MPG,'MPG')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "car mileage = 28.23 MPG\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7 pg 28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##find whether salesman is honest or not\n", - "##initialisation of variables\n", - "p= 800 ##atm\n", - "P= 10000 ##psi\n", - "x= 14.696 ##psi/atm\n", - "##CALCULATIONS\n", - "P1= p*x\n", - "##RESULTS\n", - "if (P1>P):\n", - "\tprint (\"Salesman is honest\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Salesman is honest\n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter_3-Work_energy_and_heat_first_law_of_thermodynamics_3.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter_3-Work_energy_and_heat_first_law_of_thermodynamics_3.ipynb deleted file mode 100755 index f4e0af8d..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter_3-Work_energy_and_heat_first_law_of_thermodynamics_3.ipynb +++ /dev/null @@ -1,220 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:56539cb8410013a7d0be3df1cf1e85c7a8b906e5f399b600535904fe0fd98e57" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "chapter3-Work energy and heat first law of thermodynamics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculate the work interaction of spring\n", - "##initialisation of variables\n", - "m= 5 ##kg\n", - "g= 9.8 ##m/sec^2\n", - "k= 500 ##N/m\n", - "##CALCULATIONS\n", - "x= m*g/k\n", - "W= -m*g*x\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('work interaction of spring = ',W,'J')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work interaction of spring = -4.80 J\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 pg 25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculate the work done by the gas\n", - "##initialisation of variables\n", - "m= 500 ##kg\n", - "V= 50 ##L\n", - "P= 700 ##kPa\n", - "T= 25 ##C\n", - "P0= 100 ##kPa\n", - "g= 9.8 ##m/sec^2\n", - "A= 200 ##cm^2\n", - "V1= 100 ##L\n", - "##CALCULATIONS\n", - "pe= P0*math.pow(10,3)+(m*g/(A*(math.pow(10,-4))))\n", - "W= pe*(V1-V)*(math.pow(10,-6))\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('work of the gas =',W,'kJ')" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work of the gas = 17.25 kJ\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5 pg 27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calcualte the energy change in process 1,2,3 and work in third process\n", - "##initialisation of variables\n", - "W= 5 ##kJ\n", - "Q= 23 ##kJ\n", - "Q1= -50 ##kJ\n", - "W1= 0 ##kJ\n", - "##CALCULATIONS\n", - "E1= Q-W\n", - "E2= Q1-W1\n", - "E3= -(E1+E2)\n", - "W3= -E3\n", - "##RESULTS\n", - "print '%s %.f %s'%('energy change in process 1 =',E1,'kJ')\n", - "print'%s %.f %s'% ('energy change in process 2 = ',E2,'kJ')\n", - "print '%s %.f %s'%('energy change in process 3 = ',E3,'kJ')\n", - "print '%s %.f %s'%('Work in third process = ',W3,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "energy change in process 1 = 18 kJ\n", - "energy change in process 2 = -50 kJ\n", - "energy change in process 3 = 32 kJ\n", - "Work in third process = -32 kJ\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6 pg 28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculat the car mileage of given variable\n", - "##initialisation of variables\n", - "V= 12 ##km/L\n", - "##CALCULATIONS\n", - "MPG= V*3.7854/1.609\n", - "##RESULTS\n", - "print'%s %.2f %s'%('car mileage =',MPG,'MPG')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "car mileage = 28.23 MPG\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7 pg 28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##find whether salesman is honest or not\n", - "##initialisation of variables\n", - "p= 800 ##atm\n", - "P= 10000 ##psi\n", - "x= 14.696 ##psi/atm\n", - "##CALCULATIONS\n", - "P1= p*x\n", - "##RESULTS\n", - "if (P1>P):\n", - "\tprint (\"Salesman is honest\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Salesman is honest\n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter_3.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter_3.ipynb deleted file mode 100755 index 013387dc..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter_3.ipynb +++ /dev/null @@ -1,220 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:f73954e8811e151c0b5b9ebbc8b4a25ed95b527042098578272743a33330e079" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "chapter3-heat" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculate the work interaction of spring\n", - "##initialisation of variables\n", - "m= 5 ##kg\n", - "g= 9.8 ##m/sec^2\n", - "k= 500 ##N/m\n", - "##CALCULATIONS\n", - "x= m*g/k\n", - "W= -m*g*x\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('work interaction of spring = ',W,'J')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work interaction of spring = -4.80 J\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 pg 25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculate the work done by the gas\n", - "##initialisation of variables\n", - "m= 500 ##kg\n", - "V= 50 ##L\n", - "P= 700 ##kPa\n", - "T= 25 ##C\n", - "P0= 100 ##kPa\n", - "g= 9.8 ##m/sec^2\n", - "A= 200 ##cm^2\n", - "V1= 100 ##L\n", - "##CALCULATIONS\n", - "pe= P0*math.pow(10,3)+(m*g/(A*(math.pow(10,-4))))\n", - "W= pe*(V1-V)*(math.pow(10,-6))\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('work of the gas =',W,'kJ')" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work of the gas = 17.25 kJ\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5 pg 27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calcualte the energy change in process 1,2,3 and work in third process\n", - "##initialisation of variables\n", - "W= 5 ##kJ\n", - "Q= 23 ##kJ\n", - "Q1= -50 ##kJ\n", - "W1= 0 ##kJ\n", - "##CALCULATIONS\n", - "E1= Q-W\n", - "E2= Q1-W1\n", - "E3= -(E1+E2)\n", - "W3= -E3\n", - "##RESULTS\n", - "print '%s %.f %s'%('energy change in process 1 =',E1,'kJ')\n", - "print'%s %.f %s'% ('energy change in process 2 = ',E2,'kJ')\n", - "print '%s %.f %s'%('energy change in process 3 = ',E3,'kJ')\n", - "print '%s %.f %s'%('Work in third process = ',W3,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "energy change in process 1 = 18 kJ\n", - "energy change in process 2 = -50 kJ\n", - "energy change in process 3 = 32 kJ\n", - "Work in third process = -32 kJ\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6 pg 28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculat the car mileage of given variable\n", - "##initialisation of variables\n", - "V= 12 ##km/L\n", - "##CALCULATIONS\n", - "MPG= V*3.7854/1.609\n", - "##RESULTS\n", - "print'%s %.2f %s'%('car mileage =',MPG,'MPG')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "car mileage = 28.23 MPG\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7 pg 28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##find whether salesman is honest or not\n", - "##initialisation of variables\n", - "p= 800 ##atm\n", - "P= 10000 ##psi\n", - "x= 14.696 ##psi/atm\n", - "##CALCULATIONS\n", - "P1= p*x\n", - "##RESULTS\n", - "if (P1>P):\n", - "\tprint (\"Salesman is honest\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Salesman is honest\n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter_3_1.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter_3_1.ipynb deleted file mode 100755 index f4e0af8d..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter_3_1.ipynb +++ /dev/null @@ -1,220 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:56539cb8410013a7d0be3df1cf1e85c7a8b906e5f399b600535904fe0fd98e57" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "chapter3-Work energy and heat first law of thermodynamics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculate the work interaction of spring\n", - "##initialisation of variables\n", - "m= 5 ##kg\n", - "g= 9.8 ##m/sec^2\n", - "k= 500 ##N/m\n", - "##CALCULATIONS\n", - "x= m*g/k\n", - "W= -m*g*x\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('work interaction of spring = ',W,'J')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work interaction of spring = -4.80 J\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 pg 25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculate the work done by the gas\n", - "##initialisation of variables\n", - "m= 500 ##kg\n", - "V= 50 ##L\n", - "P= 700 ##kPa\n", - "T= 25 ##C\n", - "P0= 100 ##kPa\n", - "g= 9.8 ##m/sec^2\n", - "A= 200 ##cm^2\n", - "V1= 100 ##L\n", - "##CALCULATIONS\n", - "pe= P0*math.pow(10,3)+(m*g/(A*(math.pow(10,-4))))\n", - "W= pe*(V1-V)*(math.pow(10,-6))\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('work of the gas =',W,'kJ')" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work of the gas = 17.25 kJ\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5 pg 27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calcualte the energy change in process 1,2,3 and work in third process\n", - "##initialisation of variables\n", - "W= 5 ##kJ\n", - "Q= 23 ##kJ\n", - "Q1= -50 ##kJ\n", - "W1= 0 ##kJ\n", - "##CALCULATIONS\n", - "E1= Q-W\n", - "E2= Q1-W1\n", - "E3= -(E1+E2)\n", - "W3= -E3\n", - "##RESULTS\n", - "print '%s %.f %s'%('energy change in process 1 =',E1,'kJ')\n", - "print'%s %.f %s'% ('energy change in process 2 = ',E2,'kJ')\n", - "print '%s %.f %s'%('energy change in process 3 = ',E3,'kJ')\n", - "print '%s %.f %s'%('Work in third process = ',W3,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "energy change in process 1 = 18 kJ\n", - "energy change in process 2 = -50 kJ\n", - "energy change in process 3 = 32 kJ\n", - "Work in third process = -32 kJ\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6 pg 28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculat the car mileage of given variable\n", - "##initialisation of variables\n", - "V= 12 ##km/L\n", - "##CALCULATIONS\n", - "MPG= V*3.7854/1.609\n", - "##RESULTS\n", - "print'%s %.2f %s'%('car mileage =',MPG,'MPG')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "car mileage = 28.23 MPG\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7 pg 28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##find whether salesman is honest or not\n", - "##initialisation of variables\n", - "p= 800 ##atm\n", - "P= 10000 ##psi\n", - "x= 14.696 ##psi/atm\n", - "##CALCULATIONS\n", - "P1= p*x\n", - "##RESULTS\n", - "if (P1>P):\n", - "\tprint (\"Salesman is honest\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Salesman is honest\n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter_3_2.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter_3_2.ipynb deleted file mode 100755 index f4e0af8d..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter_3_2.ipynb +++ /dev/null @@ -1,220 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:56539cb8410013a7d0be3df1cf1e85c7a8b906e5f399b600535904fe0fd98e57" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "chapter3-Work energy and heat first law of thermodynamics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculate the work interaction of spring\n", - "##initialisation of variables\n", - "m= 5 ##kg\n", - "g= 9.8 ##m/sec^2\n", - "k= 500 ##N/m\n", - "##CALCULATIONS\n", - "x= m*g/k\n", - "W= -m*g*x\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('work interaction of spring = ',W,'J')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work interaction of spring = -4.80 J\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 pg 25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculate the work done by the gas\n", - "##initialisation of variables\n", - "m= 500 ##kg\n", - "V= 50 ##L\n", - "P= 700 ##kPa\n", - "T= 25 ##C\n", - "P0= 100 ##kPa\n", - "g= 9.8 ##m/sec^2\n", - "A= 200 ##cm^2\n", - "V1= 100 ##L\n", - "##CALCULATIONS\n", - "pe= P0*math.pow(10,3)+(m*g/(A*(math.pow(10,-4))))\n", - "W= pe*(V1-V)*(math.pow(10,-6))\n", - "##RESULTS\n", - "print'%s %.2f %s'% ('work of the gas =',W,'kJ')" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work of the gas = 17.25 kJ\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5 pg 27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calcualte the energy change in process 1,2,3 and work in third process\n", - "##initialisation of variables\n", - "W= 5 ##kJ\n", - "Q= 23 ##kJ\n", - "Q1= -50 ##kJ\n", - "W1= 0 ##kJ\n", - "##CALCULATIONS\n", - "E1= Q-W\n", - "E2= Q1-W1\n", - "E3= -(E1+E2)\n", - "W3= -E3\n", - "##RESULTS\n", - "print '%s %.f %s'%('energy change in process 1 =',E1,'kJ')\n", - "print'%s %.f %s'% ('energy change in process 2 = ',E2,'kJ')\n", - "print '%s %.f %s'%('energy change in process 3 = ',E3,'kJ')\n", - "print '%s %.f %s'%('Work in third process = ',W3,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "energy change in process 1 = 18 kJ\n", - "energy change in process 2 = -50 kJ\n", - "energy change in process 3 = 32 kJ\n", - "Work in third process = -32 kJ\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6 pg 28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##calculat the car mileage of given variable\n", - "##initialisation of variables\n", - "V= 12 ##km/L\n", - "##CALCULATIONS\n", - "MPG= V*3.7854/1.609\n", - "##RESULTS\n", - "print'%s %.2f %s'%('car mileage =',MPG,'MPG')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "car mileage = 28.23 MPG\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7 pg 28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "##find whether salesman is honest or not\n", - "##initialisation of variables\n", - "p= 800 ##atm\n", - "P= 10000 ##psi\n", - "x= 14.696 ##psi/atm\n", - "##CALCULATIONS\n", - "P1= p*x\n", - "##RESULTS\n", - "if (P1>P):\n", - "\tprint (\"Salesman is honest\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Salesman is honest\n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter_4.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter_4.ipynb deleted file mode 100755 index b4cbb2bf..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter_4.ipynb +++ /dev/null @@ -1,466 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:f794a4d18f36c13ddab8d6024721da6bc9aca8b98b0260eaf3e1fb73a8bd345d" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Chapter 4-simple systems" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg43" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#caluclate the heat interaction and temperature rise\n", - "##initialisation of variables\n", - "m= 5000. ##kg\n", - "cp= 1.4 ##kJ/kg K\n", - "T2= 27.6 ##K\n", - "T1= 22. ##K\n", - "t= 40. ##min\n", - "P= 20. ##kW\n", - "##CALCULATIONS\n", - "H= m*cp*(T2-T1)\n", - "W= -P*t*60\n", - "Q= H+W\n", - "dT= -W/(m*cp)\n", - "##RESULTS\n", - "print'%s %.f %s'%('heat interaction =',Q,'kJ')\n", - "print'%s %.2f %s'%('Temperature rise = ',dT,'C')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "heat interaction = -8800 kJ\n", - "Temperature rise = 6.86 C\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "example 2-pg 49\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#caluclate the volumes and internal energy and enthaply\n", - "##initialisation of variables\n", - "T= 300. ##C\n", - "p= 2. ##Mpa\n", - "T1= 300. ##C\n", - "p1= 20.##Mpa\n", - "T2= 300. ##C\n", - "p2= 8.501 ##Mpa\n", - "##CALCULATIONS\n", - "v= 0.12547\n", - "v1= 0.00136\n", - "u= 2772.6\n", - "u1= 1306.1\n", - "h= 3023.5\n", - "h1= 1333.3\n", - "##RESULTS\n", - "print'%s %.5f %s'%('volume =',v,'m^3/kg')\n", - "print'%s %.5f %s'%('volume =',v1,'m^3/kg')\n", - "print'%s %.1f %s'%('internal energy = ',u,'kJ/kg')\n", - "print'%s %.1f %s'%('internal energy =',u1,'kJ/kg')\n", - "print'%s %.1f %s'%('enthalpy =',h,'kJ/kg')\n", - "print'%s %.f %s'%('enthalpy = ',h1,'kJ/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume = 0.12547 m^3/kg\n", - "volume = 0.00136 m^3/kg\n", - "internal energy = 2772.6 kJ/kg\n", - "internal energy = 1306.1 kJ/kg\n", - "enthalpy = 3023.5 kJ/kg\n", - "enthalpy = 1333 kJ/kg\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "example3-pg49\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate the volume and internal energy and enthalpy\n", - "##initialisation of variables\n", - "vf= 0.001404 ##m^3/kg\n", - "x= 0.8\n", - "vg= 0.02167 ##m^3/kg\n", - "uf= 1332. ##kJ/kg\n", - "ug= 1231. ##kJ/kg\n", - "hf= 1344. ##kJ/kg\n", - "hg= 1404.9 ##kJ/kg\n", - "##CALCULATIONS\n", - "v= vf+x*(vg-vf)\n", - "u= uf+x*ug\n", - "h= hf+x*hg\n", - "##RESULTS\n", - "print'%s %.5f %s'%('volume =',v,'m^3/kg')\n", - "print'%s %.1f %s'%('internal energy =',u,'kJ/kg')\n", - "print'%s %.1f %s'%('enthalpy =',h, 'kJ/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume = 0.01762 m^3/kg\n", - "internal energy = 2316.8 kJ/kg\n", - "enthalpy = 2467.9 kJ/kg\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg 52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate the specific volume and internal energy and enthalpy and entropy\n", - "##initialisation of variables\n", - "T= 296. ##K\n", - "T1= 250. ##K\n", - "T2= 300. ##K\n", - "v= 0.1257 ##m^3/kg\n", - "v1= 0.11144 ##m^3/kg\n", - "u1= 27772.6 ##kJ/kg\n", - "u2= 2679.6 ##kJ/kg\n", - "h1= 3023.5 ##kJ/kg\n", - "h2= 2902.5 ##kJ/kg\n", - "s1= 6.7664 ##kJ/kg K\n", - "s2= 6.5433 ##kJ/kg K\n", - "##CALCULATIONS\n", - "a1= (T-T1)/(T2-T1)\n", - "a2= 1-a1\n", - "V= a1*v+a2*v1\n", - "U= a1*u1+a2*u2\n", - "H= a1*h1+a2*h2\n", - "S= a1*s1+a2*s2\n", - "##RESULTS\n", - "print'%s %.3f %s'%('a2 = ',a2,'')\n", - "print'%s %.5f %s'%('specific volume =',V,'m^3/kg')\n", - "print'%s %.1f %s'%('internal energy =',U,'kJ/kg')\n", - "print'%s %.1f %s'%('enthalpy =',H,'kJ/kg')\n", - "print'%s %.1f %s'%('Entropy =',S,'kJ/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "a2 = 0.080 \n", - "specific volume = 0.12456 m^3/kg\n", - "internal energy = 25765.2 kJ/kg\n", - "enthalpy = 3013.8 kJ/kg\n", - "Entropy = 6.7 kJ/kg\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exapmle5-pg54" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate a2 and internal enerjy\n", - "##initialisation of variables\n", - "v= 0.15 ##m^3/kg\n", - "v1= 0.13857 ##m^3/kg\n", - "v2= 0.1512 ##m^3/kg\n", - "v3= 0.050 ##m^3##kg\n", - "vf= 0.001177 ##m^3/kg\n", - "vg= 0.09963 ##m^3/kg\n", - "uf= 906.44 ##kJ/kg\n", - "ufg= 1693.8 ##kJ/kg\n", - "##CALCULATIONS\n", - "a1= (v-v1)/(v2-v1)\n", - "a2= 1-a1\n", - "x= (v3-vf)/(vg-vf)\n", - "u= uf+x*ufg\n", - "##RESULTS\n", - "print'%s %.3f %s'%('a2 =',a2,'')\n", - "print'%s %.1f %s'%('internal energy =',u,'kJ/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "a2 = 0.095 \n", - "internal energy = 1746.4 kJ/kg\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate pressure and temperature\n", - "##initialisation of variables\n", - "T= 250.##C\n", - "T1= 300. ##C\n", - "v300= 0.6548 ##m^3/kg\n", - "v250= 0.591 ##m^3/kg\n", - "v= 0.6 ##m^3/kg\n", - "u= 3000. ##kJ/kg\n", - "u250= 2726.1 ##kJ/kg\n", - "u300= 2804.8 ##kJ/kg\n", - "T2= 510.30 \n", - "u2= 3145.26 ##kJ/kg\n", - "p= 0.4 ##Mpa\n", - "p2= 0.2 ##Mpa\n", - "##CALCULATIONS\n", - "T1= T1+((v-v250)/(v300-v250))*(T2-T)\n", - "u1= u250+((v-v250)/(v300-v250))*(u300-u250)\n", - "du= u1-u\n", - "p1= p+((u-u1)/(u2-u1))*p2\n", - "##RESULTS\n", - "print'%s %.3f %s'%('pressure =',p1,'Mpa')\n", - "print'%s %.f %s'%('temperature =',T2,'C')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "pressure = 0.529 Mpa\n", - "temperature = 510 C\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7-pg54" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate work and heat interaction\n", - "##initialisation of variables\n", - "V= 0.2 ##m^3\n", - "v1= 0.02995 ##m^3/kg\n", - "u2= 2826.7 ##kJ/kg\n", - "u1= 2747.7 ##kJ/kg\n", - "h2= 3092.5 ##kJ/kg\n", - "h1= 2987.3 ##kJ/kg\n", - "p= 4 ##Mpa\n", - "v2= 0.06645 ##m^3/kg\n", - "v1= 0.02995 ##m^3/kg\n", - "##CALCULATIONS\n", - "m= V/v1\n", - "U= m*(u2-u1)\n", - "H= m*(h2-h1)\n", - "W= m*p*10*10*10*(v2-v1)\n", - "Q= U+W\n", - "##RESULTS\n", - "print'%s %.1f %s'%('work =',W,'kJ') \n", - "print'%s %.1f %s'%('heat interaction =',Q,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work = 975.0 kJ\n", - "heat interaction = 1502.5 kJ\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example8-pg 55" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate work and heat interaction\n", - "##initialisation of variables\n", - "m= 6.678 ##kg\n", - "u2= 2826.7 ##kJ/kg\n", - "u1= 2747.7 ##kJ/kg\n", - "p1= 8. ##Mpa\n", - "p2= 7. ##Mpa\n", - "p3= 6. ##Mpa\n", - "p4= 5. ##Mpa\n", - "p5= 4. ##Mpa\n", - "v1= 29.95 ##L/kg\n", - "v2= 35.24 ##L/kg\n", - "v3= 42.23 ##L/kg\n", - "v4= 51.94 ##L/kg\n", - "v5= 66.45 ##L/kg\n", - "##CALCULATIONS\n", - "U= m*(u2-u1)\n", - "W= m*0.5*((p1+p2)*(v2-v1)+(p2+p3)*(v3-v2)+(p3+p4)*(v4-v3)+(p4+p5)*(v5-v4))\n", - "Q=U+W\n", - "##RESULTS\n", - "print'%s %.1f %s'%('work =',W,'kJ') \n", - "print'%s %.f %s'%('heat interaction =',Q,'kJ') \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work = 1361.0 kJ\n", - "heat interaction = 1889 kJ\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9-pg56\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate final pressure and enthalpy and etropy\n", - "##initialisation of variables\n", - "p0= 100. ##kpa\n", - "A= 0.1 ##m^2\n", - "F= 20. ##kN\n", - "m3= 0.8873 ##kg\n", - "m1= 1.1384 ##kg\n", - "m2= 0.2511 ##kg\n", - "u1= 3116.2 ##kJ/kg\n", - "u2= 2728.7 ##kJ/kg\n", - "v3= 0.9942 ##m^3/kg\n", - "##CALCULATIONS\n", - "pe= (p0+(F/A))/1000\n", - "h3= (m1*u1-m2*u2)/m3\n", - "z3= m3*v3/A\n", - "##RESULTS\n", - "print'%s %.1f %s'%('final pressure =',pe,'Mpa') \n", - "print'%s %.1f %s'%('enthalpy = ',h3,'kJ/kg') \n", - "print'%s %.2f %s'%('piston rise =',z3,'m') \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "final pressure = 0.3 Mpa\n", - "enthalpy = 3225.9 kJ/kg\n", - "piston rise = 8.82 m\n" - ] - } - ], - "prompt_number": 14 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter_4_-Simple_systems.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter_4_-Simple_systems.ipynb deleted file mode 100755 index b4cbb2bf..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter_4_-Simple_systems.ipynb +++ /dev/null @@ -1,466 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:f794a4d18f36c13ddab8d6024721da6bc9aca8b98b0260eaf3e1fb73a8bd345d" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Chapter 4-simple systems" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg43" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#caluclate the heat interaction and temperature rise\n", - "##initialisation of variables\n", - "m= 5000. ##kg\n", - "cp= 1.4 ##kJ/kg K\n", - "T2= 27.6 ##K\n", - "T1= 22. ##K\n", - "t= 40. ##min\n", - "P= 20. ##kW\n", - "##CALCULATIONS\n", - "H= m*cp*(T2-T1)\n", - "W= -P*t*60\n", - "Q= H+W\n", - "dT= -W/(m*cp)\n", - "##RESULTS\n", - "print'%s %.f %s'%('heat interaction =',Q,'kJ')\n", - "print'%s %.2f %s'%('Temperature rise = ',dT,'C')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "heat interaction = -8800 kJ\n", - "Temperature rise = 6.86 C\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "example 2-pg 49\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#caluclate the volumes and internal energy and enthaply\n", - "##initialisation of variables\n", - "T= 300. ##C\n", - "p= 2. ##Mpa\n", - "T1= 300. ##C\n", - "p1= 20.##Mpa\n", - "T2= 300. ##C\n", - "p2= 8.501 ##Mpa\n", - "##CALCULATIONS\n", - "v= 0.12547\n", - "v1= 0.00136\n", - "u= 2772.6\n", - "u1= 1306.1\n", - "h= 3023.5\n", - "h1= 1333.3\n", - "##RESULTS\n", - "print'%s %.5f %s'%('volume =',v,'m^3/kg')\n", - "print'%s %.5f %s'%('volume =',v1,'m^3/kg')\n", - "print'%s %.1f %s'%('internal energy = ',u,'kJ/kg')\n", - "print'%s %.1f %s'%('internal energy =',u1,'kJ/kg')\n", - "print'%s %.1f %s'%('enthalpy =',h,'kJ/kg')\n", - "print'%s %.f %s'%('enthalpy = ',h1,'kJ/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume = 0.12547 m^3/kg\n", - "volume = 0.00136 m^3/kg\n", - "internal energy = 2772.6 kJ/kg\n", - "internal energy = 1306.1 kJ/kg\n", - "enthalpy = 3023.5 kJ/kg\n", - "enthalpy = 1333 kJ/kg\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "example3-pg49\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate the volume and internal energy and enthalpy\n", - "##initialisation of variables\n", - "vf= 0.001404 ##m^3/kg\n", - "x= 0.8\n", - "vg= 0.02167 ##m^3/kg\n", - "uf= 1332. ##kJ/kg\n", - "ug= 1231. ##kJ/kg\n", - "hf= 1344. ##kJ/kg\n", - "hg= 1404.9 ##kJ/kg\n", - "##CALCULATIONS\n", - "v= vf+x*(vg-vf)\n", - "u= uf+x*ug\n", - "h= hf+x*hg\n", - "##RESULTS\n", - "print'%s %.5f %s'%('volume =',v,'m^3/kg')\n", - "print'%s %.1f %s'%('internal energy =',u,'kJ/kg')\n", - "print'%s %.1f %s'%('enthalpy =',h, 'kJ/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume = 0.01762 m^3/kg\n", - "internal energy = 2316.8 kJ/kg\n", - "enthalpy = 2467.9 kJ/kg\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg 52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate the specific volume and internal energy and enthalpy and entropy\n", - "##initialisation of variables\n", - "T= 296. ##K\n", - "T1= 250. ##K\n", - "T2= 300. ##K\n", - "v= 0.1257 ##m^3/kg\n", - "v1= 0.11144 ##m^3/kg\n", - "u1= 27772.6 ##kJ/kg\n", - "u2= 2679.6 ##kJ/kg\n", - "h1= 3023.5 ##kJ/kg\n", - "h2= 2902.5 ##kJ/kg\n", - "s1= 6.7664 ##kJ/kg K\n", - "s2= 6.5433 ##kJ/kg K\n", - "##CALCULATIONS\n", - "a1= (T-T1)/(T2-T1)\n", - "a2= 1-a1\n", - "V= a1*v+a2*v1\n", - "U= a1*u1+a2*u2\n", - "H= a1*h1+a2*h2\n", - "S= a1*s1+a2*s2\n", - "##RESULTS\n", - "print'%s %.3f %s'%('a2 = ',a2,'')\n", - "print'%s %.5f %s'%('specific volume =',V,'m^3/kg')\n", - "print'%s %.1f %s'%('internal energy =',U,'kJ/kg')\n", - "print'%s %.1f %s'%('enthalpy =',H,'kJ/kg')\n", - "print'%s %.1f %s'%('Entropy =',S,'kJ/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "a2 = 0.080 \n", - "specific volume = 0.12456 m^3/kg\n", - "internal energy = 25765.2 kJ/kg\n", - "enthalpy = 3013.8 kJ/kg\n", - "Entropy = 6.7 kJ/kg\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exapmle5-pg54" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate a2 and internal enerjy\n", - "##initialisation of variables\n", - "v= 0.15 ##m^3/kg\n", - "v1= 0.13857 ##m^3/kg\n", - "v2= 0.1512 ##m^3/kg\n", - "v3= 0.050 ##m^3##kg\n", - "vf= 0.001177 ##m^3/kg\n", - "vg= 0.09963 ##m^3/kg\n", - "uf= 906.44 ##kJ/kg\n", - "ufg= 1693.8 ##kJ/kg\n", - "##CALCULATIONS\n", - "a1= (v-v1)/(v2-v1)\n", - "a2= 1-a1\n", - "x= (v3-vf)/(vg-vf)\n", - "u= uf+x*ufg\n", - "##RESULTS\n", - "print'%s %.3f %s'%('a2 =',a2,'')\n", - "print'%s %.1f %s'%('internal energy =',u,'kJ/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "a2 = 0.095 \n", - "internal energy = 1746.4 kJ/kg\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate pressure and temperature\n", - "##initialisation of variables\n", - "T= 250.##C\n", - "T1= 300. ##C\n", - "v300= 0.6548 ##m^3/kg\n", - "v250= 0.591 ##m^3/kg\n", - "v= 0.6 ##m^3/kg\n", - "u= 3000. ##kJ/kg\n", - "u250= 2726.1 ##kJ/kg\n", - "u300= 2804.8 ##kJ/kg\n", - "T2= 510.30 \n", - "u2= 3145.26 ##kJ/kg\n", - "p= 0.4 ##Mpa\n", - "p2= 0.2 ##Mpa\n", - "##CALCULATIONS\n", - "T1= T1+((v-v250)/(v300-v250))*(T2-T)\n", - "u1= u250+((v-v250)/(v300-v250))*(u300-u250)\n", - "du= u1-u\n", - "p1= p+((u-u1)/(u2-u1))*p2\n", - "##RESULTS\n", - "print'%s %.3f %s'%('pressure =',p1,'Mpa')\n", - "print'%s %.f %s'%('temperature =',T2,'C')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "pressure = 0.529 Mpa\n", - "temperature = 510 C\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7-pg54" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate work and heat interaction\n", - "##initialisation of variables\n", - "V= 0.2 ##m^3\n", - "v1= 0.02995 ##m^3/kg\n", - "u2= 2826.7 ##kJ/kg\n", - "u1= 2747.7 ##kJ/kg\n", - "h2= 3092.5 ##kJ/kg\n", - "h1= 2987.3 ##kJ/kg\n", - "p= 4 ##Mpa\n", - "v2= 0.06645 ##m^3/kg\n", - "v1= 0.02995 ##m^3/kg\n", - "##CALCULATIONS\n", - "m= V/v1\n", - "U= m*(u2-u1)\n", - "H= m*(h2-h1)\n", - "W= m*p*10*10*10*(v2-v1)\n", - "Q= U+W\n", - "##RESULTS\n", - "print'%s %.1f %s'%('work =',W,'kJ') \n", - "print'%s %.1f %s'%('heat interaction =',Q,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work = 975.0 kJ\n", - "heat interaction = 1502.5 kJ\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example8-pg 55" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate work and heat interaction\n", - "##initialisation of variables\n", - "m= 6.678 ##kg\n", - "u2= 2826.7 ##kJ/kg\n", - "u1= 2747.7 ##kJ/kg\n", - "p1= 8. ##Mpa\n", - "p2= 7. ##Mpa\n", - "p3= 6. ##Mpa\n", - "p4= 5. ##Mpa\n", - "p5= 4. ##Mpa\n", - "v1= 29.95 ##L/kg\n", - "v2= 35.24 ##L/kg\n", - "v3= 42.23 ##L/kg\n", - "v4= 51.94 ##L/kg\n", - "v5= 66.45 ##L/kg\n", - "##CALCULATIONS\n", - "U= m*(u2-u1)\n", - "W= m*0.5*((p1+p2)*(v2-v1)+(p2+p3)*(v3-v2)+(p3+p4)*(v4-v3)+(p4+p5)*(v5-v4))\n", - "Q=U+W\n", - "##RESULTS\n", - "print'%s %.1f %s'%('work =',W,'kJ') \n", - "print'%s %.f %s'%('heat interaction =',Q,'kJ') \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work = 1361.0 kJ\n", - "heat interaction = 1889 kJ\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9-pg56\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate final pressure and enthalpy and etropy\n", - "##initialisation of variables\n", - "p0= 100. ##kpa\n", - "A= 0.1 ##m^2\n", - "F= 20. ##kN\n", - "m3= 0.8873 ##kg\n", - "m1= 1.1384 ##kg\n", - "m2= 0.2511 ##kg\n", - "u1= 3116.2 ##kJ/kg\n", - "u2= 2728.7 ##kJ/kg\n", - "v3= 0.9942 ##m^3/kg\n", - "##CALCULATIONS\n", - "pe= (p0+(F/A))/1000\n", - "h3= (m1*u1-m2*u2)/m3\n", - "z3= m3*v3/A\n", - "##RESULTS\n", - "print'%s %.1f %s'%('final pressure =',pe,'Mpa') \n", - "print'%s %.1f %s'%('enthalpy = ',h3,'kJ/kg') \n", - "print'%s %.2f %s'%('piston rise =',z3,'m') \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "final pressure = 0.3 Mpa\n", - "enthalpy = 3225.9 kJ/kg\n", - "piston rise = 8.82 m\n" - ] - } - ], - "prompt_number": 14 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter_4_.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter_4_.ipynb deleted file mode 100755 index b4cbb2bf..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter_4_.ipynb +++ /dev/null @@ -1,466 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:f794a4d18f36c13ddab8d6024721da6bc9aca8b98b0260eaf3e1fb73a8bd345d" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Chapter 4-simple systems" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg43" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#caluclate the heat interaction and temperature rise\n", - "##initialisation of variables\n", - "m= 5000. ##kg\n", - "cp= 1.4 ##kJ/kg K\n", - "T2= 27.6 ##K\n", - "T1= 22. ##K\n", - "t= 40. ##min\n", - "P= 20. ##kW\n", - "##CALCULATIONS\n", - "H= m*cp*(T2-T1)\n", - "W= -P*t*60\n", - "Q= H+W\n", - "dT= -W/(m*cp)\n", - "##RESULTS\n", - "print'%s %.f %s'%('heat interaction =',Q,'kJ')\n", - "print'%s %.2f %s'%('Temperature rise = ',dT,'C')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "heat interaction = -8800 kJ\n", - "Temperature rise = 6.86 C\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "example 2-pg 49\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#caluclate the volumes and internal energy and enthaply\n", - "##initialisation of variables\n", - "T= 300. ##C\n", - "p= 2. ##Mpa\n", - "T1= 300. ##C\n", - "p1= 20.##Mpa\n", - "T2= 300. ##C\n", - "p2= 8.501 ##Mpa\n", - "##CALCULATIONS\n", - "v= 0.12547\n", - "v1= 0.00136\n", - "u= 2772.6\n", - "u1= 1306.1\n", - "h= 3023.5\n", - "h1= 1333.3\n", - "##RESULTS\n", - "print'%s %.5f %s'%('volume =',v,'m^3/kg')\n", - "print'%s %.5f %s'%('volume =',v1,'m^3/kg')\n", - "print'%s %.1f %s'%('internal energy = ',u,'kJ/kg')\n", - "print'%s %.1f %s'%('internal energy =',u1,'kJ/kg')\n", - "print'%s %.1f %s'%('enthalpy =',h,'kJ/kg')\n", - "print'%s %.f %s'%('enthalpy = ',h1,'kJ/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume = 0.12547 m^3/kg\n", - "volume = 0.00136 m^3/kg\n", - "internal energy = 2772.6 kJ/kg\n", - "internal energy = 1306.1 kJ/kg\n", - "enthalpy = 3023.5 kJ/kg\n", - "enthalpy = 1333 kJ/kg\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "example3-pg49\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate the volume and internal energy and enthalpy\n", - "##initialisation of variables\n", - "vf= 0.001404 ##m^3/kg\n", - "x= 0.8\n", - "vg= 0.02167 ##m^3/kg\n", - "uf= 1332. ##kJ/kg\n", - "ug= 1231. ##kJ/kg\n", - "hf= 1344. ##kJ/kg\n", - "hg= 1404.9 ##kJ/kg\n", - "##CALCULATIONS\n", - "v= vf+x*(vg-vf)\n", - "u= uf+x*ug\n", - "h= hf+x*hg\n", - "##RESULTS\n", - "print'%s %.5f %s'%('volume =',v,'m^3/kg')\n", - "print'%s %.1f %s'%('internal energy =',u,'kJ/kg')\n", - "print'%s %.1f %s'%('enthalpy =',h, 'kJ/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume = 0.01762 m^3/kg\n", - "internal energy = 2316.8 kJ/kg\n", - "enthalpy = 2467.9 kJ/kg\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg 52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate the specific volume and internal energy and enthalpy and entropy\n", - "##initialisation of variables\n", - "T= 296. ##K\n", - "T1= 250. ##K\n", - "T2= 300. ##K\n", - "v= 0.1257 ##m^3/kg\n", - "v1= 0.11144 ##m^3/kg\n", - "u1= 27772.6 ##kJ/kg\n", - "u2= 2679.6 ##kJ/kg\n", - "h1= 3023.5 ##kJ/kg\n", - "h2= 2902.5 ##kJ/kg\n", - "s1= 6.7664 ##kJ/kg K\n", - "s2= 6.5433 ##kJ/kg K\n", - "##CALCULATIONS\n", - "a1= (T-T1)/(T2-T1)\n", - "a2= 1-a1\n", - "V= a1*v+a2*v1\n", - "U= a1*u1+a2*u2\n", - "H= a1*h1+a2*h2\n", - "S= a1*s1+a2*s2\n", - "##RESULTS\n", - "print'%s %.3f %s'%('a2 = ',a2,'')\n", - "print'%s %.5f %s'%('specific volume =',V,'m^3/kg')\n", - "print'%s %.1f %s'%('internal energy =',U,'kJ/kg')\n", - "print'%s %.1f %s'%('enthalpy =',H,'kJ/kg')\n", - "print'%s %.1f %s'%('Entropy =',S,'kJ/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "a2 = 0.080 \n", - "specific volume = 0.12456 m^3/kg\n", - "internal energy = 25765.2 kJ/kg\n", - "enthalpy = 3013.8 kJ/kg\n", - "Entropy = 6.7 kJ/kg\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exapmle5-pg54" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate a2 and internal enerjy\n", - "##initialisation of variables\n", - "v= 0.15 ##m^3/kg\n", - "v1= 0.13857 ##m^3/kg\n", - "v2= 0.1512 ##m^3/kg\n", - "v3= 0.050 ##m^3##kg\n", - "vf= 0.001177 ##m^3/kg\n", - "vg= 0.09963 ##m^3/kg\n", - "uf= 906.44 ##kJ/kg\n", - "ufg= 1693.8 ##kJ/kg\n", - "##CALCULATIONS\n", - "a1= (v-v1)/(v2-v1)\n", - "a2= 1-a1\n", - "x= (v3-vf)/(vg-vf)\n", - "u= uf+x*ufg\n", - "##RESULTS\n", - "print'%s %.3f %s'%('a2 =',a2,'')\n", - "print'%s %.1f %s'%('internal energy =',u,'kJ/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "a2 = 0.095 \n", - "internal energy = 1746.4 kJ/kg\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate pressure and temperature\n", - "##initialisation of variables\n", - "T= 250.##C\n", - "T1= 300. ##C\n", - "v300= 0.6548 ##m^3/kg\n", - "v250= 0.591 ##m^3/kg\n", - "v= 0.6 ##m^3/kg\n", - "u= 3000. ##kJ/kg\n", - "u250= 2726.1 ##kJ/kg\n", - "u300= 2804.8 ##kJ/kg\n", - "T2= 510.30 \n", - "u2= 3145.26 ##kJ/kg\n", - "p= 0.4 ##Mpa\n", - "p2= 0.2 ##Mpa\n", - "##CALCULATIONS\n", - "T1= T1+((v-v250)/(v300-v250))*(T2-T)\n", - "u1= u250+((v-v250)/(v300-v250))*(u300-u250)\n", - "du= u1-u\n", - "p1= p+((u-u1)/(u2-u1))*p2\n", - "##RESULTS\n", - "print'%s %.3f %s'%('pressure =',p1,'Mpa')\n", - "print'%s %.f %s'%('temperature =',T2,'C')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "pressure = 0.529 Mpa\n", - "temperature = 510 C\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7-pg54" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate work and heat interaction\n", - "##initialisation of variables\n", - "V= 0.2 ##m^3\n", - "v1= 0.02995 ##m^3/kg\n", - "u2= 2826.7 ##kJ/kg\n", - "u1= 2747.7 ##kJ/kg\n", - "h2= 3092.5 ##kJ/kg\n", - "h1= 2987.3 ##kJ/kg\n", - "p= 4 ##Mpa\n", - "v2= 0.06645 ##m^3/kg\n", - "v1= 0.02995 ##m^3/kg\n", - "##CALCULATIONS\n", - "m= V/v1\n", - "U= m*(u2-u1)\n", - "H= m*(h2-h1)\n", - "W= m*p*10*10*10*(v2-v1)\n", - "Q= U+W\n", - "##RESULTS\n", - "print'%s %.1f %s'%('work =',W,'kJ') \n", - "print'%s %.1f %s'%('heat interaction =',Q,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work = 975.0 kJ\n", - "heat interaction = 1502.5 kJ\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example8-pg 55" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate work and heat interaction\n", - "##initialisation of variables\n", - "m= 6.678 ##kg\n", - "u2= 2826.7 ##kJ/kg\n", - "u1= 2747.7 ##kJ/kg\n", - "p1= 8. ##Mpa\n", - "p2= 7. ##Mpa\n", - "p3= 6. ##Mpa\n", - "p4= 5. ##Mpa\n", - "p5= 4. ##Mpa\n", - "v1= 29.95 ##L/kg\n", - "v2= 35.24 ##L/kg\n", - "v3= 42.23 ##L/kg\n", - "v4= 51.94 ##L/kg\n", - "v5= 66.45 ##L/kg\n", - "##CALCULATIONS\n", - "U= m*(u2-u1)\n", - "W= m*0.5*((p1+p2)*(v2-v1)+(p2+p3)*(v3-v2)+(p3+p4)*(v4-v3)+(p4+p5)*(v5-v4))\n", - "Q=U+W\n", - "##RESULTS\n", - "print'%s %.1f %s'%('work =',W,'kJ') \n", - "print'%s %.f %s'%('heat interaction =',Q,'kJ') \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work = 1361.0 kJ\n", - "heat interaction = 1889 kJ\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9-pg56\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate final pressure and enthalpy and etropy\n", - "##initialisation of variables\n", - "p0= 100. ##kpa\n", - "A= 0.1 ##m^2\n", - "F= 20. ##kN\n", - "m3= 0.8873 ##kg\n", - "m1= 1.1384 ##kg\n", - "m2= 0.2511 ##kg\n", - "u1= 3116.2 ##kJ/kg\n", - "u2= 2728.7 ##kJ/kg\n", - "v3= 0.9942 ##m^3/kg\n", - "##CALCULATIONS\n", - "pe= (p0+(F/A))/1000\n", - "h3= (m1*u1-m2*u2)/m3\n", - "z3= m3*v3/A\n", - "##RESULTS\n", - "print'%s %.1f %s'%('final pressure =',pe,'Mpa') \n", - "print'%s %.1f %s'%('enthalpy = ',h3,'kJ/kg') \n", - "print'%s %.2f %s'%('piston rise =',z3,'m') \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "final pressure = 0.3 Mpa\n", - "enthalpy = 3225.9 kJ/kg\n", - "piston rise = 8.82 m\n" - ] - } - ], - "prompt_number": 14 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter_4__1.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter_4__1.ipynb deleted file mode 100755 index b4cbb2bf..00000000 --- a/Thermodynamics:_From_concepts_to_applications/Chapter_4__1.ipynb +++ /dev/null @@ -1,466 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:f794a4d18f36c13ddab8d6024721da6bc9aca8b98b0260eaf3e1fb73a8bd345d" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Chapter 4-simple systems" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg43" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#caluclate the heat interaction and temperature rise\n", - "##initialisation of variables\n", - "m= 5000. ##kg\n", - "cp= 1.4 ##kJ/kg K\n", - "T2= 27.6 ##K\n", - "T1= 22. ##K\n", - "t= 40. ##min\n", - "P= 20. ##kW\n", - "##CALCULATIONS\n", - "H= m*cp*(T2-T1)\n", - "W= -P*t*60\n", - "Q= H+W\n", - "dT= -W/(m*cp)\n", - "##RESULTS\n", - "print'%s %.f %s'%('heat interaction =',Q,'kJ')\n", - "print'%s %.2f %s'%('Temperature rise = ',dT,'C')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "heat interaction = -8800 kJ\n", - "Temperature rise = 6.86 C\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "example 2-pg 49\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#caluclate the volumes and internal energy and enthaply\n", - "##initialisation of variables\n", - "T= 300. ##C\n", - "p= 2. ##Mpa\n", - "T1= 300. ##C\n", - "p1= 20.##Mpa\n", - "T2= 300. ##C\n", - "p2= 8.501 ##Mpa\n", - "##CALCULATIONS\n", - "v= 0.12547\n", - "v1= 0.00136\n", - "u= 2772.6\n", - "u1= 1306.1\n", - "h= 3023.5\n", - "h1= 1333.3\n", - "##RESULTS\n", - "print'%s %.5f %s'%('volume =',v,'m^3/kg')\n", - "print'%s %.5f %s'%('volume =',v1,'m^3/kg')\n", - "print'%s %.1f %s'%('internal energy = ',u,'kJ/kg')\n", - "print'%s %.1f %s'%('internal energy =',u1,'kJ/kg')\n", - "print'%s %.1f %s'%('enthalpy =',h,'kJ/kg')\n", - "print'%s %.f %s'%('enthalpy = ',h1,'kJ/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume = 0.12547 m^3/kg\n", - "volume = 0.00136 m^3/kg\n", - "internal energy = 2772.6 kJ/kg\n", - "internal energy = 1306.1 kJ/kg\n", - "enthalpy = 3023.5 kJ/kg\n", - "enthalpy = 1333 kJ/kg\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "example3-pg49\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate the volume and internal energy and enthalpy\n", - "##initialisation of variables\n", - "vf= 0.001404 ##m^3/kg\n", - "x= 0.8\n", - "vg= 0.02167 ##m^3/kg\n", - "uf= 1332. ##kJ/kg\n", - "ug= 1231. ##kJ/kg\n", - "hf= 1344. ##kJ/kg\n", - "hg= 1404.9 ##kJ/kg\n", - "##CALCULATIONS\n", - "v= vf+x*(vg-vf)\n", - "u= uf+x*ug\n", - "h= hf+x*hg\n", - "##RESULTS\n", - "print'%s %.5f %s'%('volume =',v,'m^3/kg')\n", - "print'%s %.1f %s'%('internal energy =',u,'kJ/kg')\n", - "print'%s %.1f %s'%('enthalpy =',h, 'kJ/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume = 0.01762 m^3/kg\n", - "internal energy = 2316.8 kJ/kg\n", - "enthalpy = 2467.9 kJ/kg\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg 52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate the specific volume and internal energy and enthalpy and entropy\n", - "##initialisation of variables\n", - "T= 296. ##K\n", - "T1= 250. ##K\n", - "T2= 300. ##K\n", - "v= 0.1257 ##m^3/kg\n", - "v1= 0.11144 ##m^3/kg\n", - "u1= 27772.6 ##kJ/kg\n", - "u2= 2679.6 ##kJ/kg\n", - "h1= 3023.5 ##kJ/kg\n", - "h2= 2902.5 ##kJ/kg\n", - "s1= 6.7664 ##kJ/kg K\n", - "s2= 6.5433 ##kJ/kg K\n", - "##CALCULATIONS\n", - "a1= (T-T1)/(T2-T1)\n", - "a2= 1-a1\n", - "V= a1*v+a2*v1\n", - "U= a1*u1+a2*u2\n", - "H= a1*h1+a2*h2\n", - "S= a1*s1+a2*s2\n", - "##RESULTS\n", - "print'%s %.3f %s'%('a2 = ',a2,'')\n", - "print'%s %.5f %s'%('specific volume =',V,'m^3/kg')\n", - "print'%s %.1f %s'%('internal energy =',U,'kJ/kg')\n", - "print'%s %.1f %s'%('enthalpy =',H,'kJ/kg')\n", - "print'%s %.1f %s'%('Entropy =',S,'kJ/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "a2 = 0.080 \n", - "specific volume = 0.12456 m^3/kg\n", - "internal energy = 25765.2 kJ/kg\n", - "enthalpy = 3013.8 kJ/kg\n", - "Entropy = 6.7 kJ/kg\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exapmle5-pg54" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate a2 and internal enerjy\n", - "##initialisation of variables\n", - "v= 0.15 ##m^3/kg\n", - "v1= 0.13857 ##m^3/kg\n", - "v2= 0.1512 ##m^3/kg\n", - "v3= 0.050 ##m^3##kg\n", - "vf= 0.001177 ##m^3/kg\n", - "vg= 0.09963 ##m^3/kg\n", - "uf= 906.44 ##kJ/kg\n", - "ufg= 1693.8 ##kJ/kg\n", - "##CALCULATIONS\n", - "a1= (v-v1)/(v2-v1)\n", - "a2= 1-a1\n", - "x= (v3-vf)/(vg-vf)\n", - "u= uf+x*ufg\n", - "##RESULTS\n", - "print'%s %.3f %s'%('a2 =',a2,'')\n", - "print'%s %.1f %s'%('internal energy =',u,'kJ/kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "a2 = 0.095 \n", - "internal energy = 1746.4 kJ/kg\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate pressure and temperature\n", - "##initialisation of variables\n", - "T= 250.##C\n", - "T1= 300. ##C\n", - "v300= 0.6548 ##m^3/kg\n", - "v250= 0.591 ##m^3/kg\n", - "v= 0.6 ##m^3/kg\n", - "u= 3000. ##kJ/kg\n", - "u250= 2726.1 ##kJ/kg\n", - "u300= 2804.8 ##kJ/kg\n", - "T2= 510.30 \n", - "u2= 3145.26 ##kJ/kg\n", - "p= 0.4 ##Mpa\n", - "p2= 0.2 ##Mpa\n", - "##CALCULATIONS\n", - "T1= T1+((v-v250)/(v300-v250))*(T2-T)\n", - "u1= u250+((v-v250)/(v300-v250))*(u300-u250)\n", - "du= u1-u\n", - "p1= p+((u-u1)/(u2-u1))*p2\n", - "##RESULTS\n", - "print'%s %.3f %s'%('pressure =',p1,'Mpa')\n", - "print'%s %.f %s'%('temperature =',T2,'C')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "pressure = 0.529 Mpa\n", - "temperature = 510 C\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7-pg54" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate work and heat interaction\n", - "##initialisation of variables\n", - "V= 0.2 ##m^3\n", - "v1= 0.02995 ##m^3/kg\n", - "u2= 2826.7 ##kJ/kg\n", - "u1= 2747.7 ##kJ/kg\n", - "h2= 3092.5 ##kJ/kg\n", - "h1= 2987.3 ##kJ/kg\n", - "p= 4 ##Mpa\n", - "v2= 0.06645 ##m^3/kg\n", - "v1= 0.02995 ##m^3/kg\n", - "##CALCULATIONS\n", - "m= V/v1\n", - "U= m*(u2-u1)\n", - "H= m*(h2-h1)\n", - "W= m*p*10*10*10*(v2-v1)\n", - "Q= U+W\n", - "##RESULTS\n", - "print'%s %.1f %s'%('work =',W,'kJ') \n", - "print'%s %.1f %s'%('heat interaction =',Q,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work = 975.0 kJ\n", - "heat interaction = 1502.5 kJ\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example8-pg 55" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate work and heat interaction\n", - "##initialisation of variables\n", - "m= 6.678 ##kg\n", - "u2= 2826.7 ##kJ/kg\n", - "u1= 2747.7 ##kJ/kg\n", - "p1= 8. ##Mpa\n", - "p2= 7. ##Mpa\n", - "p3= 6. ##Mpa\n", - "p4= 5. ##Mpa\n", - "p5= 4. ##Mpa\n", - "v1= 29.95 ##L/kg\n", - "v2= 35.24 ##L/kg\n", - "v3= 42.23 ##L/kg\n", - "v4= 51.94 ##L/kg\n", - "v5= 66.45 ##L/kg\n", - "##CALCULATIONS\n", - "U= m*(u2-u1)\n", - "W= m*0.5*((p1+p2)*(v2-v1)+(p2+p3)*(v3-v2)+(p3+p4)*(v4-v3)+(p4+p5)*(v5-v4))\n", - "Q=U+W\n", - "##RESULTS\n", - "print'%s %.1f %s'%('work =',W,'kJ') \n", - "print'%s %.f %s'%('heat interaction =',Q,'kJ') \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work = 1361.0 kJ\n", - "heat interaction = 1889 kJ\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9-pg56\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate final pressure and enthalpy and etropy\n", - "##initialisation of variables\n", - "p0= 100. ##kpa\n", - "A= 0.1 ##m^2\n", - "F= 20. ##kN\n", - "m3= 0.8873 ##kg\n", - "m1= 1.1384 ##kg\n", - "m2= 0.2511 ##kg\n", - "u1= 3116.2 ##kJ/kg\n", - "u2= 2728.7 ##kJ/kg\n", - "v3= 0.9942 ##m^3/kg\n", - "##CALCULATIONS\n", - "pe= (p0+(F/A))/1000\n", - "h3= (m1*u1-m2*u2)/m3\n", - "z3= m3*v3/A\n", - "##RESULTS\n", - "print'%s %.1f %s'%('final pressure =',pe,'Mpa') \n", - "print'%s %.1f %s'%('enthalpy = ',h3,'kJ/kg') \n", - "print'%s %.2f %s'%('piston rise =',z3,'m') \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "final pressure = 0.3 Mpa\n", - "enthalpy = 3225.9 kJ/kg\n", - "piston rise = 8.82 m\n" - ] - } - ], - "prompt_number": 14 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter_4__2.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter_4__2.ipynb index af2345df..087b31cb 100755 --- a/Thermodynamics:_From_concepts_to_applications/Chapter_4__2.ipynb +++ b/Thermodynamics:_From_concepts_to_applications/Chapter_4__2.ipynb @@ -1,7 +1,7 @@ { "metadata": { "name": "", - "signature": "sha256:0cf657809abd59a3a86b6df0687d80933981fc0951ab754e85709aa636b8b749" + "signature": "sha256:1f455d345757b912d780f8c505ce37e354978864332af7e0ecea71365b71aa92" }, "nbformat": 3, "nbformat_minor": 0, @@ -10,10 +10,10 @@ "cells": [ { "cell_type": "heading", - "level": 2, + "level": 1, "metadata": {}, "source": [ - "Chapter 4-simple systems" + "Chapter4-Simple systems" ] }, { @@ -21,7 +21,7 @@ "level": 2, "metadata": {}, "source": [ - "Example1-46" + "Ex1-pg51" ] }, { @@ -29,6 +29,7 @@ "collapsed": false, "input": [ "import math\n", + "#calculte pressure and mass and specific volume of water vapour\n", "##initialisation of variables\n", "V= 0.5 ##m**3\n", "M= 18.02 ##kg/kmol\n", @@ -46,7 +47,7 @@ "##RESULTS\n", "print'%s %.2f %s'% ('mass of water vapour =',m,' kg')\n", "print'%s %.2f %s' %(' specific volume of water vapour = ',v,' m**3/kg')\n", - "print'%s %.2f %s' %(' pressure of water vapour =',p-10,'kPa')\n", + "print'%s %.2f %s' %(' pressure of water vapour =',p,'kPa')\n", "print'%s %.2f %s' %(' pressure of water vapour = ',P-12,' kPa')\n", "print'%s %.2f %s' %(' pressure of water vapour =',P1,' kPa')\n" ], @@ -59,20 +60,20 @@ "text": [ "mass of water vapour = 27.03 kg\n", " specific volume of water vapour = 0.02 m**3/kg\n", - " pressure of water vapour = 15543.51 kPa\n", + " pressure of water vapour = 15553.51 kPa\n", " pressure of water vapour = 12131.31 kPa\n", " pressure of water vapour = 12432.21 kPa\n" ] } ], - "prompt_number": 3 + "prompt_number": 14 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ - "Ex2-pg50" + "Ex2-pg52" ] }, { @@ -80,6 +81,7 @@ "collapsed": false, "input": [ "import math\n", + "#calculate heat interaction\n", "##initialisation of variables\n", "m= 0.3 ##kg\n", "T= 25 ##C\n", @@ -101,14 +103,14 @@ ] } ], - "prompt_number": 4 + "prompt_number": 15 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ - "Example3-pg53" + "Ex3-pg53" ] }, { @@ -116,22 +118,22 @@ "collapsed": false, "input": [ "import math\n", - "#caluclate the heat interaction and temperature rise\n", + "#calculate heat interaction and temperature rise\n", "##initialisation of variables\n", - "m= 5000. ##kg\n", + "m= 5000 ##kg\n", "cp= 1.4 ##kJ/kg K\n", "T2= 27.6 ##K\n", - "T1= 22. ##K\n", - "t= 40. ##min\n", - "P= 20. ##kW\n", + "T1= 22 ##K\n", + "t= 40 ##min\n", + "P= 20 ##kW\n", "##CALCULATIONS\n", "H= m*cp*(T2-T1)\n", "W= -P*t*60\n", "Q= H+W\n", "dT= -W/(m*cp)\n", "##RESULTS\n", - "print'%s %.f %s'%('heat interaction =',Q,'kJ')\n", - "print'%s %.2f %s'%('Temperature rise = ',dT,'C')\n" + "print'%s %.2f %s'% ('heat interaction = ',Q,' kJ')\n", + "print'%s %.2f %s'% ('\\n temperature rise = ',dT,' C')\n" ], "language": "python", "metadata": {}, @@ -140,19 +142,20 @@ "output_type": "stream", "stream": "stdout", "text": [ - "heat interaction = -8800 kJ\n", - "Temperature rise = 6.86 C\n" + "heat interaction = -8800.00 kJ\n", + "\n", + " temperature rise = 6.86 C\n" ] } ], - "prompt_number": 15 + "prompt_number": 16 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ - "example 4-pg 59\n" + "Ex4-pg59" ] }, { @@ -160,12 +163,12 @@ "collapsed": false, "input": [ "import math\n", - "#caluclate the volumes and internal energy and enthaply\n", "##initialisation of variables\n", + "#calculate volume and internal energy and enthalpy\n", "T= 300. ##C\n", "p= 2. ##Mpa\n", "T1= 300. ##C\n", - "p1= 20.##Mpa\n", + "p1= 20. ##Mpa\n", "T2= 300. ##C\n", "p2= 8.501 ##Mpa\n", "##CALCULATIONS\n", @@ -176,12 +179,12 @@ "h= 3023.5\n", "h1= 1333.3\n", "##RESULTS\n", - "print'%s %.5f %s'%('volume =',v,'m^3/kg')\n", - "print'%s %.5f %s'%('volume =',v1,'m^3/kg')\n", - "print'%s %.1f %s'%('internal energy = ',u,'kJ/kg')\n", - "print'%s %.1f %s'%('internal energy =',u1,'kJ/kg')\n", - "print'%s %.1f %s'%('enthalpy =',h,'kJ/kg')\n", - "print'%s %.f %s'%('enthalpy = ',h1,'kJ/kg')\n" + "print'%s %.2f %s'% ('volume = ',v,' m^3/kg')\n", + "print'%s %.2f %s'% ('\\n volume =',v1,' m^3/kg')\n", + "print'%s %.2f %s'% ('\\n internal energy = ',u,' kJ/kg')\n", + "print'%s %.2f %s'% ('\\n internal energy = ',u1,' kJ/kg')\n", + "print'%s %.2f %s'% ('\\n enthalpy = ',h,' kJ/kg')\n", + "print'%s %.2f %s'% ('\\n enthalpy = ',h1,' kJ/kg')\n" ], "language": "python", "metadata": {}, @@ -190,12 +193,17 @@ "output_type": "stream", "stream": "stdout", "text": [ - "volume = 0.12547 m^3/kg\n", - "volume = 0.00136 m^3/kg\n", - "internal energy = 2772.6 kJ/kg\n", - "internal energy = 1306.1 kJ/kg\n", - "enthalpy = 3023.5 kJ/kg\n", - "enthalpy = 1333 kJ/kg\n" + "volume = 0.13 m^3/kg\n", + "\n", + " volume = 0.00 m^3/kg\n", + "\n", + " internal energy = 2772.60 kJ/kg\n", + "\n", + " internal energy = 1306.10 kJ/kg\n", + "\n", + " enthalpy = 3023.50 kJ/kg\n", + "\n", + " enthalpy = 1333.30 kJ/kg\n" ] } ], @@ -206,7 +214,7 @@ "level": 2, "metadata": {}, "source": [ - "example5-pg60\n" + "Ex5-pg60" ] }, { @@ -214,7 +222,7 @@ "collapsed": false, "input": [ "import math\n", - "#calculate the volume and internal energy and enthalpy\n", + "#calculate volume and internal energy\n", "##initialisation of variables\n", "vf= 0.001404 ##m^3/kg\n", "x= 0.8\n", @@ -228,9 +236,9 @@ "u= uf+x*ug\n", "h= hf+x*hg\n", "##RESULTS\n", - "print'%s %.5f %s'%('volume =',v,'m^3/kg')\n", - "print'%s %.1f %s'%('internal energy =',u,'kJ/kg')\n", - "print'%s %.1f %s'%('enthalpy =',h, 'kJ/kg')\n" + "print'%s %.2f %s'% ('volume = ',v,' m^3/kg')\n", + "print'%s %.2f %s'% ('\\n internal energy = ',u,' kJ/kg')\n", + "print'%s %.2f %s'% ('\\n enthalpy = ',h,' kJ/kg')\n" ], "language": "python", "metadata": {}, @@ -239,20 +247,22 @@ "output_type": "stream", "stream": "stdout", "text": [ - "volume = 0.01762 m^3/kg\n", - "internal energy = 2316.8 kJ/kg\n", - "enthalpy = 2467.9 kJ/kg\n" + "volume = 0.02 m^3/kg\n", + "\n", + " internal energy = 2316.80 kJ/kg\n", + "\n", + " enthalpy = 2467.92 kJ/kg\n" ] } ], - "prompt_number": 5 + "prompt_number": 18 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ - "Example6-pg 61" + "Ex6-pg61" ] }, { @@ -260,7 +270,7 @@ "collapsed": false, "input": [ "import math\n", - "#calculate the specific volume and internal energy and enthalpy and entropy\n", + "#calculate specific volume and internal energy and enthalpy and entropy\n", "##initialisation of variables\n", "T= 296. ##K\n", "T1= 250. ##K\n", @@ -275,17 +285,17 @@ "s2= 6.5433 ##kJ/kg K\n", "##CALCULATIONS\n", "a1= (T-T1)/(T2-T1)\n", - "a2= 1-a1\n", + "a2= 1.-a1\n", "V= a1*v+a2*v1\n", "U= a1*u1+a2*u2\n", "H= a1*h1+a2*h2\n", "S= a1*s1+a2*s2\n", "##RESULTS\n", - "print'%s %.3f %s'%('a2 = ',a2,'')\n", - "print'%s %.5f %s'%('specific volume =',V,'m^3/kg')\n", - "print'%s %.1f %s'%('internal energy =',U,'kJ/kg')\n", - "print'%s %.1f %s'%('enthalpy =',H,'kJ/kg')\n", - "print'%s %.1f %s'%('Entropy =',S,'kJ/kg')\n" + "print'%s %.2f %s'% ('a2 = ',a2,'')\n", + "print'%s %.2f %s'% ('\\n specific volume = ',V,' m^3/kg')\n", + "print'%s %.2f %s'% ('\\n internal energy = ',U,' kJ/kg')\n", + "print'%s %.2f %s'% ('\\n enthalpy = ',H,' kJ/kg')\n", + "print'%s %.2f %s'% ('\\n Entropy = ',S,' kJ/kg')\n" ], "language": "python", "metadata": {}, @@ -294,22 +304,26 @@ "output_type": "stream", "stream": "stdout", "text": [ - "a2 = 0.080 \n", - "specific volume = 0.12456 m^3/kg\n", - "internal energy = 25765.2 kJ/kg\n", - "enthalpy = 3013.8 kJ/kg\n", - "Entropy = 6.7 kJ/kg\n" + "a2 = 0.08 \n", + "\n", + " specific volume = 0.12 m^3/kg\n", + "\n", + " internal energy = 25765.16 kJ/kg\n", + "\n", + " enthalpy = 3013.82 kJ/kg\n", + "\n", + " Entropy = 6.75 kJ/kg\n" ] } ], - "prompt_number": 6 + "prompt_number": 19 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ - "Exapmle7-pg62" + "Ex7-pg62" ] }, { @@ -317,7 +331,7 @@ "collapsed": false, "input": [ "import math\n", - "#calculate a2 and internal enerjy\n", + "#calculate a2 and internal energy\n", "##initialisation of variables\n", "v= 0.15 ##m^3/kg\n", "v1= 0.13857 ##m^3/kg\n", @@ -333,8 +347,8 @@ "x= (v3-vf)/(vg-vf)\n", "u= uf+x*ufg\n", "##RESULTS\n", - "print'%s %.3f %s'%('a2 =',a2,'')\n", - "print'%s %.1f %s'%('internal energy =',u,'kJ/kg')\n" + "print'%s %.2f %s'% ('a2 = ',a2,'')\n", + "print'%s %.2f %s'% ('\\n internal energy = ',u,' kJ/kg')\n" ], "language": "python", "metadata": {}, @@ -343,19 +357,20 @@ "output_type": "stream", "stream": "stdout", "text": [ - "a2 = 0.095 \n", - "internal energy = 1746.4 kJ/kg\n" + "a2 = 0.10 \n", + "\n", + " internal energy = 1746.40 kJ/kg\n" ] } ], - "prompt_number": 7 + "prompt_number": 20 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ - "Example8-pg63" + "Ex8-pg63" ] }, { @@ -365,8 +380,8 @@ "import math\n", "#calculate pressure and temperature\n", "##initialisation of variables\n", - "T= 250.##C\n", - "T1= 300. ##C\n", + "T= 250. ##C\n", + "T2= 300. ##C\n", "v300= 0.6548 ##m^3/kg\n", "v250= 0.591 ##m^3/kg\n", "v= 0.6 ##m^3/kg\n", @@ -378,13 +393,13 @@ "p= 0.4 ##Mpa\n", "p2= 0.2 ##Mpa\n", "##CALCULATIONS\n", - "T1= T1+((v-v250)/(v300-v250))*(T2-T)\n", + "T1= T+((v-v250)/(v300-v250))*(T2-T)\n", "u1= u250+((v-v250)/(v300-v250))*(u300-u250)\n", "du= u1-u\n", "p1= p+((u-u1)/(u2-u1))*p2\n", "##RESULTS\n", - "print'%s %.3f %s'%('pressure =',p1,'Mpa')\n", - "print'%s %.f %s'%('temperature =',T2,'C')\n" + "print'%s %.2f %s'% ('pressure = ',p1,' Mpa')\n", + "print'%s %.2f %s'% ('\\n temperature = ',T2,' C')\n" ], "language": "python", "metadata": {}, @@ -393,36 +408,38 @@ "output_type": "stream", "stream": "stdout", "text": [ - "pressure = 0.529 Mpa\n", - "temperature = 510 C\n" + "pressure = 0.53 Mpa\n", + "\n", + " temperature = 510.30 C\n" ] } ], - "prompt_number": 8 + "prompt_number": 21 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ - "Ex10-pg64" + "Ex9-pg64" ] }, { "cell_type": "code", "collapsed": false, "input": [ - "\n", + "import math\n", + "#calculate mass and specific volume\n", "##initialisation of variables\n", "n= 1.5 ##kmol\n", - "V= 0.5 ##m**3\n", + "V= 0.5 ##m^3\n", "M= 18.02 ##kg\n", "##CALCULATIONS\n", "m= n*M\n", "v= V/m\n", "##RESULTS\n", "print'%s %.2f %s'% ('mass = ',m,' kg')\n", - "print'%s %.2f %s'% (' sepcific volume = ',v,' m^3/kg')\n" + "print'%s %.2f %s'% ('\\n sepcific volume = ',v,' m^3/kg')\n" ], "language": "python", "metadata": {}, @@ -432,18 +449,19 @@ "stream": "stdout", "text": [ "mass = 27.03 kg\n", + "\n", " sepcific volume = 0.02 m^3/kg\n" ] } ], - "prompt_number": 5 + "prompt_number": 22 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ - "Example 12-pg66" + "Ex12-pg66" ] }, { @@ -459,18 +477,18 @@ "u1= 2747.7 ##kJ/kg\n", "h2= 3092.5 ##kJ/kg\n", "h1= 2987.3 ##kJ/kg\n", - "p= 4 ##Mpa\n", + "p= 4. ##Mpa\n", "v2= 0.06645 ##m^3/kg\n", "v1= 0.02995 ##m^3/kg\n", "##CALCULATIONS\n", "m= V/v1\n", "U= m*(u2-u1)\n", "H= m*(h2-h1)\n", - "W= m*p*10*10*10*(v2-v1)\n", + "W= m*p*10**3*(v2-v1)\n", "Q= U+W\n", "##RESULTS\n", - "print'%s %.1f %s'%('work =',W,'kJ') \n", - "print'%s %.1f %s'%('heat interaction =',Q,'kJ')\n" + "print'%s %.2f %s'% (' work = ',W,' kJ') \n", + "print'%s %.2f %s'% ('\\n heat interaction = ',Q,' kJ') \n" ], "language": "python", "metadata": {}, @@ -479,19 +497,20 @@ "output_type": "stream", "stream": "stdout", "text": [ - "work = 975.0 kJ\n", - "heat interaction = 1502.5 kJ\n" + " work = 974.96 kJ\n", + "\n", + " heat interaction = 1502.50 kJ\n" ] } ], - "prompt_number": 10 + "prompt_number": 23 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ - "Example13-pg 67" + "Ex13-pg67" ] }, { @@ -519,8 +538,8 @@ "W= m*0.5*((p1+p2)*(v2-v1)+(p2+p3)*(v3-v2)+(p3+p4)*(v4-v3)+(p4+p5)*(v5-v4))\n", "Q=U+W\n", "##RESULTS\n", - "print'%s %.1f %s'%('work =',W,'kJ') \n", - "print'%s %.f %s'%('heat interaction =',Q,'kJ') \n" + "print'%s %.2f %s'% (' work = ',W,' kJ') \n", + "print'%s %.2f %s'% ('\\n heat interaction = ',Q,' kJ') \n" ], "language": "python", "metadata": {}, @@ -529,19 +548,20 @@ "output_type": "stream", "stream": "stdout", "text": [ - "work = 1361.0 kJ\n", - "heat interaction = 1889 kJ\n" + " work = 1361.04 kJ\n", + "\n", + " heat interaction = 1888.61 kJ\n" ] } ], - "prompt_number": 12 + "prompt_number": 24 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ - "Example 14-pg68\n" + "Ex14-pg68" ] }, { @@ -549,7 +569,7 @@ "collapsed": false, "input": [ "import math\n", - "#calculate final pressure and enthalpy and etropy\n", + "#calculate final pressure and enthalpy and piston rise\n", "##initialisation of variables\n", "p0= 100. ##kpa\n", "A= 0.1 ##m^2\n", @@ -561,13 +581,13 @@ "u2= 2728.7 ##kJ/kg\n", "v3= 0.9942 ##m^3/kg\n", "##CALCULATIONS\n", - "pe= (p0+(F/A))/1000\n", + "pe= (p0+(F/A))/1000.\n", "h3= (m1*u1-m2*u2)/m3\n", "z3= m3*v3/A\n", "##RESULTS\n", - "print'%s %.1f %s'%('final pressure =',pe,'Mpa') \n", - "print'%s %.1f %s'%('enthalpy = ',h3,'kJ/kg') \n", - "print'%s %.2f %s'%('piston rise =',z3,'m') \n" + "print'%s %.2f %s'% (' final pressure = ',pe,' Mpa') \n", + "print'%s %.2f %s'% (' \\n enthalpy = ',h3,' kJ/kg') \n", + "print'%s %.2f %s'% ('\\n piston rise = ',z3,' m') \n" ], "language": "python", "metadata": {}, @@ -576,13 +596,15 @@ "output_type": "stream", "stream": "stdout", "text": [ - "final pressure = 0.3 Mpa\n", - "enthalpy = 3225.9 kJ/kg\n", - "piston rise = 8.82 m\n" + " final pressure = 0.30 Mpa\n", + " \n", + " enthalpy = 3225.86 kJ/kg\n", + "\n", + " piston rise = 8.82 m\n" ] } ], - "prompt_number": 14 + "prompt_number": 25 } ], "metadata": {} diff --git a/Thermodynamics:_From_concepts_to_applications/chapter12.ipynb b/Thermodynamics:_From_concepts_to_applications/chapter12.ipynb deleted file mode 100755 index aea962e5..00000000 --- a/Thermodynamics:_From_concepts_to_applications/chapter12.ipynb +++ /dev/null @@ -1,314 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:2837d214113f06819e10997f047a7eaa67f457e584a6b0f4db06b83606bfd8b8" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter12-ideal gas mixtures and humid air" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg 251" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate molecular weight of air\n", - "##initialisation of variables\n", - "x= 0.78\n", - "x1= 0.21\n", - "x2= 0.008\n", - "x3= 0.002\n", - "MN2= 28.013 ##gms\n", - "MO2= 32. ##gms\n", - "MAr= 39.948 ##gms\n", - "MH2O= 18.016 ##gms\n", - "##CALCULATIONS\n", - "M= x*MN2+x1*MO2+x2*MAr+x3*MH2O\n", - "##RESULTS\n", - "print'%s %.3f %s'% ('molecular wight of air=',M,'kg/kmol')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "molecular wight of air= 28.926 kg/kmol\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg254" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate average value and mass\n", - "##initialisation of variables\n", - "M= 30.04 ##kg/kmol\n", - "R= 8.3143 ##J/mol K\n", - "p= 100. ##kPa\n", - "V= 0.2 ##m^3\n", - "T= 25. ##C\n", - "##CALCULATIONS\n", - "R1= R/M\n", - "m= p*V/(R1*(273.15+T))\n", - "##RESULTS\n", - "print'%s %.4f %s'% ('average value of R=',R1,'kJ/kg K')\n", - "print'%s %.3f %s'% ('mass=',m,'kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "average value of R= 0.2768 kJ/kg K\n", - "mass= 0.242 kg\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg256" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate final temperature and final pressure and change in entropy\n", - "##initialisation of variables\n", - "m1= 0.5 ##kg\n", - "cv1= 0.6496 ##kJ/kg K\n", - "T1= 80. ##C\n", - "m2= 1. ##kg\n", - "cv2= 0.6299 ##kJ/kg K\n", - "T2= 150. ##C\n", - "M= 32. ##kg\n", - "M1= 44. ##kg\n", - "V1= 0.11437 ##m^3\n", - "V2= 0.1 ##m^2\n", - "R= 8.314 ##J/mol K\n", - "##CALCULATIONS\n", - "T= (m1*cv1*(273.15+T1)+m2*cv2*(273.15+T2))/(m1*cv1+m2*cv2)\n", - "p= ((m1/M)+(m2/M1))*R*T/(V1+V2)\n", - "S= m1*(cv1*math.log(T/(273.15+T1))+(R/M)*math.log((V1+V2)/V1))+m2*(cv2*math.log(T/(273.15+T2))+(R/M1)*math.log((V1+V2)/V2))\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('final temperature=',T,'kPa')\n", - "print'%s %.1f %s'% ('final pressure=',p,'kPa')\n", - "print'%s %.4f %s'% ('change in entropy=',S,'kJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "final temperature= 399.3 kPa\n", - "final pressure= 594.0 kPa\n", - "change in entropy= 0.2291 kJ/K\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg268\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate wet-bulb temoerature and minimum temperature and amount of water injected\n", - "##initialisation of variables\n", - "Twb= 22. ##C\n", - "Tmin= 22.3 ##C\n", - "w2= 0.0170 ##kg/kg dry air\n", - "w1= 0.0093 ##kg/kg dry air\n", - "##CALCULATIONS\n", - "m= w2-w1\n", - "##RESULTS\n", - "print'%s %.f %s'% (' wet-bulb temperature=',Twb,'C')\n", - "print'%s %.f %s'% ('minimum temperature=',Tmin,'1C')\n", - "print'%s %.4f %s'% ('amount of water injected=',m,'kg/kg dry air')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " wet-bulb temperature= 22 C\n", - "minimum temperature= 22 1C\n", - "amount of water injected= 0.0077 kg/kg dry air\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg269" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate state after mixing\n", - "##initialisation of variables\n", - "w3= 0.0178 ##kg/kgair\n", - "w4= 0.0172 ##kg/kgair\n", - "##CALCULATIONS\n", - "dw= w3-w4\n", - "##RESULTS\n", - "print'%s %.4f %s'% (' state after mixing=',dw,'kg/kgair')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " state after mixing= 0.0006 kg/kgair\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg271" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate air mass flow rate and amount of water to be added\n", - "##initialisation of variables\n", - "m= 20000. ##kg/h\n", - "T1= 42. ##C\n", - "T2= 22. ##C\n", - "J= 4.186 ##cal\n", - "h1= 54. ##kJ/kg\n", - "h2= 94.8 ##kJ/kg\n", - "w1= 0.0105 ##kg/h kg\n", - "w2= 0.0244 ##kg/h kg\n", - "##CALCULATIONS\n", - "ma= m*(T1-T2)*J/((h2-h1-J*T2*(w2-w1)))\n", - "mw= ma*(w2-w1)\n", - "m4= m-mw\n", - "##RESULTS\n", - "print'%s %.1f %s'%('air mass flow rate=',ma,'kg/hr')\n", - "print'%s %.f %s'%('amount of water to be added=',m4,'kg/hr')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "air mass flow rate= 42368.5 kg/hr\n", - "amount of water to be added= 19411 kg/hr\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg272" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate maximum useful work\n", - "##initialisation of variables\n", - "x= 0.79\n", - "P0= 101 ##kPa\n", - "P= 20 ##Mpa\n", - "V= 0.032 ##m^3\n", - "##CALCULATIONS\n", - "p= x*P0\n", - "Wrev= P*10*10*10*V*(math.log(P/(p*math.pow(10,-3)))+((p*math.pow(10,-3))/P)-1)\n", - "##RESULTS\n", - "print'%s %.1f %s'% (' maximum useful work=',Wrev,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " maximum useful work= 2898.0 kJ\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/chapter12_1.ipynb b/Thermodynamics:_From_concepts_to_applications/chapter12_1.ipynb deleted file mode 100755 index aea962e5..00000000 --- a/Thermodynamics:_From_concepts_to_applications/chapter12_1.ipynb +++ /dev/null @@ -1,314 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:2837d214113f06819e10997f047a7eaa67f457e584a6b0f4db06b83606bfd8b8" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter12-ideal gas mixtures and humid air" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg 251" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate molecular weight of air\n", - "##initialisation of variables\n", - "x= 0.78\n", - "x1= 0.21\n", - "x2= 0.008\n", - "x3= 0.002\n", - "MN2= 28.013 ##gms\n", - "MO2= 32. ##gms\n", - "MAr= 39.948 ##gms\n", - "MH2O= 18.016 ##gms\n", - "##CALCULATIONS\n", - "M= x*MN2+x1*MO2+x2*MAr+x3*MH2O\n", - "##RESULTS\n", - "print'%s %.3f %s'% ('molecular wight of air=',M,'kg/kmol')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "molecular wight of air= 28.926 kg/kmol\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg254" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate average value and mass\n", - "##initialisation of variables\n", - "M= 30.04 ##kg/kmol\n", - "R= 8.3143 ##J/mol K\n", - "p= 100. ##kPa\n", - "V= 0.2 ##m^3\n", - "T= 25. ##C\n", - "##CALCULATIONS\n", - "R1= R/M\n", - "m= p*V/(R1*(273.15+T))\n", - "##RESULTS\n", - "print'%s %.4f %s'% ('average value of R=',R1,'kJ/kg K')\n", - "print'%s %.3f %s'% ('mass=',m,'kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "average value of R= 0.2768 kJ/kg K\n", - "mass= 0.242 kg\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg256" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate final temperature and final pressure and change in entropy\n", - "##initialisation of variables\n", - "m1= 0.5 ##kg\n", - "cv1= 0.6496 ##kJ/kg K\n", - "T1= 80. ##C\n", - "m2= 1. ##kg\n", - "cv2= 0.6299 ##kJ/kg K\n", - "T2= 150. ##C\n", - "M= 32. ##kg\n", - "M1= 44. ##kg\n", - "V1= 0.11437 ##m^3\n", - "V2= 0.1 ##m^2\n", - "R= 8.314 ##J/mol K\n", - "##CALCULATIONS\n", - "T= (m1*cv1*(273.15+T1)+m2*cv2*(273.15+T2))/(m1*cv1+m2*cv2)\n", - "p= ((m1/M)+(m2/M1))*R*T/(V1+V2)\n", - "S= m1*(cv1*math.log(T/(273.15+T1))+(R/M)*math.log((V1+V2)/V1))+m2*(cv2*math.log(T/(273.15+T2))+(R/M1)*math.log((V1+V2)/V2))\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('final temperature=',T,'kPa')\n", - "print'%s %.1f %s'% ('final pressure=',p,'kPa')\n", - "print'%s %.4f %s'% ('change in entropy=',S,'kJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "final temperature= 399.3 kPa\n", - "final pressure= 594.0 kPa\n", - "change in entropy= 0.2291 kJ/K\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg268\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate wet-bulb temoerature and minimum temperature and amount of water injected\n", - "##initialisation of variables\n", - "Twb= 22. ##C\n", - "Tmin= 22.3 ##C\n", - "w2= 0.0170 ##kg/kg dry air\n", - "w1= 0.0093 ##kg/kg dry air\n", - "##CALCULATIONS\n", - "m= w2-w1\n", - "##RESULTS\n", - "print'%s %.f %s'% (' wet-bulb temperature=',Twb,'C')\n", - "print'%s %.f %s'% ('minimum temperature=',Tmin,'1C')\n", - "print'%s %.4f %s'% ('amount of water injected=',m,'kg/kg dry air')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " wet-bulb temperature= 22 C\n", - "minimum temperature= 22 1C\n", - "amount of water injected= 0.0077 kg/kg dry air\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg269" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate state after mixing\n", - "##initialisation of variables\n", - "w3= 0.0178 ##kg/kgair\n", - "w4= 0.0172 ##kg/kgair\n", - "##CALCULATIONS\n", - "dw= w3-w4\n", - "##RESULTS\n", - "print'%s %.4f %s'% (' state after mixing=',dw,'kg/kgair')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " state after mixing= 0.0006 kg/kgair\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg271" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate air mass flow rate and amount of water to be added\n", - "##initialisation of variables\n", - "m= 20000. ##kg/h\n", - "T1= 42. ##C\n", - "T2= 22. ##C\n", - "J= 4.186 ##cal\n", - "h1= 54. ##kJ/kg\n", - "h2= 94.8 ##kJ/kg\n", - "w1= 0.0105 ##kg/h kg\n", - "w2= 0.0244 ##kg/h kg\n", - "##CALCULATIONS\n", - "ma= m*(T1-T2)*J/((h2-h1-J*T2*(w2-w1)))\n", - "mw= ma*(w2-w1)\n", - "m4= m-mw\n", - "##RESULTS\n", - "print'%s %.1f %s'%('air mass flow rate=',ma,'kg/hr')\n", - "print'%s %.f %s'%('amount of water to be added=',m4,'kg/hr')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "air mass flow rate= 42368.5 kg/hr\n", - "amount of water to be added= 19411 kg/hr\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg272" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate maximum useful work\n", - "##initialisation of variables\n", - "x= 0.79\n", - "P0= 101 ##kPa\n", - "P= 20 ##Mpa\n", - "V= 0.032 ##m^3\n", - "##CALCULATIONS\n", - "p= x*P0\n", - "Wrev= P*10*10*10*V*(math.log(P/(p*math.pow(10,-3)))+((p*math.pow(10,-3))/P)-1)\n", - "##RESULTS\n", - "print'%s %.1f %s'% (' maximum useful work=',Wrev,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " maximum useful work= 2898.0 kJ\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/chapter12_2.ipynb b/Thermodynamics:_From_concepts_to_applications/chapter12_2.ipynb deleted file mode 100755 index aea962e5..00000000 --- a/Thermodynamics:_From_concepts_to_applications/chapter12_2.ipynb +++ /dev/null @@ -1,314 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:2837d214113f06819e10997f047a7eaa67f457e584a6b0f4db06b83606bfd8b8" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter12-ideal gas mixtures and humid air" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg 251" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate molecular weight of air\n", - "##initialisation of variables\n", - "x= 0.78\n", - "x1= 0.21\n", - "x2= 0.008\n", - "x3= 0.002\n", - "MN2= 28.013 ##gms\n", - "MO2= 32. ##gms\n", - "MAr= 39.948 ##gms\n", - "MH2O= 18.016 ##gms\n", - "##CALCULATIONS\n", - "M= x*MN2+x1*MO2+x2*MAr+x3*MH2O\n", - "##RESULTS\n", - "print'%s %.3f %s'% ('molecular wight of air=',M,'kg/kmol')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "molecular wight of air= 28.926 kg/kmol\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg254" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate average value and mass\n", - "##initialisation of variables\n", - "M= 30.04 ##kg/kmol\n", - "R= 8.3143 ##J/mol K\n", - "p= 100. ##kPa\n", - "V= 0.2 ##m^3\n", - "T= 25. ##C\n", - "##CALCULATIONS\n", - "R1= R/M\n", - "m= p*V/(R1*(273.15+T))\n", - "##RESULTS\n", - "print'%s %.4f %s'% ('average value of R=',R1,'kJ/kg K')\n", - "print'%s %.3f %s'% ('mass=',m,'kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "average value of R= 0.2768 kJ/kg K\n", - "mass= 0.242 kg\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg256" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate final temperature and final pressure and change in entropy\n", - "##initialisation of variables\n", - "m1= 0.5 ##kg\n", - "cv1= 0.6496 ##kJ/kg K\n", - "T1= 80. ##C\n", - "m2= 1. ##kg\n", - "cv2= 0.6299 ##kJ/kg K\n", - "T2= 150. ##C\n", - "M= 32. ##kg\n", - "M1= 44. ##kg\n", - "V1= 0.11437 ##m^3\n", - "V2= 0.1 ##m^2\n", - "R= 8.314 ##J/mol K\n", - "##CALCULATIONS\n", - "T= (m1*cv1*(273.15+T1)+m2*cv2*(273.15+T2))/(m1*cv1+m2*cv2)\n", - "p= ((m1/M)+(m2/M1))*R*T/(V1+V2)\n", - "S= m1*(cv1*math.log(T/(273.15+T1))+(R/M)*math.log((V1+V2)/V1))+m2*(cv2*math.log(T/(273.15+T2))+(R/M1)*math.log((V1+V2)/V2))\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('final temperature=',T,'kPa')\n", - "print'%s %.1f %s'% ('final pressure=',p,'kPa')\n", - "print'%s %.4f %s'% ('change in entropy=',S,'kJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "final temperature= 399.3 kPa\n", - "final pressure= 594.0 kPa\n", - "change in entropy= 0.2291 kJ/K\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg268\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate wet-bulb temoerature and minimum temperature and amount of water injected\n", - "##initialisation of variables\n", - "Twb= 22. ##C\n", - "Tmin= 22.3 ##C\n", - "w2= 0.0170 ##kg/kg dry air\n", - "w1= 0.0093 ##kg/kg dry air\n", - "##CALCULATIONS\n", - "m= w2-w1\n", - "##RESULTS\n", - "print'%s %.f %s'% (' wet-bulb temperature=',Twb,'C')\n", - "print'%s %.f %s'% ('minimum temperature=',Tmin,'1C')\n", - "print'%s %.4f %s'% ('amount of water injected=',m,'kg/kg dry air')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " wet-bulb temperature= 22 C\n", - "minimum temperature= 22 1C\n", - "amount of water injected= 0.0077 kg/kg dry air\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg269" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate state after mixing\n", - "##initialisation of variables\n", - "w3= 0.0178 ##kg/kgair\n", - "w4= 0.0172 ##kg/kgair\n", - "##CALCULATIONS\n", - "dw= w3-w4\n", - "##RESULTS\n", - "print'%s %.4f %s'% (' state after mixing=',dw,'kg/kgair')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " state after mixing= 0.0006 kg/kgair\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg271" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate air mass flow rate and amount of water to be added\n", - "##initialisation of variables\n", - "m= 20000. ##kg/h\n", - "T1= 42. ##C\n", - "T2= 22. ##C\n", - "J= 4.186 ##cal\n", - "h1= 54. ##kJ/kg\n", - "h2= 94.8 ##kJ/kg\n", - "w1= 0.0105 ##kg/h kg\n", - "w2= 0.0244 ##kg/h kg\n", - "##CALCULATIONS\n", - "ma= m*(T1-T2)*J/((h2-h1-J*T2*(w2-w1)))\n", - "mw= ma*(w2-w1)\n", - "m4= m-mw\n", - "##RESULTS\n", - "print'%s %.1f %s'%('air mass flow rate=',ma,'kg/hr')\n", - "print'%s %.f %s'%('amount of water to be added=',m4,'kg/hr')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "air mass flow rate= 42368.5 kg/hr\n", - "amount of water to be added= 19411 kg/hr\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg272" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate maximum useful work\n", - "##initialisation of variables\n", - "x= 0.79\n", - "P0= 101 ##kPa\n", - "P= 20 ##Mpa\n", - "V= 0.032 ##m^3\n", - "##CALCULATIONS\n", - "p= x*P0\n", - "Wrev= P*10*10*10*V*(math.log(P/(p*math.pow(10,-3)))+((p*math.pow(10,-3))/P)-1)\n", - "##RESULTS\n", - "print'%s %.1f %s'% (' maximum useful work=',Wrev,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " maximum useful work= 2898.0 kJ\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Thermodynamics:_From_concepts_to_applications/chapter12_ideal_gas_mixtures_and_humid_air.ipynb b/Thermodynamics:_From_concepts_to_applications/chapter12_ideal_gas_mixtures_and_humid_air.ipynb deleted file mode 100755 index aea962e5..00000000 --- a/Thermodynamics:_From_concepts_to_applications/chapter12_ideal_gas_mixtures_and_humid_air.ipynb +++ /dev/null @@ -1,314 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:2837d214113f06819e10997f047a7eaa67f457e584a6b0f4db06b83606bfd8b8" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter12-ideal gas mixtures and humid air" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example1-pg 251" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate molecular weight of air\n", - "##initialisation of variables\n", - "x= 0.78\n", - "x1= 0.21\n", - "x2= 0.008\n", - "x3= 0.002\n", - "MN2= 28.013 ##gms\n", - "MO2= 32. ##gms\n", - "MAr= 39.948 ##gms\n", - "MH2O= 18.016 ##gms\n", - "##CALCULATIONS\n", - "M= x*MN2+x1*MO2+x2*MAr+x3*MH2O\n", - "##RESULTS\n", - "print'%s %.3f %s'% ('molecular wight of air=',M,'kg/kmol')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "molecular wight of air= 28.926 kg/kmol\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example2-pg254" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate average value and mass\n", - "##initialisation of variables\n", - "M= 30.04 ##kg/kmol\n", - "R= 8.3143 ##J/mol K\n", - "p= 100. ##kPa\n", - "V= 0.2 ##m^3\n", - "T= 25. ##C\n", - "##CALCULATIONS\n", - "R1= R/M\n", - "m= p*V/(R1*(273.15+T))\n", - "##RESULTS\n", - "print'%s %.4f %s'% ('average value of R=',R1,'kJ/kg K')\n", - "print'%s %.3f %s'% ('mass=',m,'kg')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "average value of R= 0.2768 kJ/kg K\n", - "mass= 0.242 kg\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example3-pg256" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate final temperature and final pressure and change in entropy\n", - "##initialisation of variables\n", - "m1= 0.5 ##kg\n", - "cv1= 0.6496 ##kJ/kg K\n", - "T1= 80. ##C\n", - "m2= 1. ##kg\n", - "cv2= 0.6299 ##kJ/kg K\n", - "T2= 150. ##C\n", - "M= 32. ##kg\n", - "M1= 44. ##kg\n", - "V1= 0.11437 ##m^3\n", - "V2= 0.1 ##m^2\n", - "R= 8.314 ##J/mol K\n", - "##CALCULATIONS\n", - "T= (m1*cv1*(273.15+T1)+m2*cv2*(273.15+T2))/(m1*cv1+m2*cv2)\n", - "p= ((m1/M)+(m2/M1))*R*T/(V1+V2)\n", - "S= m1*(cv1*math.log(T/(273.15+T1))+(R/M)*math.log((V1+V2)/V1))+m2*(cv2*math.log(T/(273.15+T2))+(R/M1)*math.log((V1+V2)/V2))\n", - "##RESULTS\n", - "print'%s %.1f %s'% ('final temperature=',T,'kPa')\n", - "print'%s %.1f %s'% ('final pressure=',p,'kPa')\n", - "print'%s %.4f %s'% ('change in entropy=',S,'kJ/K')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "final temperature= 399.3 kPa\n", - "final pressure= 594.0 kPa\n", - "change in entropy= 0.2291 kJ/K\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example4-pg268\n" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate wet-bulb temoerature and minimum temperature and amount of water injected\n", - "##initialisation of variables\n", - "Twb= 22. ##C\n", - "Tmin= 22.3 ##C\n", - "w2= 0.0170 ##kg/kg dry air\n", - "w1= 0.0093 ##kg/kg dry air\n", - "##CALCULATIONS\n", - "m= w2-w1\n", - "##RESULTS\n", - "print'%s %.f %s'% (' wet-bulb temperature=',Twb,'C')\n", - "print'%s %.f %s'% ('minimum temperature=',Tmin,'1C')\n", - "print'%s %.4f %s'% ('amount of water injected=',m,'kg/kg dry air')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " wet-bulb temperature= 22 C\n", - "minimum temperature= 22 1C\n", - "amount of water injected= 0.0077 kg/kg dry air\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example5-pg269" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate state after mixing\n", - "##initialisation of variables\n", - "w3= 0.0178 ##kg/kgair\n", - "w4= 0.0172 ##kg/kgair\n", - "##CALCULATIONS\n", - "dw= w3-w4\n", - "##RESULTS\n", - "print'%s %.4f %s'% (' state after mixing=',dw,'kg/kgair')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " state after mixing= 0.0006 kg/kgair\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example6-pg271" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate air mass flow rate and amount of water to be added\n", - "##initialisation of variables\n", - "m= 20000. ##kg/h\n", - "T1= 42. ##C\n", - "T2= 22. ##C\n", - "J= 4.186 ##cal\n", - "h1= 54. ##kJ/kg\n", - "h2= 94.8 ##kJ/kg\n", - "w1= 0.0105 ##kg/h kg\n", - "w2= 0.0244 ##kg/h kg\n", - "##CALCULATIONS\n", - "ma= m*(T1-T2)*J/((h2-h1-J*T2*(w2-w1)))\n", - "mw= ma*(w2-w1)\n", - "m4= m-mw\n", - "##RESULTS\n", - "print'%s %.1f %s'%('air mass flow rate=',ma,'kg/hr')\n", - "print'%s %.f %s'%('amount of water to be added=',m4,'kg/hr')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "air mass flow rate= 42368.5 kg/hr\n", - "amount of water to be added= 19411 kg/hr\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example7-pg272" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#calculate maximum useful work\n", - "##initialisation of variables\n", - "x= 0.79\n", - "P0= 101 ##kPa\n", - "P= 20 ##Mpa\n", - "V= 0.032 ##m^3\n", - "##CALCULATIONS\n", - "p= x*P0\n", - "Wrev= P*10*10*10*V*(math.log(P/(p*math.pow(10,-3)))+((p*math.pow(10,-3))/P)-1)\n", - "##RESULTS\n", - "print'%s %.1f %s'% (' maximum useful work=',Wrev,'kJ')\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " maximum useful work= 2898.0 kJ\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file -- cgit