summaryrefslogtreecommitdiff
path: root/1445/CH2/EX2.6/Ex2_6.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:38:01 +0530
committerprashantsinalkar2017-10-10 12:38:01 +0530
commitf35ea80659b6a49d1bb2ce1d7d002583f3f40947 (patch)
treeeb72842d800ac1233e9d890e020eac5fd41b0b1b /1445/CH2/EX2.6/Ex2_6.sce
parent7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (diff)
downloadScilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.gz
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.bz2
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.zip
updated the code
Diffstat (limited to '1445/CH2/EX2.6/Ex2_6.sce')
-rw-r--r--1445/CH2/EX2.6/Ex2_6.sce14
1 files changed, 7 insertions, 7 deletions
diff --git a/1445/CH2/EX2.6/Ex2_6.sce b/1445/CH2/EX2.6/Ex2_6.sce
index 378b29151..61aedd2de 100644
--- a/1445/CH2/EX2.6/Ex2_6.sce
+++ b/1445/CH2/EX2.6/Ex2_6.sce
@@ -1,6 +1,7 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 6
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 6");
@@ -12,18 +13,17 @@ v=230; //in Volts
pf2=0.9; //power factor(lagging)
//SOLUTION
-//V.I1.cos(Φ1) = P
phi1=acos(pf1);
res1=tan(phi1); //result1 = tan(Φ1)
phi2=acos(pf2);
res2=tan(phi2); //result2 = tan(Φ2)
Ic=I1*pf1*(res1-res2);
-w=2*%pi*f; //w=2.pi.f
+w=2*%pi*f;
c=Ic/(v*w);
-disp(sprintf("The value of capacitance is %5.2f μF",c*(10^6)));//text book answer is 82.53 mF
-Qc=v*Ic; // reactive power in kVAr
-disp(sprintf("The reactive power is %6.4f kVAR",Qc/(10^3)));//text book answer is 1.3716
-I2=I1*(pf1/pf2); //I1.cos(Φ1) = I2.cos(Φ2)
-disp(sprintf("The new supply current is %5.2f A",I2));
+disp(sprintf("The value of capacitance is %f μF",c*(10^6)));
+Qc=v*Ic;
+disp(sprintf("The reactive power is %f kVAR",Qc/(10^3)));
+I2=I1*(pf1/pf2);
+disp(sprintf("The new supply current is %f A",I2));
//END