{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 12 High Voltage cables "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 12.17.1 pgno403"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Radius = 4.8 cm \n",
      "Inner radial thickness = 2.8 cm \n",
      "Outer radial thickness = 0.2 cm\n",
      "Vpeak of outer dielectric = 70.04 kV\n",
      "Vpeak of inner dielectric = 4.9 kV\n",
      "Peak voltage of cable = 74.94 kV\n",
      "Safe opearating voltage = 53 kV\n"
     ]
    }
   ],
   "source": [
    "#Calculate radial thickness of insulating layer\n",
    "from math import log\n",
    "\n",
    "#based on equation 12.15 and v1alues of E1 and E2 \n",
    "E1 = 40. # kV/cm\n",
    "E2 = 25. # kV/cm\n",
    "ep1 = 6. # permittives of the material\n",
    "ep2 = 4. #permittives of the material\n",
    "d1 = 4. # cm\n",
    "d2 = 10. # cm\n",
    "r1 = 2. # cm\n",
    "r2 = (E1*ep1*2.)/(E2*ep2)\n",
    "inner = r2-(d1/2)\n",
    "outer = (d2/2)-r2\n",
    "#based on equation 12.16\n",
    "V1peak = E1*r1*log(r2/r1) # inner dielectric\n",
    "V2peak = E2*r2*log(d2/(2*r2)) # outter dielectric\n",
    "Vcab = V1peak+V2peak # Peak volatge of cable\n",
    "rms = Vcab/(2)**0.5\n",
    "print\"Radius = %.1f cm \"%r2\n",
    "print\"Inner radial thickness = %.1f cm \"%inner\n",
    "print\"Outer radial thickness = %.1f cm\"%outer\n",
    "print\"Vpeak of outer dielectric = %.2f kV\"%V1peak\n",
    "print\"Vpeak of inner dielectric = %.1f kV\"%V2peak\n",
    "print\"Peak voltage of cable = %.2f kV\"%Vcab\n",
    "print\"Safe opearating voltage = %d kV\"%round(rms)\n",
    "\n",
    "#answers may vary due to round off error."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 12.17.2 pgno404"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Radius = 2.57 cm \n"
     ]
    }
   ],
   "source": [
    "#Calculate optimum value of r\n",
    "\n",
    "#Based on equation 12.17\n",
    "V1 = 100 # kV\n",
    "V2 = 55 # kV\n",
    "r = V1*(2)**0.5/V2\n",
    "print\"Radius = %.2f cm \"%round(r,2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 12.17.3 pgno406"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Resistivity of insulation material = 4.53 ohm.m \n"
     ]
    }
   ],
   "source": [
    "#Calculate resistivity\n",
    "from math import log,pi\n",
    "\n",
    "l = 10**4 # cable length in m\n",
    "Rr = 3/1.5 # R/r ratio\n",
    "ins = 0.5*10**6 # insulation in ohms\n",
    "p = 2*pi*l*ins/log(Rr)\n",
    "print\"Resistivity of insulation material = %.2f ohm.m \"%round(p/10**10,2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 12.17.4 pgno406"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "C4 = 5 mircoF \n",
      "Line charging current = 18.14 A \n",
      "Charging = 314.16 kVA \n"
     ]
    }
   ],
   "source": [
    "#Calculate resistivity\n",
    "from math import pi\n",
    "\n",
    "# Baased on Equation 12.1*10**2\n",
    "c4 = 0.5*10**2/10 # micro F\n",
    "Ic = 2*10**4*2*pi*5*50*10**-6/(3)**0.5\n",
    "C = ((3)**0.5*10000*Ic)*(10**-9*10**6)\n",
    "print\"C4 = %d mircoF \"%c4\n",
    "print\"Line charging current = %.2f A \"%Ic\n",
    "print\"Charging = %.2f kVA \"%round(C,2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 12.17.5 pgno408"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "C2 = 0.250 mircoF/Km \n",
      "C3 = 0.650 mircoF/Km \n",
      "C4 = 0.450 mircoF/Km \n",
      "Carging = 3079.10 kVAr \n"
     ]
    }
   ],
   "source": [
    "#Calculate capasitance and kVAr \n",
    "from math import pi\n",
    "\n",
    "#(a) Using the notations used in FiVgs. 12.15 and 12.16\n",
    "C2 = 0.75/3 # microF/km\n",
    "C3 = (0.6*3-2*C2)/2 # microF/km\n",
    "C4 = (C2+C3)/2 # microF/km\n",
    "print\"C2 = %.3f mircoF/Km \"%C2\n",
    "print\"C3 = %.3f mircoF/Km \"%C3\n",
    "print\"C4 = %.3f mircoF/Km \"%C4\n",
    "#(b)Capacitance of 10 km between 2 cores\n",
    "V = 33*10**3\n",
    "w = 2*pi*50\n",
    "C = 2*V**2*w*C4*10*10**-9\n",
    "print\"Carging = %.2f kVAr \"%round(C,1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 12.17.6 pgno409"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Conductor resistance = 0.105 ohm\n",
      "Conductor resistance for the whole leangth (Rc) = 8.9 ohm\n",
      "Resistance of sheath (Rsh) = %.2f ohm/Km  22.8257125656\n",
      "Conductor to sheath mutual inductive reactance (Xm)= 5.7 ohm/m \n",
      "Effective AC resistance(Ref) = 10.27 ohm \n",
      "Reactance with sheaths open-circuit(Xc) = 11.10 ohm \n",
      "Effective reactance per cable(Xef) = 11.04 ohm \n",
      "Sheath loss/conductor loss = 0.15 \n",
      "emf induced per sheath(emf) = 2.28 kV\n"
     ]
    }
   ],
   "source": [
    "#Determine the efective electrical parameters \n",
    "from math import pi,log\n",
    "\n",
    "rc = 0.0875*(1+0.004*50) # conductor resistance in ohm/km\n",
    "Rc = 0.105*85 # ohm\n",
    "w = 2*pi*50\n",
    "Rsh = 23.2*10**-6*85*10**5/(pi*(3**2-2.5**2)) # Resistance of sheath\n",
    "D = 8.\n",
    "rsh = 1./2.*(2.5+3)\n",
    "Xm = w*2*log(D/rsh)*10**-7*85000\n",
    "Ref = Rc + Xm**2*Rsh/(Rsh**2+Xm**2) # Effective AC resistance \n",
    "Xc = 11.1# reactance with sheaths open-circuit\n",
    "Xef = Xc-(Xm**2/(Rsh**2+Xm**2)) #Effective reactance per cable\n",
    "SlCl = Rsh*Xm**2/(Rc*(Rsh**2+Xm**2)) # Sheath loss/conductor loss\n",
    "I = 400 # A\n",
    "emf = Xm*I # emf induced per sheath\n",
    "print\"Conductor resistance = %.3f ohm\"%rc\n",
    "print\"Conductor resistance for the whole leangth (Rc) = %.1f ohm\"%Rc\n",
    "print\"Resistance of sheath (Rsh) = %.2f ohm/Km \",Rsh\n",
    "print\"Conductor to sheath mutual inductive reactance (Xm)= %.1f ohm/m \"%Xm\n",
    "print\"Effective AC resistance(Ref) = %.2f ohm \"%Ref\n",
    "print\"Reactance with sheaths open-circuit(Xc) = %.2f ohm \"%Xc\n",
    "print\"Effective reactance per cable(Xef) = %.2f ohm \"%Xef\n",
    "print\"Sheath loss/conductor loss = %.2f \"%SlCl\n",
    "print\"emf induced per sheath(emf) = %.2f kV\"%round(emf/1000,2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 12.17.7 pgno410"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If the sheaths are bonded at one end, the voltage between them at the other end = 46.131881 V/km\n",
      "\n",
      "Induced sheath voltage per Km = 26.6 V/km\n"
     ]
    }
   ],
   "source": [
    "#Determine the induced sheath voltage \n",
    "from math import log\n",
    "\n",
    "D = 15. # cm\n",
    "rsh = 5.5/2 # Sheath diameter converted to radius in cm\n",
    "I = 250. # A\n",
    "E = 2.*10**-7*314*I*log(D/rsh)*10**3\n",
    "\n",
    "print\"If the sheaths are bonded at one end, the voltage between them at the other end = %f V/km\"%(E*(3)**0.5)\n",
    "print\"\\nInduced sheath voltage per Km = %.1f V/km\"%round(E,1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 12.17.8 pgno411"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "53.8887743412\n",
      "Peak voltage of the conductor V = 53.89 kV\n",
      "V1 = 41.10 kV\n",
      "V2 = 23.90 kV\n",
      "Maximum stress without sheaths = 55.30 kV/cm\n",
      "Minimum stress without sheaths = 20.87 kV/cm\n",
      "Maximum stress with sheaths = 38.59 kV/cm\n",
      "Minimum stress with sheaths = 27.89 kV/cm\n"
     ]
    }
   ],
   "source": [
    "#Determine the maximum stress \n",
    "from math import log\n",
    "\n",
    "ba = 5.3/2 # b/a\n",
    "alpha = ba**(1./3)\n",
    "r1 = 1.385      # cm\n",
    "r2 = 1.92       # cm\n",
    "r = 2.65        # cm\n",
    "V = 66*(2)**0.5/(3)**0.5\n",
    "print V\n",
    "V2 = 23.9       #V/(1+(1/alpha)+(1/alpha**2))\n",
    "V1 = 41.1       #(1+1/alpha)*V2\n",
    "#calculating maximim and minimum stress without sheaths\n",
    "Emax0 = V/(1*log(r/1.))\n",
    "Emin0 = V/(r*log(r))\n",
    "#calculating max and min stress with the sheaths\n",
    "Emax = (Emax0*3.)/(1+(alpha)+(alpha**2.))\n",
    "Emin = Emax/alpha\n",
    "print\"Peak voltage of the conductor V = %.2f kV\"%V\n",
    "print\"V1 = %.2f kV\"%V1\n",
    "print\"V2 = %.2f kV\"%V2\n",
    "print\"Maximum stress without sheaths = %.2f kV/cm\"%(Emax0)\n",
    "print\"Minimum stress without sheaths = %.2f kV/cm\"%(Emin0)\n",
    "print\"Maximum stress with sheaths = %.2f kV/cm\"%(Emax)\n",
    "print\"Minimum stress with sheaths = %.2f kV/cm\"%(Emin)\n",
    "\n",
    "# Answers vary due to round off errors."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 12.17.9 pgno412"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "V1 = 45.562692 kV/cm\n",
      "V2 = 23.204074 kV/cm\n",
      "\n",
      "Emax = 47.50 kV/cm\n"
     ]
    }
   ],
   "source": [
    "#Determine the maximum stress \n",
    "from math import log\n",
    "\n",
    "Emax = 47.5 # kV\n",
    "b = 2.65 # cm\n",
    "a = 1. # cm\n",
    "ba = 0.55*3 # 1/3(b-a)\n",
    "r1 = 1.55 # cm\n",
    "r2 = 2.1 # cm2Vr = 2.65 # cm  \n",
    "V = 53.8 # kV\n",
    "alpha = ba**(1/3)\n",
    "# based on the example 12_8 \n",
    "#calculating VEmax1, Emax2, Emax3 \n",
    "x = 1/(a*log(r1/a))\n",
    "y = 1/(r1*log(r2/r1))\n",
    "z = 1/(r2*log(b/r2))\n",
    "VV1 = Emax/x\n",
    "V1V2 = Emax/y\n",
    "V2 = Emax/z\n",
    "V1 = V2+(Emax/y)\n",
    "\n",
    "print\"V1 = %f kV/cm\"%V1\n",
    "print\"V2 = %f kV/cm\"%V2\n",
    "print\"\\nEmax = %.2f kV/cm\"%Emax\n",
    "\n",
    "# Answers may vary due to round off error."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 12.17.10 pgno412"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false,
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "E1max = 51.50 kV/cm\n",
      "E2max = 32.18 kV/cm\n"
     ]
    }
   ],
   "source": [
    "#Determine the maximum stress \n",
    "from math import log,e\n",
    "\n",
    "a = 1. #cm\n",
    "r1 = 2. # cm\n",
    "b = 2.65 # cm\n",
    "er1 = 4.5\n",
    "er2 = 3.6\n",
    "V = 53.8 # kV\n",
    "ba = 5.3/2 # b/a\n",
    "alpha = 1.325\n",
    "E1max = V/(log(r1)+(er1/er2)*log(alpha))\n",
    "E2max = V/(r1*(((er2/er1)*log(r1))+log(alpha)))\n",
    "print\"E1max = %.2f kV/cm\"%round(E1max,1)\n",
    "print\"E2max = %.2f kV/cm\"%round(E2max,2) \n",
    "# Answer vary from the text due to round off "
   ]
  }
 ],
 "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
}
