{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 7: Entropy" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 7-1 ,Page No.335" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#given data\n", "Q=750;#heat transfered in kJ\n", "Tsys=300.0;#temperature of liquid-water mixture in K\n", "\n", "#calculations\n", "dSsys=Q/Tsys;\n", "print'Entropy change in the process %f kJ/K'%round(dSsys,1)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Entropy change in the process 2.500000 kJ/K\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 7-2 ,Page No.338" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#given data\n", "Qsink=2000.0;#heat lost in kJ\n", "Qsource=-Qsink;\n", "Tsource=800.0;#temp of heat loss in K\n", "\n", "#calculations\n", "#part - a\n", "Tsink=500.0;\n", "dSsource=Qsource/Tsource;\n", "dSsink=Qsink/Tsink;\n", "Sgena=dSsource+dSsink;\n", "print'entropy generated in part a %f kJ/K'%round(Sgena,1);\n", "#part - b\n", "Tsink=750;\n", "dSsource=Qsource/Tsource;\n", "dSsink=Qsink/Tsink;\n", "Sgenb=dSsource+dSsink;\n", "print'entropy generated in part b %f kJ/K'%round(Sgenb,1);\n", "if Sgena>Sgenb :\n", " print('part a is more irreversible');\n", "elif(Sgena == Sgenb) :\n", " print('heat transfer is equally irreversible');\n", "else:\n", " print('part b is more irreversible');\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "entropy generated in part a 1.500000 kJ/K\n", "entropy generated in part b 0.200000 kJ/K\n", "part a is more irreversible\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 7-3 ,Page No.341" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#given data\n", "m=5.0;#mass of refrigerant 134-a in kg\n", "P1=140.0;#intial pressure in kPa\n", "T1=20.0;#temperature in C\n", "P2=100.0;#final pressure in kPa\n", "\n", "#from refrigerant-134a data\n", "#at P1 and T1\n", "s1=1.0624;\n", "v1=0.16544;\n", "#at P2\n", "v2=v1;\n", "vf=0.0007529;\n", "vg=0.19254;\n", "sf=0.07188;\n", "sfg=0.87995;\n", "\n", "#calculations\n", "# vf < v2