School of Computer Science Introduction to Programming
Due: Sept. 25
ASSIGNMENT 1 4%
Rolling Resistance of Trains
A railway vehicle moving across level track, in still air and constant speed is still
subject to resistances which must be overcome by the tractive effort of the locomotive.
These resistances include rolling friction between wheel and rail, bearing resistance,
train dynamic losses, and air resistance. In 1926, W.J.Davis proposed one of the ﬁrst
formulas for computing tractive resistance. In 1990,
Canadian National produced another version of
the train resistance equation which has produced
reliable results in train performance calculations.
18N CaV 2
R r1 .5 × +0 .03V +
R = the rolling resistance of vehicle in lb per ton
N = number of axles
W = total weight in tons of locomotive or car
V = velocity of train in mph
C = streamlining coeﬃcient
a = the cross-sectional area of the locomotive or car in square feet
For example, consider the following values for C, a, and W:
Type of equipment C coefﬁcient Area (square feet) Weight (lbs)
Leading freight locomotive 24.0 160 416,000
Box car 4.9 140 211,800
Tank car 5.5 95 263,000
Hopper car 7.1 125 286,000 For example, a box car (211,800 lbs = 105.9 tons) with 4 axles, moving at 13.7 mph
would have a rolling resistance of 1.552 lbs per ton, or (1.552 times 105.9 tons) =
164.36 lbs. This essentially means that if the rolling resistance is 1.552 pounds per ton,
then it would take a pull of 1.552 pounds to keep one ton of train moving forward.
Write a program to calculate the rolling resistance of a particular part of a train. Note
the following constraints on input and output.
1. The total weight of the railcar or locomotive is to be input in pounds instead of tons.
2. Weight input cannot be input as 200,000, but rather 200000.
3. Input should indicate the type of units - e.g. pounds, miles per hour, etc.
4. Output should be expressed to 3 decimal places.
Use the following program skeleton:
> h . o i d t s < e d u l c n i▯#
) d i o v ( n i a m t n▯i
s n o i t a r a l c e d e l b a i r a v / / ▯
t u p n i r e s u / / ▯
s n o i t a l u c l a c / / ▯
t u p t u o r e s u / / ▯
; 0 n r u t e r ▯