{
 "metadata": {
  "name": "",
  "signature": "sha256:b84dc3021bf00fa69e8fa42a6cbf4b1ad563cdbb8726721608219def960b394a"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 9 : Heat transfer by the combined effect of conduction and convection"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.1 page : 159"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "D  =  3./48;                                # diameter in ft\n",
      "L  =  9./12;                                # Length of steam vessel in ft\n",
      "T1  =  210.;                                # Vessel temperature in degF\n",
      "T2  =  80.;                                 # Air temperature in degF\n",
      "th0  =  T1-T2;                             # Temperature difference in degF\n",
      "h  =  1.44;                                # Assumed heat coefficient in Btu/hr-ft**2-degF\n",
      "C  =  math.pi*D;                               # Circumference of vessel in ft \n",
      "A  =  math.pi*D*D/4;                           # Area of vessel in ft**2\n",
      "\n",
      "# Calculations and Results\n",
      "# For copper\n",
      "k1  =  219;                                # Heat conductivity of copper in Btu/hr-ft-degF\n",
      "m1  =  math.sqrt(h*C/(k1*A));                   # in  /ft\n",
      "th1  =  th0*2/(math.exp(m1*L)+math.exp(-m1*L));           \n",
      "Tl1  =  round(th1+T2);                     # The temperaure at the free end in degF\n",
      "print \"Temperature at free end of the copper rod is %d degF \"%(Tl1);\n",
      "\n",
      "# For iron\n",
      "k2  =  36;                                 # heat conductivity of copper in Btu/hr-ft-degF\n",
      "m2  =  math.sqrt(h*C/(k2*A));                   # in  /ft\n",
      "th2  =  th0*2/(math.exp(m2*L)+math.exp(-m2*L));           \n",
      "Tl2  =  th2+T2;                            # The temperaure at the free end in degF\n",
      "print \" Temperature at free end of the iron rod is %.2f degF \"%(Tl2);\n",
      "\n",
      "# For glass\n",
      "k3  =  0.64;                                # Heat conductivity of copper in Btu/hr-ft-degF\n",
      "m3  =  math.sqrt(h*C/(k3*A));                    # in  /ft\n",
      "th3  =  th0*2/(math.exp(m3*L)+math.exp(-m3*L));\n",
      "Tl3  =  th3+T2;                             # The temperaure at the free end in degF\n",
      "print \" Temperature at free end of the glass rod is %.2f degF \"%(Tl3);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Temperature at free end of the copper rod is 196 degF \n",
        " Temperature at free end of the iron rod is 151.80 degF \n",
        " Temperature at free end of the glass rod is 80.03 degF \n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.2 page : 163"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "D  =  3./48;                                # diameter in ft\n",
      "L  =  9./12;                                # Length of steam vessel in ft\n",
      "T1  =  210.;                                # Vessel temperature in degF\n",
      "T2  =  80.;                                 # Air temperature in degF\n",
      "th0  =  T1-T2;                             # Temperature difference in degF\n",
      "h  =  1.44;                                # Assumed heat coefficient in Btu/hr-ft**2-degF\n",
      "C  =  math.pi*D;                               # Circumference of vessel in ft \n",
      "A  =  math.pi*D*D/4;                           # Area of vessel in ft**2\n",
      "\n",
      "# Calculations \n",
      "k  =  36;                                  # heat conductivity of copper in Btu/hr-ft-degF\n",
      "m  =  math.sqrt(h*C/(k*A));                     # in  /ft\n",
      "q = k*A*m*th0*(math.exp(m*L)-math.exp(-m*L))/(math.exp(m*L)+math.exp(-m*L)); \n",
      "# Heat loss by iron rod in Btu/hr\n",
      "\n",
      "# Results\n",
      "print \"The rate of heat loss by iron rod is %.1f Btu/hr\"%(q);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The rate of heat loss by iron rod is 19.2 Btu/hr\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.3 page : 170"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "x  =  3./96;                             # Thickness of plate  in ft\n",
      "k  =  220.;                              # thermal conductivity in Btu/hr-ft-degF\n",
      "h1  =  480.;                             # Inner film coefficient in Btu/hr-ft**2-degF\n",
      "h2  =  1250.;                            # Outer film coefficient in Btu/hr-ft**2-degF\n",
      "\n",
      "# Calculations \n",
      "U  =  1./((1/h1)+(x/k)+(1/h2));          # Overall heat transer coeeficient in Btu-hr-ft**2-degF\n",
      "\n",
      "# Results\n",
      "print \"Overall heat transfer coefficient is %.f Btu/hr-ft**2-degF\"%(U);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Overall heat transfer coefficient is 331 Btu/hr-ft**2-degF\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.4 page : 172"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "r2  =  3./96;                            # Outer radius in ft\n",
      "x  =  0.1/12;                           # Thickness of plate  in ft\n",
      "r1  =  r2-x;                            # Outer radius in ft\n",
      "k  =  200.;                              # thermal conductivity in Btu/hr-ft-degF\n",
      "h1  =  280.;                             # Inner film coefficient in Btu/hr-ft**2-degF\n",
      "h2  =  2000.;                            # Outer film coefficient in Btu/hr-ft**2-degF\n",
      "\n",
      "# Calculations \n",
      "U  =  1/((r2/(h1*r1))+(r2*math.log(r2/r1)/k)+(1/h2));         # Overall heat transer coeeficient in Btu-hr-ft**2-degF\n",
      "\n",
      "# Results\n",
      "print \"Overall heat transfer coefficient is %d Btu/hr-ft**2-degF\"%(U);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Overall heat transfer coefficient is 184 Btu/hr-ft**2-degF\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.5 page : 176"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "Tc1  =  120.;                                  # Inlet cold fluid temperature in degF\n",
      "Tc2  =  310.;                                  # Outlet cold fluid temperature in degF\n",
      "Th1  =  500.;                                  # Inlet hot fluid temperature in degF\n",
      "Th2  =  400.;                                  # Outlet hot fluid temperature in degF\n",
      "\n",
      "# Calculations \n",
      "delt1  =  Th2-Tc1;                            # Maximum temperature difference in degF\n",
      "delt2  =  Th1-Tc2;                            # Minimum temperature difference in degF\n",
      "LMTD  =  (delt1-delt2)/math.log(delt1/delt2);      # Log mean temperature difference \n",
      "\n",
      "# Results\n",
      "print \"The log mean temperature difference is %d degF\"%(LMTD)     \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The log mean temperature difference is 232 degF\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.6 page : 178"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "Tc1  =  120.;                                  # Inlet cold fluid temperature in degF\n",
      "Tc2  =  310.;                                  # Outlet cold fluid temperature in degF\n",
      "Th1  =  500.;                                  # Inlet hot fluid temperature in degF\n",
      "Th2  =  400.;                                  # Outlet hot fluid temperature in degF\n",
      "\n",
      "# Calculations \n",
      "K  =  (Tc2-Tc1)/(Th2-Tc2);                    # Temperature ratio\n",
      "R  =  (Th1-Th2)/(Tc2-Tc1);                    # Temperature ratio    \n",
      "delt1  =  Th2-Tc1;                            # Maximum temperature difference in degF\n",
      "delt2  =  Th1-Tc2;                            # Minimum temperature difference in degF\n",
      "LMTD  =  (delt1-delt2)/math.log(delt1/delt2);      # Log mean temperature difference\n",
      "f  =  0.99;                                   # Correction factor as seen from figure\n",
      "LMTDc  =  round(LMTD*f);                      # Corrected math.log mean temperature difference\n",
      "\n",
      "# Results\n",
      "print \"Log mean temperature difference is %d degF\"%(LMTDc);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Log mean temperature difference is 230 degF\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.7 page : 181"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "Do = 1./12;                               # Outside diameter of the condenser in ft\n",
      "Di = 0.902/12;                           # Outside diameter of the condenser in ft\n",
      "Ts = 81.7;                               # Steam temperature in degF\n",
      "Tw1 = 61.4;                              # Water inlet temperature in degF\n",
      "Tw2 = 69.9;                              # Water outlet temperature in degF\n",
      "k = 63.;                                  # Thermal conductivity in Btu/hr-ft-degF\n",
      "v = 7.;                                   # average velocity in ft/sec\n",
      "h1 = 1270.;                               # water side film coefficient i Btu/hr-ft**2-degF\n",
      "h2 = 1000.;                               # Steam side film coefficient in Btu/hr-ft**2-degF\n",
      "\n",
      "# Calculations \n",
      "U = 1/((Do/(Di*h1))+(Do*math.log(Do/Di)/(2*k))+(1/h2));     # Heat transfer coefficient\n",
      "LMTD = ((Ts-Tw1)-(Ts-Tw2))/math.log((Ts-Tw1)/(Ts-Tw2));   # Log mean temperature diff.\n",
      "m = 731300;                                          # Saturated steam to be handled in lb/hr\n",
      "L = 1097.4-49.7;                                     # Change in enthalpy in Btu/lb\n",
      "q = m*L;                                             # Heat required in Btu/hr\n",
      "A = q/(U*LMTD);                                      # Area of condenser in ft**2\n",
      "\n",
      "# Results\n",
      "print \"The area of steam condenser is %d ft**2\"%(A);\n",
      "\n",
      "# book answer is rounded. kindly check."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The area of steam condenser is 94927 ft**2\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.8 page : 182"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "Tc1  =  139.7;                                  # Inlet cold fluid temperature in degF\n",
      "Tc2  =  59.5;                                   # Outlet cold fluid temperature in degF\n",
      "Th1  =  108.7;                                 # Inlet hot fluid temperature in degF\n",
      "Th2  =  97.2;                                   # Outlet hot fluid temperature in degF\n",
      "\n",
      "# Calculations and Results\n",
      "delt1  =  Tc1-Th2;                         # Maximum temperature difference in degF\n",
      "delt2  =  Th1-Tc2;                         # Minimum temperature difference in degF\n",
      "LMTD  =  round((delt1-delt2)/math.log(delt1/delt2));\n",
      "print \"  The math.log mean temperature difference is %d degF\"%(LMTD);     \n",
      "\n",
      "m  =  18210.;                              # Flow rate through tubes\n",
      "q  =  m*(Th2-Tc2);                        # Heat loss in Btu/hr\n",
      "A  =  48.1;                               # Area in ft**2\n",
      "U  =  q/(A*LMTD);                         # Overall heat transfer coefficient\n",
      "print \"  The overall heat transfer coefficient is %d Btu/hr-ft**2-degF \"%(U);\n",
      "\n",
      "\n",
      "# To calcalute using equations estabilished by correlation\n",
      "Ts  =  113.;                               # Average tube temperature in degF\n",
      "Tf  =  (123.9+Ts)/2;                      # Film temperature in degF\n",
      "# At this temperature thermal properties are considered\n",
      "p1  =  61.7/32.2;                              # Density in slug/ft**3\n",
      "u1  =  1.38/32.2;                              # Vismath.cosity in slug/ft-hr\n",
      "Cp1  =  1*32.2;                                # Btu/slug/ft\n",
      "k1  =  0.366;                                  # Thermal conductivity in Btu/hr-ft-degF\n",
      "D1  =  0.375/12;                               # Diameter in ft\n",
      "v1  =  7610.;                                   # Velocity in ft/sec\n",
      "Nre1  =  v1*D1*p1/u1;                          # Reynolds number\n",
      "Npr1  =  u1*Cp1/k1;                            # Prandtls number\n",
      "Nnu1  =  0.33*Nre1**0.6*Npr1**(1./3);             # Nusselt number\n",
      "h1  =  Nnu1*k1/D1;                             # Heat transfer coefficient\n",
      "print \"  The outer heat transfer coefficient is %d Btu/hr-ft**2-degF \"%(h1);\n",
      "\n",
      "# Taking the thermal properties at 78.3 degF\n",
      "p2  =  62.2/32.2;                              # Density in slug/ft**3\n",
      "u2  =  2.13/32.2;                              # Vismath.cosity in slug/ft-hr\n",
      "Cp2  =  1*32.2;                                # Heat capacity in Btu/slug/ft\n",
      "k2  =  0.348;                                  # Thermal conductivity in Btu/hr-ft-degF\n",
      "D2  =  0.277/12;                               # Diameter in ft\n",
      "v2  =  7140;                                   # Velocity in ft/sec\n",
      "Nre2  =  v2*D2*p2/u2;                          # Reynolds number\n",
      "Npr2  =  u2*Cp2/k2;                            # Prandtls number\n",
      "Nnu2  =  0.023*Nre2**0.8*Npr2**(0.4);            # Nusselt number\n",
      "h2  =  Nnu2*k2/D2;                             # Heat transfer coefficient\n",
      "print \"  The inner heat transfer coefficient is %d Btu/hr-ft**2-degF\"%(h2);\n",
      "\n",
      "k3  =  58;\n",
      "U1  =  1/((D1/(D2*h2))+(D1*math.log(D1/D2)/(2*k3))+(1/h1));   # Heat transfer coefficient \n",
      "print \"  The overall heat transfer coefficient accordind to estabilished correlation  is %d Btu/hr-ft**2-degF \"%(U1);\n",
      "\n",
      "# note : rounding off error."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "  The math.log mean temperature difference is 46 degF\n",
        "  The overall heat transfer coefficient is 310 Btu/hr-ft**2-degF \n",
        "  The outer heat transfer coefficient is 1567 Btu/hr-ft**2-degF \n",
        "  The inner heat transfer coefficient is 631 Btu/hr-ft**2-degF\n",
        "  The overall heat transfer coefficient accordind to estabilished correlation  is 349 Btu/hr-ft**2-degF \n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.9 page : 188"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "To1 = 140.;                                # inlet temperature of oil in degF\n",
      "To2 = 90.;                                 # Outlet temperature of oil in degf\n",
      "Cpo = 0.5;                                # Specific heat capacity in Btu/lb-degf\n",
      "Tw1 = 60.;                                 # Inlet tempearture of water in degF\n",
      "Tw2 = 80.;                                 # Outlet temperature of water in degF\n",
      "mo = 2000.;                                # Mass flow rate of oil in lb/hr\n",
      "\n",
      "# Calculations \n",
      "q = mo*Cpo*(To1-To2);                     # Heat transferred in Btu/hr\n",
      "Cpw = 1;                                  # Heat capacity of water in Btu/hr\n",
      "mw = q/(Cpw*(Tw2-Tw1));                   # Mass flow rate in lb/hr\n",
      "E1 = (Tw1-Tw2)/(Tw1-To2);                 # Effective ratio\n",
      "# Seeing the effective ratio and mass flow rate ratio, from the graph we get UA\n",
      "UA = 1.15*mo*Cpo;\n",
      "\n",
      "# Results\n",
      "print \"The product of overall heat transfer and total area is %d Btu/hr-degF\"%(UA);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The product of overall heat transfer and total area is 1150 Btu/hr-degF\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.9 page : 191\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "t = 2.;                                  # Thickness of wall in ft\n",
      "To = 100.;                               # Initial temperature of wall in degF\n",
      "Tg = 1000.;                              # Temperature of hot gases math.exposed in degF\n",
      "k = 8.;                                  # Thermal conductivity in Btu/hr-ft-degF\n",
      "p = 162.;                                # density in lb/ft**-3\n",
      "Cp = 0.3;                               # Heat capacity in Btu/lb-degF\n",
      "h = 1.6;                                # Heat transfer coefficient in Btu/hr-ft**-2-degF\n",
      "a = k/(p*Cp);                           # Thermal diffusivity\n",
      "\n",
      "# Considering the values of a and 4at/L**2 and hl/2k, the value of Phis, Phic and Si can be obtained\n",
      "Phis = 0.37;\n",
      "Phic = 0.41;\n",
      "Si = 0.62;\n",
      "\n",
      "# Calculations and Results\n",
      "Ta = Tg+(To-Tg)*Phis;                   # Temperature of surface in degF\n",
      "print \"The temperature of surface is %d degF  \"%(Ta);\n",
      "Tc = Tg+(To-Tg)*Phic;                   # Temperature of center plane in degF\n",
      "print \"The temperature of surface is %d degF  \"%(Tc);\n",
      "A = 10;                                  # area of wall through which heat is absorbed\n",
      "q = p*Cp*t*A*Si*(To-Tg);                 # Heat absorbed in Btu/hr\n",
      "print \"The heat absorbed by wall is %d Btu\"%(q);\n",
      "\n",
      "# note : book answer is rounded off."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The temperature of surface is 667 degF  \n",
        "The temperature of surface is 631 degF  \n",
        "The heat absorbed by wall is -542376 Btu\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.10 page : 189"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "To1 = 160.;                               # inlet temperature of oil in degF\n",
      "Cpo = 0.5;                               # Specific heat capacity in Btu/lb-degf\n",
      "Tw1 = 60.;                                # Inlet temperature of water in degF\n",
      "mo = 1000.;                               # Mass flow rate of oil in lb/hr\n",
      "mw = 2500.;                               # Mass flow rate of water in lb/hr\n",
      "Cpw = 1.;                                 # Heat capacity of water in Btu/hr\n",
      "\n",
      "# Calculations and Results\n",
      "X = mo*Cpo/(mw*Cpw);                     # Ratio of flow rates \n",
      "UA = 1.15*mo*Cpo;\n",
      "B = UA/mo*Cpo;\n",
      "\n",
      "# from the graph, we can locate the point of A and B And corresponding effectiveness ratio\n",
      "E = 0.86;                                # Effectiveness ratio\n",
      "To2 = To1-E*(To1-Tw1);                   # Outlet temperature of oil in degF\n",
      "print \"The outlet temperature of oil is %d degF \"%(To2);\n",
      "\n",
      "q = mo*Cpo*(To1-To2);                     # Heat transferred in Btu/hr\n",
      "Tw2 = Tw1+(q/(mw*Cpw));                   # Outlet temperature of oil in degF\n",
      "print \" The outlet tempearture of water is %.1f degF\"%(Tw2);\n",
      "\n",
      "\n",
      "\n",
      "     \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The outlet temperature of oil is 74 degF \n",
        " The outlet tempearture of water is 77.2 degF\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.11 page : 193"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "from numpy import zeros, nan\n",
      "\n",
      "# To compute the temprature distribution\n",
      "h = 1.;                                        # Heat transfer coefficient in Btu/hr-ft**2-degF\n",
      "x = 1.;                                        # Assumed thickness in ft\n",
      "k = 1.;                                        # Thermal conductivity in Btu/hr-ft-degF\n",
      "N = h*x/k;\n",
      "t0 = 600.;\n",
      "t4 = 200.;\n",
      "t1 = [500, 550, 550, 525, 525, 512.5, 512.5, 512.5, 506.2, 506.2, 506.2, 506.2, 503.1, 503.1];\n",
      "t2 = [450, 450, 450, 450, 425, 425, 425, 412.5, 412.5, 412.5, 406.3, 406.3, 406.3, 403.1];\n",
      "t3 = [350, 350, 325, 325 ,325, 325, 312.5, 312.5, 312.5 ,306.3, 306.3, 303.1, 303.1, 303.1];\n",
      "th1 = zeros(14)\n",
      "th2 = zeros(14)\n",
      "th3 = zeros(14)\n",
      "th1[0] = nan\n",
      "th2[0] = nan\n",
      "th3[0] = nan\n",
      "\n",
      "# Assumed temperatures in degF for points 1 2 & 3 respectively\n",
      "for i in range(0,14):\n",
      "    th1[i] = th1[i]+t0+t2[i]-2*t1[i];\n",
      "    th2[i] = th2[i]+t1[i]+t3[i]-2*t2[i];\n",
      "    th3[i] = th3[i]+t2[i]+t4-2*t3[i];\n",
      "    print \"Assuming t1 = %.1f degF  t2 = %.1fdegF  t3 = %.1fdegF  th1 = %.1f  degF  th2 = %.1f  degF  th3 = %.1f  degF  \"%(t1[i],t2[i],t3[i],th1[i],th2[i],th3[i]);\n",
      "\n",
      "print \"This way assumption must be continued till all sink strengths are zero\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Assuming t1 = 500.0 degF  t2 = 450.0degF  t3 = 350.0degF  th1 = nan  degF  th2 = nan  degF  th3 = nan  degF  \n",
        "Assuming t1 = 550.0 degF  t2 = 450.0degF  t3 = 350.0degF  th1 = -50.0  degF  th2 = 0.0  degF  th3 = -50.0  degF  \n",
        "Assuming t1 = 550.0 degF  t2 = 450.0degF  t3 = 325.0degF  th1 = -50.0  degF  th2 = -25.0  degF  th3 = 0.0  degF  \n",
        "Assuming t1 = 525.0 degF  t2 = 450.0degF  t3 = 325.0degF  th1 = 0.0  degF  th2 = -50.0  degF  th3 = 0.0  degF  \n",
        "Assuming t1 = 525.0 degF  t2 = 425.0degF  t3 = 325.0degF  th1 = -25.0  degF  th2 = 0.0  degF  th3 = -25.0  degF  \n",
        "Assuming t1 = 512.5 degF  t2 = 425.0degF  t3 = 325.0degF  th1 = 0.0  degF  th2 = -12.5  degF  th3 = -25.0  degF  \n",
        "Assuming t1 = 512.5 degF  t2 = 425.0degF  t3 = 312.5degF  th1 = 0.0  degF  th2 = -25.0  degF  th3 = 0.0  degF  \n",
        "Assuming t1 = 512.5 degF  t2 = 412.5degF  t3 = 312.5degF  th1 = -12.5  degF  th2 = 0.0  degF  th3 = -12.5  degF  \n",
        "Assuming t1 = 506.2 degF  t2 = 412.5degF  t3 = 312.5degF  th1 = 0.1  degF  th2 = -6.3  degF  th3 = -12.5  degF  \n",
        "Assuming t1 = 506.2 degF  t2 = 412.5degF  t3 = 306.3degF  th1 = 0.1  degF  th2 = -12.5  degF  th3 = -0.1  degF  \n",
        "Assuming t1 = 506.2 degF  t2 = 406.3degF  t3 = 306.3degF  th1 = -6.1  degF  th2 = -0.1  degF  th3 = -6.3  degF  \n",
        "Assuming t1 = 506.2 degF  t2 = 406.3degF  t3 = 303.1degF  th1 = -6.1  degF  th2 = -3.3  degF  th3 = 0.1  degF  \n",
        "Assuming t1 = 503.1 degF  t2 = 406.3degF  t3 = 303.1degF  th1 = 0.1  degF  th2 = -6.4  degF  th3 = 0.1  degF  \n",
        "Assuming t1 = 503.1 degF  t2 = 403.1degF  t3 = 303.1degF  th1 = -3.1  degF  th2 = 0.0  degF  th3 = -3.1  degF  \n",
        "This way assumption must be continued till all sink strengths are zero\n"
       ]
      }
     ],
     "prompt_number": 22
    }
   ],
   "metadata": {}
  }
 ]
}