summaryrefslogtreecommitdiff
path: root/147/CH2/EX2.14
diff options
context:
space:
mode:
Diffstat (limited to '147/CH2/EX2.14')
-rw-r--r--147/CH2/EX2.14/Example2_14.sce26
-rw-r--r--147/CH2/EX2.14/Result2_14.txt3
2 files changed, 29 insertions, 0 deletions
diff --git a/147/CH2/EX2.14/Example2_14.sce b/147/CH2/EX2.14/Example2_14.sce
new file mode 100644
index 000000000..fa565240b
--- /dev/null
+++ b/147/CH2/EX2.14/Example2_14.sce
@@ -0,0 +1,26 @@
+//Resistance R, Current source , Voltage source V1
+close();
+clear;
+clc;
+R1 = 30;//ohm
+R2 = 20;//ohm
+R3 = 10;//ohm
+R4 = 5;//ohm
+I = 10;//A
+V = 100;//V
+//From previous question
+I1 = 0.37;//A
+I2 = -1.85;//A
+//Current through R4 'I3'
+I3 = I - I1;
+V1 = I3*R4;
+V2 = V+I2*R1;
+//Power from Current source 'P1'
+P1 = I*V1;
+//Power from voltage source 'P2'
+P2 = V*(-I2);
+//Total Power 'P'
+P = P1+P2;
+//Power dissipated in resistances 'Pr'
+Pr = V1^2/R4+I1^2*R3 + V2^2/R2 + I2^2*R1;
+mprintf('Sum of power from the sources P = %0.2f W\nPower dissipated by resistances P = %0.2f W \nHence Sum of the powers from the two sources is the total power dissipated in all the resistances.',P,Pr); \ No newline at end of file
diff --git a/147/CH2/EX2.14/Result2_14.txt b/147/CH2/EX2.14/Result2_14.txt
new file mode 100644
index 000000000..1e21b917b
--- /dev/null
+++ b/147/CH2/EX2.14/Result2_14.txt
@@ -0,0 +1,3 @@
+Sum of power from the sources P = 666.50 W
+Power dissipated by resistances P = 666.74 W
+Hence Sum of the powers from the two sources is the total power dissipated in all the resistances. \ No newline at end of file