diff options
author | kinitrupti | 2017-05-12 18:40:35 +0530 |
---|---|---|
committer | kinitrupti | 2017-05-12 18:40:35 +0530 |
commit | d36fc3b8f88cc3108ffff6151e376b619b9abb01 (patch) | |
tree | 9806b0d68a708d2cfc4efc8ae3751423c56b7721 /basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter1.ipynb | |
parent | 1b1bb67e9ea912be5c8591523c8b328766e3680f (diff) | |
download | Python-Textbook-Companions-d36fc3b8f88cc3108ffff6151e376b619b9abb01.tar.gz Python-Textbook-Companions-d36fc3b8f88cc3108ffff6151e376b619b9abb01.tar.bz2 Python-Textbook-Companions-d36fc3b8f88cc3108ffff6151e376b619b9abb01.zip |
Revised list of TBCs
Diffstat (limited to 'basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter1.ipynb')
-rw-r--r--[-rwxr-xr-x] | basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter1.ipynb | 108 |
1 files changed, 1 insertions, 107 deletions
diff --git a/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter1.ipynb b/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter1.ipynb index e394c7f6..7f27495e 100755..100644 --- a/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter1.ipynb +++ b/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter1.ipynb @@ -31,13 +31,10 @@ ], "source": [ "import math\n", - "\n", "q1=q2=0.1\n", "r=1\n", "e=8.84*(10**-12)\n", - "\n", "E=(q1*q2)/float(4*3.14*e*(r**2))\n", - "\n", "print \"E=\",format(E,'.2f'),\"N\"" ] }, @@ -66,34 +63,21 @@ ], "source": [ "import math\n", - "\n", "#given\n", - "\n", "q1=2*(10**-9)\n", "q2=3*(10**-9)\n", - "\n", "#q1 and q2 are 6m apart in air\n", "#on substituting the values in the formula for calculating force between q and q1 and q and q2 we get 9[(3/(6-x**2)-(2/(x**2)))]\n", - "\n", "import sympy as sp\n", "x=sp.Symbol('x')\n", "sp.integrate(((3/(6-x)**2)-(2/x**2)),x)\n", - "\n", "from scipy.integrate import quad\n", "import scipy.integrate\n", - "\n", "def f(x):\n", " return -(x+12)/(x**2 - 6*x)\n", - " \n", - " \n", - " \n", - "\n", "i=quad(f,1,4)\n", "print (i[0]),\"J\"\n", - "\n", - "\n", "print \"Vab=-vba=5.4V\"\n", - "\n", "#the value obtained is directly given with print \n", "\n", "\n", @@ -126,10 +110,8 @@ ], "source": [ "import math\n", - "\n", "charge=1.6*(10**-19)\n", "iav=1.6*(10**-19)*(10**19) #total charge movement per second\n", - "\n", "print \"iav=\",format(iav,'.1f'),\"A\"" ] }, @@ -157,17 +139,13 @@ ], "source": [ "import math\n", - "\n", "p=30\n", "i=10\n", - "\n", "v=p/i\n", "dt=1\n", "dq=i*dt\n", - "\n", "dw=v*dq\n", "energy=dw/i\n", - "\n", "print \"energy of each coulomb of charge=\",format(energy,'.1f'),\"J\"\n", "\n", "\n" @@ -197,14 +175,10 @@ ], "source": [ "import math\n", - "\n", "#given\n", - "\n", "p=15000\n", "n=1500\n", - "\n", "t=(60*p)/float(1500*2*3.14)\n", - "\n", "print \"torque=\",format(t,'.2f'),\"Nm\"\n" ] }, @@ -234,13 +208,10 @@ ], "source": [ "import math\n", - "\n", "res=1.72*(10**-8)\n", "l=200\n", "a=25*(10**-6)\n", - "\n", "R=(res*l)/float(a)\n", - "\n", "print \"R=\",format(R,'.4f'),\"ohm\"" ] }, @@ -268,15 +239,12 @@ ], "source": [ "import math\n", - "\n", "#given and derived\n", "meanrad=0.08\n", "meanlen=3.14*meanrad\n", "a=0.04*0.04\n", "res=1.72*(10**-8)\n", - "\n", "R=(res*meanlen)/float(a)\n", - "\n", "print \"R=\",format(R,'.8f'),\"ohm\"" ] }, @@ -305,17 +273,12 @@ ], "source": [ "import math\n", - "\n", "res=0.02*(10**-6)\n", "l=4000*80*(10**-2)\n", "a=0.8*(10**-6)\n", - "\n", "R=(res*l)/float(a)\n", - "\n", "print \"R=\",format(R,'.4f'),\"ohm\"\n", - "\n", "power=(230*230)/float(80)\n", - "\n", "print \"power=\",format(power,'.2f'),\"W\"" ] }, @@ -345,7 +308,6 @@ ], "source": [ "import math\n", - "\n", "lal=7.5\n", "lcu=6\n", "rcu=0.017*(10**-6)\n", @@ -353,21 +315,13 @@ "d=(10**-6)\n", "a=((3.14*d))/float(4)\n", "Ral=(lal*ral)/float(a)\n", - "\n", "print \"R=\",format(Ral,'.4f'),\"ohm\"\n", - "\n", "ial=3\n", - "\n", "pv=Ral*ial\n", - "\n", - "\n", "Rcu=pv/float(2)\n", "print Rcu\n", - "\n", "a=(rcu*lcu)/float(Rcu)\n", - "\n", "dcu=(((a*4)/3.14)**0.5)\n", - "\n", "print \"dcu=\",format(dcu,'.6f'),\"nm\"\n", "\n", "\n" @@ -397,29 +351,21 @@ ], "source": [ "import math\n", - "\n", "#given and derived\n", - "\n", "a=100/0.32 #area required to dissipate 100W power\n", "d=5\n", "#length of cyclinder L,length of wire if l,diameter of the wire is d\n", "L=a/float(3.14*d)\n", - "\n", "r=100/1**2\n", - "\n", "#spacing is d cm\n", "#distance along the axis of the cylinder is 2d cm\n", - "\n", "#no of turns is 10/d\n", "#length of one turn of the wire is 3.14*5 cm\n", "#length of the wire is 50*3.14/d\n", "res=10**-4\n", - "\n", "#d=(((2*10**-4))**(0.6))\n", "d=0.058\n", - "\n", "l=(50*3.14)/d\n", - "\n", "print \"l=\",format(l,'.6f'),\"cm\"\n", "\n", "\n" @@ -449,22 +395,15 @@ ], "source": [ "import math\n", - "\n", "#given\n", "v=250\n", "i=5\n", "i1=3.91\n", - "\n", "t0=0.00426 #temperature coefficient\n", - "\n", "r15=v/i #at 15 degrees\n", - "\n", "rt=v/i1 #at t degrees\n", - "\n", "l=(rt*(1+t0*15))/50 #left hand side\n", - "\n", "t=(l-1)/t0\n", - "\n", "print \"t=\",format(t,'.2f'),\"centigrade\"" ] }, @@ -492,15 +431,11 @@ ], "source": [ "import math\n", - "\n", "#this is a derivation by substitution problem\n", - "\n", "#al1=al0/(1+al0*t1)\n", "#al2=al0/(1+al0*t2)\n", "#where t1 and t2 are different temperatures al0,al1 and al2 are temperature coefficients\n", - "\n", "#substitute al0 in al2\n", - "\n", "#on deriving and solving for al2 we get,\n", "print \"al2=al1/(1+al1*(t1-t2))\"\n" ] @@ -530,25 +465,16 @@ ], "source": [ "import math\n", - "\n", "#values are obtained from the graph\n", - "\n", "i=10 #10t A for 0 to 1 second\n", - "\n", "d=10 #where di/dt is 10\n", "L=2\n", "# at one second\n", - "\n", "v=L*d\n", - "\n", "print \"v=\",format(v,'.1f'),\"v\"\n", - "\n", "#for 1 to 5 seconds\n", - "\n", "d=-5\n", - "\n", "#at t=3 seconds voltage across the inductor is\n", - "\n", "v=L*d\n", "print \"v=\",format(v,'.1f'),\"v\"\n" ] @@ -580,33 +506,21 @@ ], "source": [ "import math\n", - "\n", "#given\n", - "\n", "dv=20 #dv/dt\n", "c=25*(10**-6)\n", - "\n", "#case a\n", - "\n", "i=c*dv\n", - "\n", "print \"i=\",format(i,'.4f'),\"A\"\n", - "\n", "#case b\n", "q=c*dv\n", - "\n", "print \"q=\",format(q,'.4f'),\"C\"\n", - "\n", "#case c\n", - "\n", "p=dv*i\n", - "\n", "print \"p=\",format(p,'.4f'),\"W\"\n", - "\n", "#case d\n", "v=dv**2\n", "wc=(c*v)/2\n", - "\n", "print \"wc=\",format(wc,'.4f'),\"J\"\n", " " ] @@ -639,28 +553,18 @@ ], "source": [ "import math\n", - "\n", "l=1\n", "b=1.5\n", "i=50\n", "u=5\n", - "\n", "#case a\n", - "\n", "f=b*i*l\n", - "\n", "print \"f=\",format(f,'.1f'),\"N\"\n", - "\n", "#case b\n", - "\n", "p=f*u\n", - "\n", "print \"p=\",format(p,'.1f'),\"W\"\n", - "\n", "#case c\n", - "\n", "e=b*l*u\n", - "\n", "print \"e=\",format(e,'.1f'),\"V\"\n" ] }, @@ -689,23 +593,17 @@ ], "source": [ "import math\n", - "\n", "#e=b*l*u*sin(angle)\n", - "\n", "b=0.5\n", "l=40\n", "u=1.5\n", - "\n", "#when angle=90 sin(90)=1=s\n", "s=1\n", "e=b*l*u*s\n", - "\n", "print \"e=\",format(e,'.1f'),\"V\"\n", - "\n", "#when angle=30 sin(angle)=s=0.5\n", "s=0.5\n", "e=b*l*u*s\n", - "\n", "print \"e=\",format(e,'.1f'),\"V\"\n", "\n" ] @@ -734,7 +632,6 @@ ], "source": [ "import math\n", - "\n", "#applying kcl to circuit at node b i3+i4=6-4=2\n", "i3=i4=1 #potential of node b with respect to node c\n", "vb=8\n", @@ -742,11 +639,8 @@ "va=6 #potential of node a w.r.t note c\n", "i2=3\n", "#applying kcl to node a\n", - "\n", "isa=1\n", - "\n", "vs=va+2*isa\n", - "\n", "print \"vse=\",format(vs,'.1f'),\"V\"\n", "\n" ] @@ -777,7 +671,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", - "version": "2.7.9" + "version": "2.7.5" } }, "nbformat": 4, |