summaryrefslogtreecommitdiff
path: root/608/CH15/EX15.10/15_10.sce
blob: 897c623ce9a46155097f9704144e55d69cbf8f3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//Problem 15.10: A coil consists of a resistance of 100 ohms and an inductance of 200 mH. If an alternating voltage, v, given by v = 200 sin500t volts is applied across the coil, calculate (a) the circuit impedance, (b) the current flowing, (c) the p.d. across the resistance, (d) the p.d. across the inductance and (e) the phase angle between voltage and current.

//initializing the variables:
R = 100; // in ohms
L = 0.2; // in henry
Vmax = 200; // in volts
w = 500; // in rad/sec

//calculation:
Vrms = 0.707*Vmax
f = w/(2*%pi)
XL = 2*%pi*f*L
Z = (R^2 + XL^2)^0.5
I = Vrms/Z
VL = I*XL
VR = I*R
phid = atan(XL/R)*180/%pi

printf("\n\n Result \n\n") 
printf("\n (a)Impedance, Z = %.1f ohms",Z)
printf("\n (b)current, I = %.0f A",I)
printf("\n (c)p.d. across resistance, VR = %.0f V", VR)
printf("\n (d)p.d. across Inductor, VL = %.0f V",VL)
printf("\n (e)circuit phase angle is %.0f°",phid)