from math import pi,exp
from math import atan,sin
from math import sqrt
R=10;
L=0.1;
f=50;
w=2*pi*f;
k=sqrt((R**2)+((w*L)**2));
angle=atan(w*L/R);
E=400
A=E*sin(angle)/k;
i=A*exp((-R)*.02/L);
i=round(i*100)/100;
print"the transient current =A",i
from math import sqrt,sin,atan,pi,exp
R=10;
L=0.1;
f=50;
w=2*pi*f;
k=sqrt((R**2)+((w*L)**2));
angle=atan(w*L/R);
E=100;
Em=sqrt(2)*E;
A=Em*sin(angle)/k;
i1=A;
Em=round(Em*10)/10;
i1=round(i1*10)/10;
print"current in amperes for part1=A\n",i1
print"current in part 2& part 3= 0\n"
print"the DC component vanishes if e=V",Em#the error is due to the erroneous values in the textbook
t1=0.5*.02;
i2=A*exp((-R)*t1/L);
print"\ncurrent at .5 cycles for t1=sec \ncurrent in the problem = A",t1,i2
t2=1.5*.02;
i3=A*exp((-R)*t2/L);
print"\ncurrent at 1.5 cycles for t2=sec \ncurrent in the problem = A",t2,i3
t3=5.5*.02;
i4=A*exp((-R)*t3/L);
print"\ncurrent at 5.5 cycles for t3=sec \ncurrent in the problem = A",t3,i4
print"the difference in result is due to erroneous value in textbook."
from math import sqrt,e,pi
C=.003e-6
L=1.6e-3
y=sqrt(L*C);
y=round(y*1e7)/1e7;
f=(2*3.14*y)**-1;
f=round(f/100)*100;
i=7500;
E=i*2*3.15*L*50;
Em=1.414*E;
Em=round(Em/10)*10
t=y*pi/2;
t=t*1e6;
t=round(t*100)/100;
e=Em/y;
e=round((e)/1e6)*1e6;
e=round(e/1e7)*1e7
print"frequency of oscillations=c/s",f
print"\ntime of maximum restriking voltage=microsec",t
print"\nmaximum restriking voltage=V/microsecs",e/1e6
from math import pi,sqrt
R=5
f=50
L=R/(2*pi*f);
V=11e3;
Vph=11/sqrt(3);
C=0.01e-6;
y=sqrt(L*C);
Em=sqrt(2)*Vph;
ep=2*Em;
ep=round(ep*10)/10;
y=round(y*1e7)/1e7;
t=y*pi;
t=round(t*1e7)/1e7
ea=ep/t;
ea=round(ea/1e3)*1e3
fn=(2*3.14*y)**-1;
Em=round(Em)
Emax=Em/y;
Emax=round(Emax/1000)*1e3;
print"peak restriking voltage=kV",ep
print"\nfrequency of oscillations=c/s",fn
print"\naverage rate of restriking voltage=kV/microsecs",ea/1e6
print"\nmax restriking voltage=V/microsecs",Emax/1e3
from math import pi,sqrt
E=19.1*1e3;
L=10*1e-3;
C=.02*1e-6;
Em=sqrt(2)*E;
y=sqrt(L*C);
t=pi*y*1e6;
emax=2*Em;
eavg=emax/t;
eavg=round(eavg/10)*10
print"average restriking voltage=V/microsecs",eavg
from math import e,sqrt,acos,sin
V=78e3;
Vph=V/sqrt(3);
Em=2*Vph;
pf=0.4;
angle=acos(pf);
k1=sin(angle);
k1=round(k1*100)/100;
k2=.951;
k3=1;
k=k1*k2*k3;
k=round(k*1000)/1e3;
E=k*Em;
f=15000.;
t=1/(2*f);
t=round(t*1e6);
eavg=2*E/t;
eavg=round(eavg/100)*100;
print"average restriking voltage=kV/microsecs",eavg/1e3
Em=100e3
t=70e-6
Ea=Em/t/1e6
f=1/(2*t);
Ea=round(Ea/10)*10;
f=round(f);
print"average voltage in volts=V/microsecs",Ea
print"frequency of oscillation =c/s",f
from math import sqrt
L=6;
C=0.01e-6;
i=10;
v=i*sqrt(L/C);
R=.5*v/i;
R=round(R/10)*10;
print"damping resistance in ohms=kohms",R/1e3