DECKELEVEN'S BLOG

Here you can find out what we have been up to. Feel free to leave a comment or give your feedback!

Never Asked Questions About Train Physics

Today’s post is going to be a bit technical, but nothing too scary and it’s informative, so stay with me!

In Railroads 2, trains are simulated with a simplified physics model. The goal is to give a “realistic” feel when you play with trains. For instance, trains take time to accelerate to full speed. Locomotive seems to pull light passenger cars much more easily than heavy grain hoppers. Trains have a hard time climbing steep slopes. Streamliner trains with aerodynamic designs can go faster than regular trains. And so on…

In order to achieve this realistic feel, the game takes into account multiple physical properties: locomotive weight and power, total train weight, type of locomotive and number of wheels, but also some more complex properties like friction and air drag.

I’m sure you have a lot of questions about how this physics model works and how it is done in the game… or maybe you don’t.

Anyway, here is a NAQ on this topic.

What is a locomotive?

A locomotive is a machine that generates the tractive force which put a train in motion. In railway engineering, this force is called the Tractive Effort.

The main property of a locomotive is its Power. The power of a locomotive is the rate at which it does work. For instance a 800hp (horsepower) locomotive can produce as much work as 800 draft horses. That’s a lot of horses… The more powerful the locomotive, the more cars it can pull and the higher the acceleration.

Power (P) is related to the Tractive Effort (TE) and the speed (v) of the train with this formula:

    \[ P = TE \times v \]

Railroads 2 uses a constant power model for its calculation: the available power is always the same regardless of speed. So P is a constant. Easy peasy…

As a result TE and v are inversely proportional:
When the speed is low, the tractive effort is high. The locomotive is pulling very hard.
When the speed increases, the tractive force decreases. The locomotive is pulling less and less.

A small chart is worth a thousand words:

Tractive Effort (TE) at some Speed (v)

Wait-a-minute… so if this formula is correct, does this means that the locomotive will pull with an infinite force at zero speed?

Not really… There is a maximum practical value for the tractive effort.

When a train is starting from stationary (speed is close to zero), the tractive effort is maximal, but it cannot be infinite. If the train pulls too hard, the wheels will slip on the rail and the train won’t move at all. The locomotive driver must therefore reduce power to avoid wheel slip. This effectively limits the tractive effort to a maximum practical value.

There is a formula to calculate this Maximum Tractive Effort (TE_{max}):

    \[ TE_ {max} = W_{wheels} \times c_{friction} \]

Where W_{wheels} is the Weight on driving wheels,
and c_{friction} is the coefficient of friction.

What is this “weight on driving wheels”? It it the name of your rock band?

In a steam locomotive, not all wheels are coupled to the engine. Only the driving wheels transfer power and create movement thanks to adhesion to the rail.

The other wheels are of no use and are purely decorative (well to be honest, they are also useful for the locomotive stability and to support the firebox and cab weight, but that’s another matter…)

If the locomotive is heavy on the driving wheels, the adhesion is high. When the engine starts, the locomotive will “stick” to the rail and can move heavy cargo without slipping.
That’s why freight locomotives are heavy and usually have many small driving wheels: they can support more load and it increases the proportion of the locomotive weight used for adhesion. As a result, this increases the maximum tractive effort.

On the contrary, passenger locomotives are lighter and have bigger wheels that don’t have to rotate a lot when the train goes fast. This gives them speed, but they cannot pull heavy cargo.

In Railroads 2, the weight on driving wheels is modeled with a single parameter: the Adhesive Ratio. Each locomotive have an adhesive ratio that gives the percentage of locomotive weight that is supported by the driving wheels.

What about the coefficient of friction?

The maximum tractive effort is also proportional to a constant called the coefficient of friction c_{friction}. This coefficient depends on the steel the rail and the wheel are made of, but also on other conditions, like the weather. When it’s rainy, the rails are wet and slippery: the coefficient is low. That’s why train operators put sand on the rail. It increases the coefficient and it helps trains to start rolling in wet or cold weather. Most trains have there own reserve of sand in a sandbox.

Slippery rails can be caused by many things like fallen leaves in autumn, morning dew or even insects crossing the tracks.

In Railroads 2, the coefficient of friction is fixed for ease of computation. Sorry aficionados… no weather or caterpillar simulation yet…

Why do we need to pull?

Because nature is always pushing back.

To put the train is motion, the locomotive must overcome two opposing forces:

  • Friction, which is the force that comes from the surface contact between train wheels and the rail
  • Air drag, which is the force that comes from the resistance of the air to the train movement

These forces can be derived from these formulas:

    \[F_{friction} = c_0 \times m + c_1 \times m \times v\]

    \[F_{airdrag} = c_2 \times v^2 \]

Where m is the total mass of the train, v is the speed of the train, c_0 is the static/kinetic friction coefficient, c_1 is the rolling friction coefficient, and c_2 is the air resistance coefficient.

As you can see, the forces opposing the train movement increase with speed, while the tractive effort decreases with speed.
At some speed, they completely balance each other. The train speed has reached an equilibrium speed (V_{cruise}) and cannot go faster.

You can also see on the second formula, that the air drag will increase very rapidly with the train speed. At high speed, air drag is the main opposing factor to the the train motion. To solve this issue, locomotive engineers use aerodynamic designs like streamliner or bullet trains with very low c_2 coefficients. Oh clever ones…

We can update our chart with the opposing forces (F_o):

Tractive Effort and Opposing forces

How fast can we go ?

We already know that a locomotive cannot go faster than V_{cruise}. That’s when the tractive effort if fully opposed by friction and air drag. There is also another limitation to the maximum speed to take into account: a locomotive is always built to structurally resist up to certain maximum speed. You can theoretically go beyond this speed, but if you do, your locomotive will start shaking and creaking. Wheels will turn red hot and melt. Boiler will crack. Nuts and bolts will fly away. Not something you really want…

In Railroads 2, locomotives cannot go beyond this speed called V_{max}. Period.

The good news, is that more advanced and modern locomotives in the game have higher V_{max}. That’s a good incentive to boost your research program…

What now?

Okay… that was a lot of information! Let’s try to sum it up.

We know how to calculate the train tractive effort: TE = \frac{P}{v} and it cannot go higher than TE_{max}.
We also know how to calculate the opposing forces: F_o = F_{friction} + F_{airdrag}

We can now use Newton’s Second Law of Motion to derive our train acceleration:

    \[a = \frac{TE - F_o}{m} \]

From there, we can easily get the train speed. It cannot go higher than V_{max}.

Voilà! We have our train physics model. Let’s draw it on a chart:

Train physics model

Want more? Some extras

What happens when a train goes up a slope?

Well it’s bad… a part of the train own weight turns into a force opposing the train movement.
This force depends on the angle of the slope. Railroaders like to think in terms of grade. It can be calculated as:

    \[F_{grade} = W \times sin(\theta)\]

Where \theta is the angle of the slope and W is the weight of the train.

Train on a slope

We have to add this term to the Newton formula:

    \[a = \frac{TE - F_o - F_{grade}}{m} \]

Technically it also reduce the weight on the driving wheels and the maximum tractive effort.

If your train does not have enough speed, it can get stuck in the middle of the slope… a very ridiculous situation, so design your routes carefully.

What happens when a train goes down a slope?

Well it’s even worse… the part that was opposing the train movement is now reversed, and is helping the train movement. It can be fun when you are riding an electric scooter, but not so fun when you are driving a 10000 tons heavy freight train that can turn into an unstoppable killing machine.

What this means is that trains must absolutely slow down before going down any slope, even small ones, or else they can miss the next mandatory stop, in real life and in simulated life.

What about braking?

At some point, trains must brake to stop, or else trains will run lights and forget to stop at stations. The questions are how much? and when should we brake?

These are valid questions but unfortunately without a simple analytical solution and nice formula. The problem involves differential equations of the second order with messy exponential results, that would take too much computing power for a game.

In Railroads 2, we opted for an easier solution: all trains always brake with the same force: F_{brake} = b \times m
Where b is the coefficient of friction for braking and m is the total mass of the train. This basically increases the kinetic friction of the train by a fixed amount.

Thanks to numerical integration, the game constantly evaluates the braking distance of each train. If a train knows that a red light or a station is coming, it will apply brakes just in time (hopefully).

But what happens if a light turns red while the train is too close to brake ?

The short answer is: it never happens. Traffic lights are smart enough to never turn red when it’s too late.

The longer answer may be the topic of another post.

3 thoughts on “Never Asked Questions About Train Physics

Leave a Reply to dndonhell@gmail.com Cancel reply

Your email address will not be published. Required fields are marked *