summaryrefslogtreecommitdiff
path: root/24/CH31/EX31.7/Example31_7.sce
blob: 8daf2e918b7d44c3b5252b095fecb2163c8c2236 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//Given that
L = 53*10^-3  //in H
R = 0.35  //in Ohm
V = 12  //in Volts

//Sample Problem 31-7a
printf("**Sample Problem 31-7a**\n")
i = V/R  //in steady state
E = 1/2*L*i^2
printf("The Energy stored in the inductor in steady state is %fJ\n", E)

//Sample Problem 31-7b
printf("\n**Sample Problem 31-7b**\n")
Et = E/2
//hence It = Io/sqrt(2)
f = log(1-1/sqrt(2))  //the number of times of time constant
printf("After t=%1.1fT, the energy stored in the inductor will be half of tis steady state value", f)