{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 6 : Thermodynamic potentials" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 6.6 Page No : 218" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "m = 0.1;\t\t\t #mass of superheated steam in the piston cylinder assembly in kg\n", "P1 = 1.\t \t\t #initial pressure of superheated steam in MPa\n", "T1 = 300.\t\t\t #initial temperature of superheated steam in degree celsius\n", "P2 = 0.1\t\t\t #pressure of steam after expansion in MPa\n", "T2 = 200.\t\t\t #temperature of steam after expansion in degree celsius\n", "\n", "# Calculations\n", "#For steam at P1 and T1:\n", "h1 = 3052.1\n", "v1 = 0.2580\n", "\n", "#For steam at P2 and T2:\n", "h2 = 2875.4\n", "v2 = 2.1720\n", "\n", "del_u = (((h1*10**3)-(P1*10**6*v1))-((h2*10**3)-(P2*10**6*v2)))*10**-3\n", "W = m*(del_u)\n", "\n", "# Results\n", "print \" The work done by steam = %0.2f kJ\"%(W);\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " The work done by steam = 13.59 kJ\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 6.8 Page No : 220" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "P = 3.\t \t\t #pressure of superheated steam in MPa\n", "Ti = 300.\t\t\t #temperature at which the steam enters the turbine in degree celsius\n", "m = 1.\t\t \t #mass flow rate of steam in kg/s\n", "Te = 60.\t\t\t #temperature of dry saturated steam when it leaves the turbine in degree celsius\n", "\n", "# Calculations\n", "#For steam at P and Ti:\n", "h1 = 2995.1\t\t\t #specific entahlpy of steam in kJ/kg\n", "\n", "#For saturated steam at Te:\n", "h2 = 2609.7\t\t\t #specific enthalpy of saturated vapour in kJ/kg\n", "\n", "Ws = m*(h1-h2)\t\t # Calculations of the power Results of the turbine using Eq.(6.83) in kW\n", "\n", "# Results\n", "print \" The power Results of the turbine = %0.1f kW\"%(Ws);\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " The power Results of the turbine = 385.4 kW\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 6.10 Page No : 223" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "m = 0.1 \t\t\t #mass of superheated steam in the piston cylinder assembly in kg\n", "P1 = 3.\t \t\t #initial pressure of superheated steam in MPa\n", "T1 = 300.\t\t\t #initial temperature of superheated steam in degree celsius\n", "T0 = 300.\t\t\t #temperature of the reservoir which is placed in thermal contact with the piston-cylinder assembly in degree celsius\n", "P2 = 0.1\t\t\t #pressure of steam after expansion in MPa\n", "\n", "#For steam at P1 and T1:\n", "h1 = 2995.1\n", "v1 = 0.08116\n", "s1 = 6.5422\n", "\n", "#For steam at P2 and T2:\n", "h2 = 3074.5\n", "v2 = 2.6390\n", "s2 = 8.2166\n", "\n", "# Calculations\n", "T0 = T0+273.15\n", "\n", "W = m*(h1-h2-(((P1*v1)-(P2*v2))*10**3)-(T0*(s1-s2)))\n", "\n", "# Results\n", "print \" The maximum work obtained from steam = %0.2f kJ\"%(W);\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " The maximum work obtained from steam = 90.07 kJ\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 6.12 Page No : 226" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "\n", "# Variables\n", "P1 = 0.1\t\t\t #pressure at which air enters the compressor in MPa\n", "T1 = 300.\t\t\t #temperature at which air enters the compressor in K\n", "P2 = 1. \t\t\t #pressure at which air leaves the compressor in MPa\n", "T2 = 300.\t\t\t #temperature at which air leaves the compressor in K\n", "T0 = 300.\t\t\t #ambient temperature in K\n", "N = 1. \t\t\t #molar flow rate of air in mol/s\n", "gaamma = 1.4\t\t #ratio of specific heat capacities (no unit)\n", "R = 8.314\t\t\t #universal gas constant in J/molK\n", "\n", "# Calculations\n", "\n", "Ws = (-N*T0*(-R*math.log (P2/P1)))*10**-3\n", "\n", "# Results\n", "print \" The minimum power required to compress one mole per second of air = %0.3f kW\"%(Ws);\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " The minimum power required to compress one mole per second of air = 5.743 kW\n" ] } ], "prompt_number": 4 } ], "metadata": {} } ] }