summaryrefslogtreecommitdiff
path: root/608/CH15/EX15.13/15_13.sce
diff options
context:
space:
mode:
Diffstat (limited to '608/CH15/EX15.13/15_13.sce')
-rwxr-xr-x608/CH15/EX15.13/15_13.sce18
1 files changed, 18 insertions, 0 deletions
diff --git a/608/CH15/EX15.13/15_13.sce b/608/CH15/EX15.13/15_13.sce
new file mode 100755
index 000000000..bd9d5d6bb
--- /dev/null
+++ b/608/CH15/EX15.13/15_13.sce
@@ -0,0 +1,18 @@
+//Problem 15.13: A resistor of 25 ohms is connected in series with a capacitor of 45 μF. Calculate (a) the impedance, and (b) the current taken from a 240 V, 50 Hz supply. Find also the phase angle between the supply voltage and the current.
+
+//initializing the variables:
+R = 25; // in ohms
+C = 45E-6; // in Farads
+f = 50; // in Hz
+V = 240; // in volts
+
+//calculation:
+Xc = 1/(2*%pi*f*C)
+Z = (R^2 + Xc^2)^0.5
+I = V/Z
+phid = atan(Xc/R)*180/%pi
+
+printf("\n\n Result \n\n")
+printf("\n (a)Impedance, Z = %.2f ohms",Z)
+printf("\n (b)current, I = %.2f A",I)
+printf("\n (c)phase angle between the supply voltage and current is %.2f°",phid) \ No newline at end of file