summaryrefslogtreecommitdiff
path: root/3809/CH7/EX7.2/EX7_2.sce
blob: 10601776e5dca4b9bc97c1b7a5ea983d302d0169 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//Chapter 7, Example 7.2

clc
//Initialisation
s=2000                                  //apparent power
p=0.75                              //power factor
v=240                                //voltage
//Calculation

ap=s*p                                  //active power
phi=sqrt(1-(p**2))                      //phase angle in radians
q=s*phi                            //reactive power in var
i=s/v                                //current in ampere
 

//Results
printf("(a) Apparent Power, S = %d VA\n",s)
printf("(b) Active Power, P = %d W\n",ap)
printf("(c) Reactive Power, Q = %d var\n",q)
printf("(d) Current, I = %.2f A\n",i)