{
 "metadata": {
  "name": "",
  "signature": "sha256:85e6b6fc08cf389e51cb8c88e6ef45df0ab76627422a51dd5811f81a969b3ed6"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 17: Symmetrical Fault Calculations"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 17.1, Page Number: 402"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable declaration:\n",
      "kVAa = 15000\n",
      "kVAb = 20000\n",
      "V = 12000\n",
      "kVA_base = 35000\n",
      "Xa = 30                    #%reactance of alternator A(%)\n",
      "Xb = 50                    #%reactance of alternator B(%)\n",
      "\n",
      "\n",
      "#Calculation:\n",
      "Xa1 = kVA_base/kVAa*Xa            #% Reactance of alternator A at the base kVA\n",
      "Xb1 = kVA_base/kVAb*Xb            #% Reactance of alternator B at the base kVA\n",
      "I = kVA_base*1000/(3**0.5*V)   #Line current corresponding to 35000 kVA at 12 kV\n",
      "\n",
      "X = Xa1*Xb1/(Xa1+Xb1)            #Total % reactance from generator neutral up to fault point\n",
      "Isc = I*100/X                    #Short-circuit current(A)\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"The short-circuit current is\",round(Isc),\"A\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The short-circuit current is 4330.0 A\n"
       ]
      }
     ],
     "prompt_number": 48
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 17.2, Page Number: 404"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable declaration:\n",
      "kVA = 20000              #kVA rating of alternator\n",
      "V = 10000              #voltage rating of alternator\n",
      "Xa = 5                    # % reactance of alternator(ohm)\n",
      "\n",
      "#Calculation:\n",
      "I = kVA*1000/(3**0.5*V)              #full load current(A)\n",
      "Vp = V/3**0.5                      #phase voltage(A)\n",
      "#As the short-circuit current is to be 8 times the full-load current,\n",
      "Xr = 1/8*100\n",
      "Xe = Xr-Xa                         #External % reactance required\n",
      "X = Xe*Vp/(I*100)            #per phase external reactance required(ohm)\n",
      "\n",
      "#Result:\n",
      "print \"Per phase external reactance required is\",X,\"ohm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Per phase external reactance required is 0.375 ohm\n"
       ]
      }
     ],
     "prompt_number": 49
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 17.3, Page Number: 404"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable declaration:\n",
      "Vl = 10                            #transmission line voltage(kV)\n",
      "Rl = 1                             #line resistance(ohm)\n",
      "Xl = 4                             #line reactance(ohm)\n",
      "MVAtf = 5                          #transformer rating(MVA)\n",
      "Xtf = 5                            #reactance of transformer(%)\n",
      "MVAal = 10                         #rating of alternator(MVA)\n",
      "Xal = 10                           #reactance of alternator(%)\n",
      "\n",
      "\n",
      "\n",
      "#Calculation:\n",
      "#Let 10,000 kVA be the base kVA\n",
      "kVAb = 10000                          #base kVA\n",
      "Xalb = kVAb/(MVAal*1000)*Xal          #% reactance of alternator on base kVA\n",
      "Xtfb = kVAb/(MVAtf*1000)*Xtf          #% reactance of transformer on base kVA\n",
      "Xl1 = kVAb*Xl/(10*Vl**2)              #% reactance of transmission line\n",
      "Rl1 = kVAb*Rl/(10*Vl**2)              #% resistance of transmission line\n",
      "\n",
      "\n",
      "#(i)For a fault at the end of a transmission line (point F2),\n",
      "Xt = Xalb+Xtfb+Xl1                   #Total % reactance\n",
      "Z = (Xt**2+Rl1**2)**0.5    #% impedance from generator neutral upto fault point F2\n",
      "SCkVA1 = kVAb*100/Z                  #Short-circuit kVA\n",
      "\n",
      "\n",
      "#(ii)For a fault at the high voltage terminals of the transformer (point F1),\n",
      "#Total % reactance from generator neutral upto fault point F1:\n",
      "Xt1 = Xalb+Xtfb\n",
      "SCkVA2 = kVAb*100/Xt1               #Short-circuit kVA\n",
      "\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"(i) SC kVA for 1st case = \",round(SCkVA1),\"kVA\"\n",
      "print \"(ii)SC kVA for 2nd case = \",round(SCkVA2),\"kVA\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i) SC kVA for 1st case =  16440.0 kVA\n",
        "(ii)SC kVA for 2nd case =  50000.0 kVA\n"
       ]
      }
     ],
     "prompt_number": 50
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 17.4, Page Number: 405"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable declaration:\n",
      "kVAb = 10000                   #kVA base\n",
      "Xt = 5                         #reactance of each transformer(%)\n",
      "kVAt = 5000                    #kVA rating of each transformer\n",
      "kVA1 = 10000                  #kVA of generator A & B each\n",
      "kVA3 = 5000                    #kVA of generator C\n",
      "Xa = 12                        #reactance of generator A & B each(%)\n",
      "Xc = 18                        #reactance of generator c(%)\n",
      "\n",
      "\n",
      "\n",
      "#Calculation:\n",
      "#The % reactance of generators A, B and C and that of\n",
      "#each transformer on the selected base kVA will be:\n",
      "XA = Xa*kVAb/kVA1\n",
      "XB = Xa*kVAb/kVA1\n",
      "XC = Xc*kVAb/kVA3\n",
      "XT = Xt*kVAb/kVAt\n",
      "\n",
      "#(i) When the fault occurs on the low voltage side of the\n",
      "#transformer,\n",
      "#Total % reactance from generator neutral upto fault point F1\n",
      "XT1 = XA/2*XC/(XA/2+XC)             #%\n",
      "MVAf1 = kVAb*100/XT1/1000            #Fault MVA\n",
      "\n",
      "#(i) When the fault occurs on the high voltage side of the\n",
      "#transformer\n",
      "#Total % reactance from generator neutral upto fault point F2\n",
      "XT2 = XT1+XT                       #%\n",
      "MVAf2 = kVAb*100/XT2/1000          #Fault MVA\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"Maximum fault MVA which the circuit breakers on:\"\n",
      "print \"(i) low voltage side is\",round(MVAf1,1),\"MVA\"\n",
      "print \"(ii)high voltage side is\",round(MVAf2),\"MVA\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Maximum fault MVA which the circuit breakers on:\n",
        "(i) low voltage side is 194.4 MVA\n",
        "(ii)high voltage side is 66.0 MVA\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 17.5, Page Number: 407"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "#Variable declaration:\n",
      "X1 = 10                      #reactance of generator 1 & 2 each(%)\n",
      "X3 = 12                      #reactance of generator 3 & 4 each(%)\n",
      "kVA1 = 10000                 #kVA rating of generator 1 & 2 each\n",
      "kVA3 = 8000                 #kVA rating of generator 3 & 4 each\n",
      "Xr = 10                      #reactance of reactor(%)\n",
      "kVAr = 5000                  #kVA of reactor\n",
      "\n",
      "\n",
      "#Calculation:\n",
      "#Fig. above shows the single line diagram of the network.\n",
      "kVAb = 10000                    #base kVA\n",
      "X1b = X1*kVAb/kVA1             #% Reactance of generator 1 or 2 on the base kVA\n",
      "X3b = X3*kVAb/kVA3             #% Reactance of generator 3 or 4 on the base kVA\n",
      "Xrb = Xr*kVAb/kVAr             #% Reactance of bus-bar reactor on the base kVA\n",
      "\n",
      "#After the fault occurs,\n",
      "Xt = ((X1b/2+Xrb)*X3b/2)/(X1b/2+Xrb+X3b/2)\n",
      "kVAf = kVAb*100/Xt\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"Required fault MVA is\",round(kVAf/1000,2),\"MVA\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Required fault MVA is 173.33 MVA\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 17.6, Page Number: 408"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "from sympy import *\n",
      "\n",
      "\n",
      "#Variable declaration:\n",
      "kVAa = 3000                   #kVA rating of generator A\n",
      "kVAb = 4500                   #kVA rating of generator B\n",
      "Xa = 7                        #% reactance of gen A\n",
      "Xb = 8                        #% reactance of gen A\n",
      "kVAt = 7500                   #kVA rating of transformer\n",
      "Xt = 7.5                      #% reactance of transformer\n",
      "Vb = 3.3                      #bus voltage(kV)\n",
      "\n",
      "#Calculation:\n",
      "kVAbs = 7500                   #base kVA(say)\n",
      "XA = Xa*kVAbs/kVAa         #% Reactance of generator A on the base kVA\n",
      "XB = Xb*kVAbs/kVAb         #% Reactance of generator B on the base kVA\n",
      "XT = Xt*kVAbs/kVAt         #% Reactance of transformer on the base kVA\n",
      "X = symbols('X')               #percentage reactance of the bus-bar reactor\n",
      "Xt1 = (XA*XB/(XA+XB))*(X+XT)/((XA*XB/(XA+XB))+(X+XT))\n",
      "SCkVA = kVAt*100*Xt1                    #Short-circuit kVA\n",
      "#But the short-circuit kVA should not exceed 150 * 10**3 kVA,\n",
      "#the rupturing capacity of the breaker.\n",
      "\n",
      "X1 = abs(solve(SCkVA-150*1000,X)[0])\n",
      "x = X1*10*Vb**2/kVAt                    #reactance of the reactor(ohm)\n",
      "\n",
      "#Result:\n",
      "print \"Reactance of the reactor per phase is\",round(x,3),\"ohm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Reactance of the reactor per phase is 0.106 ohm\n"
       ]
      }
     ],
     "prompt_number": 53
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 17.7, Page Number: 409"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable declaratioon:\n",
      "MVAbase = 100                    #base MVA\n",
      "MVAa = 1500                    #estimated short-circuit MVA at busbar A\n",
      "MVAb = 1200                   #estimated short-circuit MVA at busbar B\n",
      "kV = 33                        #generated voltage at each station(kV)\n",
      "x = 1                        #transmission line reactance(ohm)\n",
      "\n",
      "#Calculation:\n",
      "Xa = MVAbase/MVAa*100         #% Reactance of station A on the base MVA\n",
      "Xb = MVAbase/MVAb*100         #% Reactance of station B on the base MVA\n",
      "Xt = MVAbase*1000*x/(10*kV**2)\n",
      "\n",
      "#Fault on station A.\n",
      "Xt1 = (Xb+Xt)*Xa/(Xa+Xb+Xt)         #Total % reactance upto fault point F1\n",
      "SCMVA1 = MVAbase*100/Xt1            #Short-circuit MVA\n",
      "\n",
      "#Fault on station B.\n",
      "Xt2 = (Xa+Xt)*Xb/(Xb+Xa+Xt)         #Total % reactance upto fault point F2\n",
      "SCMVA2 = MVAbase*100/Xt2            #Short-circuit MVA\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"Fault on station A, the short circuit MVA is\",round(SCMVA1),\"MVA\"\n",
      "print \"Fault on station B, the short circuit MVA is\",round(SCMVA2),\"MVA\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Fault on station A, the short circuit MVA is 2071.0 MVA\n",
        "Fault on station B, the short circuit MVA is 1831.0 MVA\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 17.8, Page Number: 410"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable declaration:\n",
      "kVAbase = 5000                     #base kVA\n",
      "Xr = 6                             #% reactance of reactor\n",
      "Xg = 12                            #% reactance of each generator\n",
      "kVAg = 5000                        #given generator rating(kVA)\n",
      "kVAr = 5000                        #given reactor rating(kVA)\n",
      "\n",
      "\n",
      "#Calculation:\n",
      "#(i) With reactors:\n",
      "#Suppose a 3-phase short-circuit fault occurs on section 3 of the bus-bar.\n",
      "\n",
      "Xt1 = round(((Xr+Xg)/2+Xr)*Xg/(((Xr+Xg)/2+Xr)+Xg),2)   #% reactance from gen. neutral upto fault point F      \n",
      "SCkVA1 = kVAbase*100/Xt1                     #Short-circuit input\n",
      "\n",
      "#(ii) Without reactors:\n",
      "Xt2 = Xg/3                     #Total % reactance upto fault point F\n",
      "SCkVA2 = kVAbase*100/Xt2\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"(i) With reactors, short circuit MVA\",round(SCkVA1/1000,3),\"MVA\"\n",
      "print \"(ii) With reactors, short circuit MVA\",SCkVA2/1000,\"MVA\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i) With reactors, short circuit MVA 74.963 MVA\n",
        "(ii) With reactors, short circuit MVA 125.0 MVA\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 17.9, Page Number: 411"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable declaration:\n",
      "MVAbase = 5                        #base MVA\n",
      "MVAg = 10                         #MVA of generator\n",
      "MVAr = 10                         #MVA of reactor\n",
      "MVAtr = 5                        #MVA of transformer\n",
      "xr = 10                           #% reactance of each reactor\n",
      "xg = 30                           #% reactance of each generator\n",
      "xtr = 5                           #% reactance of each transformer\n",
      "\n",
      "\n",
      "\n",
      "#Calculation:\n",
      "Xg = xg*MVAbase/MVAg                 #%age reactance of each generator on the base MVA\n",
      "Xr = xr*MVAbase/MVAr               #%age reactance of each reactor on the base MVA\n",
      "Xtr = xtr*MVAbase/MVAtr             #%age reactance of each transformer on the base MVA\n",
      "\n",
      "#Total %age reactance from generator neutral upto fault point F\n",
      "Xt = ((Xg+Xr)/2+Xtr)*Xg/(((Xg+Xr)/2+Xtr)+Xg)+Xr\n",
      "SCMVA = MVAbase*100/Xt                    #short circuit MVA\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"Short circuit MVA is\",SCMVA,\"MVA\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Short circuit MVA is 40.0 MVA\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 17.10, Page Number: 412"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "from sympy import *\n",
      "\n",
      "#Variable declaration:\n",
      "#Let N = no. of section in bus bar\n",
      "#Q = kVA rating of generator\n",
      "#x = reactance of reactance\n",
      "#b = bus reactances.\n",
      "N,Q,x,b = symbols('N Q x b')\n",
      "\n",
      "#Calculation:\n",
      "X1 = (b+(x+b)/(N-1))*x/(b+(x+b)/(N-1)+x)           # %\n",
      "SCkVA = Q*100/X1                            #short circuit kVA\n",
      "\n",
      "\n",
      "#Now putting values:\n",
      "Q = 50000                                #kVA\n",
      "x = 20                                # %\n",
      "b = 10                                 #  %\n",
      "\n",
      "#(i) With 3 sections\n",
      "N1 = 3\n",
      "X1 = (b+(x+b)/(N1-1))*x/(b+(x+b)/(N1-1)+x)\n",
      "SCkVA1 = Q*100/X1\n",
      "\n",
      "#(ii) With 9 sections\n",
      "N2 = 9\n",
      "X2 = (b+(x+b)/(N2-1))*x/(b+(x+b)/(N2-1)+x)\n",
      "SCkVA2 = Q*100/X2\n",
      "\n",
      "#(ii) When N is very large\n",
      "N3 = 9999999999999              #say\n",
      "X3 = (b+(x+b)/(N3-1))*x/(b+(x+b)/(N3-1)+x)\n",
      "SCkVA3 = Q*100/X3\n",
      "\n",
      "#Result:\n",
      "print \"Short circuit kVA\"\n",
      "print \"(i)  For 3 sections is\",SCkVA1,\"kVA\"\n",
      "print \"(ii) For 9 sections is\",round(SCkVA2),\"kVA\"\n",
      "print \"(iii)For large N is\",round(SCkVA3),\"kVA\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Short circuit kVA\n",
        "(i)  For 3 sections is 450000.0 kVA\n",
        "(ii) For 9 sections is 613636.0 kVA\n",
        "(iii)For large N is 750000.0 kVA\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 17.11, Page Number: 414"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "from sympy import *\n",
      "\n",
      "#Variable declaration:\n",
      "MVAbs = 50                       #base MVA\n",
      "MVAg = 10                        #MVA of each generators\n",
      "xg = 20                           #% reactance\n",
      "xt = 10                          #reactance of transformer(%)\n",
      "MVAt = 50                         #MVA of transformer\n",
      "kV = 33                          #bus voltage\n",
      "\n",
      "\n",
      "#Calculation:\n",
      "Xg = MVAbs/MVAg*xg            #% reactance of each of the generator on base MVA\n",
      "Xt = MVAbs/MVAt*xt            #% reactance of the transformer on base MVA\n",
      "\n",
      "#Suppose the required reactance of the reactor is X % on 50 MVA base.\n",
      "X = symbols('X')\n",
      "#The reactances of the four generators are in parallel\n",
      "#& their equivalent reactance = 100/4 = 25%.\n",
      "\n",
      "Xtt = (Xg/4*(X+10))/(Xg/4+(X+10))\n",
      "\n",
      "#Now fault MVA at F is not to exceed 500 MVA.\n",
      "Xreq = MVAbs*100/500                 #required reactance(%)\n",
      "X1 = solve(Xtt-Xreq,X)[0]\n",
      "Xrt = 10*kV**2*X1/(MVAbs*10**3)        #Reactance of the reactor(ohm)\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"Reactance of the reactor is\",round(Xrt,3),\"ohm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Reactance of the reactor is 1.452 ohm\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 17.12, Page Number: 415"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "from sympy import *\n",
      "\n",
      "#Variable declaration:\n",
      "kVAg = 5000                      #kVA rating of generator\n",
      "V = 6600                        #voltage rating(V)\n",
      "x = 6                            #reactance of generator(%)\n",
      "\n",
      "\n",
      "#Calculation:\n",
      "X = symbols('X')                 #% reactance of the reactor\n",
      "kVAbs = 5000                      #base kVA\n",
      "#The short-circuit kVA is not to exceed 5 \u00d7 5000 kVA.\n",
      "X1 = solve(kVAbs*100/(X+x)-5*kVAg)[0]\n",
      "\n",
      "X11 = X1*10*(V/1000)**2/kVAg                #reactance in ohm\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"The required reactance is\",round(X11,2),\"ohm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The required reactance is 1.22 ohm\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 17.13, Page Number: 416"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable declaration:\n",
      "MVAg1 = 15                        #MVA rating of A & B generators\n",
      "x1 = 12                           #reactance of A & B(%)\n",
      "MVAg3 = 8                          #MVA rating of generator C\n",
      "x3 = 10                          #reactance of C(%)\n",
      "MVAt = 5                         #MVA rating of each transformer\n",
      "xt = 4                           #reactance of each transformer(%)\n",
      "MVAr = 10                         #MVA of reactor\n",
      "xr = 15                           #reactance of reactor(%)\n",
      "\n",
      "\n",
      "#Calculation:\n",
      "#Let 10 MVA be the base MVA.\n",
      "MVAbs = 10\n",
      "#The percentage reactance of various elements on the selected\n",
      "#base MVA will be :\n",
      "Xa = MVAbs/MVAg1*x1\n",
      "Xb = MVAbs/MVAg1*x1\n",
      "Xc = MVAbs/MVAg3*x3\n",
      "Xt = MVAbs/MVAt*xt\n",
      "\n",
      "\n",
      "\n",
      "#After the fault occurs,\n",
      "#The reactances of generators A and B are in parallel & their\n",
      "#equivalent reactance is 8%/2 = 4%.\n",
      "\n",
      "#Total reactance upto fault point F:\n",
      "XT = ((Xa*Xb)/(Xa+Xb)+Xt)*(Xc+xr)/(((Xa*Xb)/(Xa+Xb)+Xt)+(Xc+xr))\n",
      "MVA = MVAbs*100/XT                    #Fault MVA\n",
      "\n",
      "#Result:\n",
      "print \"Total reactance upto fault point F is\",round(MVA,2),\"%\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Total reactance upto fault point F is 119.7 %\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 17.14, Page Number: 417"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "import math\n",
      "\n",
      "#Variable declaration:\n",
      "MVAa = 10                          #MVA ratng of alterator\n",
      "xa = 20                              #reactance of alterator(%)\n",
      "MVAt = 5                             #MVA of tranformer\n",
      "xt = 10                            #reactance of transformer(%)\n",
      "V1 = 6.6                             #voltage on alterator side(kV)\n",
      "V2 = 33                           #voltage on transmission line side(kV)\n",
      "xl = 50                            #line reactance(ohm)\n",
      "rl = 10                           #line resistance(ohm)\n",
      "\n",
      "\n",
      "\n",
      "#Calculation:\n",
      "MVAbs = 10                        #base MVA\n",
      "Xa = MVAbs/MVAa*xa                  #% reactance of the alternator on base MVA\n",
      "Xt = MVAbs/MVAt*xt                #% reactance of the transformer on base MVA\n",
      "Xl = MVAbs*1000*xl/(10*V2**2)       #% reactance of the transmission line\n",
      "Rl = MVAbs*1000*rl/(10*V2**2)        #% resistance of the transmission line\n",
      "#When the symmetrical fault occurs at point F on the transmission line (50 km away), then\n",
      "XT = Xa+Xt+Xl                     #Total % reactance upto the point of fault F\n",
      "Z = math.sqrt(XT**2+Rl**2)            #% impedance from generator neutral upto fault point F\n",
      "SCMVA = MVAbs*100/Z               #Short-circuit MVA\n",
      "Isc = SCMVA*10**6/(3**0.5*V1*1000)    #Short-circuit current fed to the fault by the alternator\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"Short-circuit current fed to the fault by the alternator is\",round(Isc),\"A\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Short-circuit current fed to the fault by the alternator is 1012.0 A\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 17.15, Page Number: 418"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable declaration:\n",
      "#the ratings of the machines and equipments are shown in fig above.\n",
      "\n",
      "MVAbs = 10\n",
      "\n",
      "\n",
      "#Calculation:\n",
      "X1 = MVAbs/10*12       #% reactance of each generator (A, B, C and D) on the base MVA\n",
      "X2 = MVAbs/10*24              #% reactance of the reactor on the base MVA\n",
      "X3 = MVAbs/6*3          #% reactance of the transformer on the base MVA\n",
      "\n",
      "#When fault occurs at point F,\n",
      "XT = (30*6/(30+6))+5          #% reactance from generator neutral upto fault point F\n",
      "MVAf = MVAbs*100/XT           #Fault MVA\n",
      "Isc = 100*10**6/(3**0.5*66000)          #Short-circuit current\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"The fault current is\",round(Isc),\"A\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The fault current is 875.0 A\n"
       ]
      }
     ],
     "prompt_number": 62
    }
   ],
   "metadata": {}
  }
 ]
}