{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter16 Faults and Protection"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example16.1,Pg.no.57"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "peak inverse voltage of the device=PIV= 2969.71 Volts\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "from math import sqrt\n",
    "V=415.0      #AC input voltage\n",
    "Vf=2.53      #voltage safety factor\n",
    "PIV=2*sqrt(2)*V*Vf        #peak inverse voltage of the device\n",
    "PIV=round(PIV,2)\n",
    "print 'peak inverse voltage of the device=PIV=',PIV,'Volts'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example16.2,Pg.no.57"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "voltage safety factor of the device=Vf= 2.3\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "from math import sqrt\n",
    "V=415.0        #AC input voltage in volts\n",
    "PIV=1350.0     #peak inverse voltage of the device in volts\n",
    "Vf=PIV/(sqrt(2)*V)         #voltage safety factor of the device\n",
    "Vf=round(Vf,2)\n",
    "print 'voltage safety factor of the device=Vf=',Vf"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example16.3,Pg.no.58"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "choke power of the converter=Pc= 8.0 KVA\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "P=100.0           #input power in KVA\n",
    "Xt=0.04           #limiting ac reactance value\n",
    "Fov=2.0           #current ovarload factor\n",
    "Pc=Xt*P*Fov       #choke power of the converter in KVA\n",
    "print 'choke power of the converter=Pc=',Pc,'KVA'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example16.4,Pg.no.58"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "capacitance in snubber circuit=C= 625.0 nanofarads\n",
      "Resistance in snubber circuit=R= 3.58 Kilo Ohms\n",
      "Permissible dv/dt of the circuit= 30.0 MV/s\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "from math import sqrt\n",
    "Ls=0.1              #stray inductance in the circui t in milli Henry\n",
    "L=2*Ls              #inductance required for the snubber ckt for protection in mH\n",
    "Im=250.0            #mean value of current in amp\n",
    "C=2.5*Im            #capacitance required for the snubber ckt in nano Farads\n",
    "print 'capacitance in snubber circuit=C=',C,'nanofarads'\n",
    "R=2*100*sqrt(L/C)   #resistance in snubber circ uit in Kilo Ohms\n",
    "R=round(R,2)\n",
    "print 'Resistance in snubber circuit=R=',R,'Kilo Ohms'\n",
    "Pdif=1*30.0         #permissible dv/dt of the circuit\n",
    "print 'Permissible dv/dt of the circuit=',Pdif,'MV/s'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example16.5,Pg.no.59"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "number of plates in series in the circuit=N= 9.6\n",
      "So,we will use 10 plates in the circuit\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "V=240.0           #dc input voltage in volts\n",
    "Vh=25.0           #each selenium plate handling voltage in volts\n",
    "N=V/Vh            #number of plates in series in the circuit\n",
    "print 'number of plates in series in the circuit=N=',N\n",
    "print 'So,we will use 10 plates in the circuit'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example16.6,Pg.no.59"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "number of plates in series in each direction =N= 9.0\n",
      "total number of plates in series in both directions=Nt= 18.0\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "V=230.0            #ac input voltage in volts\n",
    "Vh=30.0            #each selenium plate handling voltage in volts\n",
    "N=(V/Vh)+1      #number of plates in series in each direction in the ckt\n",
    "N=round(N,0)\n",
    "print 'number of plates in series in each direction =N=',N\n",
    "Nt=2*N             #total number of plates in series in the circuit\n",
    "Nt=round(Nt,0)\n",
    "print 'total number of plates in series in both directions=Nt=',Nt"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example16.7,Pg.no.59"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "number of plates in each branch=N= 15.0\n",
      "total number of plates=Nt= 45.0\n",
      "Armature circuit inductance=L= 5.25 mH\n",
      "Energy stored in armature circuit=Es= 48.55 wattsec\n",
      "Energy dissipated per plate=Ed= 3.24 wattsec\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "V=415.0       #ac input voltage in volts\n",
    "Vdc=440.0     #supplied voltage to dc motor in volts\n",
    "Vh=30.0       #each selenium plate handling voltage in volts\n",
    "N=Vdc/Vh      #number of plates in series in each direction in the ckt\n",
    "N=15.0\n",
    "print 'number of plates in each branch=N=',N\n",
    "Nt=3*N        #total number of plates in series in the circuit\n",
    "Nt=round(Nt,0)\n",
    "print 'total number of plates=Nt=',Nt\n",
    "Ipa=136.0     #peak armature current in amperes\n",
    "T=30.0        #time constant in milliseconds\n",
    "R=0.175       #Armature resistance in Ohms\n",
    "L=T*R         #Armature circuit Inductance in milliHenry\n",
    "L=round(L,2)\n",
    "print 'Armature circuit inductance=L=',L,'mH'\n",
    "Es=0.5*L*Ipa**2*10**-3            #Energy stored in armature circuit in wattsec\n",
    "Es=round(Es,2)\n",
    "print 'Energy stored in armature circuit=Es=',Es,'wattsec'\n",
    "Ed=Es/N       #Energy dissipated per plate in wattsec\n",
    "Ed=round(Ed,2)\n",
    "print 'Energy dissipated per plate=Ed=',Ed,'wattsec'"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
