{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 02 : Line Constant Calculations"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.2, Page No 29"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "GMD=0.7788*0.8/(2*100)\n",
      "Mgmd=((1.6*3.2*1.6)**(1.0/3))\n",
      "\n",
      "#Calculations\n",
      "Z=2*(10**-4)*1000*math.log(2.015/.003115)\n",
      "\n",
      "#Results\n",
      "print(\"The self GMD of the conductor =%.6f metres\" %GMD)\n",
      "print(\"The mutual GMD of the conductor =%.3f metres \" %Mgmd)\n",
      "print(\"Inductance =%.3f mH/km\\n\" %Z)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The self GMD of the conductor =0.003115 metres\n",
        "The mutual GMD of the conductor =2.016 metres \n",
        "Inductance =1.294 mH/km\n",
        "\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.3, Page No 29"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "r=1\n",
      "D11=r**1\n",
      "D12=2*r\n",
      "D14=4*r\n",
      "\n",
      "#Calculations\n",
      "D13=math.sqrt(16-4)*r\n",
      "Ds1=((1*2*2*math.sqrt(3)*4*2*math.sqrt(3)*2*2)**(1.0/7))*r\n",
      "Ds7=((2*1*2*2**2*2*2)**(1.0/7))*r       #we get this after Taking r outside the 1/7th root\n",
      "Ds=((((1*2*2*math.sqrt(3)*4*2*math.sqrt(3)*2*2)**(1.0/7))**6)*((2*1*2*2**2*2*2)**(1.0/7)))**(1.0/7)*r\n",
      "Dseq=((.7788)**(1.0/7))*Ds\n",
      "\n",
      "#Results\n",
      "print(\"Dseq.= %.2fr\" %Dseq)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Dseq.= 2.18r\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.4, Page No 30"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "GMDa=0.001947\t\t\t\t# GMD of conductor in group A\n",
      "\n",
      "#Calculations\n",
      "DSA=((.001947*6*12*.001947*6*6*0.001947*6*12)**(1.0/9))\n",
      "DSB=math.sqrt(5*(10**-3)*.7788*6)\n",
      "Dae=math.sqrt((9**2)+6**2)\n",
      "Dcd=math.sqrt((12**2)+9**2)\n",
      "DMA=((9*10.81*10.81*9*15*10.81)**(1.0/6))\n",
      "LA=2*(10**-7)*(10**6)*math.log(DMA/DSA)\n",
      "LB=2*(10**-7)*(10**6)*math.log(DMA/DSB)\n",
      "Tot=LA+LB\n",
      "\n",
      "#Results\n",
      "print(\"inductance of line A,LA=%.3f mH/km\" %LA)\t\t#Answers don't match due to difference in rounding off of digits\n",
      "print(\"inductance of line B,LB=%.1f mH/km\" %LB)\t\t#Answers don't match due to difference in rounding off of digits\n",
      "print(\"total inductance of line =%.2f mH/km\" %Tot)\t#Answers don't match due to difference in rounding off of digits\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "inductance of line A,LA=0.621 mH/km\n",
        "inductance of line B,LB=0.9 mH/km\n",
        "total inductance of line =1.47 mH/km\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.5 Page No 32"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "GMDc=1.266*0.7788*(10**-2)\t\t# self GMD of each conductor\n",
      "Dbc=math.sqrt((4**2)+(.75**2))\n",
      "Dab=Dbc\n",
      "\n",
      "#Calculations\n",
      "Dab=math.sqrt((4**2)+(8.25**2))\n",
      "Daa=math.sqrt((8**2)+(7.5**2))\n",
      "Dm1=(Dbc*8*7.5*9.1685)**(1.0/4)\n",
      "Dm2=(Dbc*Dbc*9.1685*9.1685)**(1.0/4)\n",
      "Dm3=Dm1\n",
      "Dm=((Dm1*Dm2*Dm3)**(1.0/3))\n",
      "Ds1=math.sqrt(GMDc*Daa)\t\t# self GMD of each phase\n",
      "Ds3=Ds1\n",
      "Ds2=math.sqrt(GMDc*9)\n",
      "Ds=((Ds1*Ds2*Ds3)**(1.0/3))\n",
      "Z=2*(10**-4)*(1000)*math.log(Dm/Ds)\n",
      "\n",
      "#Results\n",
      "print(\"inductance=%.3f mH/km/phase\\n\" %Z)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "inductance=0.607 mH/km/phase\n",
        "\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.6, Page No 33"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "GMDs=.0069\t\t#self GMD of the conductor\n",
      "Dab=math.sqrt((3**2)+.5**2)\n",
      "Dbc=Dab\n",
      "Dac=6.0\n",
      "\n",
      "#Calculations\n",
      "Dab=math.sqrt((3**2)+6**2)\n",
      "Daa=math.sqrt((6**2)+5.5**2)\n",
      "Dm1=((3.04*6*5.5*6.708)**.25)\n",
      "Dm2=((3.04*3.04*6.708*6.708)**.25)\n",
      "Dm=4.89\n",
      "Ds1=math.sqrt(GMDs*Daa)\n",
      "Ds2=0.2217\n",
      "Ds=.228\n",
      "Z=2*(10**-7)*(10**6)*math.log(Dm/Ds)\n",
      "\n",
      "#Results\n",
      "print(\"inductance =%.3f mH/km\" %Z)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "inductance =0.613 mH/km\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.7, Page No 34"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "Ds=math.sqrt(0.025*.4*.7788)\n",
      "\n",
      "#Calculations\n",
      "Dm=((6.5*13.0*6.5)**(1.0/3))\n",
      "Z=2*(10**-4)*1000*math.log(Dm/Ds)\n",
      "\n",
      "#Results\n",
      "print(\"inductance =%.3f mH/km/phase\" %Z)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "inductance =0.906 mH/km/phase\n"
       ]
      }
     ],
     "prompt_number": 6
    }
   ],
   "metadata": {}
  }
 ]
}