{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# CHAPTER 25:Air-Conditioning Methods"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## EXAMPLE 25.1,PAGE NUMBER:305"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "Air flow for sensible heat=1.525 kg/s \n",
      "Moisture content of entering air=0.00745\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "# Variable Declaration\n",
    "T_d=21;# The dry bulb temperature in °C\n",
    "Q=14;# Internal load in kW\n",
    "H=50;# % saturation\n",
    "Q_l=1.5;# Latent heat gain in kW\n",
    "T_ain=12;# The inlet air temperature in °C \n",
    "C_p=1.02;# The specific heat capacity of air in kJ/kg.K\n",
    "\n",
    "# Calculation\n",
    "deltaT=T_d-T_ain;# Air temperature rise through room in K\n",
    "m=Q/(deltaT*C_p);# Air flow for sensible heat in kg/s\n",
    "x=0.007857;# Moisture content of room air, 21, 50%\n",
    "x_p=Q_l/(2440*m);# Moisture to pick up\n",
    "x_ain=x-x_p;# Moisture content of entering air \n",
    "print\"\\nAir flow for sensible heat=%1.3f kg/s \\nMoisture content of entering air=%0.5f\"%(m,x_ain)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## EXAMPLE 25.2,PAGE NUMBER:305"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "Mass water flow=0.71 kg/s\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "# Variable declaration\n",
    "# From example 25.1\n",
    "Q_i=14;# Internal load in kW\n",
    "Q_l=1.5;# Latent heat gain in kW\n",
    "Q_f=0.9;# The fan motor power in kW\n",
    "T_win=5;# The temperature of water at inlet in °C \n",
    "T_wout=10.5;# The temperature of water at outlet in °C \n",
    "C_pw=4.19;# The specific heat capacity in kJ/kg.K\n",
    "\n",
    "# Calculation\n",
    "Q=Q_i+Q_l+Q_f;# Total cooling load in kW\n",
    "m_w=Q/(C_pw*(T_wout-T_win));# Mass water flow in kg/s\n",
    "print\"\\nMass water flow=%0.2f kg/s\"%m_w"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## EXAMPLE 25.3,PAGE NUMBER:305"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Required refrigerant mass flow=0.103 kg/s\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "# Variable declaration\n",
    "# From example 25.2\n",
    "Q=16.4;# Total load in kW\n",
    "T_in=33;# The temperature at liquid R134a enters the expansion valve in °C \n",
    "T_out=9;# The temperature at liquid  R134a leaves the cooler in °C \n",
    "T_e=5;#  The temperature at which liquid  R134a evaporates in °C \n",
    "\n",
    "# Calculation\n",
    "h_v=405.23;# Enthalpy of R134a,superheated to 9 C in kJ/kg\n",
    "h_f=246.71;# Enthalpy of liquid R134a at 33 C in kJ/kg\n",
    "Re=h_v-h_f;# Refrigerating effect in kJ/kg\n",
    "m_r=Q/Re;# Required refrigerant mass flow in kg/s\n",
    "print\"Required refrigerant mass flow=%0.3f kg/s\"%m_r\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "## EXAMPLE 25.4,PAGE NUMBER:306"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "Mass water flow=0.64 kg/s\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "# Variable declaration\n",
    "T_d1=13;# The dry bulb temperature in °C \n",
    "m_a=0.4;# The flow rate of primary air in kg/s\n",
    "T_win=12;# The temperature of water at inlet in °C \n",
    "T_wout=16;# The temperature of water at outlet in °C \n",
    "H=72;# % saturation\n",
    "T_d2=21;# The dry bulb temperature in °C \n",
    "# From example 25.1\n",
    "Q_i=14;# Internal load in kW\n",
    "Q_l=1.5;# Latent heat gain in kW\n",
    "C_pw=4.19;# The specific heat capacity in kJ/kg.K\n",
    "C_pa=1.02;# The specific heat capacity of air in kJ/kg.K\n",
    "\n",
    "# Calculation\n",
    "x_a=0.006744;# Moisture in primary air, 13 C DB, 72% sat\n",
    "x_r=Q_l/(2440*m_a);# Moisture removed in kg/kg\n",
    "x_rise=x_a+x_r;# Moisture in room air will rise to in kg/kg\n",
    "# which corresponds to a room condition of 21°C dry bulb, 53% saturation\n",
    "Q_a=m_a*C_pa*(T_d2-T_d1);# Sensible heat removed by primary air in kW\n",
    "Q_w=Q_i-Q_a;# Heat to be removed by water in kW\n",
    "m_w=Q_w/(C_pw*(T_wout-T_win));# Mass water flow in kg/s\n",
    "print\"\\nMass water flow=%0.2f kg/s\"%m_w"
   ]
  }
 ],
 "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
}
