summaryrefslogtreecommitdiff
path: root/1964/CH5/EX5.18/ex5_18.sce
blob: b8699fc04619eb656a81de063bd10578496d2962 (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-5, Example 5.18, Page 176
//=============================================================================
clc
clear
//INPUT DATA
L=5;//inductance in Henry
f=50;//frequency in hz
V=230;//supply voltage in volts
R=2;//resitance in ohms
V1=250;//voltage across coil in V
//CALCULATIONS
Xl=(2*%pi*f*L);//inductive reactance in ohms
Z1=sqrt((R)^2+(Xl)^2);//impedance of coil in ohms
I=V1/Z1;//current in A
Z=V/I;//total impedance in ohms
//Z=sqrt((R)^2+(Xl-Xc)^2) and solving for Xc
Xc=poly(0,"Xc");
p=(Xc^2)-3141.58*(Xc)+378004
roots2 = roots (p);
r2 = roots2 (2);
//Xc cannot be greater than Z
C=1/(2*%pi*f*r2);//capacitance in F
mprintf("Thus value of C that must be present suct that voltage across coil is 250 volts is %g F respectively,",C);
//=================================END OF PROGRAM======================================================================================================

;