Freighttrains and braking trains

Got an idea for a new feature in TTDPatch? Post it here.

Moderator: TTDPatch Moderators

Uwe
Transport Coordinator
Transport Coordinator
Posts: 353
Joined: 09 Jul 2004 14:05
Location: Germany

Freighttrains and braking trains

Post by Uwe »

While I was updating my railway guides I stumbled upon this part, more specifically, the part about building tracks going down a hill and that they should be built in a realistic way. With the freighttrains switch we can simulate a heavy train, which has quite an impact when going up a hill, but not for going down again.

I think a train which is too heavy for the brakes should be punsished in some way when attempting to go down a hill that is too steep. Basically this would work in the same way as the realistic acceleration model, but just in the inverse direction. For simplification one could say, the engine(s) do(es) not have to pull the train down the hill, but push against it in order to make it slower. And if the tractive effort of the engine(s) isn't high enough, it cannot brake the train. But what should happen if a train is too heavy? In reality it would speed up (and perhaps derail). In the game, one could perhaps just make it break down or slow it down to 1mph (for safety reasons ;-) ), enforcing the player to build a track that's not as steep.

Admittedly, this is just about realism, for the average player this may not a useful feature and I do not know how difficult it would be to implement it, but I felt like posting the idea anyway.
User avatar
SuperTycoon
Chief Executive
Chief Executive
Posts: 733
Joined: 24 Jun 2004 20:05

Re: Freighttrains and braking trains

Post by SuperTycoon »

Interesting suggestion, although if my memory of mechanics lessons serves me correctly the actual mass of the train will have no bearing on its downhill acceleration.

Code: Select all

a = acceleration
m = Mass of train
g = Gravitational constant (9.866)
x = angle of the slope

Force created by the action of gravity on the train = mg

Downward force resolved parallel to the plane of the slope = (mg)Cos(x)
Given that Newton's laws state F=ma, then a = F/m
In this case a = ((mg)Cos(x))/m = gCos(x)
Thus, the mass of the train has no bearing on the acceleration.
However, we have neglected to factor in friction, although I don't really know the effect of the fact moving wheels are involved, as a general rule friction is proportional to the normal reaction force, in this case (mg)Sin(x), so increasing the mass will increase the friction, reduce the resultant force in the downhill direction, and thus reduce downhill accelration.

The misconception that heavy trains are more likely to "run-away" on hills could stem from the fact that a heavier train will cause more damage, since its kinetic energy is proportional to this mass, and the laws of energy conservation state that this energy has to go somewhere when the train stops (since this kinetic energy is no longer present) this energy is likely tyo be lost in the form of transfering kinetic energy to other particles (breaking stuff) sound energy (a big bang) and potentially some heat as well.
Image
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Freighttrains and braking trains

Post by DaleStan »

There are two types of friction: Rolling resistance and air resistance.
Force of rolling resistance increases approximately proportionally to weight, meaning acceleration of rolling resistance remains approximately constant.
Force of air resistance increases approximately proportionally to the square of velocity, and is approximately constant WRT both train length and train weight, meaning acceleration of air resistance decreases for heavier trains.

So maybe heavier trains should travel downhill slightly faster, but that v-squared term in the air friction eats up any extra forces rather quickly.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Freighttrains and braking trains

Post by wallyweb »

I think that the current patch curves switch handles this scenario quite nicely.
In real life, steep slopes are solved with switchbacks, a series of curves and straight sections. The patch's curves switch causes trains to slow down through the curves. The result is that a train heading down a steep slope via switchbacks slows for each curve. The effect that I see in my games is that the train is braking as it goes down the slope.
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

Re: Freighttrains and braking trains

Post by Zephyris »

If there are two trains, of different weights, with the same brakes, going down the same hill, the heavier one will go faster. The brakes can apply a maximum force, which counteracts the force of gravity. For a heavier train the force of gravity is greater, so the force due to braking may not be enough to counteract it => accelaration and a runaway train...
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Freighttrains and braking trains

Post by DaleStan »

Zephyris wrote:If there are two trains, of different weights, with the same brakes, going down the same hill, the heavier one will go faster. The brakes can apply a maximum force, which counteracts the force of gravity. For a heavier train the force of gravity is greater,
True. The force of gravity parallel to the hill (mg sinΘ) increases proportional to the weight of a train. However, the normal force (mg cosΘ), and hence the maximum frictional force (mg μ cosΘ), also increase proportional to the weight of the train, since all wheels have brakes. So increasing the weight of a train that can stop will actually increase the net decelerative force (mg μ cosΘ - mg sinΘ = mg (μ cosΘ - sinΘ) ) , but this will be increased exactly proportional to the weight of the train, meaning that the braking acceleration (g (μ cosΘ - sinΘ) ) will (*drum roll*) remain constant.

Please cease blathering about physics until you've actually taken some classes in it? Thank you.

m: mass
g: force of gravity (9.8 m/s²)
μ: coefficient of friction -- constant
Θ: slope angle

[0] braking force less gravitational force.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Freighttrains and braking trains

Post by wallyweb »

Evil CEO: We need to increase profits! The shareholders and my bonus demand it! Effective immediately track inspection and maintenance intervals are doubled. Furthermore, the sides of all bulk ore carriers are to be raised by 1 foot to increase capacity. Don't forget to delete this email after you have read it.

:?
User avatar
JGR
Tycoon
Tycoon
Posts: 2559
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: Freighttrains and braking trains

Post by JGR »

But is not mg mg μ cosθ the force of friction between the wheel and the rail, which is the limiting factor for wheel-slip?
Surely the maximum frictional force between the brake-blocks and the wheels is independent of the force between the wheel and the rail (the train weight).
So if we assume that the brake-blocks can grip the wheels with a maximum force (by hydraulics/air pressure or whatever), due to limits of the mechanism, than the friction force on the wheel itself would have a maximum.

So I would say that if mg sinθ rose above the maximum friction force applicable at the brake blocks, but below the maximum friction between the wheel and rail, the wheel rotation speed would not decrease when the brakes were applied and the train would accelerate down the slope at mg sinθ - max brake friction - other resistive forces/frictions.
So Zephyris would be correct if those conditions were possible, which would indicate that the train's brakes are rather inadequate :)
I suppose also if the slope were unrealistically steep, mg μ cosθ would be less than mg sinθ and the train would slide into oblivion.

But within sensible parameters, DaleStan is correct.

(In case anyone asks I am currently doing A-level physics, maths and further maths)
Ex TTDPatch Coder
Patch Pack, Github
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

Re: Freighttrains and braking trains

Post by Zephyris »

The friction of brake blocks against the wheels is generally the limiting factor, imagine parking your car on a really steep hill.
Please cease blathering about physics until you've actually taken some classes in it? Thank you.
I have a degree in physics...
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Freighttrains and braking trains

Post by DaleStan »

Zephyris wrote:The friction of brake blocks against the wheels is generally the limiting factor, imagine parking your car on a really steep hill.
First, that's an invalid comparison. My car has rubber wheels and is parked on asphalt. The train has steel wheels and is parked on steel rails. The rubber-asphalt coefficient of friction is significantly larger than steel-steel coefficient of friction. Could that make a difference in whether or not the train brakes could lock the train wheels under circumstances where car brakes could not lock the car wheels?
Second, that's an invalid comparison. My parking brake only applies braking power to half of my car's wheels. Train brakes apply braking power to all of the train's wheels.

If, on the other hand, you meant "imagine stopping on a really steep hill":
First, I've never met with a(n un-iced) hill where I couldn't stop my car using the foot brake. (And never want to meet with one, should it exist.)
Second, it's still an invalid comparison for the same rubber-asphalt vs steel-steel reason above.
Third, the presence of ABS as standard on all recent cars should give you an indication of the which of the pad-disk and wheel-road frictional forces are the limiting factor, even with a larger wheel-road coefficient.
Zephyris wrote:I have a degree in physics...
So is that a BS (I'm sure we all know what that means), an MS (More of the Same), or a Ph. D (Piled Higher and Deeper)?

Personally, I'm guessing the last, on the "know more and more about less and less, until finally you know absolutely everything about nothing at all" theory.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
doktorhonig
Tycoon
Tycoon
Posts: 1104
Joined: 22 Aug 2006 11:03
Location: Austria
Contact:

Re: Freighttrains and braking trains

Post by doktorhonig »

Erm.. normally the train should slow down before going down the hill, if it isn't able to provide enough "braking power".

Is OpenTTD coding so frustrating? Every time I read a posting from a developer, it seems, you're all annoyed sociopaths. I highly appreciate your work though, but I'd expect you to work on first person shooters instead of peaceful train sims.
User avatar
JGR
Tycoon
Tycoon
Posts: 2559
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: Freighttrains and braking trains

Post by JGR »

The fact of the matter is that trains are not (in normal operation) sent down hills steep enough for there to be a potential for insufficient braking, assuming functioning braking systems.
The whole argument is somewhat moot.
In a game with no scale, where trains decelerate to 0 in 0.5 tiles, trying to fit such concepts into the game is a non-starter, and certainly not worth getting upset over.
If you want to take it into account in your games, build stepped/switched descent tracks.

Coding for something like OpenTTD or TTDPatch is probably easier than a FPS.
As for being annoyed; that's what the intertubes (and life in general really) does to people...

In my opinion, degrees are more like pyramids of knowledge than towers of minuscule area, and poking fun at them accomplishes little.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

Re: Freighttrains and braking trains

Post by Zephyris »

BA actually, because of cambridge weirdness! And its true what people say, I can do quantum mechanics, but can't do anything actually useful!
User avatar
athanasios
Tycoon
Tycoon
Posts: 3138
Joined: 23 Jun 2005 00:09
Contact:

Re: Freighttrains and braking trains

Post by athanasios »

Oh man, how can I go through all this physics stuff? I haven't done physics for ages.

So weight is irrelevant? I remember a documentary about a derailed train that caused disaster and among the factors that led to derailment was the fact that it was overloaded. ?(
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.


I prefer to be contacted through PMs. Thanks.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Freighttrains and braking trains

Post by DaleStan »

Overloaded is possible; the rails, bridges, axles, &c. do have a maximum safe loading. But until you get to "overloaded", an increased weight only means that forces applied by only the engine(s) result in lower accelerations. Forces that are applied to the whole train all grow in proportion to weight, so resultant acceleration stays constant.

Underloaded (or improperly loaded) is also possible, I think, though much harder to pull off. It would require a crater-style elevation[0] (or at least a washboard) and one or more of heavy end cars, lightweight front/middle cars, and/or an over-strong engine. Put all of these together, in the right (wrong?) fashion, and I think you can get the couplers to provide upward forces on the middle cars. Do it horribly wrong, and that upward force might exceed the weight of the rail-car. I'm quite sure this would be a Bad Thing(tm).

[0] Pardon the ASCII: /`-'\
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
Dave
Moderator
Moderator
Posts: 17243
Joined: 26 Dec 2005 20:19
Location: North London

Re: Freighttrains and braking trains

Post by Dave »

Zephyris wrote:BA actually, because of cambridge weirdness! And its true what people say, I can do quantum mechanics, but can't do anything actually useful!
You have a BA in Physics!?

A BACHELOR OF THE ARTS DEGREE... IN PHYSICS!?

Is something not computing here!?

I'm doing a BA Honours degree... But my course is quite blatantly about the arts. You're doing one of the CORE SUBJECTS of science at degree level and getting a BA!?
Official TT-Dave Fan Club

Dave's Screenshot Thread! - Albion: A fictional Britain
Flickr


Why be a song when you can be a symphony? r is a...
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

Re: Freighttrains and braking trains

Post by Zephyris »

Its called "tradition". Or "pretentiousness".
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Freighttrains and braking trains

Post by wallyweb »

Leonardo DaVinci must have been a Cambridge graduate. :lol:
My father was. :D
This also explains how those flaky arts students are able to hold the edge in those races. 8)
"Let's see now ... the coefficient of resistance of water times ... "
User avatar
Dave
Moderator
Moderator
Posts: 17243
Joined: 26 Dec 2005 20:19
Location: North London

Re: Freighttrains and braking trains

Post by Dave »

Zephyris wrote:Its called "tradition". Or "pretentiousness".
Oxford sucks.

Cambridge sucks even more.

This from someone tipped for Oxford 5 years ago.
Official TT-Dave Fan Club

Dave's Screenshot Thread! - Albion: A fictional Britain
Flickr


Why be a song when you can be a symphony? r is a...
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

Re: Freighttrains and braking trains

Post by Zephyris »

tbh the course was rubbish, its bad when you realise you really are doing something purely for the degree...
Post Reply

Return to “Suggestions”

Who is online

Users browsing this forum: No registered users and 21 guests