# Chapter 12 Direct current circut¶

## Example 12.1 page no 192¶

In [9]:
#given
R=(6,6.0,12)                          #Resistances from circuit diagram 12.34 on page no.192 in ohms
V=(5,2)                             #Voltage in V from circuit diagram 12.20 on page no.192

#Calculations
Re=(R[2]*R[1])/(R[2]+R[1])
Re2=Re+R[1]
I=V[0]/Re2
Ve=I*Re
I1=Ve/R[2]
RE=(R[0]*R[1])/(R[0]+R[1])
RE2=RE+R[2]
I2=Ve/RE2
Itotal=I1-I2

#Output
print"The current is ",round(Itotal,2),"A"

The current is  0.03 A


## Example 12.2 page no 193¶

In [13]:
#given
R=(3,5,6,7)                                  #Resistances from circuit diagram 12.36(a) on page no. 193 in ohms
V=12                                         #Voltage in V from circuit diagram 12.36(a) on page no. 193

#Calculations
Vth=(V*R[2])/(R[2]+R[3]+R[1])
Rth=R[0]+(V*R[2])/(V+R[2])

#Output
print"Thevenin equivalent resistance is ",Rth,"ohms"
print"Thevenin equivalent voltage is ",Vth,"V"

Thevenin equivalent resistance is  7 ohms
Thevenin equivalent voltage is  4 V


## Example 12.3 page no 193¶

In [2]:
#given
R=(2,3,4.0)                                 #Resistances from circuit diagram 12.37(a) on page no.194 in ohms
V=5                                       #Voltage in V from circuit diagram 12.37(a) on page no.194

#Calculations
RN=(V*R[2])/(V+R[2])
IN=V/(R[0]+R[1])

#Output
print"Nortons equivalent resistance is ",round(RN,1),"ohms"
print"Nortons equivalent current is ",IN,"A"

Nortons equivalent resistance is  2.2 ohms
Nortons equivalent current is  1 A


## Example 12.4 page no 194¶

In [18]:
#given
C=10*10**-6                                          #Capicitance in F
R=10.0*10.0**3                                       #Resistance in ohms
e=6                                                  #Emf of the battery in V

#Calculations
t=C*R
Qm=(C*e)/10.0**-6
Im=(e/R)*1000

#Output
print"Time constant of the circuit is ",t,"s"
print"Maximum charge on the capacitor is ",Qm,"micro C"
print"Maximum current in the circuit is ",Im,"mA"
print"Charge at time t is Q(t) = ",Qm,"micro C"
print"Currrent at time t is I(t) = ",Im,"mA"

Time constant of the circuit is  0.1 s
Maximum charge on the capacitor is  60.0 micro C
Maximum current in the circuit is  0.6 mA
Charge at time t is Q(t) =  60.0 micro C
Currrent at time t is I(t) =  0.6 mA


## Example 12.5 page no 194¶

In [20]:
#given
L=50                                    #Inductance in mH
R=5.0                                   #Resistance in ohms
V=6                                     #Volatage of the battery in V
t=5                                     #Time in ms

#Calculations
import math
t1=(L/R)
I=(V/R)*(1-math.exp(-t/t1))

#Output
print"The time constant of the circuit is ",t1,"ms"
print"The current in the circuit is ",round(I,2),"A"

The time constant of the circuit is  10.0 ms
The current in the circuit is  0.47 A


## Example 12.6 page no 194¶

In [23]:
#given
L=6                                         #Inductance in mH
C=12                                        #Capacitance in pF
V=6                                         #Voltage of the battery in V

#Calculations
import math
f=(1/(2.0*3.14*math.sqrt(L*10**-3*C*10**-12)))/10**5
Qm=(C*10**-12*V)/10.0**-12
Im=(2*3.14*f*10**5*Qm*10**-12)/10.0**-6

#Output
print"Frequency of oscillation is ",round(f,2),"*10^5 Hz"
print"The maximum value of charge on capacitor is ",Qm,"*10**-12 C"
print"The current in the circuit is ",round(Im,0),"micro A"

Frequency of oscillation is  5.93 *10^5 Hz
The maximum value of charge on capacitor is  72.0 *10**-12 C
The current in the circuit is  268.0 micro A


## Example 12.e.1 Page no 175¶

In [24]:
#given
V=10                                          #voltage in V from fig.12.7 on page no.175
R=10.0                                        #Resistance in ohms from fig.12.7 on page no.175

#Calculations
I=(V/R)

#Output
print"Current in the circuit shown in fig.12.7 is ",I,"A"

Current in the circuit shown in fig.12.7 is  1.0 A


## Example 12.e.2 Page no 175¶

In [23]:
#given
R=(6,6,3.0)                                #Resistances in the circuit from circuit diagram 12.9 on page no. 175 in ohms
V=(24,16)                                #Voltages in the circuit from circuit diagram 12.9 on page no. 175 in V

#Calculations
Re=(R[1]*R[2])/(R[1]+R[2])
Re1=Re+R[0]
I=V[0]/Re1
Ve=I*Re
Ie=Ve/R[2]
RE=(R[0]*R[1])/(R[0]+R[1])
RE1=RE+R[2]
I1=V[1]/RE1
VE=R[2]*I1
I2=VE/R[0]
Itotal=Ie+I2
#Output
print"The current shown in the circiut is ",round(Itotal,1),"A"

The current shown in the circiut is  3.3 A


## Example 12.e.3 Page no 177¶

In [24]:
#given
R=(4,12,2.0,12)                               #Resistances from circuit diagram 12.12 on page no. 177 in ohms
V=12                                        #Voltage in V from circuit diagram 12.12 on page no. 177

#Calculations
Rth=((R[0]+R[2])*R[1])/(R[0]+R[2]+R[1])
Vth=(V*R[1])/(R[0]+R[2]+R[1])
I=(Vth/(Rth+R[3]))

#Output
print"The current through the resistor is ",I,"A"

The current through the resistor is  0.5 A


## Example 12.e.4 Page no 178¶

In [26]:
#given
R=(2,3,6)                                   #Resistances from circuit diagram 12.15 on page no. 178 in ohms
I=2                                         #Current in A from circuit diagram 12.15 on page no. 178

#Calculations
Rth=(R[1]+R[2])
Vth=(R[2]*I)

#Output
print"Thevenin equivalent resistance is ",Rth,"ohms"
print"Thevenin equivalent voltage is ",Vth,"V"

Thevenin equivalent resistance is  9 ohms
Thevenin equivalent voltage is  12 V


## Example 12.e.5 Page no 178¶

In [4]:
#given
R=(12,8.0,3.0,6)                          #Resistances from circuit diagram 12.17 on page no.179 in ohms
V=12                                      #Voltage in V from circuit diagram 12.17 on page no.179

#Calculations
Rth=((R[2]*R[0])/(R[2]+R[0]))+((R[1]*R[3])/(R[1]+R[3]))
Vth=V*((R[1]*R[3])/(R[1]+R[3]))/(R[0]+R[2])

#Output
print"Thevenin equivalent resistance is ",round(Rth,2),"ohms"
print"Thevenin equivalent voltage is ",round(Vth,2),"V"

Thevenin equivalent resistance is  5.83 ohms
Thevenin equivalent voltage is  2.74 V


## Example 12.e.6 Page no 180¶

In [32]:
#given
R=(4,12,2,12)                                     #Resistances from circuit diagram 12.20 on page no.180 in ohms
V=12                                              #Voltage in V from circuit diagram 12.20 on page no.180

#Calculations
RN=((R[0]+R[2])*R[1])/(R[0]+R[2]+R[1])
IN=V/(RN+R[2])

#Output
print"Nortons equivalent resistance is ",RN,"ohms"
print"Nortons equivalent current is ",IN,"A"

Nortons equivalent resistance is  4 ohms
Nortons equivalent current is  2 A


## Example 12.e.7 Page no 181¶

In [35]:
#given
R=(4.0,5,6)                              #Resistances from circuit diagram 12.22 on page no.181 in ohms
I=2                                    #Current in A from circuit diagram 12.22 on page no.181

#Calculations
RN=(R[0]+R[1]+R[2])
IN=(R[0]*I)/RN

#Output
print"Nortons equivalent resistance is ",RN,"ohms"
print"Nortons equivalent current is ",round(IN,2),"A"

Nortons equivalent resistance is  15.0 ohms
Nortons equivalent current is  0.53 A