From 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:27:19 +0530 Subject: initial commit / add all books --- 3793/CH9/EX9.3/exp_9_3.sce | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 3793/CH9/EX9.3/exp_9_3.sce (limited to '3793/CH9/EX9.3/exp_9_3.sce') 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); -- cgit