{
 "metadata": {
  "name": "",
  "signature": "sha256:e24e8c5532aa0cc5567a0ced227977b5bbd55d1c64a3a566571c73c87a2dff24"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 2 - Distribution System"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E1 - Pg 20"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Calculate the most economical cross sectional area\n",
      "import math\n",
      "#soltion\n",
      "#given\n",
      "id=0.15;#interest & depreciation charges\n",
      "i=260.;#ampere#max current\n",
      "d=0.173;#ohm#resistance of conductor\n",
      "cst=.03;#rs# cost of energy per unit\n",
      "t=(365.*24.)/2.;#time of energy loss\n",
      "print '%s' %(\"Annual cost of 2 core feeder cable is Rs(90a+10)per meter\\n\");\n",
      "P3=(2.*i**2.*d*t*cst)/1000.#kWh#annual cost of energy loss\n",
      "print '%s %.2f %s' %(\"Energy loss per annum= P3/a=\",P3,\"/a\\n\");\n",
      "P2=90.*1000.*id;#energy lost per annum\n",
      "print '%s %.2f %s' %(\"Capital cost= P2*a=\",P2,\"*a\\n\");\n",
      "a=math.sqrt(P3/P2);\n",
      "print '%s %.2f %s' %(\"Economic cross section of conductor is= math.sqrt(P3/P2)=\",a,\"square cm\\n\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Annual cost of 2 core feeder cable is Rs(90a+10)per meter\n",
        "\n",
        "Energy loss per annum= P3/a= 3073.39 /a\n",
        "\n",
        "Capital cost= P2*a= 13500.00 *a\n",
        "\n",
        "Economic cross section of conductor is= math.sqrt(P3/P2)= 0.48 square cm\n",
        "\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E2 - Pg 20"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Calculate the most economical current density\n",
      "import math\n",
      "#soltion\n",
      "#given\n",
      "id=0.1;#interest & depreciation charges\n",
      "d=1.78*10.**-8.;#ohm m#resistivity\n",
      "R=(d*1000.)/10.**-4.;#ohm#resistance of conductor\n",
      "cst=.50;#rs# cost of energy per unit\n",
      "t=(365.*24.);#time of energy loss\n",
      "lf=.7;#load factor of losses\n",
      "print '%s' %(\"Annual cost of cable is Rs(2800a+1300)per km\\n\");\n",
      "print '%s %.2f %s' %(\"Resistance of each conductor=\",R,\"/a\\n\");\n",
      "P3=(R*t*cst*lf)/1000.;#*I**2#kWh#annual cost of energy loss\n",
      "print '%s %.2f %s' %(\"Annual cost of energy loss= P3/a=\",P3,\"(*I**2)/a\\n\");\n",
      "P2=2800.*id;#energy lost per annum\n",
      "print '%s %.2f %s' %(\"Annual charge on account of intrest and depreciation on variable cost of line= P2*a=\",P2,\"*a\\n\");\n",
      "J=math.sqrt(P2/P3);#current density I/a\n",
      "print '%s %.2f %s' %(\"Economic current density of conductor is\",J,\"A/cm square\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Annual cost of cable is Rs(2800a+1300)per km\n",
        "\n",
        "Resistance of each conductor= 0.18 /a\n",
        "\n",
        "Annual cost of energy loss= P3/a= 0.55 (*I**2)/a\n",
        "\n",
        "Annual charge on account of intrest and depreciation on variable cost of line= P2*a= 280.00 *a\n",
        "\n",
        "Economic current density of conductor is 22.65 A/cm square\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E3 - Pg 25"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Calculate the most economical current density and diameter of conductor\n",
      "import math\n",
      "#soltion\n",
      "#given\n",
      "id=0.1;#interest & depreciation charges\n",
      "cst=.02;#rs# cost of energy per unit\n",
      "d=0.173;#ohm#resistance of conductor\n",
      "pf=.8;#lagging\n",
      "P=1500.*10.**3.;#Watts#load\n",
      "V=11000.;#volts#supply voltage\n",
      "t=200.*8.;#hours\n",
      "print '%s' %(\"annual cost of 3 core feeder cable is Rs(8000 + 20000 a)per km\\n\");\n",
      "print '%s %.2f %s' %(\"Resistance of each conductor=\",d,\"/a\\n\");\n",
      "i=P/(math.sqrt(3.)*V*pf);#ampere\n",
      "print '%s %.2f %s' %(\"Current in each conductor=\",i,\"A\\n\");\n",
      "P2=20000.*id;#energy lost per annum\n",
      "print '%s %.2f %s' %(\"Capital cost= P2*a=\",P2,\"*a\\n\");\n",
      "P3=(3.*i**2.*d*t*cst)/1000.;#kWh#annual cost of energy loss\n",
      "print '%s %.2f %s' %(\"Energy loss per annum= P3/a=\",P3,\"/a\\n\");\n",
      "a=math.sqrt(P3/P2);\n",
      "print '%s %.2f %s' %(\"Economic cross section of conductor is= math.sqrt(P3/P2)=\",a,\"square cm \\n\");\n",
      "print '%s %.2f %s' %(\"Diameter of conductor=\",math.sqrt(4*a/math.pi),\"cm\\n\");\n",
      "print '%s %.2f %s' %(\"Current density=\",i/a,\"A/cm square\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "annual cost of 3 core feeder cable is Rs(8000 + 20000 a)per km\n",
        "\n",
        "Resistance of each conductor= 0.17 /a\n",
        "\n",
        "Current in each conductor= 98.41 A\n",
        "\n",
        "Capital cost= P2*a= 2000.00 *a\n",
        "\n",
        "Energy loss per annum= P3/a= 160.85 /a\n",
        "\n",
        "Economic cross section of conductor is= math.sqrt(P3/P2)= 0.28 square cm \n",
        "\n",
        "Diameter of conductor= 0.60 cm\n",
        "\n",
        "Current density= 347.02 A/cm square\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E4 - Pg 26"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Calculate the most economical cross sectional area\n",
      "import math\n",
      "#soltion\n",
      "#given\n",
      "id=0.1;#interest & depreciation charges\n",
      "pf=.8;#lagging\n",
      "P=10.**6.;#Watts#load\n",
      "V=11000.;#volts#supply voltage\n",
      "cst=.15;#rs# cost of energy per unit\n",
      "d=1.75*10.**-6.;#ohm cm#specific resistance\n",
      "l=1000.#m#length of the cable\n",
      "t=3000.;#hours\n",
      "print '%s' %(\"Annual cost of 2 core feeder cable is Rs(30 + 500a)per meter\\n\");\n",
      "R=(d*1000.*100.);#ohm#resistance of conductor\n",
      "print '%s %.2f %s' %(\"Resistance of each conductor=\",R,\"/a\\n\");\n",
      "i=P/(V*pf);#ampere\n",
      "print '%s %.2f %s' %(\"Current in each conductor=\",i,\"A\\n\");\n",
      "P2=500.*10.**3.*id;#energy lost per annum\n",
      "print '%s %.2f %s' %(\"Capital cost= P2*a=\",P2,\"*a\\n\");\n",
      "P3=(2.*i**2.*R*t*cst)/1000.;#kWh#annual cost of energy loss\n",
      "print '%s %.2f %s' %(\"Energy loss per annum= P3/a=\",P3,\"/a\\n\");\n",
      "a=math.sqrt(P3/P2);\n",
      "print '%s %.2f %s' %(\"Economic cross section of conductor is= math.sqrt(P3/P2)=\",a,\"square cm \\n\");\n",
      "print '%s %.2f %s' %(\"Diameter of conductor=\",math.sqrt(4*a/math.pi),\"cm\\n\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Annual cost of 2 core feeder cable is Rs(30 + 500a)per meter\n",
        "\n",
        "Resistance of each conductor= 0.18 /a\n",
        "\n",
        "Current in each conductor= 113.64 A\n",
        "\n",
        "Capital cost= P2*a= 50000.00 *a\n",
        "\n",
        "Energy loss per annum= P3/a= 2033.83 /a\n",
        "\n",
        "Economic cross section of conductor is= math.sqrt(P3/P2)= 0.20 square cm \n",
        "\n",
        "Diameter of conductor= 0.51 cm\n",
        "\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E5 - Pg 26"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "#Calculate the most economical cross sectional area\n",
      "import math\n",
      "#soltion\n",
      "#given\n",
      "id=0.1;#interest & depreciation charges\n",
      "pf=.85;#lagging\n",
      "Pm=10.**3.;#Watts#Max Demand\n",
      "Pt=5.*10.**6.#kWh#Toatal energy consumption\n",
      "V=11000.;#volts#supply voltage\n",
      "cst=.05;#rs# cost of energy per unit\n",
      "d=1.72*10.**-6.;#ohm cm#specific resistance\n",
      "t=(365.*24.);#time of energy loss\n",
      "print '%s' %(\"Annual cost of cable is Rs(80000a + 20000)per km\\n\");\n",
      "lf=Pt/(Pm*t)#Annual load factor\n",
      "print '%s %.2f %s' %(\"Annual load factor=\",lf,\"\\n\");\n",
      "llf=.25*lf+.75*lf**2.;#Loss load factor\n",
      "print '%s %.2f %s' %(\"Loss load factor=\",llf,\"\\n\");\n",
      "i=Pm*1000./(math.sqrt(3.)*V*pf);#ampere\n",
      "print '%s %.2f %s' %(\"Current in each conductor=\",i,\"A\\n\");\n",
      "P2=80000.*id;#energy lost per annum\n",
      "print '%s %.2f %s' %(\"Capital cost= P2*a=\",P2,\"*a*l\\n\");\n",
      "R=d*100*1000;#ohm\n",
      "P3=(3.*i**2.*R*t*cst*llf)/1000.;#kWh#annual cost of energy loss\n",
      "print '%s %.2f %s' %(\"Energy loss per annum= (P3*l)/a=\",P3,\"(*l)/a\\n\");\n",
      "a=math.sqrt(P3/P2);\n",
      "print '%s %.2f %s' %(\"Economic cross section of conductor is= math.sqrt(P3/P2)=\",a,\"square cm\\n\");\n",
      "#THERE IS TYPOGRAPHICAL ERROR IN THE ANS IN BOOK IT IS 0.2404 cm**2\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Annual cost of cable is Rs(80000a + 20000)per km\n",
        "\n",
        "Annual load factor= 0.57 \n",
        "\n",
        "Loss load factor= 0.39 \n",
        "\n",
        "Current in each conductor= 61.75 A\n",
        "\n",
        "Capital cost= P2*a= 8000.00 *a*l\n",
        "\n",
        "Energy loss per annum= (P3*l)/a= 333.52 (*l)/a\n",
        "\n",
        "Economic cross section of conductor is= math.sqrt(P3/P2)= 0.20 square cm\n",
        "\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E6 - Pg 27"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Calculate the most economical cross sectional area\n",
      "import math\n",
      "#soltion\n",
      "#given\n",
      "id=0.1;#interest & depreciation charges\n",
      "V=20000.;#volts#supply voltage\n",
      "d=1.72*10.**-6.;#ohm cm#specific resistance\n",
      "cst=.6;#rs# cost of energy per unit\n",
      "p1=1500.#kilowatts\n",
      "t1=8.#hours\n",
      "pf1=.8#power factor\n",
      "p2=1000.#kilowatts\n",
      "t2=10.#hours\n",
      "pf2=.9#power factor\n",
      "p3=100.#kilowatts\n",
      "t3=6.#hours\n",
      "pf3=1.#power factor\n",
      "t=365.#no. of days\n",
      "i1=p1*1000./(math.sqrt(3.)*V*pf1);#ampere#current at time t1\n",
      "i2=p2*1000./(math.sqrt(3.)*V*pf2);#ampere#current at time t2\n",
      "i3=p3*1000./(math.sqrt(3.)*V*pf3);#ampere#current at time t3\n",
      "R=d*100.*1000.;#ohm\n",
      "P2=8000.*id;#Loss load factor\n",
      "print '%s' %(\"Annual cost of cable is Rs(80000a + 20000)per km\\n\");\n",
      "print '%s %.2f %s' %(\"Capital cost= P2*a=\",P2,\"*a*l\\n\");\n",
      "P3=(3.*((i1**2.*t1)+(i2**2.*t2)+(i3**2.*t3))*R*t*cst)/1000.;#kWh#annual cost of energy loss\n",
      "print '%s %.2f %s' %(\"Energy loss per annum= (P3*l)/a=\",P3,\"(*l)/a\\n\");\n",
      "a=math.sqrt(P3/P2);\n",
      "print '%s %.2f %s' %(\"Economic cross section of conductor is= math.sqrt(P3/P2)=\",a,\"square cm \\n\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Annual cost of cable is Rs(80000a + 20000)per km\n",
        "\n",
        "Capital cost= P2*a= 800.00 *a*l\n",
        "\n",
        "Energy loss per annum= (P3*l)/a= 3816.77 (*l)/a\n",
        "\n",
        "Economic cross section of conductor is= math.sqrt(P3/P2)= 2.18 square cm \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 6
    }
   ],
   "metadata": {}
  }
 ]
}