{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "CHAPTER 3: Heating and Cooling of Electrical Machines"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.1, Page number 37"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "d = 12.0              #Diameter of copper bar(mm)\n",
      "t = 1.5               #Thickness of micanite tube(mm)\n",
      "rho = 8.0             #Thermal resistivity(ohm-m)\n",
      "theta_diff = 25.0     #Temperature difference(\u00b0C)\n",
      "l = 0.2               #Length of bar(m)\n",
      "\n",
      "#Calculation\n",
      "S = math.pi*(d+t)*10**-3*l      #Area of insulation in the path of heat flow(m^2)\n",
      "R_s = rho*t*10**-3/S            #Thermal resistance in the micanite tube(ohm)\n",
      "Q_con = theta_diff/R_s          #Loss that will pass from copper bar to iron(W)\n",
      "\n",
      "#Result\n",
      "print('Loss that will pass from copper bar to iron, Q_con = %.2f W' %Q_con)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Loss that will pass from copper bar to iron, Q_con = 17.67 W\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.2, Page number 37"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "ratio = 20.0          #Ratio of resistivity across lamination to along lamination\n",
      "t = 40.0              #Thickness of lamination stack(mm)\n",
      "S = 6000.0            #Cross-section of lamination(mm^2)\n",
      "theta = 20.0          #Temperature difference across laminations(\u00b0C)\n",
      "theta_1 = 5.0         #Temperature difference among laminations(\u00b0C)\n",
      "Q_con_1 = 25.0        #Heat conducted along laminations(W)\n",
      "S_1 = 2500.0          #Cross-section of lamination(mm^2)\n",
      "t_1 = 20.0            #Thickness of lamination stack(mm)\n",
      "\n",
      "#Calculation\n",
      "rho_1 = S_1*theta_1*10**-6/(Q_con_1*t_1*10**-3)  #Thermal resistivity along direction of lamination(ohm-m)\n",
      "rho = ratio*rho_1                                #Thermal resistivity across laminations(ohm-m)\n",
      "Q_con = S*10**-6*theta/(rho*t*10**-3)            #Heat conducted across laminations(W)\n",
      "\n",
      "#Result\n",
      "print('Loss that will be conducted across laminations, Q_con = %.f W' %Q_con)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Loss that will be conducted across laminations, Q_con = 6 W\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.3, Page number 39"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "e = 0.8               #Co-efficient of emissivity\n",
      "temp_body = 60.0      #Temperature of body(\u00b0C)\n",
      "temp_walls = 20.0     #Temperature of walls of room(\u00b0C)\n",
      "\n",
      "#Calculation\n",
      "T_1 = 273+temp_body                     #Temperature of body(K)\n",
      "T_0 = 273+temp_walls                    #Temperature of walls of room(K)\n",
      "q_rad = 5.7*10**-8*e*(T_1**4-T_0**4)    #Heat radiated from body(W/m^2)\n",
      "\n",
      "#Result\n",
      "print('Heat radiated from body, q_rad = %.1f W/m^2' %q_rad)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat radiated from body, q_rad = 224.6 W/m^2\n"
       ]
      }
     ],
     "prompt_number": 1
    }
   ],
   "metadata": {}
  }
 ]
}