There have been a number of ways to calculate train resistance (force opposing motion) over the years. Resistance calculations in Trainz appear to follow a formula proposed by J.W. Davis early in the last century.
Rail car resistance can be broken down into 5 parts - journal (or axle bearing), rolling (or flange), air, grade and curve. Each can be calculated seperately and then summed to get the total resistance. Trainz considers all but the curve resistance as far as I'm aware and have been able to verify by testing. The Davis formula considers 3 of these - journal, rolling and air.
The formula as given below is based on US units which interestingly Trainz seems to also follow in this instance. Most everything else for Trainz is specified in metric units but the input for train car resistance is specified in US units. (See section on motor container of the engine specification in the Technical Manual provided with UTC and TRS2004 for description of the various coefficients which are clearly not non-dimensional by inspecting the formula). Edit - Just to reiterate only the input for the train resistance coefficients in the engine spec is in US units - internally Trainz does everything in metric units.
In the following, W is the weight of the train car in tons (2000 lbs) and V is its velocity in mph. R represents resistance in lbs force.
Code:
R journal = 1.3W + 29n where n is total number of wheel axles on the car
R rolling = CrWV where Cr is rolling resistance coefficent (lbs/ton/mph)
R air = CaAV^2 where Ca is the air resistance coeficient (lbs/ft^2/mph^2)
and A is the cross sectional area of a transverse
section thru the car (ft^2)
So journal + rolling + air resistance for a car or loco is:
R = 1.3W + 29n + CrWV + CaAV^2 (lbs)
1) n - axle-count param in e-spec for the car
2) Cr - moving-friction-coefficient param in e-spec for the car (lbs/ton/mph)
3) A - surface-area param in the e-spec for the car (ft^2)
4) Ca - air-drag-coefficient param in the e-spec for the car (lbs/ft^2/mph^2)
Grade resistance is easily calculated as the weight of the train car times the sin of the grade angle which is equal to the weight of the car times the % of grade/100.
R grade = %gr x W x 2000/100 (lbs)
Curve resistance isn't considered (afaik) but is a function of the sharpness of the rail curve as measured by degree of curvature (function of the inverse of the radius of curve)
R curve = CcDW (lbs) with Cc a coeficient typically between 0.07 and 0.1 lb/ton/degree of curve.
Of course weight of the train car can be determined from the mass in kgs specified in its config. W = m x 2.2046/2000 (tons).
Apply the above formulas to each train car/loco in the train and sum up the individual resistance to obtain the total for the train.
If you're careful about the units used you can calculate fairly accurately the resistance Tranz calculates based on train weight, speed and track grade.
I ran a number of tests several years ago to help Stuart Thurstan (weevil) convince Auran there was a problem with the grade resistance calculated in TRS2004. For the most part all the resistances agreed well with the above formulas except for grade resistance which was out by about 20%. There were some minor differences but I currently use the above to predict resistance calculated by Trainz.
Bob Pearson
PS Where am I going with this - I'm not sure yet but stay tuned.
I hope TEE will find a new home if the current server problems can't be solved. I was looking to host it on my web page at one point since I have a link to it to use with a program I wrote, tzSTEC, that calcs steam loco power curves.
Here's the section from the Technical Manual distributed with TRS2004:
Code:
axle-count (self explanatory)
surface-area expressed in sq.ft
moving-friction-coefficient locomotives 0.03
freight cars 0.045
air-drag-coefficient streamlined locos 0.0017
locos 0.0025
freight cars 0.0005
pass. cars 0.00034
The values provided are pretty much the coefficients that Davis proposed.