summaryrefslogtreecommitdiff
path: root/1445/CH1/EX1.58/ch1_ex_58.sce
diff options
context:
space:
mode:
Diffstat (limited to '1445/CH1/EX1.58/ch1_ex_58.sce')
-rw-r--r--1445/CH1/EX1.58/ch1_ex_58.sce35
1 files changed, 35 insertions, 0 deletions
diff --git a/1445/CH1/EX1.58/ch1_ex_58.sce b/1445/CH1/EX1.58/ch1_ex_58.sce
new file mode 100644
index 000000000..f077490a3
--- /dev/null
+++ b/1445/CH1/EX1.58/ch1_ex_58.sce
@@ -0,0 +1,35 @@
+//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
+//Example 58
+
+disp("CHAPTER 1");
+disp("EXAMPLE 58");
+
+//VARIABLE INITIALIZATION
+v1=20; //LHS voltage source in Volts
+v2=5; //RHS voltage source in Volts
+r1=100; //LHS resistance in Ohms
+r2=2; //in Ohms
+r3=1; //in Ohms
+r4=4; //in Ohms
+r5=1; //RHS resistance in Ohms
+
+//SOLUTION
+
+//applying Thevenin's Theorem
+//Thevnin's equivalent resistance, r_th is same as r_AB
+r_th=((r3+r5)*r2)/((r3+r5)+r2);
+v_th=(v1-v2)/2; //from the equation
+I1=v_th/(r4+r_th);
+v1=I1*r4;
+disp(sprintf("By Thevenin Theorem, the value of V is %d V",v1));
+
+//applying Norton's Theorem
+//Norton's equivalent resistance, r_n is same as r_AB
+r_n=((r3+r5)*r2)/((r3+r5)+r2);
+I_n=(v1-v2)/r2; //since v_A=0
+I2=r_n*(I_n/(r4+r_n));
+v2=I2*r4;
+disp(sprintf("By Norton Theorem, the value of V is %d V",v2));
+
+//END
+