{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 10 : Unsteady State And Multidimensional Heat Conduction"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 10.8 Page No : 444"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The bottom surface temperature of given slab is 10.3 C\n",
      "The top surface temperature of given slab is 19.4 C\n",
      "The  mid plane temperature of given slab is 12.6 C\n"
     ]
    }
   ],
   "source": [
    "# Variables\n",
    "l = 0.05                       \t\t\t#m,thickness of margarine  slab\n",
    "ro = 990.                       \t\t\t#Kg/m**3, density of  margarine slab \n",
    "cp = 0.55                      \t\t\t#Kcal/kg C, ddpecific heat of slab\n",
    "k = 0.143                      \t\t\t#kcal/h mC,   thermal conductivity of slab\n",
    "Ti = 4.                         \t\t\t#C, initial temp\n",
    "To = 25.                        \t\t\t#C, ambient temp.\n",
    "t = 4.                          \t\t\t#hours, time\n",
    "h = 8.                          \t\t\t#kcal/h m**2 C\n",
    "\n",
    "#calculation\n",
    "Fo = k*t/(ro*cp*l**2)          \t\t\t#, fourier no.\n",
    "Bi = h*l/k                     \t\t\t#Biot no.\n",
    "#from fig. 10.6 a\n",
    "Tcbar = 0.7                    \t\t\t#Tcbar = (Tc-To)/(Ti-To)\n",
    "Tc = To+Tcbar*(Ti-To)          \t\t\t#C, centre temp.\n",
    "#from fig 10.6 b\n",
    "#(T-To)/(Tc-To) = 0.382\n",
    "T = 0.382*(Tc-To)+To           \t\t\t#c,top surface temp.\n",
    "#again from fig. 10.6 b\n",
    "Tm = 0.842*(Tc-To)+To          \t\t\t#, mid plane temp.\n",
    "\n",
    "# Results\n",
    "print \"The bottom surface temperature of given slab is %.1f C\"%(Tc);\n",
    "print \"The top surface temperature of given slab is %.1f C\"%(T);\n",
    "print \"The  mid plane temperature of given slab is %.1f C\"%(Tm);\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 10.9 Page No : 449"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "i) time required for the cantre-line temp.to drop down to 200 C is 229 s\n",
      "ii)the temp. at half radius  at that moment is 161 C \n",
      "iii)the amount of heat that has been  transfered to the liquid is  19647 Kj\n"
     ]
    }
   ],
   "source": [
    "import math \n",
    "# Variables\n",
    "Ti = 870.                             \t\t\t#C, initial temp.\n",
    "To = 30.                              \t\t\t#C, ambient  temp.\n",
    "Tc = 200.                             \t\t\t#C, centre line temp.\n",
    "h = 2000.                              \t\t\t#W/m**2 C, surface heat transfer coefficient\n",
    "a = 0.05                             \t\t\t#m, radius of cylinder \n",
    "k = 20.                               \t\t\t#W/m C, thermal conductivity\n",
    "ro = 7800.                            \t\t\t#kg/m**3, density\n",
    "cp = 0.46*10**3                      \t\t\t#j/kg C,  specific heat\n",
    "\n",
    "#calculation\n",
    "#i\n",
    "Bi = h*a/k                          \t\t\t#Biot no.\n",
    "alpha = k/(ro*cp)                     \t\t\t#m**2/C, thermal diffusivity\n",
    "Tcbar = (Tc-To)/(Ti-To)             \t\t\t# dimensionless centre line temp.\n",
    "#from fig 10.7 a\n",
    "fo = 0.51                           \t\t\t#fourier  no. fo = alpha*t/a**2\n",
    "t = fo*a**2/alpha                    \t\t\t#s, time\n",
    "\n",
    "#ii\n",
    "#at the half radius, r/a = 0.5 & Bi = 5\n",
    "T = To+0.77*(Tc-To)                 \t\t\t#from fig. 10.7 b\n",
    "\n",
    "#iii\n",
    "x = Bi**2*fo\n",
    "#for x  = 12.75 & Bi = 5.0. fig.10.9 b gives\n",
    "#q/qi = 0.83\n",
    "qi =  math.pi*a**2*(1)*ro*cp*(Ti-To)   \t\t\t#kj, initial amount of heat energy \n",
    "                            #present in 1 m length of shaft\n",
    "q = 0.83*qi                        \t\t\t#j, amount of heat transfered \n",
    "\n",
    "# Results\n",
    "print \"i) time required for the cantre-line temp.to drop down to 200 C is %.0f s\"%(t);\n",
    "print \"ii)the temp. at half radius  at that moment is %.0f C \"%(T);\n",
    "print \"iii)the amount of heat that has been  transfered to the liquid is  %d Kj\"%(q*10**-3)\n"
   ]
  }
 ],
 "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
}