{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter4 - Three phase transformers"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Exa:4.1 Pg No: 329"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Value of line currents = 276.74 Amperes\n"
     ]
    }
   ],
   "source": [
    "#Caption:Find the value of line current\n",
    "\n",
    "a=2200./200##transformation ratio\n",
    "P=450*1000. #  watts\n",
    "pf=0.85\n",
    "V_s=200. #  volts\n",
    "I_2=P/(pf*V_s) #  amperes\n",
    "I_1=1.15*I_2/a\n",
    "print 'Value of line currents = %.2f Amperes'%I_1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Exa:4.2 Pg No: 329"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Value of line current = 312.71 Amperes\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "#Caption:Find the value of line current\n",
    "\n",
    "a=2200./200##transformation ratio\n",
    "P_1=400.*1000 #  watts\n",
    "P_2=500.*1000 #  watts\n",
    "pf=0.8\n",
    "V_s=200. #  volts\n",
    "I_2=P_1/(pf*V_s) #  amperes\n",
    "I_1=1.15*I_2/a\n",
    "I_1T=I_1/2\n",
    "I_2M=P_2/(pf*V_s*a)\n",
    "I_p=np.sqrt((I_1T**2)+(I_2M**2))\n",
    "print 'Value of line current = %.2f Amperes'%I_p"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Exa:4.3 Pg No: 330"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(a)Efficiency at full load and 0.85pf = 95.67 %\n",
      "(b)Efficiency at 75 percent of full load and unity pf = 95.84 %\n",
      "(c)max efficieny at unity pf = 97.09 %\n"
     ]
    }
   ],
   "source": [
    "#Caption:Determine the efficiency of transformer at (a)full load and 0.85pf (b)75 percent of full load and unity pf (c)max efficieny at unity pf\n",
    "\n",
    "P=100*1000 #  watts\n",
    "P_iron=1500 #  watts\n",
    "x=0.8\n",
    "P_cu=1500/x**2 #  watts\n",
    "pf=0.8\n",
    "a=5000/400##transformation ratio\n",
    "P_t=P_iron+P_cu\n",
    "P_o=0.85*P #  watts\n",
    "Eff=P_o/(P_o+P_t)\n",
    "print '(a)Efficiency at full load and 0.85pf = %.2f %%'%(Eff*100)\n",
    "P_cu_1=0.75*P_cu #  watts\n",
    "P_t_1=P_cu_1+P_iron #  watts\n",
    "P_o_1=0.75*P\n",
    "Eff_1=P_o_1/(P_o_1+P_t_1)\n",
    "print '(b)Efficiency at 75 percent of full load and unity pf = %.2f %%'%(Eff_1*100)\n",
    "P_t_2=2.*P_iron\n",
    "P_o_2=P\n",
    "Eff_2=P_o_2/(P_o_2+P_t_2)\n",
    "print '(c)max efficieny at unity pf = %.2f %%'%(Eff_2*100)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Exa:4.4 Pg No: 331"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "For Star-Delta Configruation\n",
      "Line voltage = 190.53 volts\n",
      "Line current = 173.21 amperes\n",
      "Output = 57157.68 watts\n",
      "For Delta-Star Configruation\n",
      "Line voltage = 571.58 volts\n",
      "Line current = 57.74 amperes\n",
      "Output = 57157.68 watts\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "#Caption:Find the value of line voltage,line current,and output when the transformer winding is connected as (a) Star-delta (b)delta-star\n",
    "\n",
    "a=10. ##transformation ratio\n",
    "V_s=3300. #  volts\n",
    "I_1=10. #  amperes\n",
    "V_1=V_s/np.sqrt(3)\n",
    "V_2=V_1/a\n",
    "I_2=np.sqrt(3)*a*I_1\n",
    "P_o=np.sqrt(3)*V_2*I_2\n",
    "print \"For Star-Delta Configruation\"\n",
    "print 'Line voltage = %.2f volts'%V_2\n",
    "print 'Line current = %.2f amperes'%I_2\n",
    "print 'Output = %.2f watts'%P_o\n",
    "V_2p=V_s/a\n",
    "V_2L=np.sqrt(3)*V_2p\n",
    "I_2L=I_1*a/np.sqrt(3)\n",
    "P_o2=np.sqrt(3)*V_2*I_2\n",
    "print \"For Delta-Star Configruation\"\n",
    "print 'Line voltage = %.2f volts'%V_2L\n",
    "print 'Line current = %.2f amperes'%I_2L\n",
    "print 'Output = %.2f watts'%P_o2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Exa:4.5 Pg No: 332"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Efficiency = 93.29 %\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "#Caption:Find the Efficiency\n",
    "\n",
    "P=1200.*1000 #  watts\n",
    "R_1=2.#  ohms\n",
    "R_2=0.03 #  ohms\n",
    "P_iron=20000. #  watts\n",
    "V_1p=6600. #  volts\n",
    "V_2p=1100./np.sqrt(3) #  volts\n",
    "a=V_1p/V_2p\n",
    "R_o2=R_2+(R_1/a**2) #  ohms\n",
    "I_2p=P/(np.sqrt(3)*1100) #  amperes\n",
    "P_cu=3*R_o2*I_2p**2\n",
    "P_t=P_iron+P_cu\n",
    "P_o=0.9*P #  watts\n",
    "Eff=P_o/(P_o+P_t)\n",
    "print 'Efficiency = %.2f %%'%(Eff*100)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Exa:4.6 Pg No: 332"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "% Resistance drop = 2.00 %\n",
      "% Reactance drop = 4.08 %\n",
      "Voltage regulation = 4.43 %\n",
      "Efficiency = 95.62 %\n"
     ]
    }
   ],
   "source": [
    "import math as mt\n",
    "#Caption:Find the percentage resistance,reactance drop,efficiency and voltage regulation\n",
    "\n",
    "P=1500.*1000 #  watts\n",
    "phy=mt.acos(0.8)*180/mt.pi\n",
    "V_1P=300 #  volts\n",
    "V_1L=6600 #  volts\n",
    "I_1P=131.21/mt.sqrt(3)\n",
    "Z_1=V_1P/I_1P #  ohms\n",
    "R_1=30*1000/(3*I_1P**2)\n",
    "X_1=mt.sqrt((Z_1**2)-(R_1**2))\n",
    "R=I_1P*R_1*100/V_1L\n",
    "X=I_1P*X_1*100/V_1L\n",
    "print '%% Resistance drop = %.2f %%'%R\n",
    "print '%% Reactance drop = %.2f %%'%X\n",
    "VR=(R*mt.cos(phy*180/mt.pi))+(X*mt.sin(phy*180/mt.pi))\n",
    "print 'Voltage regulation = %.2f %%'%VR\n",
    "I_1_FL=P/(mt.sqrt(3)*V_1L)\n",
    "P_t=(30+25)*1000 #  watts\n",
    "P_o=P*0.8 #  watts\n",
    "Eff=P_o/(P_o+P_t)\n",
    "print 'Efficiency = %.2f %%'%(Eff*100)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Exa:4.7 Pg No: 334"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(a)KVA Load supplied by each transformer = 28.87 KVA\n",
      "(b)Percent of rated load = 1.15 %\n",
      "(c)Total KVA rating = 43.30 KVA\n",
      "(d)Ratio=0.577\n",
      "(e)Increase in load = 173.21 %\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "#Caption:Determine the (a)KVA Load (b)Percentage rated load (c)Total KVA Rating (d)Ratio of star-star bank to delta-delta bank transformer rating (e)% increase in load\n",
    "\n",
    "KVA=25.\n",
    "KVA_s=50./np.sqrt(3)\n",
    "print '(a)KVA Load supplied by each transformer = %.2f KVA'%KVA_s\n",
    "r=KVA_s/KVA\n",
    "print '(b)Percent of rated load = %.2f %%'%r\n",
    "KVA_t=2*25*0.866\n",
    "print '(c)Total KVA rating = %.2f KVA'%KVA_t\n",
    "ratio=KVA_t/75\n",
    "print '(d)Ratio=%.3f'%ratio\n",
    "KVA_s2=50./3\n",
    "Inc=KVA_s/KVA_s2\n",
    "print '(e)Increase in load = %.2f %%'%(Inc*100)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Exa:4.8 Pg No: 335"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(a)Currents in sections Oa,Ob and Oc = 131.22 amperes\n",
      " Currents in sections Aa,Bb and Cc = 524.86 amperes\n",
      "(b)Power transformed by transformer action = 80.00 Kw\n",
      "(c)Power Conducted directly = 320.00 Kw\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "#Caption:Determine the (a)Current flowing in various sections (b)Power transformed (c)Power conducted directly\n",
    "\n",
    "P=400.*1000 #  watts\n",
    "pf=0.8\n",
    "V_1=550. #  volts\n",
    "V_2=440. #  volts\n",
    "I_2=P/(np.sqrt(3)*V_2*pf)## in amperes\n",
    "I_1=I_2*V_2/V_1 #  amperes\n",
    "I=I_2-I_1\n",
    "print '(a)Currents in sections Oa,Ob and Oc = %.2f amperes'%I\n",
    "print ' Currents in sections Aa,Bb and Cc = %.2f amperes'%I_1\n",
    "P_trans=P*(1-(V_2/V_1))\n",
    "print '(b)Power transformed by transformer action = %.2f Kw'%(P_trans/1000)\n",
    "P_cond=P-P_trans\n",
    "print '(c)Power Conducted directly = %.2f Kw'%(P_cond/1000)"
   ]
  }
 ],
 "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.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}