{
 "metadata": {
  "name": "",
  "signature": "sha256:b94acd518022e6ed411c8d1167b000dca66e142504e746cb8280f47544693d50"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 9 : Refrigerator And Liquifaction"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.1 page no : 128"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "T1 = 261.15;\t\t\t#[K] Temgeratureof refrigerated space\n",
      "T2 = 294.15;\t\t\t#[K] Temperature of cooling water\n",
      "dT = 5.6;\t\t\t#[K]    Temperature Difference\n",
      "Qc = 35.2;\t\t\t#[kW]  Refrigerant Capacity\n",
      "eta = 0.8;\t\t\t#Efficeincy(b)\n",
      "\n",
      "# Calculations and Results\n",
      "#(a) Carnot Refrigerator\n",
      "Tc = T1-dT;\n",
      "Th = T2+dT;\n",
      "#Umath.sing Eqn(9.3)\n",
      "w = round(Tc/(Th-Tc),2);\n",
      "print '(a)Coefficient of Performance for Carnot Refrigerator',w\n",
      "\n",
      "#(b)  Vapor Compression Cycle\n",
      "#From Table(9.1)\n",
      "#@ Tc = 255.55K\n",
      "H2 = 388.13;\t\t\t#[KJ/Kg]\n",
      "S2 = 1.7396;\t\t\t#[KJ/Kg/K]\n",
      "\n",
      "#@ Th = 299.75K\n",
      "H4 = 236.76;\t\t\t#[KJ/Kg]\n",
      "\n",
      "S3 = S2;\t\t\t#Isentropic\n",
      "#Hence\n",
      "H3 = 420.27;\t\t\t#[KJ/Kg]\n",
      "#Step 2 --> 3\n",
      "del_Hs = H3-H2;\n",
      "#But Compressor Efficiency  =  0.80\n",
      "del_Hs = del_Hs/eta\n",
      "#Step 1 --> 4\n",
      "H1 = H4;\t\t\t#isenthalpic\n",
      "w = round((H2-H4)/del_Hs,2);\n",
      "print '(b)Coefficient of Performance for Vapor Compression Cycle',w\n",
      "rm = round(Qc/(H2-H4),4);\t\t\t#[Kg/s]\n",
      "print 'Circulation rate',rm,'kg/s'\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)Coefficient of Performance for Carnot Refrigerator 5.78\n",
        "(b)Coefficient of Performance for Vapor Compression Cycle 3.77\n",
        "Circulation rate 0.2325 kg/s\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.2 page no : 128"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "Qh_Winter = 30.;\t\t\t#[KW]\n",
      "Qc_Summer = 60.;\t\t\t#[KW]\n",
      "Tc_Winter = 283.15;\t\t\t#[K]\n",
      "Th_Winter = 303.15;\t\t\t#[K]\n",
      "Tc_Summer = 278.15;\t\t\t#[K]\n",
      "Th_Summer = 298.15;\t\t\t#[K]\n",
      "\n",
      "# Calculations and Results\n",
      "#For WINTER's\n",
      "#Using Eqn(5.7)\n",
      "Qc_Winter = Qh_Winter*(Tc_Winter/Th_Winter);\n",
      "#Umath.sing Eqn(9.1)\n",
      "W_Winter = round((Qh_Winter-Qc_Winter),2);\t\t\t#[KW]\n",
      "print \"Power Requirement for WINTER''s\",W_Winter,'KW'\n",
      "\n",
      "#For SUMMER's\n",
      "#Combining Eqn(9.2) And Eqn(9.3)\n",
      "W_Summer = round((Qc_Summer*((Th_Summer-Tc_Summer)/Tc_Summer)),2);\n",
      "print \"Power Requirement for SUMMER''s\",W_Summer,'KW'\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Power Requirement for WINTER''s 1.98 KW\n",
        "Power Requirement for SUMMER''s 4.31 KW\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.3 page no : 129"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "x = 0.25;\n",
      "#For Superheated Methane\n",
      "#By Perry and Green  by linear interpolation\n",
      "H4 = 1140.;\t\t\t    #[KJ/Kg]  @ 300K and 60 Bar\n",
      "H15 = 1188.9;\t\t\t#[KJ/Kg]  @ 295K and 1 Bar\n",
      "#By interpolation based on lnP\n",
      "T_sat = 111.5;\t\t\t#[K]\n",
      "H9 = 285.4;\t\t    \t#[KJ/Kg]  Saturated Liquid\n",
      "H12 = 769.9;\t\t\t#[KJ/Kg] Saturated Vapor\n",
      "S12 = 9.521;\t\t\t#[KJ/Kg/K] Saturated vapor\n",
      "\n",
      "T5 = 253.6;\t\t\t    #[K]\n",
      "H5 = 1009.8;\t\t\t#[KJ/Kg]  @ 60 Bar\n",
      "\n",
      "#From Eqn(9.7)\n",
      "z = ((x*(H12-H5))+H4-H15)/(H9-H15);\n",
      "H14 = ((H5-H4)/(1-z))+H15;\t\t\t#[KJ/Kg]\n",
      "#Whence\n",
      "T14 = 227.2;\t\t\t#[K]  @ 1Bar\n",
      "H7 = H5-((1-z)/(1-x)*(H14-H12));\t\t\t#[KJ/Kg]\n",
      "T7 = 197.6;\t\t\t#[K]  @ 60Bar\n",
      "#From Eqn(9.8)\n",
      "z = round((H4-H15)/(H9-H15),4);\n",
      "H7 = H4-((1-z)*(H15-H12));\n",
      "T7 = 206.6;\t\t\t#[K]\n",
      "\n",
      "# Results\n",
      "print 'Fraction of methane liquefied',z*100,'%'\n",
      "print 'Temperature of High Pressure steam entering the throttle valve',T7,'K'\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Fraction of methane liquefied 5.41 %\n",
        "Temperature of High Pressure steam entering the throttle valve 206.6 K\n"
       ]
      }
     ],
     "prompt_number": 3
    }
   ],
   "metadata": {}
  }
 ]
}