# Chapter8-Electrical energy¶

## Ex1-pg222¶

In :
import math
## Example 8.1
print('Example 8.1');
print('Page No. 222');

## given
V = 240;## Voltage in Volts
I = 8;## Current in Amps
##By ohm's law-> V = I*R
R = V/I;## In ohms
print'%s %.2f %s '%('The resistance of the given circuit is ',R,' ohms')

Example 8.1
Page No. 222
The resistance of the given circuit is  30.00  ohms


## Ex2-pg223¶

In :
import math
import numpy
from numpy.linalg import inv
## Example 8.2
print('Example 8.2');
print('Page No. 223');

## given
V1 = 100.;## In Volts
V2 = 50.;## In Volts
R1 = 8.;## Resistance in ohm
R2 = 5.;## Resistance in ohm
R3 = 10.;## Resistance in ohm
R4 = 50.;## Resistance in ohm
##By refering figure 8.3, and applying kirchoff's current law and kirchoff's voltage law in the given circuit diagram, we get following equations:
## I1 = I2 + I3
##V1 - R1*I1 - V2 - R3*I3 = 0
##V2 - R4*I3 + R3*I3 - R2*I2 = 0
A = ([[1, -1, -1],[8, 0, 10],[0 ,55, -10]])
b = ([0,50,50]);
x =numpy.dot(inv(A),b)
print'%s %.2f %s '%('The currents in I1 is ',x,' A ')
print'%s %.2f %s '%('The currents in I2 is ',x,' A ')
print'%s %.2f %s '%('The currents in I3 is ',x,' A ')

Example 8.2
Page No. 223
The currents in I1 is  3.50  A
The currents in I2 is  1.31  A
The currents in I3 is  2.20  A


## Ex3-pg226¶

In :
import math
## Example 8.3
print('Example 8.3');
print('Page No. 226');

## given
R = 6;## Resistance in ohm
Xc = 16;## Capacitive resistance in ohm
Xl = 24;## Inductive resistance in ohm
Z = ((R**2) + (Xc - Xl)**2)**0.5;## Impedance in ohm
P_f = R/Z;## Power factor = cos(x) = 0.6
x = math.cos(0.6)*57.3;
y = math.sqrt(1 - P_f**2);##y = sin (x)
V = 200;## in Volts(sin wave voltage = ((200*2**1.5)*sinwt)
I = V/Z;## Current in Amperes
P = I**2 * R;## in W
Q = V * I * y;## in VAR
S = V * I;## in VA
print'%s %.2f %s'% ('The actual power is ',P,' W ')
print'%s %.2f %s'% ('The reactive power is ',Q,' VAR ')
print'%s %.2f %s'% ('The apparent power is ',S,' VA ')

Example 8.3
Page No. 226
The actual power is  2400.00  W
The reactive power is  3200.00  VAR
The apparent power is  4000.00  VA


## Ex4-pg232¶

In :
## Example 8.4
print ('Example 8.4');
print ('Page No. 232');

##given
pump_1 = 100*10**3;## Required pump in W
T_1 = 8;## Pump Operating time of each day
Inc_op = 0.5;## Increased output per cent
pump_ex = 50*10**3;## Extra pump requried in W

## This question doesnot contain any calculation part.
print('there is no computational part in the problem')

Example 8.4
Page No. 232
there is no computational part in the problem


## Ex5-pg232¶

In :
## Example 8.5
print ('Example 8.5');
print ('Page No. 232');

##given
P = 600*10**3;## Power demand of pump in W
T = 8.;## Operating time in hour per day
red = 1.00/10**3.;## off-peak reduction in Pound per 10**3 W month
M_save = P*red;##  Monthly saving Pound per month
A_save = M_save*12.;## Annual saving in Pound per year
print'%s %.2f %s'% ('Annual saving is ',A_save,' Pound per year')

Example 8.5
Page No. 232
Annual saving is  7200.00  Pound per year


## Ex6-pg234¶

In :
import math
import numpy
from numpy import floor
## Example 8.6
print ('Example 8.6');
print('Page No. 234');

##given
T_lamp = 12.*10**3.;## Output for the tungsten filament lamp in lm per 10^3 W
F_tube = 63.*10**3.;## Output for the fluorescent tubes in lm per 10^3 W
Save = F_tube - T_lamp;##  in W
print'%s %.2f %s'% ('Energy saving is ',Save,' lm per 10^3 W ')

Save_pcent = (Save/F_tube)*100.;
print'%s %.2f %s'% ('Energy saving per cent is  ',floor(Save_pcent),'')

Example 8.6
Page No. 234
Energy saving is  51000.00  lm per 10^3 W
Energy saving per cent is   80.00


## Ex7-pg235¶

In :
import math
## Example 8.7
print('Example 8.7');
print ('Page No. 235');

##given
N = 40.;## Number of lamps
T1 = 15.;## Operating time in h per day
P = 500.;## POwer from the lamps in W
T2 = 300.;## Total operating time in days per year
C = 2.5/10**3;## Electricity cost in p per Wh

An_Cost = N*P*T1*T2*C*10**-2;## In euro
print'%s %.2f %s'% ('The Annual Cost is ',An_Cost,' Euro ')

##Improvement in light by installing glassfibre skylights
T3 = 5;##   Extra Time for natural lighting in h per day
New_An_Cost = N*P*(T1-T3)*T2*C*10**-2;## In euro
print'%s %.2f %s'% ('The New Annual Cost is ',New_An_Cost,' Euro ')

Save = An_Cost - New_An_Cost;## in euro
print'%s %.2f %s'% ('The annual saving for a pay-back period of 2.5 years is ',Save,'')

Example 8.7
Page No. 235
The Annual Cost is  2250.00  Euro
The New Annual Cost is  1500.00  Euro
The annual saving for a pay-back period of 2.5 years is  750.00


## Ex8-pg236¶

In :
## Example 8.8
print ('Example 8.8');
print ('Page No. 236');

## This question doesnot contain any calculation part.

##By refering figure 8.7 which shows Poer factor-load curve for a motor with a capacitor and one without a capacitor.
print('there is no computational part in the problem')

Example 8.8
Page No. 236
there is no computational part in the problem


## Ex9-pg238¶

In :
import math
## Example 8.9
print('Example 8.9');
print('Page No. 238');

## This question doesnot contain any calculation part.
##given
l = 500.*10**3.;## Load in VA
P_F = 0.6;## Power Factor
Req_P_F = 0.9;## Required power factor
##Refer to figure 8.8
BC = 2.5;## units
C_rt = 250*10**3;## in VAR (obtained from figure 8.8)
print'%s %.2f %s'%('The required condenser rating is',C_rt,'')

Example 8.9
Page No. 238
The required condenser rating is 250000.00


## Ex10-pg240¶

In :
import math
import numpy
from numpy.linalg import inv
## Example 8.10
print ('Example 8.10');
print ('Page No. 240');

P = 100.;## Power in 10^3 W
C = 5.;## Charge in Euro per 10^3 per month
PF = ([1.0, 0.9 ,0.8, 0.7, 0.6, 0.5]);## Power factor
leng=len(PF)
for i in range (0,leng):
VA = (PF[i]/P)*C
a=VA
b=PF[i]
print'%s %.2f %s %.2f %s'% ('Charge per month for power factor ',b,' is' ,a,'Euro')

Example 8.10
Page No. 240
Charge per month for power factor  1.00  is 0.05 Euro
Charge per month for power factor  0.90  is 0.05 Euro
Charge per month for power factor  0.80  is 0.04 Euro
Charge per month for power factor  0.70  is 0.03 Euro
Charge per month for power factor  0.60  is 0.03 Euro
Charge per month for power factor  0.50  is 0.03 Euro


## Ex11-pg240¶

In :
import math
## Example 8.11
print('Example 8.11');
print ('Page No. 240');

## This question doesnot contain any calculation part.
##given
P_F_1 = 0.7;## Initial power factor
P_F_2 = 0.95;## Final power factor
##Refer Figure 8.10
red_I = 26;##reduction in current in per cent
print'%s %.2f %s'% ('The reduction in current is ',red_I,' per cent ')
P_F_3 = 1.0;## Increased power factor
## From figure 8.10
Save = 4.;## per cent
print'%s %.2f %s'% ('Increase in power factor from 0.95-1.0 only increases saving further by a ',Save,' per cent')

Example 8.11
Page No. 240
The reduction in current is  26.00  per cent
Increase in power factor from 0.95-1.0 only increases saving further by a  4.00  per cent


## Ex12-pg240¶

In :
## Example 8.12
print ('Example 8.12');
print ('Page No. 240');

## This question doesnot contain any calculation part.
##given
C = 10000.;## Installation cost of capacitors in Pound
P_F_1 = 0.84;## Initial power factor
P_F_2 = 0.97;## Final power factor
##Refer Figure 8.10
red_dem = 14.;##reduction in maximum demand in per cent
T = 9.;## pay-back time in months

print'%s %.2f %s'% ('The reduction in maximum demand is',red_dem,' per cent')
print'%s %.2f %s'% ('The pay-back time was',T,' months')
## This question does not contain any calculation part.

Example 8.12
Page No. 240
The reduction in maximum demand is 14.00  per cent
The pay-back time was 9.00  months


## Ex13-pg244¶

In :
import math
import numpy
from numpy import floor
## Example 8.13
print ('Example 8.13');
print ('Page No. 244');

##given
T1 = 21.;## in degree celcius
t1 = 8.;## time in h per day
c = 3.5;## cost in p per unit
C1 = 38.;## Total cost in Pound per 10^3 W

T2 = 16.;## in degree celcius
t2 = 8.;## time in h per day
C2 = 27.;## Total cost in Pound per 10^3 W

Save = C1 - C2;## Saving in Pound per 10^3 W
Save_deg = Save/(T1 - T2);## Total Saving in Pound per 10^3 W for each degree drop
Save_per = (Save_deg/C1)*100.;## Saving in percent
print'%s %.2f %s'% ('For each degree drop, an energy saving of ',floor(Save_per),' per cent is achieved')

Example 8.13
Page No. 244
For each degree drop, an energy saving of  5.00  per cent is achieved


## Ex14-pg245¶

In :
import math
## Example 8.14
print ('Example 8.14');
print ('Page No. 245');

## This question doesnot contain any calculation part.
##refer Table 8.6
O_1 = 1750.;
O_2 = 0.;
O_3 = 2.;
O_4 = 150.;
O_5 = 1900.;
O_6 = 0.;
I_1 = 580.;
I_2 = 1658.;
I_3 = 0.5;
I_4 = 40.;
I_5 = 1698.;
I_6 = 11.;
D_1 = 300.;
D_2 = 869.;
D_3 = 0.5;
D_4 = 40.;
D_5 = 900.;
D_6 = 37.;
print(' \t\t\t\t\t\t ENERGY COSTS FOR HEATING STEEL BILLETS')
print('components\t\t\t\t\t\t kmol \t\t\t\t\t\t % Composition by volume' '\n\n\n')
print('\t\t\t\t\t\t\t (1)Oil fired 	   (2)Induction 	 (3)Direct resistance')
print'%s %.2f %s %.2f %s %.2f %s '%('Components(10^3 W/tonne) \t\t ',O_1,'  \t\t ',I_1,' \t\t  ',D_1,'')
print'%s %.2f %s %.2f %s %.2f %s '%('Fuel(electricity) \t\t      '  ,O_2,'  \t\t ',I_2,' \t\t  ',D_2,'')
print'%s %.2f %s %.2f %s %.2f %s '%('Components(10^3 W/tonne) \t\t ',O_3,'  \t\t ',I_3,' \t\t  ',D_3,'')
print'%s %.2f %s %.2f %s %.2f %s '%('Components(10^3 W/tonne) \t\t ',O_4,'  \t\t ',I_4,' \t\t  ',D_4,'')
print'%s %.2f %s %.2f %s %.2f %s '%('Components(10^3 W/tonne) \t\t ',O_5,'  \t\t ',I_5,' \t\t  ',D_5,'')
print'%s %.2f %s %.2f %s %.2f %s '%('Components(10^3 W/tonne) \t\t ',O_6,'  \t\t ',I_6,' \t\t  ',D_6,'')

Example 8.14
Page No. 245
ENERGY COSTS FOR HEATING STEEL BILLETS
components						 kmol 						 % Composition by volume

(1)Oil fired 	   (2)Induction 	 (3)Direct resistance
Components(10^3 W/tonne) 		  1750.00   		  580.00  		   300.00
Fuel(electricity) 		       0.00   		  1658.00  		   869.00
Components(10^3 W/tonne) 		  2.00   		  0.50  		   0.50
Components(10^3 W/tonne) 		  150.00   		  40.00  		   40.00
Components(10^3 W/tonne) 		  1900.00   		  1698.00  		   900.00
Components(10^3 W/tonne) 		  0.00   		  11.00  		   37.00


## Ex15-pg247¶

In :
import math
## Example 8.15
print('Example 8.15\n\n');
print('Page No. 247\n\n');

## This question doesnot contain any calculation part.
##refer Table 8.7
El = 35.;## Percentage of electricity produced from primary fuel
En_1 = 50.;## Endothermic gas (m^3)
En_2 = 100.;## Endothermic gas (m^3)
En_3 = 200.;## Endothermic gas (m^3)
G_1 = 97.;## Gas use (10^3 Wh)
G_2 = 194.;## Gas use (10^3 Wh)
G_3 = 386.;## Gas use (10^3 Wh)
El_1 = 24.;## Electricity use (10^3 Wh)
El_2 = 48.;## Electricity use (10^3 Wh)
El_3 = 95.;## Electricity use (10^3 Wh)
P_1 = 69.;## Primary energy (10^3 Wh)
P_2 = 137.;## Primary energy (10^3 Wh)
P_3 = 271.;## Primary energy (10^3 Wh)
Endothermicgas=['50 \t\t',       '100 \t\t ','200 \t\t ']
gasuse=        ['\t\t 97 \t\t  ','\t\t194 \t\t ','\t\t 386 \t\t ']
electricityuse=[' \t\t 24 ',' \t\t 48\t\t ',' \t\t 95 \t']
primaryenergy= [' \t\t 69 ',' 137 ',' \t 271  ']
print('Endothermicgas\t\t gasuse\t\t electricityuse \t\t primaryenergy')

for row in zip(Endothermicgas , gasuse, electricityuse,primaryenergy):
print ' '.join(row)

Example 8.15

Page No. 247

Endothermicgas		 gasuse		 electricityuse 		 primaryenergy
50 		 		 97 		    		 24   		 69
100 		  		194 		   		 48		   137
200 		  		 386 		   		 95 	  	 271