# Chapter 9: Cells and Batteries¶

### Example 9.1: page 166:¶

In :
from __future__ import division
import math

#given  data  :
n=20;#  dry  cells  of  emf
E=1.5;#  emf  in  volts
R=5;  #  external  resistance  in  ohm
r=0.5;#  internal  resistance  in  ohm

#calculations:
I=(n*E)/(R+(n*r));

#Results
print  "current  flowing,I(A)  =  ",I

current  flowing,I(A)  =   2.0


### Example 9.2: Page 167:¶

In :
from __future__ import division
import math

#given  data  :
n=10;#  dry  cells  of  emf
E=1.5;#  emf  in  volts
R=4.9;#  resistance  in  ohm
r=1;  #  internal  resistance  in  ohm

#calculations:
I=(n*E)/((n*R)+(r));

#Results
print  "current  flowing,I(A)  =  ",I

current  flowing,I(A)  =   0.3


### Example 9.3: page 167:¶

In :
from __future__ import division
import math

#given  data  :
m=3;
n=10;#  dry  cells  of  emf
E=1.5;#  emf  in  volts
R=2.5;#  resistance  in  ohm
r=0.5;#  internal  resistance  in  ohm

#colculations:
I=(m*n*E)/((m*R)+(n*r));

#Results
print  "current  flowing,I(A)  =  ",I

current  flowing,I(A)  =   3.6


### Example 9.4: page 172:¶

In :
from __future__ import division
import math

#given data:
n=10  #  no.  of  cells
Rl=4  #  LOAD  RESISTANCE
V=12  #  in  volts
Va=18#  IN  VOLTS

#calculations:
r=((Va-V)*Rl)/(n*V)#  internal  resistance  in  ohms
Il=V/Rl#  IN  AMPERES

#Results
print  "(a)internal  resistance  in  ohms  is",r
print  "(b)load  current  in  amperes  is", Il

(a)internal  resistance  in  ohms  is 0.2
(b)load  current  in  amperes  is 3.0


### Example 9.5: page 173:¶

In :
from __future__ import division
import math

#given data:
n=6    #  no.  of  cells
Rl=3  #  LOAD  RESISTANCE
I=2.5#  IN  AMPERES
r1=9  #  in  ohms
I2=1.25#  om  amperes

#calculations:
r=((r1*I2)-(Rl*I))/(n*(I-I2))#  internal  resistance  in  ohms
E=((I*(Rl+n*r))/n)#  emf  of  each  cell  in  volts

#Results
print  "emf  of  each  cell  in  volts  is", E
print  "internal  resistance  of  each  cell  in  ohms is",r

emf  of  each  cell  in  volts  is 2.5
internal  resistance  of  each  cell  in  ohms is 0.5


### Example 9.6: page 173:¶

In :
from __future__ import division
import math

#given data:
I=20  #  in  amperes
t=15  #  in  hours

#calculations
Ah=I*t#  ampere  hour  capacity  of  the  battery

#Results
print  "ampere  hour  capacity  of  the  battery  in  A-h is",Ah

ampere  hour  capacity  of  the  battery  in  A-h is 300


### Example 9.7: page 174:¶

In :
from __future__ import division
import math

#given data:
I=30  #  in  amperes
t=6    #  in  hours
Vt=2  #  terminal  voltage
Ic=40#  in  amperes
tc=5  #  in  hours
Vc=2.5#  in  volts

#calculations:
Aho=I*t#  ampere  hour  output  of  the  battery
Ahi=Ic*tc#  ampere  hour  input  of  the  battery
nAh=(Aho/Ahi)*100#  ampere  hour  efficiency
Who=I*t*Vt#  watt  hour  output  of  the  battery
Whi=Ic*tc*Vc#  watt  hour  input  of  the  battery
nWh=(Who/Whi)*100#  ampere  hour  efficiency

#Results
print  "(a)ampere  hour  efficiency  of  the  battery  in  percentage  is",nAh
print  "(b)watt  hour  efficiency  of  the  battery  in  percentage  is",nWh

(a)ampere  hour  efficiency  of  the  battery  in  percentage  is 90.0
(b)watt  hour  efficiency  of  the  battery  in  percentage  is 72.0


### Example 9.8: page 176:¶

In :
from __future__ import division
import math

#given data:
n=50  #  no.  of  cells
Vc=250#  in  volts
Vd=1.8#in  volts
Vcs=2.2#in  volts
r=0.01#internal  resistance  of  each  cell  in  ohms
rl=0.1#lead  resistance  in  ohms
Re=19.4#external  resitance  in  ohms

#calculations:
Ib=n*r#  internal  resistnce  of  battery
Tb=rl+Ib#total  resistance  of  battery
Eb=Vd*n#total  rmf  of  battery
I=(Vc-Eb)/(Re+Tb)#  initial  charging  current  in  amperes
Ebf=Vcs*n#emf  of  the  battery  at  the  end  of  charging
If=(Vc-Ebf)/(Re+Tb)#  initial  charging  current  in  amperes
#Results
print  "(a)initial  charging  current  in  amperes  is",I
print  "(b)final  charging  current  in  amperes  is",If

(a)initial  charging  current  in  amperes  is 8.0
(b)final  charging  current  in  amperes  is 7.0


### Example 9.9: page 182:¶

In :
from __future__ import division
import math
import numpy as np

#given data:
V=230#  in  volts
emf1=122#in  volts
r=0.4#internal  resistance  in  ohms
emf2=130#in  volts
r1=0.5#in  ohms
R = 5; #in ohm

# calculations:
#apllying  kirchoff's  low
#  x  ampere  is  the  total  current  taken  by  battery
#  x1  ampere  is  the  total  current  taken  by  battery  A
#  x-x1  ampere  is  the  total  current  taken  by  battery  B
#  5*x+0.4*y=180  is  the  equation  in  mesh  ABEF
#  5.5*x+0.5*y=100  equation  in  the  mesh  CDEF
#  equation  1  is  25*x+2*y=540  and  equation  2  is  22*x-2*y=400
A=np.array([[25, 2],[22,-2]])#  EQUATIONS
B=np.array([540,400])#  VALUES
X=np.linalg.solve(A, B)#  UNKNOW  VALUES
I=X#TOTAL  CURRENT  IN  AMPERES
x1=X#current  taken  by  battery  A
x2=I-x1#
p=(I**2)*R#  in  watt

#Results
print  "(a1)current  in  battery  A  in  amperes  (discharging) is",x1
print  "(a2)current  in  bettery  B  in  amperes is",round(x2,1)
print  "(b)total  current  in  battery  A  and  B  in  amperes  (charging)",I
print  "(c)power  dissipated  in  watts  is",p

(a1)current  in  battery  A  in  amperes  (discharging) is 20.0
(a2)current  in  bettery  B  in  amperes is 0.0
(b)total  current  in  battery  A  and  B  in  amperes  (charging) 20.0
(c)power  dissipated  in  watts  is 2000.0


### Example 9.10: page 183:¶

In :
from __future__ import division
import math
import numpy as np

#given data:
V=34  #  in  volts
emf1=2#in  volts
r1=6  #in  ohms
r2=1  #in  ohms
r3=2  #in  ohms
r4=4  #  in  ohms

# calculations:
#apllying  kirchoff's  low
#  x  ampere  is  the  current  in  branch  AB
#  x1  ampere  is  the  current  in  branch  AC
#x2  ampere  is  the  current  in  the  Branch  BD
#  x-x2  ampere  is  the  current  in  the  branch  BC
#  x1+x2  ampere  is  the  current  in  the  branch  DC
#  x-6*x1+8*x2=2  in  mesh  ABD
#  2*x-4*x1-14*x2=-2  in  mesh  BCD
#  10*x1+4*x2=34;//in  mesh  ADCEF
A=np.array([[1,-6,8],[2,-4,-14],[0,10,4]])#  EQUATIONS
B=np.array([2,-2,34])#  VALUES
X=np.linalg.solve(A, B)#  UNKNOW  VALUES
x=X#TOTAL  CURRENT  IN  AMPERES
x1=X#current  taken  by  battery  A
x2=X#
b1=x-x2#  in  amperes
b2=x1+x2#in  amperes
R=((r1*x1+r4*(x2+x1))/(x+x1))#total  resistance  in  ohms

#Results
print  "current  in  1  ohms  resistance  from  A  to  B  in  amperes is",x
print  "current  in  6  ohms  resistance  from  A  to  D  in  amperes is",x1
print  "current  in  8  ohms  resistance  from  B  to  D  in  amperes is",x2
print  "current  in  2  ohm  resistance  from  B  to  C  in  amperes  is",b1
print  "current  in  4  ohm  resistance  from  D  to  C  in  amperes  is",b2
print  "total  reistance  in  ohms  is",round(R,2)

current  in  1  ohms  resistance  from  A  to  B  in  amperes is 12.0
current  in  6  ohms  resistance  from  A  to  D  in  amperes is 3.0
current  in  8  ohms  resistance  from  B  to  D  in  amperes is 1.0
current  in  2  ohm  resistance  from  B  to  C  in  amperes  is 11.0
current  in  4  ohm  resistance  from  D  to  C  in  amperes  is 4.0
total  reistance  in  ohms  is 2.27