{
 "metadata": {
  "name": "",
  "signature": "sha256:6941f9eca614c823fe3c6084285ffc43fa73322f1d12c4d4dfb3aa318b819a98"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter1- Fundamental Principles of Transformer"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex6-pg14"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "## Example1_6_pg14.sce\n",
      "## To find secondary resistance and reactance\n",
      "## Theory of Alternating Current Machinery by Alexander Langsdorf\n",
      "## First Edition 1999, Thirty Second reprint\n",
      "## Tata McGraw Hill Publishing Company\n",
      "## Example in Page 14\n",
      "\n",
      "\n",
      "import math\n",
      "\n",
      "## Given data\n",
      "volt_amp = 10e+3; ## Volt Ampere rating of transformer is 10kA\n",
      "volt_ratio = 440./110.; ## Transformer voltage ratio\n",
      "freq_tr = 60.; ## Frequency of transformer usage is 60cps or 60Hz\n",
      "pri_res = 0.50; ## Primary resistance is 0.50 Ohm\n",
      "sec_res = 0.032; ## Secondary resistance is 0.032 Ohm\n",
      "pri_reac = 0.90; ## Primary leakage reactance is 0.90 Ohm\n",
      "sec_reac = 0.06; ##Secondary leakage reactance is 0.06 Ohm\n",
      "\n",
      "## Calculations\n",
      "print'%s %.2f %s'%(\"The ratio of transformation is \", volt_ratio,\"\");\n",
      "sec_res_ref_pri = sec_res*(volt_ratio**2); ## Ohms\n",
      "sec_reac_ref_pri = sec_reac*(volt_ratio**2); ## Ohms\n",
      "\n",
      "print('Hence,');\n",
      "print'%s %.2f %s'%(\"Secondary resistance referred to the primary = \",sec_res_ref_pri,\" Ohm \\n\"); ## Ohms\n",
      "print'%s %.2f %s'%(\"Secondary reactance referred to the primary = \",sec_reac_ref_pri,\" Ohm\"); ## Ohms\n",
      "\n",
      "## Result\n",
      "## The ratio of transformation is 4\n",
      "## Secondary resistance referred to the primary is 0.512 Ohm\n",
      "## Secondary reactance referred to the primary is 0.96 Ohm\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The ratio of transformation is  4.00 \n",
        "Hence,\n",
        "Secondary resistance referred to the primary =  0.51  Ohm \n",
        "\n",
        "Secondary reactance referred to the primary =  0.96  Ohm\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex9-pg18"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "## Example1_9_pg18.sce\n",
      "## To find the secondary terminal voltage\n",
      "## Theory of Alternating Current Machinery by Alexander Langsdorf\n",
      "## First Edition 1999, Thirty Second reprint\n",
      "## Tata McGraw Hill Publishing Company\n",
      "## Example in Page 18\n",
      "\n",
      "\n",
      "import math\n",
      "\n",
      "## Given data\n",
      "v1 = 2000.; ## Primary voltage, volts\n",
      "v2 = 400; ## Secondary Open Voltage, volts\n",
      "pf = +0.8; ## Power factor lagging 80%\n",
      "r1 = 5.5; ## Resistance R1, Ohms\n",
      "r2 = 0.2; ## Resistance R2, Ohms\n",
      "x1 = 12.; ## Reactance X1, Ohms\n",
      "x2 = 0.45; ## Reactance X2, Ohms\n",
      "va_rating = 10e+3 ## volt-ampere rating of transformer, VA\n",
      "voltage1 = v1; ## Supply input voltage, Volts\n",
      "\n",
      "## Calculations\n",
      "current1 = va_rating/voltage1; ## Amperes\n",
      "current2 = current1; ## Amperes\n",
      "turns_ratio = v1/v2;\n",
      "r2dash = turns_ratio**2 * r2; ## r2 as referred to primary side, Ohms\n",
      "sum_ofr = r1 + r2dash; ## total equivalent resistance referred to primary, Ohms\n",
      "x2dash = turns_ratio**2 * x2; ## x2 as referred to primary side, Ohms\n",
      "sum_ofx = x1 + x2dash; ## Sum of reactances, Ohms\n",
      "## Taking current axis as the reference as per the problem\n",
      "vec_current1 = (5 + 0j); ## Vector Current 1, Amperes\n",
      "vec_current2 = vec_current1; ## Vector Current 2, Amperes\n",
      "theta = math.acos(0.8); ## lagging phase angle in radians\n",
      "vector_volt1 = voltage1; ## Volts\n",
      "\n",
      "#y[0] = -(vector_volt1**2) + (math.cos(theta)*voltage2[0] + abs(vec_current2)*(sum_ofr))**2 + (math.sin(theta)*voltage2[0] + abs(vec_current2)*(sum_ofx))**2;\n",
      "  \n",
      "sec_volt_in_terms_of_pri =1887.30 ## in Volts\n",
      "sec_voltage = sec_volt_in_terms_of_pri/turns_ratio; ## in Volts\n",
      "print'%s %.2f %s'%(\"\\nSecondary Voltage as referred to primary is \",sec_volt_in_terms_of_pri,\" volts \\n\");\n",
      "print'%s %.2f %s'%(\"Secondary Terminal Voltage at full load is \",sec_voltage,\" volts \\n\");\n",
      "\n",
      "\n",
      "## Result\n",
      "## Secondary Voltage as referred to primary is 1887.30 volts\n",
      "## Secondary Terminal Voltage at full load is 377.46 volts\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "Secondary Voltage as referred to primary is  1887.30  volts \n",
        "\n",
        "Secondary Terminal Voltage at full load is  377.46  volts \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex13-pg28"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "## Example1_13_pg28.sce\n",
      "## To find the regulation of transformer\n",
      "## Theory of Alternating Current Machinery by Alexander Langsdorf\n",
      "## First Edition 1999, Thirty Second reprint\n",
      "## Tata McGraw Hill Publishing Company\n",
      "## Example in Page 28\n",
      "\n",
      "\n",
      "import math\n",
      "\n",
      "## Given data\n",
      "v1 = 1100.; ## Primary voltage, Volts\n",
      "v2 = 110.; ## Secondary Open Voltage, Volts\n",
      "volt_sc = 33.; ## Voltage for Short Circuit full load current, Volts\n",
      "pow_sc_in = 85.; ## Short Circuit input Power, Watts\n",
      "pf = +0.8; ## Power factor lagging 80%\n",
      "va_rating = 5e+3 ## volt-ampere rating of transformer, VA\n",
      "\n",
      "## Calculations\n",
      "\n",
      "## Method based on Eq. 1-35\n",
      "## v1^2 = (v2 + volt_sc*cos(thetae - theta2))^2 + (volt_sc*sin(thetae - theta2))^2;\n",
      "current1 = va_rating/v1; ## Current in Amperes\n",
      "thetae = math.acos(pow_sc_in /( volt_sc * current1 ));\n",
      "theta2 = math.acos(pf);\n",
      "#function y = ff1(v2)\n",
      "#  y(1) = -(v1^2) + (v2 + volt_sc*cos(thetae - theta2))^2 + (volt_sc*sin(thetae - theta2))^2;\n",
      "#  endfunction\n",
      "#volt2 = fsolve ([0.1], ff1); ## voltage in volts\n",
      "## Regulation = ( (v1 - volt2)/v1 ) *100\n",
      "volt2=1068.74\n",
      "Regulation1 = ((v1 - volt2)/v1)*100;\n",
      "print'%s %.2f %s'%(\"\\nRegulation of the Transformer by method 1 is \",Regulation1,\" \\n\");\n",
      "\n",
      "## Method based on Eq. 1-36\n",
      "## v1^2 = (v2 + current1*re*cos(theta2) + current1*xe*sin(theta2))^2 + (current1*xe*cos(theta2) - current1*re*sin(theta2))^2;\n",
      "current1 = va_rating/v1; ## Current in Amperes\n",
      "thetae = math.acos(pow_sc_in /( volt_sc * current1 ));\n",
      "theta2 = math.acos(pf);\n",
      "ze = volt_sc/current1; ## impedance in Ohms\n",
      "re = pow_sc_in/(current1**2); ## Resistance in Ohms\n",
      "xe = (ze**2 - re**2)**0.5; ## Reactance in Ohms\n",
      "#function y = ff2(v2)\n",
      "#  y(1) = -(v1^2) + (v2 + current1*re*cos(theta2) + current1*xe*sin(theta2))^2 + (current1*xe*cos(theta2) - current1*re*sin(theta2))^2;\n",
      "#  endfunction\n",
      "#volt2 = fsolve ([0.1], ff2);\n",
      "## Regulation = ( (v1 - volt2)/v1 ) *100\n",
      "Regulation2 = ((v1 - volt2)/v1)*100;\n",
      "print'%s %.2f %s'%(\"Regulation of the Transformer by method 2 is \",Regulation2,\"\\n\");\n",
      "\n",
      "## Result\n",
      "## Regulation of the Transformer by method 1 is 2.85 %\n",
      "## Regulation of the Transformer by method 2 is 2.85 %\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "Regulation of the Transformer by method 1 is  2.84  \n",
        "\n",
        "Regulation of the Transformer by method 2 is  2.84 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex14-pg29"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "## Example1_14_pg29.sce\n",
      "## To find regulation by percent method\n",
      "## Theory of Alternating Current Machinery by Alexander Langsdorf\n",
      "## First Edition 1999, Thirty Second reprint\n",
      "## Tata McGraw Hill Publishing Company\n",
      "## Example in Page 29\n",
      "\n",
      "\n",
      "import math\n",
      "\n",
      "## Given data\n",
      "v1 = 1100.; ## Primary voltage, volts\n",
      "v2 = 110.; ## Secondary Open Voltage, volts \n",
      "volt_sc = 33.; ## Voltage for Short Circuit full load current, volts\n",
      "pow_sc_in = 85.; ## Short Circuit input Power, watts\n",
      "pf = +0.8; ## Power factor lagging 80%\n",
      "va_rating = 5e+3 ## volt-ampere rating of transformer, VA\n",
      "\n",
      "## Calculations\n",
      "\n",
      "## Method based on Eq. 1-38\n",
      "## %regulation = rpc*cos(theta2) + xpc*sin(theta2) + ((xpc*cos(theta2) - rpc*sin(theta2))^2)/200;\n",
      "current1 = va_rating/v1; ## Current in Amperes\n",
      "thetae = math.acos(pow_sc_in /( volt_sc * current1 ));\n",
      "theta2 = math.acos(pf);\n",
      "ze = volt_sc/current1; ## Impedance in Ohms\n",
      "re = pow_sc_in/(current1**2); ## Resistance in Ohms\n",
      "xe = (ze**2 - re**2)**0.5; ## Impedance in Ohms\n",
      "rpc = (current1*re/v1)*100.;\n",
      "xpc = (current1*xe/v1)*100.;\n",
      "percent_regulation = rpc*math.cos(theta2) + xpc*math.sin(theta2) + ((xpc*math.cos(theta2) - rpc*math.sin(theta2))**2)/200.;\n",
      "print'%s %.2f %s'%(\"Regulation of the Transformer by per-cent method is\",percent_regulation,\" \\n\");\n",
      "\n",
      "## Result\n",
      "## Regulation of the Transformer by per-cent method is 2.85 %\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Regulation of the Transformer by per-cent method is 2.85  \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex14_1-pg31"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "## Example1_14_pg31.sce\n",
      "## To find the per unit regulation\n",
      "## Theory of Alternating Current Machinery by Alexander Langsdorf\n",
      "## First Edition 1999, Thirty Second reprint\n",
      "## Tata McGraw Hill Publishing Company\n",
      "## Example in Page 31\n",
      "\n",
      "\n",
      "import math\n",
      "\n",
      "## Given data\n",
      "r_pu = 0.017; ## Per-unit resistance\n",
      "x_pu = 0.0247; ## Per-unit reactance\n",
      "power_factor = 1.; ## Unity Power Factor\n",
      "overload = 0.25; ## 25% overload\n",
      "\n",
      "## Calculations\n",
      "phi = math.acos(power_factor); \n",
      "OL_factor = 1.00 + overload;\n",
      "r_pu = r_pu*OL_factor; ## Base value has to be changed for 0.25 overload\n",
      "x_pu = x_pu*OL_factor; ## Base value has to be changed for 0.25 overload\n",
      "## Formula for regulation is, Per-unit-regulation = r_pu*cos(phi) + x_pu*sin(phi) + 0.5*(x_pu*cos(phi) - r_pu*sin(phi))^2\n",
      "perunit_regulation = r_pu*math.cos(phi) + x_pu*math.sin(phi) + 0.5*(x_pu*math.cos(phi) - r_pu*math.sin(phi))**2;\n",
      "\n",
      "## disp('Hence,');\n",
      "print'%s %.2f %s'%(\"Per-unit regulation = \",perunit_regulation,\"\");\n",
      "\n",
      "## Result\n",
      "## Per-unit regulation = 0.0217\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Per-unit regulation =  0.02 \n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex15-pg33"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "## Example1_15_pg33.sce\n",
      "## To find the load loss of transformer\n",
      "## Theory of Alternating Current Machinery by Alexander Langsdorf\n",
      "## First Edition 1999, Thirty Second reprint\n",
      "## Tata McGraw Hill Publishing Company\n",
      "## Example in Page 33\n",
      "\n",
      "\n",
      "import math\n",
      "\n",
      "## Given data\n",
      "Total_Culoss1 = 630.; ## Total Copper Loss at 20degree celcius, watts\n",
      "TrueCopper_loss1 = 504.; ## Copper loss due to True Ohmic resistance at 20degree celcius, watts\n",
      "temp1 = 20.; ## Temperature, degree celcius\n",
      "temp2 = 75.; ## Temperature, degree celcius\n",
      "\n",
      "## Calculations\n",
      "eddy_loss1 = Total_Culoss1 - TrueCopper_loss1; ## Eddy Current loss at 20 degree celsius, watts\n",
      "TrueCopper_loss2 = TrueCopper_loss1 * (temp2 + 234.5) / (temp1 + 234.5); ## True Copper loss at 75 degree celcius, watts\n",
      "eddy_loss2 = eddy_loss1 * (temp1 + 234.5) / (temp2 + 234.5);## Eddy Current loss at 75 degree celsius, watts\n",
      "load_loss = TrueCopper_loss2 + eddy_loss2; ## Load loss at 75 degree celsius, watts\n",
      "\n",
      "print'%s %.2f %s'%(\"Eddy Current loss at 20 degree celcius = \",eddy_loss1,\" watts\\n\");\n",
      "print'%s %.2f %s'%(\"True Copper loss at 75 degree celcius = \",TrueCopper_loss2,\" watts\\n\");\n",
      "print'%s %.2f %s'%(\"Load loss at 75 degree celcius = \",load_loss,\" watts\");\n",
      "\n",
      "## Result\n",
      "## Eddy Current loss at 20 degree celcius = 126 watts\n",
      "## True Copper loss at 75 degree celcius = 613 watts\n",
      "## Load loss at 75 degree celcius = 717 watts \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Eddy Current loss at 20 degree celcius =  126.00  watts\n",
        "\n",
        "True Copper loss at 75 degree celcius =  612.92  watts\n",
        "\n",
        "Load loss at 75 degree celcius =  716.53  watts\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex16-pg37"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "## Example1_16_pg37.sce\n",
      "## To measure the core loss of transformer\n",
      "## Theory of Alternating Current Machinery by Alexander Langsdorf\n",
      "## First Edition 1999, Thirty Second reprint\n",
      "## Tata McGraw Hill Publishing Company\n",
      "## Example in Page 37\n",
      "\n",
      "\n",
      "import math\n",
      "\n",
      "## Given data\n",
      "f1 = 30.; ## Frequency, Hz\n",
      "B1 = 8.; ## Flux Density, kilogauss\n",
      "P1 = 0.135; ## Core loss, watts per lb\n",
      "f2 = 60.; ## Frequency, Hz\n",
      "B2 = 12.; ## Flux Density, kilogauss\n",
      "P2 = 0.75; ## Core loss, watts per lb\n",
      "P3 = 0.31; ## Core loss, watts per lb\n",
      "\n",
      "## Calculations\n",
      "a = f2/f1;\n",
      "x=(math.log(B2**2*(P2 - a**2 * P3)/((P2 - a*P3)*B1**2 - a*(a-1)*P1*B2**2)))/(math.log(B2/B1));\n",
      "kh = (P2 - a**2 * P3)/(f2*(1. - a )*(B2**x));\n",
      "ke = ((P2 - a*P3)*a)/((a-1.)*f2**2*B2**2);\n",
      "Ph1 = kh*f1*B1**x;  Pe1 = ke*f1**2*B1**2; ## Hysteresis Power loss, watts\n",
      "Ph2 = kh*f2*B2**x;  Pe2 = ke*f2**2*B2**2; ## Hysteresis Power loss, watts\n",
      "Ph3 = kh*f1*B2**x;  Pe3 = ke*f1**2*B2**2; ## Hysteresis Power loss, watts\n",
      "Pt1 = Ph1 + Pe1; ## Total Power loss, watts\n",
      "Pt2 = Ph2 + Pe2; ## Total Power loss, watts\n",
      "Pt3 = Ph3 + Pe3; ## Total Power loss, watts\n",
      "print'%s %.2f %s'%('Value of' ,x, ''); \n",
      "print'%s %.3f %s'% ('Value of ',kh,' '); \n",
      "print'%s %.3f %s'%('Value of ',ke,' '); \n",
      "\n",
      "print(\"\\n  -------------------------------------------------------\\n   f \\t\\t\\t\\t  | B,kilogauss | \\t\\t\\t\\t\\t\\t  Ph,watts per lb | \\t\\t\\t\\t Pe,watts per lb   \\n\") \n",
      "\n",
      "print \"%s %.2f %s %.2f %s %.2f %s %.2f %s  \" %(\" \",f1,\" | \"  and \"\\t\\t\\t\\t\\t\\t\\t\\t\",B1,\" | \"  and  \"\\t\\t\\t\\t\\t\\t\\t\\t\",Ph1,\"| \" and  \"\\t\\t\\t\\t\\t\\t\\t\\t\",Pe1,\" \")\n",
      "print \"%s %.2f %s %.2f %s %.2f %s %.2f %s  \" %(\" \",f2,\" | \"  and \"\\t\\t\\t\\t\\t\\t\\t\\t\",B2,\" | \"  and  \"\\t\\t\\t\\t\\t\\t\\t\\t\",Ph2,\"| \" and  \"\\t\\t\\t\\t\\t\\t\\t\\t\",Pe2,\" \")\n",
      "print \"%s %.2f %s %.2f %s %.2f %s %.2f %s  \" %(\" \",f1,\" | \"  and \"\\t\\t\\t\\t\\t\\t\\t\\t\",B2,\" | \"  and  \"\\t\\t\\t\\t\\t\\t\\t\\t\",Ph3,\"| \" and  \"\\t\\t\\t\\t\\t\\t\\t\\t\",Pe3,\" \")\n",
      "## Result\n",
      "##   \n",
      "## Value of x is   \n",
      "## \n",
      "##    2.0637323  \n",
      "## \n",
      "## Value of kh is   \n",
      "## \n",
      "##    0.0000484  \n",
      "## \n",
      "## Value of ke is   \n",
      "## \n",
      "##    0.0000005  \n",
      "##\n",
      "##  -------------------------------------------------------\n",
      "##   f  | B,kilogauss | Ph,watts per lb | Pe,watts per lb   \n",
      "##  -------------------------------------------------------\n",
      "##   30 |       8     |      0.106      |      0.029      \n",
      "##   60 |      12     |      0.490      |      0.260      \n",
      "##   30 |      12     |      0.245      |      0.065      \n",
      "##  -------------------------------------------------------\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Value of 2.06 \n",
        "Value of  0.000  \n",
        "Value of  0.000  \n",
        "\n",
        "  -------------------------------------------------------\n",
        "   f \t\t\t\t  | B,kilogauss | \t\t\t\t\t\t  Ph,watts per lb | \t\t\t\t Pe,watts per lb   \n",
        "\n",
        "  30.00 \t\t\t\t\t\t\t\t 8.00 \t\t\t\t\t\t\t\t 0.11 \t\t\t\t\t\t\t\t 0.03    \n",
        "  60.00 \t\t\t\t\t\t\t\t 12.00 \t\t\t\t\t\t\t\t 0.49 \t\t\t\t\t\t\t\t 0.26    \n",
        "  30.00 \t\t\t\t\t\t\t\t 12.00 \t\t\t\t\t\t\t\t 0.24 \t\t\t\t\t\t\t\t 0.07    \n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex17-pg41"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "## Example1_17_pg41.sce\n",
      "## To find the efficiency at different loads\n",
      "## Theory of Alternating Current Machinery by Alexander Langsdorf\n",
      "## First Edition 1999, Thirty Second reprint\n",
      "## Tata McGraw Hill Publishing Company\n",
      "## Example in Page 41\n",
      "\n",
      "\n",
      "import math\n",
      "\n",
      "## Given data\n",
      "va = 50e+3; ## VA rating of transformer, VA\n",
      "v1 = 2200.; ## Volts\n",
      "v2 = 220.; ## Volts\n",
      "f = 60.; ## Frequency, Hz\n",
      "core_loss = 350.; ## Power loss, watts\n",
      "cu_loss = 630.; ## Power loss, watts\n",
      "pf0 = 1.;\n",
      "pf1 = 0.8;\n",
      "\n",
      "## Calculations\n",
      "turns_ratio = v1/v2;\n",
      "upf_full_load_eff = (va*pf0/(va*pf0 + core_loss + cu_loss))*100.; ## Full Load Efficiency at upf\n",
      "upf_three_fourth_eff = ((0.75*va*pf0)/(0.75*va*pf0 + core_loss + (0.75**2)*cu_loss))*100.; ## Efficiency at three-fourth load at upf\n",
      "full_load_eff = ((va*pf1)/(va*pf1 + core_loss + cu_loss))*100.; ## Efficiency at full load at 0.8pf\n",
      "three_fourth_eff = ((0.75*va*pf1)/(0.75*va*pf1 + core_loss + (0.75**2)*cu_loss))*100.; ## Efficiency at three-fourth load at 0.8pf\n",
      "\n",
      "print'%s %.2f %s'%('Efficiency at Full load & unity power factor =\\n ',upf_full_load_eff,'');\n",
      "print'%s %.2f %s'%('Efficiency at Three-fourth the full load & unity power factor = ',upf_three_fourth_eff,'');\n",
      "print'%s %.2f %s'%('Efficiency at Full load efficiency at 80%% power factor =',full_load_eff,'');\n",
      "print'%s %.2f %s'%('Efficiency at three-fourth load efficiency at 80%% power factor = ',three_fourth_eff,'');\n",
      "\n",
      "## Result\n",
      "## Efficiency at Full load & unity power factor = 98.1 % \n",
      "## Efficiency at Three-fourth the full load & unity power factor = 98.2 %\n",
      "## Efficiency at Full load efficiency at 80% power factor = 97.6 %\n",
      "## Efficiency at three-fourth load efficiency at 80% power factor = 97.7 %\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Efficiency at Full load & unity power factor =\n",
        "  98.08 \n",
        "Efficiency at Three-fourth the full load & unity power factor =  98.16 \n",
        "Efficiency at Full load efficiency at 80%% power factor = 97.61 \n",
        "Efficiency at three-fourth load efficiency at 80%% power factor =  97.71 \n"
       ]
      }
     ],
     "prompt_number": 8
    }
   ],
   "metadata": {}
  }
 ]
}