#Variable declaration
no = 2.0 #Number of motors
V_m = 48.0 #Uniform speed(kmph)
t = 30.0 #Time(sec)
F_t_m = 13350.0 #Average tractive effort per motor(N)
#Calculation
F_t = no*F_t_m #Average tractive effort(N)
energy = t*F_t*V_m/(2*3600**2) #Useful energy for acceleration(kWh)
energy_loss = energy/no #Approximate loss of energy in starting rheostats(kWh)
#Result
print('Approximate loss of energy in starting rheostats = %.3f kWh' %energy_loss)
#Variable declaration
W = 175.0 #Weight of multiple unit train(tonnes)
no = 6.0 #Number of motors
F_t = 69000.0 #Total tractive effort(N)
V = 600.0 #Line voltage(V)
I = 200.0 #Average current(A)
V_m = 38.6 #Speed(kmph)
R = 0.15 #Resistance of each motor(ohm)
#Calculation
alpha = F_t/(277.8*W) #Acceleration(km phps)
T = V_m/alpha #Time for acceleration(sec)
t_s = (V-2*I*R)*T/(2*(V-I*R)) #Duration of starting period(sec)
t_p = T-t_s #(sec)
energy_total_series = no/2*V*I*t_s #Total energy supplied in series position(watt-sec)
energy_total_parallel = no*V*I*t_p #Total energy supplied in parallel position(watt-sec)
total_energy = (energy_total_series+energy_total_parallel)/(1000*3600) #Energy supplied during starting period(kWh)
energy_waste_series = (no/2)/2*(V-2*I*R)*I*t_s #Energy wasted in starting resistance in series position(watt-sec)
energy_waste_parallel = no*(V/2)/2*I*t_p #Energy wasted in starting resistance in parallel position(watt-sec)
total_energy_waste = (energy_waste_series+energy_waste_parallel)/(1000*3600) #Total energy wasted in starting resistance(kWh)
energy_lost = (no*I**2*R*T)/(1000*3600) #Energy lost in motor resistance(kWh)
useful_energy = T*F_t*V_m/(2*3600**2) #Useful energy supplied to train(kWh)
#Result
print('Energy supplied during the starting period = %.2f kWh' %total_energy)
print('Energy lost in the starting resistance = %.1f kWh' %total_energy_waste)
print('Useful energy supplied to the train = %.1f kWh' %useful_energy)
#Variable declaration
W = 132.0 #Weight of electric train(tonnes)
no = 4.0 #Number of motors
V = 600.0 #Voltage of motor(V)
I = 400.0 #Current per motor(A)
F_t_m = 19270.0 #Tractive effort per motor at 400A & 600V(N)
V_m = 39.0 #Train speed(kmph)
G = 1.0 #Gradient
r = 44.5 #Resistance to traction(N/tonne)
inertia = 10.0 #Rotational inertia(%)
R = 0.1 #Resistance of each motor(ohm)
#Calculation
W_e = W*(100+inertia)/100 #Accelerating weight of train(tonne)
F_t = F_t_m*no #Total tractive effort at 400A & 600V(N)
alpha = (F_t-W*r-98.1*W*G)/(277.8*W_e) #Acceleration(km phps)
T = V_m/alpha #Time for acceleration(sec)
t_s = (V-2*I*R)*T/(2*(V-I*R)) #Duration of starting period(sec)
V_transition = alpha*t_s #Speed at transition(km phps)
t_p = T-t_s #(sec)
loss_series = (no/2*((V-2*I*R)/2)*I*t_s)/(1000*3600) #Energy lost during series period(kWh)
loss_parallel = (no*(V/2)/2*I*t_p)/(1000*3600) #Energy lost during parallel period(kWh)
#Result
print('Case(i) : Duration of starting period, t_s = %.1f sec' %t_s)
print('Case(ii) : Speed of train at transition, αt = %.1f sec' %V_transition)
print('Case(iii): Case(a): Rheostatic losses during series starting = %.2f kWh' %loss_series)
print(' Case(b): Rheostatic losses during parallel starting = %.2f kWh' %loss_parallel)
print('\nNOTE: ERROR: Calculation mistakes in the textbook solution')