In [1]:

```
'''A lamp giving out 1200 lm in all directions is suspended 8 m above the working plane. Calculate the illumination at a point on
the working plane 6 m away from the foot of the lamp.'''
import math as m
I = 1200/(4*3.14) #Cd (luminous intensity of lamp)
h = 8.0 #m (height)
b = 6.0 #m (breadth)
length = m.sqrt(h**2 + b**2) #m
cosQ = h/length
E = I*cosQ/length**2 #lm/m^2
print "Illumination at point =",round(E,2),"lm/m^2 ."
```

In [5]:

```
'''A small light source with intensity uniform in all directions is mounted at a height of 10 metres above a horizontal surface.
Two points A and B both lie on the surface with point A directly beneath the source. How far is B from A if the illumination at B
is only 1/10 as great as at A ?'''
from sympy import Eq,solve,Symbol
#let the intensity of lamp be I and distance between A and B be x metres
x = Symbol('x')
l = 10.0 #m (vertical distance)
#Illumination at point A
Ea = I/l**2 #lux
#Illumination at point B
Eb = I/(l**2)*(l/(l**2 + x**2)**0.5)**3
I = 10.0 #lm (assumed value as the equation does not depend on I)
#As Eb = 1/10*Ea
eq = Eq(Eb,Ea/10.0)
x = solve(eq)
x1 = x[1]
print "Distance between A and B is =",round(x1,2),"m."
```

In [2]:

```
'''A corridor is lighted by 4 lamps spaced 10 m apart and suspended at a height of 5 m above the centre line of the floor.
If each lamp gives 200 C.P. in all directions below the horizontal,find the illumination at the point on the floor mid-way
between the second and third lamps.'''
import math as m
I = 200.0 #C.P (luminous intensity)
h = 5.0 #m (height between lamps and ground)
l1 = 15.0 #m (horizantal distance 1)
l2 = 5.0 #m (horizantal distance 2)
d1 = m.sqrt(h**2 + l1**2) #m (Dist btwn L1 and mid-pt)
d2 = m.sqrt(h**2 + l2**2) #m (Dist btwn L2 and mid-pt)
#(i)Illumination due to L1
#L = (I/r^2)*cosQ
L1 = (I/d1**2)*(h/d1) #lm/m^2
#(ii)Illumination due to L2
L2 = (I/d2**2)*(h/d2) #lm/m^2
#Illumination at mid-pt due to 4-lamps
Lt = 2*(L1+L2) #lm/m^2
print "Illumination due to 4 lamps = ",round(Lt,2),"lm/m^2 ."
```

In [3]:

```
'''Two lamps A and B of 200 candela and 400 candela respectively are situated 100 m apart. The height of A above the ground
level is 10 m and that of B is 20 m. If a photometer is placed at the centre of the line joining the two lamp posts,
calculate its reading.'''
import math as m
I1 = 200.0 #Cd (lamp 1 intensity)
I2 = 400.0 #Cd (lamp 2 intensity)
h1 = 10.0 #m (height between lamp 1 and ground)
h2 = 20.0 #m (height between lamp 2 and ground)
d1 = 50.0 #m (horizontal distance from 1)
d2 = 50.0 #m (horizontal distance from 2)
l1 = m.sqrt(h1**2 + d1**2)
l2 = m.sqrt(h2**2 + d2**2)
cosQ1 = h1/l1
cosQ2 = h2/l2
#Illumination at point C = Illumination due to 1 + Illumination due to 2
I_tot = (I1/l1**2)*cosQ1 + (I2/l2**2)*cosQ2 #lm/m^2
print "Reading of photometer =",round(I_tot,3),"lm/m^2."
```

In [1]:

```
'''The average luminous output of an 80-W fluorescent lamp 1.5 metre in length and 3.5 cm diameter is 3300 lumens. Calculate its
average brightness.If the auxiliary gear associated with the lamp consumes a load equivalent to 25 percent of the lamp,
calculate the cost of running a twin unit for 2500 hours at 30 paise per kWh.'''
length = 1.5 #m (lamp output length)
dia = 3.5e-2 #m (lamp output diameter)
l_flux = 3300.0 #lumens (luminous flux)
P = 80.0 #W (Power output)
#Surface area of lamp
sa = 3.14*dia*length #m^2
#Flux emmited per unit area
fluxA = l_flux/sa #lm/m^2
#Therefore,
B = fluxA/3.14 #cd/m^2
print "Average Brightness =",round(B,2),"cd/m^2."
#Total load of twin fitting
load = 2*(P +0.25*P) #W
time = 2500.0 #hr
enrgy = load*time/1000 #kWh (Energy consumed)
#Total cost
cost = enrgy*0.3 #Rs
print "cost of running = Rs",round(cost)
```

In [5]:

```
'''A small area 7.5 m in diameter is to be illuminated by a lamp suspended at a height of 4.5 m over the centre of the area.
The lamp having an efficiency of 20 lm/w is fitted with a reflector which directs the light output only over the surface to be
illuminated,giving uniform candle power over this angle. Utilisation coefficient = 0.40. Find out the wattage of the lamp.
Assume 800 lux of illumination level from the lamp.'''
dia = 7.5 #m (diameter)
h = 4.5 #m (height)
E = 800.0 #lux (illumination)
eff = 20.0 #lm/w (lamp efficiency)
A = 3.14*(dia**2)/4
#Luminous flux reaching the surface
flux = A*E #lm
#Total flux emmited is
f_out = flux/0.4 #lm
#Lamp in watts
watt = f_out/eff #W
print "lamp wattage =",round(watt,2),"W."
```

In [6]:

```
'''A lamp of 100 candela is placed 1 m below a plane mirror which reflects 90% of light falling on it. The lamp is hung 4 m above
ground.Find the illumination at a point on the ground 3 m away from the point vertically below the lamp.'''
import math as m
h1 = 4.0 #m (height of 1 from ground)
d1 = 3.0 #m (horizontal distance 1)
I1 = 100.0 #cd (intenstity)
l1 = m.sqrt(h1**2 + d1**2) #m
cosQ1 = h1/l1
#The lamp L1 will produce the image L2 1m behind the mirror.Therefore,
h2 = h1+1+1 #m (height of 2 from ground)
d2 = 3.0 #m (horizontal distance 2)
I2 = 0.9*I1 #cd (intensity)
l2 = m.sqrt(h2**2 + d2**2) #m
cosQ2 = h2/l2
#Illumination at the required point is
E = I1/l1**2*cosQ1 + I2/l2**2*cosQ2 #lux
print "Illumination = ",round(E),"lux."
```

In [2]:

```
'''A light source having an intensity of 500 candle in all directions is fitted with a reflector so that it directs 80% of its
light along a beam having a divergence of 15º. What is the total light flux emitted along the beam? What will be the average
illumination produced on a surface normal to the beam direction at a distance of 10 m? '''
import math as m
I = 500.0 #cd (intensity)
Q = 15.0 #degrees (Beam angle)
h = 10.0 #m (height)
#Total flux emmited is
flux = 0.8*(4*3.14*I) #lm
#radius of circle to be illuminated
r = h*m.tan(Q/2*(3.14/180)) #m
#Area of surface to be illuminated is
A = 3.14*(r*r) #m^2
#Avg illumination
avg = flux/A #lux
print "Average illumination =",round(avg,2),"lux ."
```

In [8]:

```
'''A lamp has a uniform candle power of 300 in all directions and is fitted with a reflector which directs 50% of the total
emitted light uniformly on to a flat circular disc of 20 m diameter placed 20 m vertically below the lamp. Calculate the
illumination (a) at the centre and (b)at the edge of the surface without the reflector. Repeat these two calculations with
the reflector provided.'''
import math as m
I = 300.0 #Cd (intensity)
h = 20.0 #m (height)
dia = 20.0 #m (diameter of luminous area)
#(i)Without reflector
Ec = I/h**2 #lm/m^2 (illumination at centre)
theta = m.atan((dia/2)/h)
l = m.sqrt(h**2 + (dia/2)**2) #m (distance between edge and source lamp)
Eb = I/l**2*m.cos(theta) #lm/m^2 (illuminaton at edge)
print "----Without reflector ----"
print "Illumination at centre =",round(Ec,2),"lm/m^2."
print "Illumination at edge =",round(Eb,2),"lm/m^2."
#(ii)With reflector
#Luminous output of lamp
lflux = I*4*3.14 #lm
#flux directed by reflector
reflux = 0.5*lflux #lm
#Area of disc
A = 3.14*(dia*dia)/4 #m^2
#Illumination at every point will be same and will be equal to
Et = reflux/A #lm/m^2
print "----With reflector ----"
print "Illumination at every point =",round(Et,2),"lm/m^2"
```

In [10]:

```
'''A light is placed 3 m above the ground and its candle power is 100 cos θ in any downward direction making an angle q with the
vertical. If P and Q are two points on the grond, P being vertically under the light and the distance PQ being 3 m, calculate.
(a) the illumination of the ground at P and also at Q.
(b) the total radiations sent down by the lamp.'''
import math as m
from scipy.integrate import quad
r1 = 3.0 #m
r2 = m.sqrt(3**2 + 3**2) #m
#(a)
#Candela Power along LP
CP1 = 100.0*m.cos(0) #cd
#Illumination at P is
Ep = CP1/(r1**2) #cd/m^2
#Candela Power along LQ
CP2 = 100.0*m.cos(45*3.14/180) #cd
#Illumination at Q is
Eq = CP2/(r2**2) #cd/m^2
print "Iluminaton at P = ",round(Ep,2),"cd/m^2"
print "Iluminaton at Q = ",round(Eq,2),"cd/m^2"
#After working out , total flux = integral (100*pi*sin2Q*dQ) 0->pi/2
def integrand(Q):
return 100*3.14*m.sin(2*Q)
ans, err = quad(integrand, 0,3.14/2)
print "Total radiations sent = ",round(ans),"lumens."
```

In [9]:

```
'''A drawing office containing a number of boards and having a total effective area of 70 m2 is lit by a number of 40 W
incandescent lamps giving 11 lm/W. An illumination of 80 lux is required on the drawing boards. Assuming that 60% of the
total light emitted by the lamps is available for illuminating the drawing boards, estimate the number of lamps required.'''
A = 70.0 #m^2 (area)
watt = 40.0 #W (each bulb wattage)
eff = 11.0 #lm/W (luminous efficacy)
E = 80.0 #lux (Illumination)
#Output per lamp is
oplamp = watt*eff #lm
#Flux actually used per lamp is
flux = 0.6*oplamp #lm
#Now, Total flux required is Illumination*Area
flux_tot = E*A #lm
#Therefore number of lamps required are
N = flux_tot/flux
print "Number of lamps =",round(N)
```

In [10]:

```
'''A perfectly diffusing surface has a luminous intensity of 10 candles at an angle of 60º to the normal. If the area of the
surface is 100 cm2, determine the brightness and total flux radiated.'''
import math as m
I = 10.0 #Cd (Intensity)
theta = 60.0 #degrees (angle to normal)
A = 100.0 #cm^2 (Area)
proA = A*m.cos(theta*3.14/180) #cm^2
B = I/proA*(10000) #cd/m^2 (Brightness)
B = B*3.14 #lm/m^2 (Brightness)
flux = B*A*10e-5 #lm (Total flux radiated)
print "Total flux radiated =",round(flux,2),"lm."
```

In [3]:

```
'''Calculate the brightness (or luminance) of snow under an illumination of (a) 44,000 lux and (b) 0.22 lux. Assume that snow
behaves like a perfect diffusor having a reflection factor of 85 per cent.'''
E1 = 44000.0 #lux (illumination 1)
E2 = 0.22 #lux (illumination 2)
rf = 0.85 # (reflection factor)
L1 = (E1*rf/3.14) #cd/m^2 (Brightness 1)
L2 = (E2*rf/3.14) #cd/m^2 (Brightness 2)
print "Brightness 1 = %e cd/m^2." %round(L1,2)
print "Brightness 2 =",round(L2,2),"cd/m^2."
```

In [4]:

```
'''A 21 cm diameter globe of dense opal glass encloses a lamp emitting 1000 lumens and has uniform brightness of 4e+3 lumen/m^2
when viewed in any direction. What would be the luminous intensity of the globe in any direction? Find what percentage of the
flux emitted by the lamp is absorbed by the globe.'''
d = 21.0 #cm (diameter)
flux = 1000.0 #lumens (luminous flux)
B = 4e+3 #lm/m^2 (uniform Brightness)
#Surface Area of the globe
sa = 3.14*(d*d)*10e-5 #m^2
#Flux emitted by globe is
fluxe = sa*B #lm
#luminous intensity of globe is
lint = fluxe/(4*3.14) #Cd
print "luminous intensity of globe is =",round(lint),"Cd."
#Flux absorbed by globe is
fluxab = flux - fluxe #lm
#% absorption is
absrp = fluxab/flux*100 #% absorption
print "percentage absorption = ",round(absrp,2),"%."
```

In [5]:

```
'''A 2.5 cm diameter disc source of luminance 1000 cd/cm2 is placed at the focus of a specular parabolic reflector
normal to the axis. The focal length of the reflector is 10 cm, diameter 40 cm and reflectance 0.8. Calculate the axial
intensity and beam-spread. Also show diagrammatically what will happen if the source were moved away from the reflector
along the axis in either direction.'''
import math as m
dia = 0.025 #m (diameter of disc)
d = 0.4 #m (diameter of relector)
L = 1000.0e+4 #Cd/m^2 (luminance)
#Surface area is
A = 3.142*d*d/4 #m^2 (Area)
#Luminous intensity is
I = 0.8*A*L #Cd
print "Luminous intensity is =",round(I,2),"Cd"
#Let us assume 'theta' as the beam-spread .Then
r = dia/2 #m (radius)
f = 0.1 #m (focal length)
theta = 2*m.degrees(m.atan((r/f)))
print "The beam spread is =",round(theta,2),"degrees"
```

In [14]:

```
'''A 22cm diameter globe of opal glass encloses a lamp of uniform luminous intensity 120 C.P. Thirty per cent of light emitted
by the lamp is absorbed by globe. Determine (a) luminance of globe (b) C.P. of globe in any direction.'''
d = 0.22 #m (diameter)
I = 120.0 #Cd (luminous intensity)
#surface area is
sa = 3.14*d*d #m^2
#Flux emmited by source is
flux = I*(4*3.14) #lm
#Flux emmited by globe is
reflux = 0.7*flux #lm
#(a)Luminance of globe is
L = reflux/sa #lm/m^2
print "Flux emmited by source is =",round(L,2),"lm/m^2 ."
#(b) C.P of globe is
cp = reflux/(4*3.14) #Cd
print "C.P of globe is = ",round(cp,2),"Cd."
```

In [15]:

```
'''A 0.4 m diameter diffusing sphere of opal glass (20 percent absorption) encloses an incandescent lamp with a luminous flux of
4850 lumens. Calculate the average luminance of the sphere.'''
d = 0.4 #m (diameter)
lflux = 4850.0 #lm (luminous flux)
reflux = 0.8*lflux #lm (flux emmited by globe)
sa = 3.14*d*d #m^2 (surface area)
#Brightness B = flux emmited/surface area . i.e
B = reflux/sa #lm/m^2 (brightness)
print "Average luminance =",round(B,2),"lm/m^2 ."
```

In [8]:

```
'''A show case is lighted by 4 metre of architectural tubular lamps arranged in a continuous line and placed along the top of the
case.Determine the illumination produced on a horizontal surface 2 metres below the lamps in a position directly underneath the
centre of the 4 m length of the lamps on the assumption that in tubular lamps emit 1,880 lm per metre run.
Neglect the effect of any reflectors which may be used.'''
import math as m
L = 4.0 #m (length of source of light)
d = 2.0 #m (height)
flux = 1880.0 #lumens (flux)
#Now
theta = m.atan(L/(2*d))
#As I = flux/(3.14*3.14*L)
I = 4*flux/(3.14*3.14*L) #cd/m
#Illumination produced is
E = I/(2*d)*(m.sin(2*theta) + 2*theta) #lm/m^2
print "Illumination produced is =",round(E,2),"lm/m^2."
```

In [6]:

```
'''If an integrating sphere 0.6 m in diameter whose inner surface has a reflection coefficient of 0.8 contains a lamp producing
on the portion of the sphere, screened from direct radiation,a luminance of 1000 cd/m2, what is the luminous flux yield of
the source ?'''
from sympy import Eq,solve,Symbol
coef = 0.8 # (reflection coefficient)
L = 1000.0 #cd/m^2 (luminance)
d = 0.6 #m (diameter)
Fl = Symbol('Fl')
E = coef*Fl/(3.14*d*d*(1-coef)) #lm/m^2
L1 = coef*E/3.14 #cd/m^2
#As L is equal to L1
eq = Eq(L,L1)
Fl = solve(eq)
Fl1 = Fl[0] #lumens
print "Luminous flux yield of the source =",round(Fl1,2),"lm."
```

In [9]:

```
'''A room 8 m * 12 m is lighted by 15 lamps to a fairly uniform illumination of 100 lm/m^2. Calculate the utilization coefficient
of the room given that the output of each lamp is 1600 lumens.'''
Area = 8*12 #m^2 (area of room)
num = 15.0 # (number of lamps)
I = 1600.0 #lumens (output of each lamp)
E = 100.0 #lm/m^2 (illumination)
#Lumens emmited by lamp
I_tot = num*I #lumens
#Lumens recieved by working plane
I1 = Area*E #lumens
#Utilization coefficient is
coef = I1/I_tot
print "Utilization coefficient = ",round(coef,2)
```

In [10]:

```
'''The illumination in a drawing office 30 m*10 m is to have a value of 250 lux and is to be provided by a number of 300 W
filament lamps. If the coefficient of utilization is 0.4 and the depreciation factor 0.9, determine the number of lamps
required. The luminous efficiency of each lamp is 14 lm/W.'''
A = 30*10.0 #m^2 (area)
E = 250.0 #lm/m^2 (illumination)
coef = 0.4 # (coefficient of utilization)
p = 0.9 # (depriciation factor)
eff = 14.0 #lm/W (luminous efficiency)
watt = 300.0 #W (wattage of eacch lamp)
#Now, flux = E*A/coef*p
flux = E*A/(coef*p) #lm (output in lumens)
#Flux emmited per lamp is
Fl2 = watt*eff #lm
#No. of lamps required are
num = flux/Fl2
print "Number of lamps required =",round(num)
```

In [11]:

```
'''Find the total saving in electrical load and percentage increase in illumination if instead of using twelve 150 W tungsten-
filament lamps,we use twelve 80 W fluorescent tubes. It may be assumed that (i) there is a choke loss of 25 per cent of rated
lamp wattage (ii) average luminous efficiency throughout life for each lamp is 15 lm/W and for each tube 40 lm/W and
(iii) coefficient of utilization remains the same in both cases.'''
#Luminous efficiency
eff1 = 15.0 #lm/W
eff2 = 40.0 #lm/W
#Total load in filament-lamps
flamp = 12*150.0 #W
#Total load in fluoroscent tubes
tube = 12*(80 + 0.25*80) #W
#Net saving
load = flamp - tube #W
print "Net saving in load =",round(load,2),"W."
#Let us assume that
#E1 -> illumination with lamps
#E2 -> illumination with tubes
#Now E1/E2 = (O/P in lumens 1)/(O/P in lumens 2)
tube2 = 12*80.0 #W
E1_E2 = flamp*eff1/(tube2*eff2)
#Increase in illumination is given by %increase = (E2/E1 - 1)*100
increase = (1/E1_E2 - 1)*100.0
print "Increase in illumination = ",round(increase,2),"%"
```

In [12]:

```
'''A football pitch 120 m * 60 m is to be illuminated for night play by similar banks of equal 1000 W lamps supported on twelve
towers which are distributed around the ground to provide approximately uniform illumination of the pitch.Assuming that 40% of
the total light emitted reaches the playing pitch and that an illumination of 1000 lm/m2 is necessary for television purposes,
calculate the number of lamps on each tower. The overall efficiency of the lamp is to be taken as 30 lm/W.'''
Area = 120.0*60.0 #m^2 (Area of pitch)
E = 1000.0 #lm/m^2 (Illumination of pitch)
#Flux required is
flux = Area*E #lm
#Since only 40% reaches the ground.Total flux required is
lflux = flux/0.4 #lm
#There are 12 tower banks . Therefore flux by each tower bank is
flux_each = lflux/12 #lm
#Output of each 1000 W lamp is
I = 30.0*1000 #lm
#Therefore, number of each lamps is
num = flux_each/I
print "Number of lamps on each tower is =",round(num)
```

In [13]:

```
'''Design a suitable lighting scheme for a factory 120 m * 40 m with a height of 7 m. Illumination required is 60 lux.
State the number, location and mounting height of 40 W fluorescent tubes giving 45 lm/W. Depreciation factor = 1.2;
utilization factor = 0.5 .'''
A = 120.0*40.0 #m^2 (Area)
h = 7.0 #m (Height)
E = 60.0 #lm/m^2 (Illumination)
watt = 40.0 #W (Wattage of bulb)
eff = 45.0 #lm/W (Luminous efficiency)
dep = 1.2 # (Depriciation factor)
uti = 0.5 # (Utilization factor)
#Total output flux is
flux = E*A/(uti*1/dep) #lm
#Flux per tube is
flux_tube = eff*watt #lm
#Therefore,number of flouroscent tubes required
num = flux/flux_tube
print "number of flouroscent tubes =",round(num)
#For twin fittings
num = num/2
print "number of twin fittings =",round(num)
print "These can be arranged in 8 rows and 24 columns with space/height ratio = 1."
```

In [14]:

```
'''A drawing hall in an engineering college is to be provided with a lighting installation. The hall is 30 m * 20 m * 8 m (high).
The mounting height is 5 m and the required level of illumination is 144 lm/m^2. Using metal filament lamps, estimate
the size and number of single lamp luminaries and also draw their spacing layout. Assume :
Utilization coefficient = 0.6; maintenance factor = 0.75; space/height ratio=1 lumens/watt for 300-W lamp = 13,
lumens/watt for 500-W lamp = 16.'''
A = 30.0*20 #m^2 (Area)
E = 144.0 #lm/m^2 (Illumination)
coef = 0.6 # (Utilization coefficient)
mfac = 0.75 # (maintenance factor)
#The flux is given by
flux = E*A/(coef*mfac) #lm
#Lumen output for 500-W lamp
I5 = 500.0*16 #lm
#Lumen output for 500-W lamp
I3 = 300.0*13 #lm
#No. of 500 W lamps required is
num5 = flux/I5
print "Number of 500-W lamps required =",round(num5)
#No. of 300 W lamps required is
num3 = flux/I3
print "Number of 300-W lamps required =",round(num3)
```

In [15]:

```
'''Estimate the number and wattage of lamps which would be required to illuminate a workshop space 60 * 15 metres by means of
lamps mounted 5 metres above the working plane. The average illumination required is about 100 lux.Coefficient of
utilization=0.4 ; Luminous efficiency=16 lm/W.Assume a spacing/height ratio of unity and a candle power depreciation of 20%.'''
A = 60.0*15.0 #m^2
E = 100.0 #lm/m^2
coef = 0.4 # (coefficient of utilization)
lum = 16.0 #lm/W (luminous efficiency)
dep = 1+0.2 # (depriciation factor)
#Total flux is given by
flux = E*A/(coef*1/dep) #lm
#Total wattage required is
watt = flux/lum #W
#Now,space/height ratio is 1.
h = 5.0 #m
#Therefore along breadth , lamps are
num_b = 15.0/h
#Therefore along length , lamps are
num_l = 60.0/h
#Total number of lamps are
num_tot = num_b*num_l
#Wattage of each lamp is
watt_each = watt/num_tot
print "Total number of lamps =",num_tot
print "Wattage of each lamp is =",round(watt_each,-2),"W."
```

In [16]:

```
'''A drawing hall 40 m * 25 m * 6 high is to be illuminated with metal-filament gas-filled lamps to an average illumination of
90 lm/m^2 on a working plane 1 metre above the floor.Estimate suitable number, size and mounting height of lamps. Sketch the
spacing layout.Assume coefficient of utilization of 0.5, depreciation factor of 1.2 and spacing/height ratio of 1.2
Size of lamps : 200 W 300 W 500 W
Luminous efficiency (in lm/W) : 16 18 20 '''
A = 40.0*25.0 #m^2 (Area)
E = 90.0 #lm/m^2 (Illumination)
coef = 0.5 # (Coefficient of utilization)
dep = 1.2 # (Depreciation factor)
#Total flux required is
flux = E*A/(coef*1/1.2) #lumens
#Lumen output of each 200-W lamp is
flux_200 = 200.0*16 #lumens
#Lumen output of each 200-W lamp is
flux_300 = 300.0*18 #lumens
#Lumen output of each 200-W lamp is
flux_500 = 500.0*20 #lumens
#Number of 200-W lamps required is
num_200 = flux/flux_200
#Number of 200-W lamps required is
num_300 = flux/flux_300
#Number of 200-W lamps required is
num_500 = flux/flux_500
print "Number of 200-W lamps required are =",round(num_200)
print "Number of 300-W lamps required are =",round(num_300)
print "Number of 500-W lamps required are =",round(num_500)
```

In [17]:

```
'''A school classroom, 7 m * 10 m * 4 m high is to be illuminated to 135 lm/m^2 on the working plane. If the coefficient of
utilization is 0.45 and the sources give 13 lumens per watt,work out the total wattage required, assuming a depreciation factor
of 0.8 .Sketch roughly the plan of the room, showing suitable positions for fittings, giving reasons for the positions chosen.'''
A = 7.0*10.0 #m^2 (Area)
E = 135.0 #lm/m^2 (Illumination)
coef = 0.45 # (Coefficient of utilization)
dep = 0.8 # (Depreciation factor)
eff = 13.0 #lm/W (luminous efficiency)
#Total flux is
flux = E*A/(coef*dep) #lumens
#Therefore,total wattage required is
watt = flux/eff #W
print "Total wattage required is =",round(watt,2),"W."
```

In [18]:

```
'''A hall 30 m long and 12 m wide is to be illuminated and the illumination required is 50 lm/m2. Calculate the number,
the wattage of each unit and the location and mounting height of the units, taking a depreciation factor of 1.3 and
utilization factor of 0.5, given that the outputs of the different types of lamp are as under :
Watts : 100 200 300 500 1000
Lumens : 1615 3650 4700 9950 21500 '''
A = 30.0*12.0 #m^2 (Area)
E = 50.0 #lm/m^2 (Illumination)
coef = 0.5 # (coefficient of utilization)
dep = 1/1.3 # (depreciation factor)
#Total flux required is
flux = E*A/(coef*dep) #lumens
#For 100-W lamps are used ,Number required
num_100 = flux/1615.0
#For 200-W lamps are used ,Number required
num_200 = flux/3650.0
#For 300-W lamps are used ,Number required
num_300 = flux/4700.0
#For 500-W lamps are used ,Number required
num_500 = flux/9950.0
#For 1000-W lamps are used ,Number required
num_1000 = flux/21500.0
print "Number of 100-W lamps required =",round(num_100)
print "Number of 200-W lamps required =",round(num_200)
print "Number of 300-W lamps required =",round(num_300)
print "Number of 500-W lamps required =",round(num_500)
print "Number of 1000-W lamps required =",round(num_1000)
print "If we take the mounting height of 5 m, then 300 W lamps would be suitable."
print "The No.of lamps required would be 10, arranged in two rows, each row having 5 lamps thus giving space/height ratio of 6/5"
```

In [19]:

```
'''It is desired to floodlight the front of a building 42 m wide and 16 m high.Projectors of 30° beam spread and 1000-W lamps
giving 20 lumen/watt are available. If the desired level of illumination is 75 lm/m2 and if the projectors are to be located
at ground level 17 m away,design and show a suitable scheme. Assume the following :
Coefficient of utilization = 0.4 ; Depreciation factor = 1.3 ; Waste-light factor = 1.2. '''
A = 42.0*16.0 #m^2 (Area)
E = 75.0 #lm/m^2 (Illumination)
W = 1.2 # (Waste-light factor)
coef = 0.4 # (Coefficient of utilization)
dep = 1/1.3 # (Depreciation factor)
eff = 20.0 #lm/W (luminous efficiency)
#Total flux is
flux = E*A*W/(coef*dep) #lm/m^2
#Lumen output of each 1000-W lamp is
flux_each = 1000.0*eff
#Number of lamps required are
num = flux/flux_each
print "Number of lamps required are =",round(num)
```

In [20]:

```
'''Estimate the number of 1000-W floodlight projectors required to illuminate the up per 75 m of one face of a 96 m tower of
width 13 m if approximate initial average luminance is to be 6.85 cd/m2. The projectors are mounted at ground level 51m from base
of the tower.Utilization factor is = 0.2; reflection factor of wall = 25% and efficiency of each lamp = 18 lm/W.'''
A = 13.0*75.0 #m^2 (Area to be flood-lighted)
B = 6.85 #cd/m^2 (Average luminance)
watt = 1000.0 #W (Wattage floodlight projectors)
coef = 0.2 # (Utilization factor)
ref = 0.25 # (Reflection factor)
#Illumination E = pi*B/reflection factor
E = 3.14*B/ref #lm/m^2
#Therefore, total flux required is
flux = E*A #lm
#Flux to be emmited by lamp is
lflux = flux/coef #lm
#Flux from each lamp is
flux_each = 18.0*watt #lm
#The number of floodlight projectors required are
num = lflux/flux_each
print "The number of floodlight projectors required =",round(num)+1
```

In [24]:

```
'''If the filament of a 32 candela, 100-V lamp has a length l and diameter d,calculate the length and diameter of the filament
of a 16 candela 200-V lamp,assuming that the two lamps run at the same intrinsic brilliance.'''
#As l*d is directly propotional luminous intensity .
#Let a = l1*d1 & b = l2*d2 . Then, l1*d1/l2*d2 = 32/16
a_b = 32.0/16 # (= a/b = l1*d1/l2*d2)
#As luminous intensity is directly propotional to power output
# 32 o< 100*I1 & 16 o< 200*I2
I1_I2 = 32*200.0/(16*100.0) #( = I1/I2)
#Also , I o< d^3/2
d1_d2 = (I1_I2)**(2.0/3) #( = d1/d2)
print "Diameter d2 = ",round(1/d1_d2,2),"*d1."
#As , d1_d2 = d1/d2
l1_l2 = a_b/d1_d2 #( = l1/l2)
print "Length l2 = ",round(1/l1_l2,2),"*l1."
```

In [25]:

```
'''An incandescent lamp has a filament of 0.005 cm diameter and one metre length. It is required to construct another lamp of
similar type to work at double the supply voltage and give half the candle power. Assuming that the new lamp operates at the same
brilliancy,determine suitable dimensions for its filament.'''
d1 = 0.005 #cm (diameter)
l1 = 100.0 #cm (length)
#As l*d is directly propotional luminous intensity .
#Let a = l1*d1 & b = l2*d2 . Then, l1*d1/l2*d2 = 2.0/1.0
a_b = 2.0/1 # (= a/b = l1*d1/l2*d2)
#As luminous intensity is directly propotional to power output
# I1 o< V1*i1 & I2 o< V2*i2
I1_I2 = (2.0/1)*(2.0/1) #( = I1/I2)
#Also , I o< d^3/2
d1_d2 = (I1_I2)**(2.0/3) #( = d1/d2)
d2 = d1/d1_d2 #cm
print "Diameter d2 = ",round(d2,5),"cm."
#As , d1_d2 = d1/d2
l1_l2 = a_b/d1_d2 #( = l1/l2)
l2 = l1/l1_l2 #cm
print "Length l2 = ",round(l2),"cm."
```

In [52]:

```
'''A 60 candle power, 250-V metal filament lamp has a measured candle power of 71.5 candela at 260 V and 50 candela at 240 V.
(a) Find the constant for the lamp in the expression C = aV^b where C = candle power and V = voltage.
(b) Calculate the change of candle power per volt at 250 V. Determine the percentage variation of candle power due to a voltage
variation of æ 4% from the normal value. '''
from sympy import Symbol,solve,Eq
#Given expression is C = a*V^b
b = Symbol('b')
# 71.5/50 = (260/240)^b
lhs = 71.5/50.0
rhs = (260.0/240)**b
eq = Eq(lhs,rhs)
b = solve(eq)
b1 = b[0] #constant
a = 71.5/(260.0)**b1
print "Hence expression for candle power is C = %e" %a,"*V^",round(b1,2)
#Change of candle power per volt
# dC/dV = b*a*V^b
change = b1*a*((250.0)**(b1)) #cd/V
print "Change of candle power per volt = ",round(change,1),"cd/m."
#When voltage is increases by 4% C2/C1 = (1.04)^b
per_change = ( (1.04)**b1 - 1 ) * 100
print "% change in candle power for increase =",round(per_change,2)
#When voltage is decreases by 4% C2/C1 = (0.96)^b
per_change = ( (0.96)**b1 - 1)* 100
print "% change in candle power for decrease =",round(per_change,2)
```

In [ ]:

```
```

In [ ]:

```
```