{
 "metadata": {
  "name": "",
  "signature": "sha256:fe9888844b12ba5958c49565e95cfea393aa060fdc976c61a0bc940d6b9f2946"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 5 : Steady-state heat conduction in bodies with heat sources"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.1 page : 108"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "Di =  10./12;                                      # inside diameter of the coil in ft\n",
      "x = 7./48;                                         # thickness of coil in ft\n",
      "ts = 70.5;                                        # Initial temp. of coil in degF\n",
      "Rm = 12.1;                                        # resistance of coil \n",
      "e = 0.0024;                                       # Temperature coefficient of coil in degF\n",
      "i = 0.009;                                        # Initial current in amp\n",
      "V = 0.1;                                          # Initial Voltage in volts\n",
      "\n",
      "# Calculations \n",
      "Rs = V/i;                                         # Initial resistance in ohms\n",
      "Thm = (Rm/Rs-1)/e;                                # Mean temperature in degF\n",
      "Th0 = 1.5*Thm;                                    # Increase in temperature in degF\n",
      "to = ts+Th0;                                      # Maximum temperature in degF\n",
      "\n",
      "# Results\n",
      "print \"The maximum temperature of the coil was %.1f degF\"%(to);\n",
      "\n",
      "# note : rounding off error"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The maximum temperature of the coil was 126.1 degF\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.2 page : 109"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "# Variables\n",
      "r = 1./4;                                     # radius in inches\n",
      "to = 300.;                                    # outer surface temperature of cylinder in degF\n",
      "q0 = 10.;                                     # i2r heat loss in Btu-in**2/hr\n",
      "k = 10.;                                      # thermal conductivity of the material in Btu/hr-ft-degF\n",
      "\n",
      "# Calculations and Results\n",
      "tc = to+(q0*r*r)*12 /(4*k);                  # temperature at center\n",
      "delt = tc-to;\n",
      "print \"The temperature diference between center and outer surface is %.2f degF\"%(delt);\n",
      "\n",
      "\n",
      "# Total energy within the cylinder must be transferred to as heat to outer surface\n",
      "\n",
      "v = math.pi*r**2;                                 # Volume of heatinf element in in**3\n",
      "q1 = q0*v;                                   # heat flow to outer surface in Btu/sec\n",
      "tr = -q1*r/(2*k);                            # derivative of temperature wrt radius\n",
      "q = q1*12;                           # Heat flow at the outer surfae in Btu/hr-ft\n",
      "print \" Heat transfer per unit length at the outer surface is %.1f Btu/hr\"%(q);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The temperature diference between center and outer surface is 0.19 degF\n",
        " Heat transfer per unit length at the outer surface is 23.6 Btu/hr\n"
       ]
      }
     ],
     "prompt_number": 4
    }
   ],
   "metadata": {}
  }
 ]
}