summaryrefslogtreecommitdiff
path: root/1445/CH2/EX2.11/ch2_ex_11.sce
blob: fc8e0b84c13908507930730f59bfdf0acc2f4f31 (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
25
26
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 11

disp("CHAPTER 2");
disp("EXAMPLE 11");

//VARIABLE INITIALIZATION
vdc=100;                      //DC voltage in Volts
vac=100;                      //AC voltage in Volts
f=50;                         //in Hertz
I1=10;                        //in Amperes
I2=5;                         //in Amperes

//SOLUTION
r=vdc/I1;
z=vac/I2;
xl=sqrt((z^2)-(r^2));
L=xl/(2*%pi*f);
pf=r/z;
disp(sprintf("The inductance of the coil is %f H",L));
disp(sprintf("The power factor of the coil is %f (lagging)",pf));

//END