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 --- 1529/CH18/EX18.12/18_12.sce | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 1529/CH18/EX18.12/18_12.sce (limited to '1529/CH18/EX18.12') diff --git a/1529/CH18/EX18.12/18_12.sce b/1529/CH18/EX18.12/18_12.sce new file mode 100755 index 000000000..5bb5e9e22 --- /dev/null +++ b/1529/CH18/EX18.12/18_12.sce @@ -0,0 +1,20 @@ +//Chapter 18, Problem 12 +clc; +//initializing the variables: +L = 6; //inductance in henry +r = 10; //resistance in ohms +V = 120; //supply voltage +taw = 0.3; //time constant +t1 = 1; // in secs + +//calculation: +R = (L/taw) - r +Rt = R + r +I = V/Rt +i2 = 0.1*I +i1 = I*(%e^(-1*t1/taw)) +t2 = -1*taw*log((i2/I)) + +printf("\n (a)Resistance of the coil = %.0f ohm\n\n",R) +printf("\n (b)Current flowing in the circuit one second after the shorting link has been placed = %.3f A\n\n",i1) +printf("\n (c)The time for the current to decay to 0.1 times of initial value = %.3f sec\n\n",t2) -- cgit