{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 15: Refrigeration and Air Conditioning"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Exa 15.1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Joule-Thomson coefficient (C/bar) =  1.61\n",
      "press enter key to exit\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "''"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#Estimate how much the temperature is lowered when the steam at 7 bar and \n",
    "#260C is throttled to 1.4 bar. What is the approximate Joule-Thomson \n",
    "#initialisation of variables\n",
    "P= 7. \t\t\t\t#bar\n",
    "P1= 1.4 \t\t\t#bar\n",
    "T= 260. \t\t\t#C\n",
    "T1= 251. \t\t\t#C\n",
    "h= 2974.9 \t\t\t#J/gm\n",
    "#CALCULATIONS\n",
    "dT= T-T1 \t\t\t#Change in Temp. \n",
    "Mj= dT/(P-P1) \t\t#Joule-Thomson coefficient\n",
    "#RESULTS\n",
    "print '%s %.2f' % ('Joule-Thomson coefficient (C/bar) = ',Mj)\n",
    "raw_input('press enter key to exit')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Exa 15.2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Refrigerating effect (Btu/lbm) =  44.80\n",
      " \n",
      " Coffecient of performnance=  3.54\n",
      " \n",
      " Capacity of refrigeration in tons (ton) =  0.67\n",
      "press enter key to exit\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "''"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#A vapor compression refrigiration system, using Refrigirant 12, works between\n",
    "#n evaporator temperature of 10F and a condenser temp. of 110F. The pumping\n",
    "#rate for the refrigrant is 180 lbm/hr. Determine (a) the refrigirating \n",
    "#effect, (b) the coefficient of performance,and (c) the capacity of refrigiration\n",
    "#in tons\n",
    "#initialisation of variables\n",
    "T= 10. \t\t\t\t\t\t#F\n",
    "T1= 110. \t\t\t\t\t#F\n",
    "Pr= 180. \t\t\t\t\t#lbm/hr\n",
    "h1= 78.335 \t\t\t\t\t#Btu/lbm\n",
    "h3= 33.531 \t\t\t\t\t#Btu/lbm\n",
    "h2= 91. \t\t\t\t\t#Btu/lbm\n",
    "L= 12000. \t\t\t\t\t#Btu/hr per ton\n",
    "#CALCULATIONS\n",
    "h4= h3\n",
    "QL= h1-h4 \t\t\t\t\t#Refrigerating effect\n",
    "W= h2-h1 \t\t\t\t\t#Work done\n",
    "COP= QL/W \t\t\t\t\t#Coffecient of performnance\n",
    "C= QL*Pr/L \t\t\t\t\t#Capacity of refrigeration in tons\n",
    "#RESULTS\n",
    "print '%s %.2f' % ('Refrigerating effect (Btu/lbm) = ',QL)\n",
    "print '%s %.2f' % (' \\n Coffecient of performnance= ',COP)\n",
    "print '%s %.2f' % (' \\n Capacity of refrigeration in tons (ton) = ',C)\n",
    "raw_input('press enter key to exit')"
   ]
  }
 ],
 "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.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
