summaryrefslogtreecommitdiff
path: root/608/CH45/EX45.02/45_02.sce
diff options
context:
space:
mode:
Diffstat (limited to '608/CH45/EX45.02/45_02.sce')
-rwxr-xr-x608/CH45/EX45.02/45_02.sce14
1 files changed, 14 insertions, 0 deletions
diff --git a/608/CH45/EX45.02/45_02.sce b/608/CH45/EX45.02/45_02.sce
new file mode 100755
index 000000000..abe0fa15b
--- /dev/null
+++ b/608/CH45/EX45.02/45_02.sce
@@ -0,0 +1,14 @@
+//Problem 45.02: A d.c. voltage supply of 200 V is connected across a 5 μF capacitor as shown in Figure 45.5. When the supply is suddenly cut by opening switch S, the capacitor is left isolated except for a parallel resistor of 2 Mohm. Calculate the p.d. across the capacitor after 20 s.
+
+//initializing the variables:
+C = 5E-6; // in Farad
+R = 2000000; // in Ohm
+V = 200; // in VOlts
+tc = 20; // in sec
+
+//calculation:
+//capacitor voltage, Vc
+Vc = V*(%e^(-1*tc/(R*C)))
+
+printf("\n\n Result \n\n")
+printf("\n value of capacitor voltage at t = 20s is %.2f V",Vc)