{
 "metadata": {
  "name": "",
  "signature": "sha256:6e1e01b593960bc19a29a3f7d1a6cb2e3ebc85a1d52dce60007beb73ddc83f3b"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 15 : Heat transfer and fluid friction"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 15.1 page : 267"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "Tm = 70.;                                    # Average air temperature in degF\n",
      "Tw = 60.;                                    # Pipe wall temperature in degF\n",
      "thm = Tm-Tw;                                # Mean temperature difference in degF\n",
      "# Thm is so small that the fluid properties may be based on 70 degF\n",
      "\n",
      "v = 30.;                                     # Velocity in ft/sec \n",
      "L = 1000.;                                   # Length of pipe\n",
      "D = 3./12;                                   # Diameter in ft\n",
      "y = 0.15;                                   # Specific weight in  lb/ft**3\n",
      "p = 0.15/32.2;                              # Density in slug/ft**3\n",
      "u = 0.00137;                                # Vismath.cosity in slug/ft/hr\n",
      "\n",
      "# Calculations and Results\n",
      "Nre = v*3600*D*p/u;                              # Reynolds number\n",
      "f = 0.08/(Nre)**.25;                         # Nusselt number\n",
      "delp = 2*f*L*p*(v**2)/D;                     # Pressure drop in lb/sq.in\n",
      "print \"The pressure drop is %d lb/sq.ft  \"%(delp);\n",
      "\n",
      "\n",
      "cp = 0.24*32.2;                             # Specific heat capacity in slug/degF\n",
      "Cp = 0.24*0.15;                             # Heat capacity in Btu/ft**3-degF\n",
      "k = 0.0148;                                 # Thermal conductivity in Btu/ft-hr-degF\n",
      "Npr = u*cp/k;                               # Prandtls number\n",
      "phi = math.sqrt(Npr)/(1+(750*math.sqrt(Npr)/Nre)+7.5*(Npr**0.25)/math.sqrt(Nre));\n",
      "A = math.pi*L*D;                                # Area in ft**2\n",
      "q = phi*f*Cp*A*v*thm*3600/(2*Npr);          # Heat loss in Btu/hr\n",
      "print \"Heat loss per hour of air is %.3f Btu/hr  \"%(phi);\n",
      "h = q/(A*thm);                             # Film coefficient\n",
      "print \"The film coefficient of heat transfer on the inner pipe wall is %.1f Btu/hr-ft**2-degF\"%(h);\n",
      "\n",
      "# note : rounding off error."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The pressure drop is 154 lb/sq.ft  \n",
        "Heat loss per hour of air is 0.821 Btu/hr  \n",
        "The film coefficient of heat transfer on the inner pipe wall is 10.3 Btu/hr-ft**2-degF\n"
       ]
      }
     ],
     "prompt_number": 3
    }
   ],
   "metadata": {}
  }
 ]
}