From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 608/CH17/EX17.03/17_03.sce | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 608/CH17/EX17.03/17_03.sce (limited to '608/CH17/EX17.03/17_03.sce') 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 -- cgit