summaryrefslogtreecommitdiff
path: root/608/CH6/EX6.12/6_12.sce
blob: 22141375186e1aa7fca7376bd65f4c3f0ecc14a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//Problem 6.12: Capacitances of 1 μF, 3 μF, 5 μF and 6 μF are connected in parallel to a direct voltage supply of 100 V. Determine (a) the equivalent circuit capacitance, (b) the total charge and (c) the charge on each capacitor.

//initializing the variables:
C1 = 1E-6; // in Farads
C2 = 3E-6; // in Farads
C3 = 5E-6; // in Farads
C4 = 6E-6; // in Farads
Vt = 100; // in Volts

//calculation:
// in Parallel
Cp = C1 + C2 + C3 + C4
Qt = Vt*Cp
Q1 = C1*Vt
Q2 = C2*Vt
Q3 = C3*Vt
Q4 = C4*Vt

printf("\n\nResult\n\n")
printf("\n (a)Equivalent Capacitance in Parallel %.2E F",Cp)
printf("\n (b)Total charge %.2E C",Qt)
printf("\n (c)Charge on each capacitors (C1, C2, C3, C4) %.2E C, %.2E C, %.2E C, %.2E C respectively",Q1,Q2,Q3,Q4)