summaryrefslogtreecommitdiff
path: root/608/CH17/EX17.03/17_03.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /608/CH17/EX17.03/17_03.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '608/CH17/EX17.03/17_03.sce')
-rwxr-xr-x608/CH17/EX17.03/17_03.sce23
1 files changed, 23 insertions, 0 deletions
diff --git a/608/CH17/EX17.03/17_03.sce b/608/CH17/EX17.03/17_03.sce
new file mode 100755
index 000000000..ba030cf86
--- /dev/null
+++ b/608/CH17/EX17.03/17_03.sce
@@ -0,0 +1,23 @@
+//Problem 17.03: A 20 μF capacitor is connected in series with a 50 kohm resistor and the circuit is connected to a 20 V, d.c. supply. Determine (a) the initial value of the current flowing, (b) the time constant of the circuit, (c) the value of the current one second after connection, (d) the value of the capacitor voltage two seconds after connection, and (e) the time after connection when the resistor voltage is 15 V
+
+//initializing the variables:
+C = 20E-6; // in Farads
+R = 50000; // in ohms
+V = 20; // in Volts
+t1 = 1; // in secs
+t2 = 2; // in secs
+VRt = 15; // in Volts
+
+//calculation:
+tou = R*C
+I = V/R
+Vct1 = V*(1-%e^(-1*t2/tou))
+t3 = -1*tou*log(VRt/V)
+it1 = I*%e^(-1*t1/tou)
+
+printf("\ = \n\n Result \n\n")
+printf("\n (a)initial value of the current flowing is %.4f A",I)
+printf("\n (b)time constant of the circuit %.0f Sec",tou)
+printf("\n (c)the value of the current one second after connection, %.3f mA",(it1/1E-3))
+printf("\n (d)the value of the capacitor voltage two seconds after connection %.1f V",Vct1)
+printf("\n (e)the time after connection when the resistor voltage is 15 V is %.3f sec",t3) \ No newline at end of file