summaryrefslogtreecommitdiff
path: root/3793/CH9/EX9.3/exp_9_3.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3793/CH9/EX9.3/exp_9_3.sce
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '3793/CH9/EX9.3/exp_9_3.sce')
-rw-r--r--3793/CH9/EX9.3/exp_9_3.sce46
1 files changed, 46 insertions, 0 deletions
diff --git a/3793/CH9/EX9.3/exp_9_3.sce b/3793/CH9/EX9.3/exp_9_3.sce
new file mode 100644
index 000000000..e1157047f
--- /dev/null
+++ b/3793/CH9/EX9.3/exp_9_3.sce
@@ -0,0 +1,46 @@
+clear;
+clc;
+function fault3faze (Zbus,nfbuses,loc,elemz,col,locs,Zf);
+ for n=1:nfbuses
+ p=input('number of bus to be faulted');
+ Vf=input('fault bus voltage');
+ If=Vf/(Zbus(p,p)+Zf);
+ mprintf("Bus no. Fault current\n");
+ mprintf("%2i\",p);
+ mprintf(" %15.4f\",real(If));
+ mprintf(" %15.4f\n",imag(If));
+ for k=1:3
+ V(k)=Vf-Zbus(k,p)*If;
+ mprintf("Bus no. Bus Voltage\n");
+ mprintf("%2i\",k);
+ mprintf(" %15.4f\",real(V(k)));
+ mprintf(" %15.4f\n",imag(V(k)));
+ end
+ kk=1;
+ for k=1:locs-1
+ add=loc(k+1)-loc(k);
+ for m=1:add
+ j=col(kk);
+ I(k,j)=(V(k)-V(j))/elemz(kk);
+ kk=kk+1;
+ mprintf("Bus no. Bus No. Current\n");
+ mprintf("%2i\",k);
+ mprintf("......%10i\",j);
+ mprintf(" %15.4f\",real(I(k,j)));
+ mprintf(" %15.4f\n",imag(I(k,j)));
+ end
+ end
+
+
+
+ end
+endfunction
+nfbuses=2;
+loc=[1 3 4];
+elemz=[.2 .3 .25]*%i;
+col=[2 3 3];
+locs=3;
+Zf=%i*.2;
+Zbus=[.0776 .0448 .0597;.0448 .1104 .0806;.0597 .0806 .2075]*%i;
+
+fault3faze (Zbus,nfbuses,loc,elemz,col,locs,Zf);