diff options
Diffstat (limited to 'Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter6.ipynb')
-rw-r--r--[-rwxr-xr-x] | Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter6.ipynb | 721 |
1 files changed, 365 insertions, 356 deletions
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter6.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter6.ipynb index a7ace61d..169d80e5 100755..100644 --- a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter6.ipynb +++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter6.ipynb @@ -1,356 +1,365 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:1e66a4aaf6aa5b1578af922356299d8af3b4aded7460ea4a450b6cc816355a1b"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 06:Second Law of Thermodynamics"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.1:pg-138"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "T1 = 800 # Source temperature in degree Celsius\n",
- "\n",
- "T2 = 30 # Sink temperature in degree Celsius\n",
- "\n",
- "e_max = 1-((T2+273)/(T1+273)) # maximum possible efficiency \n",
- "\n",
- "Wnet = 1 # in kW\n",
- "\n",
- "Q1 = Wnet/e_max # Least rate of heat required in kJ/s\n",
- "\n",
- "Q2 = Q1-Wnet # Least rate of heat rejection kJ/s\n",
- "\n",
- "\n",
- "\n",
- "print \"\\n Example 6.1\"\n",
- "\n",
- "print \"\\n Least rate of heat rejection is \",Q2,\" kW\"\n",
- "\n",
- "#The answers vary due to round off error\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " Example 6.1\n",
- "\n",
- " Least rate of heat rejection is 0 kW\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.2:pg-139"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "T1 = -15 # Source temperature in degree Celsius\n",
- "\n",
- "T2 = 30 # Sink temperature in degree Celsius\n",
- "\n",
- "Q2 = 1.75 # in kJ/sec\n",
- "\n",
- "print \"\\n Example 6.2\"\n",
- "\n",
- "W= Q2*((T2+273)-(T1+273))/(T1+273) # Least Power necessary to pump the heat out\n",
- "\n",
- "print \"\\n Least Power necessary to pump the heat out is \",round(W,2),\"kW\"\n",
- " \n",
- " #The answers vary due to round off error\n",
- " \n",
- " "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " Example 6.2\n",
- "\n",
- " Least Power necessary to pump the heat out is 0.31 kW\n"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.3:pg-140"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Given \n",
- "\n",
- "T1 = 600 # Source temperature of heat engine in degree Celsius\n",
- "\n",
- "T2 = 40 # Sink temperature of heat engine in degree Celsius \n",
- "\n",
- "T3 = -20 # Source temperature of refrigerator in degree Celsius\n",
- "\n",
- "Q1 = 2000 # Heat transfer to heat engine in kJ\n",
- "\n",
- "W = 360 # Net work output of plant in kJ\n",
- "\n",
- "# Part (a)\n",
- "\n",
- "e_max = 1.0-((T2+273)/(T1+273)) # maximum efficiency \n",
- "\n",
- "W1 = e_max*Q1 # maximum work output \n",
- "\n",
- "COP = (T3+273)/((T2-273)-(T3-273)) # coefficient of performance of refrigerator\n",
- "\n",
- "W2 = W1-W # work done to drive refrigerator \n",
- "\n",
- "Q4 = COP*W2 # Heat extracted by refrigerator\n",
- "\n",
- "Q3 = Q4+W2 # Heat rejected by refrigerator\n",
- "\n",
- "Q2 = Q1-W1 # Heat rejected by heat engine\n",
- "\n",
- "Qt = Q2+Q3 # combined heat rejection by heat engine and refrigerator \n",
- "\n",
- "print \"\\n Example 6.3\"\n",
- "\n",
- "print \"\\n\\n Part A:\"\n",
- "\n",
- "print \"\\n The heat transfer to refrigerant is \",round(Q2,3) ,\" kJ\"\n",
- "\n",
- "print \"\\n The heat rejection to the 40 degree reservoir is \",round(Qt,3) ,\" kJ\"\n",
- "\n",
- "\n",
- "\n",
- "# Part (b)\n",
- "\n",
- "print \"\\n\\n Part B:\"\n",
- "\n",
- "e_max_ = 0.4*e_max # maximum efficiency\n",
- "\n",
- "W1_ = e_max_*Q1 # maximum work output \n",
- "\n",
- "W2_ = W1_-W # work done to drive refrigerator \n",
- "\n",
- "COP_ = 0.4*COP # coefficient of performance of refrigerator\n",
- "\n",
- "Q4_ = COP_*W2_ # Heat extracted by refrigerator\n",
- "\n",
- "Q3_ = Q4_+W2_ # Heat rejected by refrigerator\n",
- "\n",
- "Q2_ = Q1-W1_ # Heat rejected by heat engine\n",
- "\n",
- "QT = Q2_+Q3_# combined heat rejection by heat engine and refrigerator \n",
- "\n",
- "print \"\\n The heat transfer to refrigerant is \",round(Q2_,3) ,\" kJ\"\n",
- "\n",
- "print \"\\n The heat rejection to the 40 degree reservoir is \",round(QT,3) ,\" kJ\"\n",
- "\n",
- "#The answers vary due to round off error\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " Example 6.3\n",
- "\n",
- "\n",
- " Part A:\n",
- "\n",
- " The heat transfer to refrigerant is 0.0 kJ\n",
- "\n",
- " The heat rejection to the 40 degree reservoir is 8200.0 kJ\n",
- "\n",
- "\n",
- " Part B:\n",
- "\n",
- " The heat transfer to refrigerant is 1200.0 kJ\n",
- "\n",
- " The heat rejection to the 40 degree reservoir is 2344.0 kJ\n"
- ]
- }
- ],
- "prompt_number": 14
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.5:pg-142"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "T1 = 473 # Boiler temperature in K\n",
- "\n",
- "T2 = 293 # Home temperature in K\n",
- "\n",
- "T3 = 273 # Outside temperature in K\n",
- "\n",
- "print \"\\n Example 6.5\"\n",
- "\n",
- "MF = (T2*(T1-T3))/(T1*(T2-T3)) \n",
- "\n",
- "print \"\\n The multiplication factor is \",MF \n",
- "\n",
- "#The answers vary due to round off error\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " Example 6.5\n",
- "\n",
- " The multiplication factor is 6\n"
- ]
- }
- ],
- "prompt_number": 15
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.6:pg-144"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "T1 = 90.0 # Operating temperature of power plant in degree Celsius \n",
- "\n",
- "T2 = 20.0 # Atmospheric temperature in degree Celsius\n",
- "\n",
- "W = 1.0 # Power production from power plant in kW\n",
- "\n",
- "E = 1880 # Capability of energy collection in kJ/m**2 h\n",
- "\n",
- "\n",
- "\n",
- "print \"\\n Example 6.6\"\n",
- "\n",
- "e_max = 1.0-((T2+273.0)/(T1+273.0)) # maximum efficiency\n",
- "\n",
- "Qmin = W/e_max # Minimum heat requirement per second\n",
- "\n",
- "Qmin_ = Qmin*3600.0 # Minimum heat requirement per hour\n",
- "\n",
- "Amin = Qmin_/E # Minimum area requirement\n",
- "\n",
- "print \"\\n Minimum area required for the collector plate is \",math. ceil(Amin) ,\" m**2\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " Example 6.6\n",
- "\n",
- " Minimum area required for the collector plate is 10.0 m**2\n"
- ]
- }
- ],
- "prompt_number": 21
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.7:pg-144"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "T1 = 1000 # Temperature of hot reservoir in K\n",
- "\n",
- "W = 1000 # Power requirement in kW\n",
- "\n",
- "K = 5.67e-08 # constant \n",
- "\n",
- "print \"\\n Example 6.7\"\n",
- "\n",
- "Amin = (256*W)/(27*K*T1**4) # minimum area required\n",
- "\n",
- "print \"\\n Area of the panel \",Amin ,\" m**2\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " Example 6.7\n",
- "\n",
- " Area of the panel 0.167221895617 m**2\n"
- ]
- }
- ],
- "prompt_number": 23
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 06:Second Law of Thermodynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.1:pg-138" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 6.1\n", + "\n", + " Least rate of heat rejection is 0 kW\n" + ] + } + ], + "source": [ + "import math\n", + "T1 = 800 # Source temperature in degree Celsius\n", + "\n", + "T2 = 30 # Sink temperature in degree Celsius\n", + "\n", + "e_max = 1-((T2+273)/(T1+273)) # maximum possible efficiency \n", + "\n", + "Wnet = 1 # in kW\n", + "\n", + "Q1 = Wnet/e_max # Least rate of heat required in kJ/s\n", + "\n", + "Q2 = Q1-Wnet # Least rate of heat rejection kJ/s\n", + "\n", + "\n", + "\n", + "print \"\\n Example 6.1\"\n", + "\n", + "print \"\\n Least rate of heat rejection is \",Q2,\" kW\"\n", + "\n", + "#The answers vary due to round off error\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.2:pg-139" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 6.2\n", + "\n", + " Least Power necessary to pump the heat out is 0.31 kW\n" + ] + } + ], + "source": [ + "import math\n", + "T1 = -15 # Source temperature in degree Celsius\n", + "\n", + "T2 = 30 # Sink temperature in degree Celsius\n", + "\n", + "Q2 = 1.75 # in kJ/sec\n", + "\n", + "print \"\\n Example 6.2\"\n", + "\n", + "W= Q2*((T2+273)-(T1+273))/(T1+273) # Least Power necessary to pump the heat out\n", + "\n", + "print \"\\n Least Power necessary to pump the heat out is \",round(W,2),\"kW\"\n", + " \n", + " #The answers vary due to round off error\n", + " \n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.3:pg-140" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 6.3\n", + "\n", + "\n", + " Part A:\n", + "\n", + " The heat transfer to refrigerant is 0.0 kJ\n", + "\n", + " The heat rejection to the 40 degree reservoir is 8200.0 kJ\n", + "\n", + "\n", + " Part B:\n", + "\n", + " The heat transfer to refrigerant is 1200.0 kJ\n", + "\n", + " The heat rejection to the 40 degree reservoir is 2344.0 kJ\n" + ] + } + ], + "source": [ + "import math\n", + "#Given \n", + "\n", + "T1 = 600 # Source temperature of heat engine in degree Celsius\n", + "\n", + "T2 = 40 # Sink temperature of heat engine in degree Celsius \n", + "\n", + "T3 = -20 # Source temperature of refrigerator in degree Celsius\n", + "\n", + "Q1 = 2000 # Heat transfer to heat engine in kJ\n", + "\n", + "W = 360 # Net work output of plant in kJ\n", + "\n", + "# Part (a)\n", + "\n", + "e_max = 1.0-((T2+273)/(T1+273)) # maximum efficiency \n", + "\n", + "W1 = e_max*Q1 # maximum work output \n", + "\n", + "COP = (T3+273)/((T2-273)-(T3-273)) # coefficient of performance of refrigerator\n", + "\n", + "W2 = W1-W # work done to drive refrigerator \n", + "\n", + "Q4 = COP*W2 # Heat extracted by refrigerator\n", + "\n", + "Q3 = Q4+W2 # Heat rejected by refrigerator\n", + "\n", + "Q2 = Q1-W1 # Heat rejected by heat engine\n", + "\n", + "Qt = Q2+Q3 # combined heat rejection by heat engine and refrigerator \n", + "\n", + "print \"\\n Example 6.3\"\n", + "\n", + "print \"\\n\\n Part A:\"\n", + "\n", + "print \"\\n The heat transfer to refrigerant is \",round(Q2,3) ,\" kJ\"\n", + "\n", + "print \"\\n The heat rejection to the 40 degree reservoir is \",round(Qt,3) ,\" kJ\"\n", + "\n", + "\n", + "\n", + "# Part (b)\n", + "\n", + "print \"\\n\\n Part B:\"\n", + "\n", + "e_max_ = 0.4*e_max # maximum efficiency\n", + "\n", + "W1_ = e_max_*Q1 # maximum work output \n", + "\n", + "W2_ = W1_-W # work done to drive refrigerator \n", + "\n", + "COP_ = 0.4*COP # coefficient of performance of refrigerator\n", + "\n", + "Q4_ = COP_*W2_ # Heat extracted by refrigerator\n", + "\n", + "Q3_ = Q4_+W2_ # Heat rejected by refrigerator\n", + "\n", + "Q2_ = Q1-W1_ # Heat rejected by heat engine\n", + "\n", + "QT = Q2_+Q3_# combined heat rejection by heat engine and refrigerator \n", + "\n", + "print \"\\n The heat transfer to refrigerant is \",round(Q2_,3) ,\" kJ\"\n", + "\n", + "print \"\\n The heat rejection to the 40 degree reservoir is \",round(QT,3) ,\" kJ\"\n", + "\n", + "#The answers vary due to round off error\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.5:pg-142" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 6.5\n", + "\n", + " The multiplication factor is 6\n" + ] + } + ], + "source": [ + "import math\n", + "T1 = 473 # Boiler temperature in K\n", + "\n", + "T2 = 293 # Home temperature in K\n", + "\n", + "T3 = 273 # Outside temperature in K\n", + "\n", + "print \"\\n Example 6.5\"\n", + "\n", + "MF = (T2*(T1-T3))/(T1*(T2-T3)) \n", + "\n", + "print \"\\n The multiplication factor is \",MF \n", + "\n", + "#The answers vary due to round off error\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.6:pg-144" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 6.6\n", + "\n", + " Minimum area required for the collector plate is 10.0 m**2\n" + ] + } + ], + "source": [ + "import math\n", + "T1 = 90.0 # Operating temperature of power plant in degree Celsius \n", + "\n", + "T2 = 20.0 # Atmospheric temperature in degree Celsius\n", + "\n", + "W = 1.0 # Power production from power plant in kW\n", + "\n", + "E = 1880 # Capability of energy collection in kJ/m**2 h\n", + "\n", + "\n", + "\n", + "print \"\\n Example 6.6\"\n", + "\n", + "e_max = 1.0-((T2+273.0)/(T1+273.0)) # maximum efficiency\n", + "\n", + "Qmin = W/e_max # Minimum heat requirement per second\n", + "\n", + "Qmin_ = Qmin*3600.0 # Minimum heat requirement per hour\n", + "\n", + "Amin = Qmin_/E # Minimum area requirement\n", + "\n", + "print \"\\n Minimum area required for the collector plate is \",math. ceil(Amin) ,\" m**2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.7:pg-144" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 6.7\n", + "\n", + " Area of the panel 0.167221895617 m**2\n" + ] + } + ], + "source": [ + "import math\n", + "T1 = 1000 # Temperature of hot reservoir in K\n", + "\n", + "W = 1000 # Power requirement in kW\n", + "\n", + "K = 5.67e-08 # constant \n", + "\n", + "print \"\\n Example 6.7\"\n", + "\n", + "Amin = (256*W)/(27*K*T1**4) # minimum area required\n", + "\n", + "print \"\\n Area of the panel \",Amin ,\" m**2\"\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |