diff options
author | Trupti Kini | 2017-03-23 23:30:25 +0600 |
---|---|---|
committer | Trupti Kini | 2017-03-23 23:30:25 +0600 |
commit | 26aa9704628ed4f79be6dd102f2c12d13b3fa85d (patch) | |
tree | decd8c7bc4db7c01418ddca7469cd18386ec8541 | |
parent | 1d49c6074a5f0c14697858d92ac7f87f1a76cbf1 (diff) | |
download | Python-Textbook-Companions-26aa9704628ed4f79be6dd102f2c12d13b3fa85d.tar.gz Python-Textbook-Companions-26aa9704628ed4f79be6dd102f2c12d13b3fa85d.tar.bz2 Python-Textbook-Companions-26aa9704628ed4f79be6dd102f2c12d13b3fa85d.zip |
Added(A)/Deleted(D) following books
A Engineering_Mechanics_by_R.K_Bansal/screenshots/sfd2.png
A j_by_j/README.txt
A j_by_j/hrituraj.ipynb
A j_by_j/sai.ipynb
A j_by_j/screenshots/SAPWEBIDE.png
A j_by_j/screenshots/monica2.png
A j_by_j/screenshots/pylab.png
-rw-r--r-- | Engineering_Mechanics_by_R.K_Bansal/screenshots/sfd2.png | bin | 0 -> 11119 bytes | |||
-rw-r--r-- | j_by_j/README.txt | 10 | ||||
-rw-r--r-- | j_by_j/hrituraj.ipynb | 596 | ||||
-rw-r--r-- | j_by_j/sai.ipynb | 349 | ||||
-rw-r--r-- | j_by_j/screenshots/SAPWEBIDE.png | bin | 0 -> 18238 bytes | |||
-rw-r--r-- | j_by_j/screenshots/monica2.png | bin | 0 -> 25584 bytes | |||
-rw-r--r-- | j_by_j/screenshots/pylab.png | bin | 0 -> 50375 bytes |
7 files changed, 955 insertions, 0 deletions
diff --git a/Engineering_Mechanics_by_R.K_Bansal/screenshots/sfd2.png b/Engineering_Mechanics_by_R.K_Bansal/screenshots/sfd2.png Binary files differnew file mode 100644 index 00000000..2f223952 --- /dev/null +++ b/Engineering_Mechanics_by_R.K_Bansal/screenshots/sfd2.png diff --git a/j_by_j/README.txt b/j_by_j/README.txt new file mode 100644 index 00000000..0703bdc5 --- /dev/null +++ b/j_by_j/README.txt @@ -0,0 +1,10 @@ +Contributed By: asmita asmita +Course: mtech +College/Institute/Organization: sd +Department/Designation: sd +Book Title: j +Author: j +Publisher: q +Year of publication: 1 +Isbn: 2 +Edition: 1
\ No newline at end of file diff --git a/j_by_j/hrituraj.ipynb b/j_by_j/hrituraj.ipynb new file mode 100644 index 00000000..3f540415 --- /dev/null +++ b/j_by_j/hrituraj.ipynb @@ -0,0 +1,596 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4 - Design Against Fluctuating Load" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## exa 4.1 Pg 102" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " for stepped plate under tension, Kt=1.75 for r/d = 0.125 & D/d = 1.25 \n", + "\n", + " for finite width plate under tension with a hole, Kt=2.42 for d0/w = 0.25\n", + "\n", + " Thickness of plate = 6.05 mm or 6 mm\n" + ] + } + ], + "source": [ + "## Given data\n", + "P=6## kN\n", + "#dimensions of plate\n", + "r=5##mm\n", + "d=40##mm\n", + "D=50##mm\n", + "d0=10##mm\n", + "w=40##mm\n", + "Sut=200##MPa\n", + "n=2.5## factor of safety\n", + "\n", + "#Fillet - \n", + "rBYd=r/d#\n", + "DBYd=D/d#\n", + "Kt=1.75## factor\n", + "print ' for stepped plate under tension, Kt=%.2f for r/d = %.3f & D/d = %.2f '%(Kt,rBYd,DBYd)\n", + "\n", + "# Hole -\n", + "d0BYw=d0/w#\n", + "Kt=2.42## factor \n", + "print '\\n for finite width plate under tension with a hole, Kt=%.2f for d0/w = %.2f'%(Kt,d0BYw)\n", + "sigma_max_into_t = Kt*P/(w-d0)##N/mm sq.\n", + "\n", + "#Design stress\n", + "sigma_d = Sut/n## MPa\n", + "#putting sigma_max=sigma_d\n", + "t=sigma_max_into_t/sigma_d*1000## mm\n", + "print '\\n Thickness of plate = %.2f mm or %.f mm'%(t,t)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## exa 4.2 Pg 104" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Diameter of axle = 46.5 mm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "# Given Data\n", + "rBYd=0.1#\n", + "DBYd=1.2#\n", + "P=3## kN\n", + "Syt=300##MPa\n", + "n=3## factor of safety\n", + "#dimensions of plate\n", + "l1=400##mm\n", + "l2=300##mm\n", + "l3=400##mm\n", + "\n", + "\n", + "sigma_d=Syt/n## MPa\n", + "Kt=1.65## factor for circular fillet radius member\n", + "Rp=P/2##kN (bearing reaction due to symmetry)\n", + "Mf=Rp*l1## kN.mm (bending moment at fillet)\n", + "Mc=P*(l1+l2+l3)/4## kN.mm (bending moment at centre)\n", + "\n", + "#Fillet\n", + "#sigma_max=Kt*32*Mf/(pi*d**3)\n", + "sigma_max_into_d_cube_1 = Kt*32*Mf*1000/pi\n", + "\n", + "\n", + "#Centre\n", + "#sigma_max=32*Mc/(pi*d**3)\n", + "sigma_max_into_d_cube_2 = Kt*32*Mf*1000/pi\n", + "sigma_max_into_d_cube=max(sigma_max_into_d_cube_1,sigma_max_into_d_cube_2)## (getting max)\n", + "\n", + "#putting sigma_max=sigma_d\n", + "t=(sigma_max_into_d_cube/sigma_d)**(1/3)## mm\n", + "print '\\n Diameter of axle = %.1f mm'%t" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## exa 4.3 Pg 105" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Endurance limit = 45.50 MPa\n" + ] + } + ], + "source": [ + "# Given Data\n", + "Sut=440##MPa\n", + "d=25##mm\n", + "R=95/100## reliability\n", + "Kt=1.8## stress concentration factor\n", + "q=0.86## sensitivity factor\n", + "\n", + "Se_dash = 0.5*Sut## MPa\n", + "\n", + "# for machined surface\n", + "ka=0.82## surface finish factor\n", + "kb=0.85## size factor\n", + "kc=0.868## reliability factor\n", + "kd=1## temperature factor\n", + "ke=0.577## load factor\n", + "\n", + "Kf=1+q*(Kt-1)## fatigue strength factor\n", + "kf=1/Kf ## fatigue strength reduction factor\n", + "Se=ka*kb*kc*kd*ke*kf*Se_dash## (MPa) Endurance limit\n", + "print '\\n Endurance limit = %.2f MPa'%Se" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## exa 4.4 Pg 105" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Thickness of plate = 18.23 mm or 20 mm\n" + ] + } + ], + "source": [ + "# Given Data\n", + "Sut=440##MPa\n", + "w=60##mm\n", + "d=12## mm\n", + "P=20## kN\n", + "q=0.8## sensitivity factor\n", + "R=90/100## reliability\n", + "n=2## factor of safety\n", + "\n", + "Kt=2.52## stress concentration factor\n", + "Se_dash = 0.5*Sut## MPa\n", + "# for hot rollednormalized condition\n", + "ka=0.67## surface finish factor\n", + "kb=0.85## size factor (assuming t<50 mm)\n", + "kc=0.897## reliability factor\n", + "kd=1## temperature factor\n", + "ke=0.9## load factor\n", + "dBYw=d/w# #(for circular hole)\n", + "\n", + "Kf=1+q*(Kt-1)## fatigue strength factor\n", + "kf=1/Kf ## fatigue strength reduction factor\n", + "Se=ka*kb*kc*kd*ke*kf*Se_dash## (MPa) Endurance limit\n", + "sigma_d=Se/n## MPa (design stress)\n", + "# sigma_max=P/(w-d)/t\n", + "sigma_max_into_t = P*1000/(w-d)#\n", + "# putting sigma_max=sigma_d\n", + "t=sigma_max_into_t/sigma_d## mm\n", + "print '\\n Thickness of plate = %.2f mm or 20 mm'%t" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## exa 4.5 Pg 107" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Endurance of specimen = 325.00 MPa\n" + ] + } + ], + "source": [ + "from math import pi, log10\n", + "# Given Data\n", + "Sut=650##MPa\n", + "N=10**5## cycles\n", + "Se_dash = 0.5*Sut## MPa\n", + "of=5## unit\n", + "ob=6##unit\n", + "bf=ob-of## unit\n", + "be=3##unit\n", + "\n", + "# calculating endurance section wise\n", + "OE=log10(Se_dash)#\n", + "OA=log10(0.9*Sut)#\n", + "AE=OA-OE#\n", + "#log10_Sf=OD=OE+ED=OE+FC\n", + "log10_Sf=OE+(bf/be)*AE#\n", + "Sf=10**log10_Sf# # (MPa) Endurance\n", + "print '\\n Endurance of specimen = %.2f MPa'%Sf" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## exa 4.6 Pg 108" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " diameter of beam 20 mm\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import pi, log10\n", + "# Given Data\n", + "Sut=540##MPa\n", + "N=10**4## cycles\n", + "q=0.85## sensitivity factor\n", + "R=90/100## reliability\n", + "P=1500## N\n", + "l=160## mm\n", + "\n", + "Se_dash = 0.5*Sut## MPa\n", + "# for cold drawn steel\n", + "ka=0.79## surface finish factor\n", + "kb=0.85## size factor (assuming t<50 mm)\n", + "kc=0.897## reliability factor\n", + "kd=1## temperature factor\n", + "ke=1## load factor\n", + "\n", + "Kt=1.33## under bending\n", + "\n", + "Kf=1+q*(Kt-1)## fatigue strength factor\n", + "kf=1/Kf ## fatigue strength reduction factor\n", + "Se=ka*kb*kc*kd*ke*kf*Se_dash## MPa( Endurance limit)\n", + "\n", + "of=4## unit\n", + "ob=6##unit\n", + "bf=ob-of## unit\n", + "be=3##unit\n", + "\n", + "# calculating endurance section wise\n", + "OE=log10(Se)#\n", + "OA=log10(0.9*Sut)#\n", + "AE=OA-OE#\n", + "#log10_Sf=OD=OE+ED=OE+FC\n", + "log10_Sf=OE+(bf/be)*AE#\n", + "Sf=10**log10_Sf# # (MPa) Endurance\n", + "\n", + "MB=P*l## N.mm\n", + "# 32*MB/pi/d**3 = Sf\n", + "d=(32*MB/pi/Sf)**(1/3)\n", + "print '\\n diameter of beam %.f mm'%d" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## exa 4.7 Pg 110" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " diameter d at fillet cross section = 16 mm\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import pi, log10, atan\n", + "# Given Data\n", + "Sut=600##MPa\n", + "Syt=380##MPa\n", + "q=0.9## sensitivity factor\n", + "R=90/100## reliability\n", + "n=2## factor of safety\n", + "Pmin=-100## N\n", + "Pmax=200## N\n", + "l=150## mm\n", + "\n", + "Se_dash = 0.5*Sut## MPa\n", + "# for cold drawn steel\n", + "ka=0.76## surface finish factor\n", + "kb=0.85## size factor (assuming t<50 mm)\n", + "kc=0.897## reliability factor\n", + "kd=1## temperature factor\n", + "ke=1## load factor\n", + "\n", + "Kt=1.4## under bending\n", + "\n", + "Kf=1+q*(Kt-1)## fatigue strength factor\n", + "kf=1/Kf ## fatigue strength reduction factor\n", + "Se=ka*kb*kc*kd*ke*kf*Se_dash## MPa( Endurance limit)\n", + "Mmax=Pmax*l## N.mm\n", + "Mmin=Pmin*l## N.mm\n", + "Mm=(Mmax+Mmin)/2## N.mm\n", + "Ma=(Mmax-Mmin)/2## N.mm\n", + "theta=atan(Ma/Mm)*pi/180## degree\n", + "\n", + "#equation of Goodman - sigma_m/Sut+sigma_a/Se=1\n", + "#here sigma_a/sigma_m=3\n", + "sigma_m=1/(1/Sut+3/Se)##MPa\n", + "sigma_a=3*sigma_m## MPa\n", + "\n", + "sigma_da=sigma_a/n## MPa\n", + "#sigma_da=32*Ma/pi/d**3\n", + "d=(32*Ma/pi/sigma_da)**(1/3)## mm \n", + "print '\\n diameter d at fillet cross section = %.f mm'%d" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## exa 4.8 Pg 112" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " diameter of shaft = 34 mm\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import pi, log10, atan,tan\n", + "# Given Data\n", + "Sut=500##MPa\n", + "Syt=300##MPa\n", + "R=90/100## reliability\n", + "n=2## factor of safety\n", + "Tmin=-200## N.m\n", + "Tmax=500## N.m\n", + "\n", + "Se_dash = 0.5*Sut## MPa\n", + "# for cold drawn steel\n", + "ka=0.80## surface finish factor\n", + "kb=0.85## size factor (assuming t<50 mm)\n", + "kc=0.897## reliability factor\n", + "kd=1## temperature factor\n", + "ke=0.577## load factor\n", + "\n", + "Ses=ka*kb*kc*kd*ke*Se_dash## MPa( Endurance limit)\n", + "Sys=ke*Syt## MPa\n", + "Tm=(Tmax+Tmin)/2## N.m\n", + "Ta=(Tmax-Tmin)/2## N.m\n", + "theta=atan(Ta/Tm)*pi/180## degree\n", + "Sms=Ses/tan(theta*180/pi)##MPa\n", + "Sas=Ses##MPa\n", + "tau_da=Sas/n##MPa\n", + "#tua_da=16*Ta/pi/d**3\n", + "d=(16*Ta*1000/pi/tau_da)**(1/3)##mm\n", + "print '\\n diameter of shaft = %.f mm'%d" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## exa 4.9 Pg 113" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " life of the spring, N = 215630 cycles\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import pi,log10\n", + "# Given Data\n", + "Sut=860##MPa\n", + "Syt=690##MPa\n", + "Pmin=60## N\n", + "Pmax=120## N\n", + "R=50/100## reliability\n", + "l=500##mm\n", + "d=10##mm\n", + "Se_dash = 0.5*Sut## MPa\n", + "# for machines surface\n", + "ka=0.70## surface finish factor\n", + "kb=0.85## size factor (assuming t<50 mm)\n", + "kc=1## reliability factor\n", + "kd=1## temperature factor\n", + "ke=1## load factor\n", + "\n", + "Se=ka*kb*kc*kd*ke*Se_dash## MPa( Endurance limit)\n", + "Mmax=Pmax*l## N.mm\n", + "Mmin=Pmin*l## N.mm\n", + "Mm=(Mmax+Mmin)/2## N.mm\n", + "Ma=(Mmax-Mmin)/2## N.mm\n", + "Sm=32*Mm/pi/d**3##MPa\n", + "sigma_m=Sm##MPa\n", + "Sa=32*Ma/pi/d**3##MPa\n", + "sigma_a=Sa##MPa\n", + "Sf=Sa*Sut/(Sut-Sm)##MPa\n", + "\n", + "#calculating section\n", + "OB=6##unit ref. o at 3\n", + "BE=OB-3##unit\n", + "OC=Sf## MPa\n", + "AE=log10(0.9*Sut)-log10(Se)##MPa\n", + "AC=log10(0.9*Sut)-log10(Sf)##MPa\n", + "CD=BE*AC/AE##\n", + "#log10(N)=3+CD\n", + "N=10**(3+CD)## cycle\n", + "print '\\n life of the spring, N = %.f cycles'%N\n", + "#Note : answer in the textbook is wrong." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## exa 4.10 Pg 116" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " factor of safety, n = 5.04\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import pi, log10, sqrt,atan,tan\n", + "# Given Data\n", + "Sut=600##MPa\n", + "Se=280##MPa\n", + "sigma_x_min=50## MPa\n", + "sigma_x_max=100## MPa\n", + "sigma_y_min=20## MPa\n", + "sigma_y_max=70## MPa\n", + "\n", + "sigma_xm=(sigma_x_max+sigma_x_min)/2## MPa\n", + "sigma_xa=(sigma_x_max-sigma_x_min)/2## MPa\n", + "sigma_ym=(sigma_y_max+sigma_y_min)/2## MPa\n", + "sigma_ya=(sigma_y_max-sigma_y_min)/2## MPa\n", + "\n", + "# distortion energy theory - \n", + "sigma_m=sqrt(sigma_xm**2+sigma_ym**2-sigma_xm*sigma_ym)## MPa\n", + "sigma_a=sqrt(sigma_xa**2+sigma_ya**2-sigma_xa*sigma_ya)## MPa\n", + "theta=atan(sigma_a/sigma_m)## radian\n", + "# Sm/Sut+Sa/Se=1 where Sa=Sm*tan(theta)\n", + "Sm=1/(1/Sut+tan(theta)/Se)## MPa\n", + "Sa=tan(theta)*Sm## MPa\n", + "n=Sa/sigma_a## factor of safety\n", + "\n", + "print '\\n factor of safety, n = %.2f'%n" + ] + } + ], + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/j_by_j/sai.ipynb b/j_by_j/sai.ipynb new file mode 100644 index 00000000..89275d31 --- /dev/null +++ b/j_by_j/sai.ipynb @@ -0,0 +1,349 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# SAMPLE NOTEBOOK" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + "\n", + "\n", + "## ch-9 page 227 pb-1" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "('load current =', 21.78649237472767)\n", + "('design current=', 28.32244008714597)\n", + "('Derating factor=', 0.92)\n", + "('fuse rating=', 30.785260964289098)\n" + ] + } + ], + "source": [ + "\n", + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "vi=120;\n", + "k=1000;\n", + "pi=2*k;\n", + "eff=0.90;\n", + "pf=0.85;\n", + "t=65;\n", + "\n", + "lc=(pi)/(vi*eff*pf);\n", + "print('load current =',lc);\n", + "\n", + "dc=1.3*lc;\n", + "print('design current=',dc);\n", + "\n", + "df=(0.2/100)*(t-25);\n", + "df=11.5*df;\n", + "print('Derating factor=',df);\n", + "\n", + "fr=dc/df;\n", + "print('fuse rating=',fr);\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + "\n", + "\n", + "## ch-10 page 268 pb-6" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "('power delivered =', 500000.0, 'watts')\n", + "('power loss=', 10000.0, 'watts')\n", + "(510583.1892725521, 241709.44403085182)\n", + "('kvar_cap=', 268.87374524170025)\n", + "('c=', 10.111669570616154, 'micro farad/ph')\n", + "('differences in kva demand=', 158.7301587301588)\n", + "('loss in cable =', 0.6049382716049381)\n", + "('cost saving=', 5294.849999999999)\n", + "('total three phase capacitor cost=', 48397.274143506045, '$')\n", + "('capacitor cost will be recoverred in', 9.140442910281887, 'months')\n" + ] + } + ], + "source": [ + "\n", + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "lpf1=0.70;\n", + "lpf2=0.90;\n", + "vi=460;\n", + "f=60;\n", + "k=1000;\n", + "p=1500*k;\n", + "time=300;\n", + "cost=60;\n", + "l=2/100;\n", + "theta1=45.6;\n", + "theta2=25.8;\n", + "pd=p/3; #since 3 phase;\n", + "pl=l*pd;\n", + "\n", + "print('power delivered =',pd,'watts');\n", + "print('power loss=',pl,'watts');\n", + "\n", + "var1=pd*(math.tan((math.pi/180)*theta1));\n", + "var2=pd*(math.tan((math.pi/180)*theta2));\n", + "var=var1-var2;\n", + "print(var1,var2);\n", + "kvar=var/1000;\n", + "print('kvar_cap=',kvar);\n", + "\n", + "vp=vi/(math.sqrt(3));\n", + "w=2*math.pi*f;\n", + "\n", + "c=(1000*kvar)/(w*vp*vp);\n", + "c=c*1000;\n", + "print('c=',c,'micro farad/ph');\n", + "\n", + "kva1=(pd/1000)/lpf1;\n", + "kva2=(pd/1000)/lpf2;\n", + "\n", + "dkva=kva1-kva2;\n", + "print('differences in kva demand=',dkva);\n", + "\n", + "loss=(lpf1/lpf2)*(lpf1/lpf2);\n", + "print('loss in cable =',loss);\n", + "\n", + "kvas=3*158.72;\n", + "\n", + "scl=3*3.95;\n", + "\n", + "tcost=10*kvas+0.15*scl*time;\n", + "print('cost saving=',tcost);\n", + "\n", + "tccost=cost*3*kvar;\n", + "\n", + "print('total three phase capacitor cost=',tccost,'$');\n", + "\n", + "duration=tccost/tcost;\n", + "print('capacitor cost will be recoverred in',duration,'months');\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + "\n", + "\n", + "## ch-13 page 340 pb-3" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "('duty cycle=', 0.5)\n", + "('avg o/p voltage=', 60.0)\n", + "('avg o/p current=', 4.0)\n", + "('avg o/p power=', 240.0)\n", + "('L min=', 3.0, 'mhenry')\n" + ] + } + ], + "source": [ + "\n", + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "v=120;\n", + "i=2;\n", + "f=1000;\n", + "to=(0.5)/1000;\n", + "\n", + "T=1/f;\n", + "\n", + "dr=(to)/T;\n", + "print('duty cycle=',dr);\n", + "\n", + "vo=dr*v;\n", + "io=i/dr;\n", + "po=vo*io;\n", + "\n", + "print('avg o/p voltage=',vo);\n", + "print('avg o/p current=',io);\n", + "print('avg o/p power=',po);\n", + "\n", + "L=(dr*(v/10))/2;\n", + "\n", + "print('L min=',L,'mhenry');\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + "\n", + "\n", + "## ch-14 page 363 pb-4" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "('V dc=', 339.4112549695428)\n", + "('I dc=', 5.892556509887896)\n", + "('fundamental ac side rms current =', 8.333333333333334)\n", + "('THD=', 0.8259394650941436)\n", + "('I ac(rms)=', 10.77677544021814)\n", + "('I dc(rms)=', 9.023118455759443)\n" + ] + } + ], + "source": [ + "\n", + "from __future__ import division\n", + "import math\n", + "\n", + "v=240;\n", + "f=60;\n", + "p=2000;\n", + "dpf=1;\n", + "k1=73.2;k2=36.6;k3=8.1;k4=5.7;\n", + "k5=4.1;k6=2.9;k7=0.8;k8=0.4;\n", + "h1=3;h2=5;h3=7;h4=9;h5=11;h6=13;h7=17;\n", + "\n", + "vdc=math.sqrt(2)*v;\n", + "\n", + "idc=p/vdc;\n", + "print('V dc=',vdc);\n", + "print('I dc=',idc);\n", + "pac=p/dpf;\n", + "\n", + "\n", + "is1=p/v;\n", + "\n", + "print('fundamental ac side rms current =',is1);\n", + "\n", + "k=(k1*k1)+k2*k2+k3*k3+k4*k4+k5*k5+k6*k6+k7*k7;\n", + "thd=(math.sqrt(k))/100;\n", + "print('THD=',thd);\n", + "\n", + "iac=is1*(math.sqrt(1+(0.82*0.82)));\n", + "\n", + "idcr=math.sqrt((iac*iac)-(idc*idc));\n", + "\n", + "print('I ac(rms)=',iac);\n", + "print('I dc(rms)=',idcr);\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + "\n", + "\n", + "## ch-16 page 454 pb-6" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "('fundamental load current =', 240.5626121623441)\n" + ] + } + ], + "source": [ + "\n", + "from __future__ import division\n", + "import math\n", + "\n", + "v=480;\n", + "k=1000;\n", + "p=200*k;\n", + "thd=600;\n", + "\n", + "lc=p/(math.sqrt(3)*v);\n", + "\n", + "print('fundamental load current =',lc);\n" + ] + } + ], + "metadata": { + "anaconda-cloud": {}, + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 1 +} diff --git a/j_by_j/screenshots/SAPWEBIDE.png b/j_by_j/screenshots/SAPWEBIDE.png Binary files differnew file mode 100644 index 00000000..912fc016 --- /dev/null +++ b/j_by_j/screenshots/SAPWEBIDE.png diff --git a/j_by_j/screenshots/monica2.png b/j_by_j/screenshots/monica2.png Binary files differnew file mode 100644 index 00000000..21d90884 --- /dev/null +++ b/j_by_j/screenshots/monica2.png diff --git a/j_by_j/screenshots/pylab.png b/j_by_j/screenshots/pylab.png Binary files differnew file mode 100644 index 00000000..0f57a00d --- /dev/null +++ b/j_by_j/screenshots/pylab.png |