import math
# Variables
N = 100.; #turns
R = 1500.; #rpm(Rotation)
B = 0.05; #T(Magnetic field)
A = 40.; #cm**2(Cross sectional area)
# Calculations and Results
f = R/60; #Hz
theta = 30.; #degree
print "(a) Frequency(Hz) : %.2f"%f
Period = 1/f; #seconds
print "(b) Period(seconds) : %.2f"%Period
Em = 2*math.pi*B*(A/10**4)*N*f; #V
print "(c) Maximum value of gnerated emf(V) : %.2f"%Em
e = math.pi*math.sin(math.radians(theta)); #V
print "(d) Gnerated emf after rotation(V) : %.2f"%e
import math
# Variables
Irms = 10; #A
# Calculations
Im = Irms*math.sqrt(2); #A
# Results
print "Peak values of current(A) are :%.2f and %.2f"%(+Im,-Im)
import math
# Variables
#v = 141.4*math.sin(377*t)
Vm = 141.4; #V
# Calculations and Results
V = Vm/math.sqrt(2); #V(rms voltage)
print "(a) r.m.s. Voltage(V) : %.f"%V
omega = 377.; #rad/s
f = omega/2/math.pi; #Hz
print "(b) Frequency(Hz) : %.2f"%f
t = 3*10**-3; #seconds
v = 141.4*math.sin(377*t); #V
print "(c) Instantaneous Voltage(V) : %.2f"%v
import math
# Variables
V = 110.; #V(Supply voltage)
R = 50.; #ohm
# Calculations and Results
Vm = V*math.sqrt(2); #V(maximum voltage)
Im = Vm/R; #A(maximum current)
Iav1 = 0.637*Im; #A(average current Over +ve half cycle)
Iav2 = 0; #(average current Over -ve half cycle)
Iav = (Iav1+Iav2)/2; #A(average current Over whole cycle)
print "(a) Reading on moving coil ammeter(A) : %.2f"%Iav
#For thermal ammeter : I**2*R = 1/4*Im**2*R(thermal effect for complete cycle)
I = math.sqrt(1./4*Im**2); #A(reading on thermal ammeter)
print "(a) Reading on thermal ammeter(A) : %.2f"%I
kf = I/Iav; #form factor
kp = Im/I; #peak factor
print "(b) Form factor & peak factor are : %.2f and %.2f"%(kf,kp)
import math
V = 100.; #V
R = 7.; #ohm
L = 31.8; #mH
f = 50.; #/Hz
XL = 2*math.pi*f*L/1000; #ohm
Z = math.sqrt(R**2+XL**2); #ohm
I = V/Z; #A(circuit current)
print "(a) Circuit current(A) %.1f"%I
fi = math.degrees(math.atan(XL/R)); #degree(lag)
print "(b) Phase angle(lag) in degree : %.f"%fi
import math
# Variables
L = 318.; #mH
R = 75.; #ohm
VR = 150.; #V
f = 50.; #/Hz
# Calculations
I = VR/R; #A
XL = 2*math.pi*f*L/1000; #ohm
VL = I*XL; #V
V = math.sqrt(VR**2+VL**2); #V
# Results
print "Supply Voltage(V) : %.f"%V
import math
# Variables
ZLr = 50.; #ohm
fiLr = 45.; #degree(lag)(between current & Voltage)
R = 40.; #ohm
I = 3.; #A(Circuit current)
# Calculations and Results
VR = I*R; #V
VLr = I*ZLr; #V
V = math.sqrt(VR**2+VLr**2+2*VR*VLr*math.cos(math.radians(fiLr))); #V
print "Supply voltage(V) : %.f"%V
print math.cos(math.radians(fiLr))
fi = math.degrees(math.acos((VR+VLr*math.cos(math.radians(fiLr)))/V)); #degree
print "Circuit phase angle(lag in degree) : %.f"%fi
import math
# Variables
C = 30.; #micro F
V = 400.; #V
f = 50.; #Hz
# Calculations and Results
Xc = 1/(2*math.pi*f*C*10**-6); #ohm
print "(a) Reacmath.tance of capacitor(ohm) : %.2f"%Xc
I = V/Xc; #A
print "(b) Current(A) : %.2f"%I
import math
# Variables
R = 12.; #ohm(Coil Resistance)
L = 0.1; #H(Coil Inductance)
V = 100.; #V
f = 50.; #Hz
# Calculations and Results
XL = 2*math.pi*f*L; #ohm
Z = math.sqrt(R**2+XL**2); #ohm
print "(a) Reactance(ohm) & impedence(ohm) of the coil are : %.2f and %.2f"%(XL,Z)
I = V/Z; #A
print "(b) Current(A) : %.2f"%I
fi = math.degrees(math.atan(XL/R)); #degree
print "Phase difference(degree) : %.f"%fi
import math
# Variables
Pr = 750.; #W(rated)
Vr = 100.; #V(rated)
V = 230.; #V(Supply voltage)
f = 60.; #Hz
# Calculations and Results
VC = math.sqrt(V**2-Vr**2); #V(Voltage across capacitor)
Ir = Pr/Vr; #A(Rated current)
C = Ir/(2*math.pi*f*VC)*10**6; #micro F
print "(a) Capacimath.tance required(micro F) : %.2f"%C
fi = math.acos(math.radians(Vr/V)); #degree
print "(b) Phase angle(degree) : %.2f"%fi
import math
# Variables
R = 12.; #ohm
L = 0.15; #H
C = 100.; #micro F
V = 100.; #V
f = 50.; #Hz
# Calculations and Results
XL = 2*math.pi*f*L; #ohm
XC = 1/(2*math.pi*f*C*10**-6); #ohm
Z = math.sqrt(R**2+(XL-XC)**2); #ohm
print "(a) Impedence(ohm) : %.2f"%Z
I = V/Z; #A
print "(b) Current(A) : %.2f"%I
VR = R*I; #V
VL = XL*I; #V
VC = XC*I; #V
print "(b) Voltge(V) across R, L & C : %.2f , %.2f and %.2f"%(VR,VL,VC)
fi = math.degrees(math.acos(VR/V)); #degree
print "(c) Phase difference(degree): %.2f"%fi
import math
# Variables
R = 6.; #ohm
L = 0.03; #H
V = 50.; #V
f = 60.; #Hz
# Calculations and Results
XL = 2*math.pi*f*L; #ohm
Z = math.sqrt(R**2+XL**2); #ohm
I = V/Z; #A
print "(a) Current(A) : %.2f"%I
fi = math.degrees(math.atan(XL/R)); #degree
print "(b) Phase angle(degree) : %.2f"%fi
S = V*I; #VA(Apparent power)
print "(c) Apparent power(VA) : %.2f"%S
P = S*math.cos(math.radians(fi)); #W
print "(d) Active power(W) : %.f"%P
import math
# Variables
R = 30.; #ohm
V = 230.; #V
f = 50.; #Hz
VR = 130.; #V
VLr = 180.; #V
# Calculations
fiLr = math.degrees(math.acos((V**2-VR**2-VLr**2)/(2*VR*VLr))); #degree(lag)
I = VR/R; #A
Pr = VLr*I*math.cos(math.radians(fiLr)); #W
# Results
print "Power dissipated in the coil(W) : %.2f"%Pr
import math
# Variables
V = 230.; #V
f = 50.; #Hz
I = 5.; #A
P = 750.; #W
# Calculations and Results
Z = V/I; #ohm
R = P/I**2; #ohm(Resistance)
XL = math.sqrt(Z**2-R**2); #ohm(reacmath.tance)
L = XL/2/math.pi/f; #H(Inductance)
print "(a) Resistance(ohm) : %.2f"%R
print "(a) Inductance(mH) : %.2f"%(L*1000)
pf = P/(V*I); #power factor(lag)
print "(b) Power factor(lag) : %.2f "%pf