# Chapter 1: Fundamentals¶

## Example 1.1, Page 3¶

In :
#Variable declaration
I =.000018;    # Electric current, A
V = 15000;    # Electric potential, V
P = 250000000    # Electric Power, W

#Calculations&Results
# Display standard form
print "Standard form:"
print "=============="
print "%f A = %3.1e A"%(I, I)
print "%5.0f V = %3.1e V"%(V, V)
print "%9.0f W = %3.1e W"%(P, P)
# Display scientific notation
print "\n\nScientific form:"
print "================"
print "%f A = %2d micro-ampere"%(I, I/1e-06)
print "%5.0f V = %2d kilo-volt"%(V, V/1e+03)
print "%9.0f W = %3d mega-watt"%(P, P/1e+06)

Standard form:
==============
0.000018 A = 1.8e-05 A
15000 V = 1.5e+04 V
250000000 W = 2.5e+08 W

Scientific form:
================
0.000018 A = 18 micro-ampere
15000 V = 15 kilo-volt
250000000 W = 250 mega-watt


## Example 1.2, Page 3¶

In :
#Variable declaration
I = 25e-05;    # Electric Current,A
P = 3e-04;    # Electric Power, W
W = 850000.;    # Work done, J
V = 0.0016;    # Electric Potential, V

#Calculations&Results
print "Scientific (Engineering) notation:";
print "===================================";
print "%2e A = %3d micro-ampere = %3.2f mA"%(I, I/1e-06, I/1e-03);
print "%1.0e W = %.e milli-watt"%(P, P/1e-03);
print "%6d J = %3d kJ = %3.2f MJ"%(W, W/1e+03, W/1e+06);
print "%5.4f V = %3.1f milli-volt"%(V, V/1e-03)

Scientific (Engineering) notation:
===================================
2.500000e-04 A = 250 micro-ampere = 0.25 mA
3e-04 W = 3e-01 milli-watt
850000 J = 850 kJ = 0.85 MJ
0.0016 V = 1.6 milli-volt


## Example 1.3, Page 5¶

In :
#Variable declaration
m = 750/1e+03;    # Mass of the body, kg
F = 2;    # Force acting on the mass, N

#Calculations
# Since F = m * a, (Newton's Second Law of motion), solving for a
a = F/m;    # Acceleration produced in the body, metre per second square

# Result
print "The acceleration produced in the body = %5.3f metre per second square"%a

The acceleration produced in the body = 2.667 metre per second square


## Example 1.4, Page 9¶

In :
#Variable declaration
Q = 35e-03;    # Electric charge, C
t = 20e-03;    # Time for transference of charge between two points, s

#Calculations
# Since Q = I * t, solving for I
I = Q/t;    # Electric current flowing between the two points, A

# Result
print "The value of electric current flowing = %4.2f A"%I

The value of electric current flowing = 1.75 A


## Example 1.5, Page 9¶

In :
#Variable declaration
I = 120e-06;    # Electric current, A
t = 15;    # Time for transference of charge between two points, s

#Calculations
# Since I = Q/t, solving for Q
Q = I*t;    # Electric charge transferred, C

# Result
print "The value of electric charge transferred = %3.1f mC"%(Q/1e-03)

The value of electric charge transferred = 1.8 mC


## Example 1.6, Page 10¶

In :
#Variable declaration
Q = 80;     # Electric charge, C
I = 0.5;     # Electric current, A

#Calculations
# Since Q = I*t, solving for t
t = Q/I;     # Time for transference of charge between two points, s

# Result
print "The duration of time for which the current flowed = %3d s"%t

The duration of time for which the current flowed = 160 s


## Example 1.7, Page 13¶

In :
#Variable declaration
I = 5.5e-03;        # Electric current, A
R = 33000;          # Resistance, ohms

#Calculations
# From Ohm's law, V = I*R
V = I*R;            # Potential difference across resistor, V

# Result
print "The potential difference developed across resistor = %5.1f V"%V

The potential difference developed across resistor = 181.5 V


## Example 1.8, Page 14¶

In :
#Variable declaration
V = 24.;            # Potential difference,V
R = 15;             # Resistance, ohms

#Calculations
# From Ohm's law, V = I*R, then solving for I
I = V/R;             # Electric current, A

# Result
print "The current flowing through the resistor = %3.1f A"%I

The current flowing through the resistor = 1.6 A


## Example 1.9, Page 16¶

In :
#Variable declaration
E = 6;           # E.m.f of battery, V
r = 0.15;        # Internal resistance of battery, ohm
I_1 = .5;        # Electric current, A
I_2 = 2;          # Electric current, A
I_3 = 10;          # Electric current, A

#Calculations
# Using relation V = E - I*R and substituting the values of I_1, I_2 and I_3 one by one in it
V_1 = E - I_1*r;     # Terminal potential difference, V
V_2 = E - I_2*r;      # Terminal potential difference, V
V_3 = E - I_3*r;       # Terminal potential difference, V

# Results
print "The terminal potential difference developed across resistor for a current of %3.1f A = %5.3f V"%(I_1,V_1)
print "The terminal potential difference developed across resistor for a current of %1d A = %3.1f V"%(I_2,V_2)
print "The terminal potential difference developed across resistor for a current of %2d A = %3.1f V"%(I_3,V_3)

The terminal potential difference developed across resistor for a current of 0.5 A = 5.925 V
The terminal potential difference developed across resistor for a current of 2 A = 5.7 V
The terminal potential difference developed across resistor for a current of 10 A = 4.5 V


## Example 1.10, Page 16¶

In :
#Variable declaration
E = 12;        # E.m.f, V
I = 5;         # Electric current, A
V = 11.5;       # Terminal potential difference, V

#Calculations
# Using relation V = E - I*r, solving for r
r = ( E - V )/I;     # Internal resistance of battery, ohm
# From Ohm's law, V = I*R, then solving for R
R = V/I;              # Resistance, ohms

# Results
print "The internal resistance of battery = %3.1f ohm"%r
print "The resistance of external circuit = %3.1f ohm"%R

The internal resistance of battery = 0.1 ohm
The resistance of external circuit = 2.3 ohm


## Example 1.11, Page 17¶

In :
#Variable declaration
I = 200e-03;       # Electric current, A
t = 300;            # Time for which current flows, s
R = 750;            # Resistance, ohms

#Calculations
# Using Ohm's law, V = I*R
V = I*R;            # Electric potential difference, V
W = I**2*R*t;         # Energy dissipated, joule

# Result
print "The potential difference developed across the resistor = %3d V\nThe energy dissipated across the resistor = %4.0f J or %1d kJ"%(V, W, W*1e-03)

The potential difference developed across the resistor = 150 V
The energy dissipated across the resistor = 9000 J or 9 kJ


## Example 1.12, Page 18¶

In :
import math

#Variable declaration
R = 680;          # Resistance, ohms
P = 85e-03;           # Electric power, W

#Calculations
# Using P = V**2/R, solving for V
V = math.sqrt( P*R );       # Potential difference, V
# Using P = I**2*R, solving for I
I = math.sqrt( P/R );        # Electric current, A

# Result
print "The potential difference developed across the resistance = %3.1f V\nThe current flowing through the resistor = %5.2f mA"%(V, I/1e-03)

The potential difference developed across the resistance = 7.6 V
The current flowing through the resistor = 11.18 mA


## Example 1.13, Page 19¶

In :
#Variable declaration
I = 1.4;           # Electric current, A
t = 900;           # Time for which current flows, s
W = 200000;        # Energy dissipated, J

#Calculations
# Using relation W = V*I*t, solving for V
V = W/( I*t );       # Potential difference, V
# Using relation P = V*I
P = V*I;             # Electric power, W
# From Ohm's law, V = I*R, solving for R
R = V/I;              # Resistance, ohm

# Result
print "The potential difference developed = %5.1f V\nThe power dissipated = %5.1f W\nThe resistance of the circuit = %5.1f ohm"%(V, P, R)

The potential difference developed = 158.7 V
The power dissipated = 222.2 W
The resistance of the circuit = 113.4 ohm


## Example 1.14, Page 20¶

In :
#Variable declaration
P = 12.5;    # Power of the machine, kW
t = 8.5;    # Time for which the machine is operated, h

#Calculations
W = P*t;         # Electric energy, kWh
# Cost per unit = 7.902 p, therefore calculating the cost of 106.25 units
cost = ( W*7.902 );       # Cost for operating machine, p

# Result
print "The cost of operating the machine = %4.2f pounds"%(cost*1e-02)

The cost of operating the machine = 8.40 pounds


## Example 1.15, Page 20¶

In :
#Variable declaration
Total_bill = 78.75;      # pounds
Standing_charge = 15.00;     # pounds
Units_used = 750;            # kWh

#Calculations
Cost_per_unit = ( Total_bill - Standing_charge )/Units_used;      # p
Cost_of_energy_used = 67.50;         # pounds
Total_bill = Cost_of_energy_used + Standing_charge;      # pounds

# Result
print "The cost per unit = %5.3f pounds or %3.1f p\nTotal bill = %5.2f pounds"%(Cost_per_unit,Cost_per_unit/1e-02,Total_bill)

The cost per unit = 0.085 pounds or 8.5 p
Total bill = 82.50 pounds


## Example 1.16, Page 22¶

In :
#Variable declaration
l = 200;          # Length of Cu wire, metre
rho = 2e-08;       # Resistivity of Cu, ohm-metre
A = 8e-07;          # Cross sectional area of Cu wire, metre square

#Calculations
# Using relation R = ( rho*l )/A
R = ( rho*l )/A;          # Resistance, ohm

# Result
print "The resistance of the coil = %1d ohm"%R

The resistance of the coil = 5 ohm


## Example 1.17, Page 22¶

In :
import math

#Variable declaration
l = 250;          # Length of Cu wire, metre
d = 5e-04;         # Diameter of Cu wire, metre
rho = 1.8e-08;       # Resistivity of Cu wire, ohm-metre

#Calculations
A = (math.pi*d**2 )/4;          # Cross sectional area of Cu wire, metre square
# Using relation R = rho*l/A
R = rho*l/A;          # Resistance, ohm

# Result
print "The resistance of the coil = %5.2f ohm"%R

The resistance of the coil = 22.92 ohm


## Example 1.18, Page 23¶

In :
#Variable declaration
R_1 = 250;           # Resistance of field coil, ohm
Theta_1 = 15;        # Initial temperature of motor, degree celcius
Theta_2 = 45;        # Final temperature of motor, degree celcius
Alpha = 4.28e-03;     # Temperature coefficient of resistance, per degree celcius

#Calculations
# Using relation, R_1/R_2 = ( 1 + Alpha*Theta_1 )/( 1 + Alpha*Theta_2 ), solving for R_2
R_2 = R_1 * (( 1 + Alpha*Theta_2 )/( 1 + Alpha*Theta_1 ));      # Resistance, ohms

# Result
print "The resistance of field coil at %2d degree celcius = %5.1f ohm"%(Theta_2, R_2)

The resistance of field coil at 45 degree celcius = 280.2 ohm


## Example 1.19, Page 24¶

In :
#Variable declaration
R_0 = 350;           # Resistance, ohms
Theta_1 = 60;        # Temperature, degree celcius
Alpha = 4.26e-03;     # Temperature coefficient, per degree celcius

#Calculations
# Using relation R_1 = R_0 * ( 1 + Alpha*Theta_1 )
R_1 = R_0 * ( 1 + Alpha*Theta_1 );      # Resistance, ohms

# Result
print "The resistance of the wire at %2d degree celcius = %5.1f ohm"%(Theta_1, R_1)

The resistance of the wire at 60 degree celcius = 439.5 ohm


## Example 1.20, Page 24¶

In :
#Variable declaration
R_1 = 120;           # Resistance, ohms
Theta_1 = 16;        # Temperature, degree celcius
Theta_2 = 32;        # Temperature, degree celcius
Alpha = -4.8e-04;     # Temperature coefficient, per degree celcius

#Calculations
# Using relation, R_1/R_2 = ( 1 + Alpha*Theta_1 )/( 1 + Alpha*Theta_2 ), solving for R_2
R_2 = R_1 * (( 1 + Alpha*Theta_2 )/( 1 + Alpha*Theta_1 ));      # Resistance, ohm

# Result
print "The resistance of carbon resistor at %2d degree celcius = %5.1f ohm"%(Theta_2, R_2)

The resistance of carbon resistor at 32 degree celcius = 119.1 ohm