diff options
Diffstat (limited to 'Thermodynamics:_From_concepts_to_applications/Chapter10_1.ipynb')
-rwxr-xr-x | Thermodynamics:_From_concepts_to_applications/Chapter10_1.ipynb | 173 |
1 files changed, 173 insertions, 0 deletions
diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter10_1.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter10_1.ipynb new file mode 100755 index 00000000..b5e1628e --- /dev/null +++ b/Thermodynamics:_From_concepts_to_applications/Chapter10_1.ipynb @@ -0,0 +1,173 @@ +{
+ "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 |