{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 12 : Thyristors"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.1, Page No 278"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "L=2*(10**-7)*math.log(100/.75)\t\t#inductance per unit length\n",
      "C=2*math.pi*(10**-9)/(36*math.pi*math.log(100.0/0.75))\t#Capacitance per phase per unit length (F/m)\n",
      "Z1=math.sqrt(L/C)\n",
      "E=11000.0\n",
      "\n",
      "#Calculations\n",
      "print(\"(i)the natural impedence of line=%.0f ohms\" %Z1)\n",
      "Il=E/(math.sqrt(3)*Z1)         #line current(amps)\n",
      "print(\"(ii)line current =%.1f amps\" %Il)\n",
      "R=1000.0\n",
      "Z2=R\n",
      "E1=2*Z2*E/((Z1+Z2)*math.sqrt(3))\n",
      "Pr=3*E1*E1/(R*1000)           #Rate of power consumption\n",
      "Vr=(Z2-Z1)*E/(math.sqrt(3)*(Z2+Z1)*1000)\t\t#Reflected voltage\n",
      "Er=3*Vr*Vr*1000/Z1\t\t\t\t\t\t\t\t#rate of reflected voltage\n",
      "print(\"(iii)rate of energy absorption =%.1f kW\" %Pr)\n",
      "print(\"rate of reflected energy =%.1f kW\" %Er)\n",
      "print(\"(iv)Terminating resistance should be equal to surge impedence of line  =%.0f ohms\" %Z1)\n",
      "L=.5*(10**-8)\n",
      "C=10**-12\n",
      "Z=math.sqrt(L/C)\t\t# surge impedence\n",
      "VR=2*Z*11/((Z1+Z)*math.sqrt(3))\n",
      "Vrl=(Z-Z1)*11/((Z1+Z)*math.sqrt(3))\n",
      "PR1=3*VR*VR*1000/(Z)\n",
      "d=Vrl\n",
      "Prl=3*d*d*1000.0/Z1\n",
      "\n",
      "#Results\n",
      "print(\"(v)Refracted power =%.1f kW\" %PR1)\n",
      "print(\"Reflected power =%.1f kW\" %Prl)\n",
      "##Answer don't match exactly due to difference in rounding off of digits i between calculations\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i)the natural impedence of line=294 ohms\n",
        "(ii)line current =21.6 amps\n",
        "(iii)rate of energy absorption =289.2 kW\n",
        "rate of reflected energy =122.9 kW\n",
        "(iv)Terminating resistance should be equal to surge impedence of line  =294 ohms\n",
        "(v)Refracted power =257.9 kW\n",
        "Reflected power =154.3 kW\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.2, Page No 280"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "Xlc=0.3*(10**-3)\t\t# inductance of cable(H)\n",
      "Xcc=0.4*(10**-6)\t\t# capacitance of cable (F)\n",
      "Xlo=1.5*(10**-3)\t\t#inductance of overhead line(H)\n",
      "Xco=.012*(10**-6)\t\t# capacitance of overhead line (F)\n",
      "\n",
      "#Calculations\n",
      "Znc=math.sqrt((Xlc/Xcc))\n",
      "Znl=math.sqrt((Xlo/Xco))\n",
      "\n",
      "#Results\n",
      "print(\"Natural impedence of cable=%.2f ohms \" %Znc)\n",
      "print(\"Natural impedence of overhead line=%.1f ohms \" %Znl)\n",
      "E=2*Znl*15/(353+27)\n",
      "print(\"voltage rise at the junction due to surge =%.2f kV \" %E)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Natural impedence of cable=27.39 ohms \n",
        "Natural impedence of overhead line=353.6 ohms \n",
        "voltage rise at the junction due to surge =27.91 kV \n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.3, Page No 280"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "Z1=600.0\n",
      "Z2=800.0\n",
      "Z3=200.0\n",
      "E=100.0\n",
      "\n",
      "#Calculations\n",
      "E1=2*E/(Z1*((1/Z1)+(1/Z2)+(1/Z3)))\n",
      "Iz2=E1*1000.0/Z2\n",
      "Iz3=E1*1000.0/Z3\n",
      "\n",
      "#Results\n",
      "print(\"Transmitted voltage =%.2f kV \" %E1)\n",
      "print(\"The transmitted current in line Z2=%.2f amps \" %Iz2)\n",
      "print(\"The transmitted current in line Z3=%.1f amps \" %Iz3)\n",
      "\n",
      "#Answer don't match exactly due to difference in rounding off of digits i between calculations"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Transmitted voltage =42.11 kV \n",
        "The transmitted current in line Z2=52.63 amps \n",
        "The transmitted current in line Z3=210.5 amps \n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.4 Page No 283"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "Z=350.0  \t#surge impedencr (ohms)\n",
      "\n",
      "#Calculations\n",
      "C=3000.0*(10**-12)\t# earth capacitance(F) \n",
      "t=2.0*(10**-6)\n",
      "E=500.0\n",
      "E1=2*E*(1-math.exp((-1*t/(Z*C))))\n",
      "\n",
      "#Results\n",
      "print(\"the maximum value of transmitted voltage=%.2f kV \" %E1)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the maximum value of transmitted voltage=851.14 kV \n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.5, Page No 283"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "Z=350.0 \t\t#surge impedencr (ohms)\n",
      "L=800*(10**-6) \n",
      "t=2*(10**-6)\n",
      "E=500.0\n",
      "\n",
      "#Calculations\n",
      "E1=E*(1-math.exp((-1*t*2*Z/L)))\n",
      "\n",
      "#Results\n",
      "print(\"The maximum value of transmitted voltage=%.1f kV \" %E1)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The maximum value of transmitted voltage=413.1 kV \n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.6, Page No 285"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "eo=50.0\n",
      "x=50.0\n",
      "R=6.0\n",
      "Z=400.0\n",
      "G=0\n",
      "v=3*(10**5)\n",
      "e=2.68\n",
      "\n",
      "#Calculations\n",
      "e1=(eo*(e**((-1/2)*R*x/Z)))\n",
      "# answess does not match due to the difference in rounding off of digits. \n",
      "print(\"(i)the value of the Voltage wave when it has travelled through a distance 50 Km=%.1f kV \" %e1)\n",
      "Pl=e1*e1*1000.0/400\n",
      "io=eo*1000.0/Z\n",
      "t=x/v\n",
      "H=-(50*125*400*((e**-0.75)-1))/(6.0*3*10**5)\n",
      "\n",
      "#Results\n",
      "print(\"(ii)Power loss=%.3fkW  \\n heat loss=%.3f kJ\" %(Pl,H))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i)the value of the Voltage wave when it has travelled through a distance 50 Km=23.9 kV \n",
        "(ii)Power loss=1424.550kW  \n",
        " heat loss=0.726 kJ\n"
       ]
      }
     ],
     "prompt_number": 6
    }
   ],
   "metadata": {}
  }
 ]
}