How to calculate Train speed with friction? (developing a little experiment game)

  • #1
Hi there,

I am new here so please don't be too hard on me yet and move this post if i placed it in the wrong forum.
I am developing a little experiment game and i want the train to drive using real physics, but I am really bad at physics.
So my question is is how do I calculate the friction of the train wheels and the air resistance at the provided speed?
What input values are needed for that and what formula?


Thank you very much!
btw. This is not a homework question(even though it may look like one)!
 

Answers and Replies

  • #2
259
16
The equation for air resistance is: ##F_D = C_D \frac{1}{2} \rho v^2 A## where ##C_D## is the drag coefficient (it is usually determined by measurement so you should do some research about the drag coefficient of trains), ##\rho## is the density of the air, ##v## is the speed of the train relatively to the airflow, ##A## is the cross section area of the train.

The equation for rolling resistance is ##F = C_{rr} N## where ##C_{rr}## is the rolling resistance coefficient (also determined by measurement) and ##N## is the force exerted on the wheel by the rails (in this case we could say it's equal to the gravitational force ##mg##)

What is your project about? Is it a computer game you're coding? If it is then it wouldn't be the best choice to put these equation right in your code because these quantities have dimensions so if you want to use them in your game in this form then you would have to redefine these dimensions in your game too. I think it would make more sense to just hardcode the basic relationships between these quantities (like air drag is proportional to ##v^2##) and find out some constants experimentally that give the best feeling of reality.
 
  • Like
Likes Tim Leijten
  • #3
The equation for air resistance is: ##F_D = C_D \frac{1}{2} \rho v^2 A## where ##C_D## is the drag coefficient (it is usually determined by measurement so you should do some research about the drag coefficient of trains), ##\rho## is the density of the air, ##v## is the speed of the train relatively to the airflow, ##A## is the cross section area of the train.

The equation for rolling resistance is ##F = C_{rr} N## where ##C_{rr}## is the rolling resistance coefficient (also determined by measurement) and ##N## is the force exerted on the wheel by the rails (in this case we could say it's equal to the gravitational force ##mg##)

What is your project about? Is it a computer game you're coding? If it is then it wouldn't be the best choice to put these equation right in your code because these quantities have dimensions so if you want to use them in your game in this form then you would have to redefine these dimensions in your game too. I think it would make more sense to just hardcode the basic relationships between these quantities (like air drag is proportional to ##v^2##) and find out some constants experimentally that give the best feeling of reality.
Thanks for your reply!
Could you maybe elaborate a bit more on why you think it might be better if I hardcode these values in?
The aim of this game is to be a sort of Train Simulator and thus I would like physics to be as realistic as possible, where as i thing hardcoding values in will make it less realistic.
So could you explain a bit more?

Thank you very much
 
  • #4
259
16
Thanks for your reply!
Could you maybe elaborate a bit more on why you think it might be better if I hardcode these values in?
The aim of this game is to be a sort of Train Simulator and thus I would like physics to be as realistic as possible, where as i thing hardcoding values in will make it less realistic.
So could you explain a bit more?

Thank you very much
Ah, I see. So if you want your game to be this realistic then forget this hardcode part I said. You have to define units in your game, specifically length, time and mass. Any other unit can be expressed with these three. If you do so, and use realistic values in your game then the equation should also give a good feeling of reality.
 
  • #5
sophiecentaur
Science Advisor
Gold Member
25,223
4,838
I wonder if you could do better by reading a 'Train Driving Manual ', which would give you typical values of acceleration, coasting distances and stopping distances for different train configurations. You could use those values to supply realistic values for your train simulation.
I remember, several years ago, playing with a train simulator on a friend's computer. Why not buy one simulator (or more) and see what constants are used. (Stopwatch needed to find acceleration and braking rate)
The Maths could be very straightforward. The SUVAT equations are simple and easy to code. All you need is some typical values of Acceleration.
I just found this link which seems to answer many of the questions you must have. The equations are pretty straightforward and the article deals with climbing and descending too. There must be other articles too. I googled "train braking performance" for that one.
 
  • Like
Likes Robin04
  • #6
The equation for air resistance is: ##F_D = C_D \frac{1}{2} \rho v^2 A## where ##C_D## is the drag coefficient (it is usually determined by measurement so you should do some research about the drag coefficient of trains), ##\rho## is the density of the air, ##v## is the speed of the train relatively to the airflow, ##A## is the cross section area of the train.

The equation for rolling resistance is ##F = C_{rr} N## where ##C_{rr}## is the rolling resistance coefficient (also determined by measurement) and ##N## is the force exerted on the wheel by the rails (in this case we could say it's equal to the gravitational force ##mg##)

What is your project about? Is it a computer game you're coding? If it is then it wouldn't be the best choice to put these equation right in your code because these quantities have dimensions so if you want to use them in your game in this form then you would have to redefine these dimensions in your game too. I think it would make more sense to just hardcode the basic relationships between these quantities (like air drag is proportional to ##v^2##) and find out some constants experimentally that give the best feeling of reality.
I took a good look at your fomulas and I notice that you don't take the speed of the train in consideration with the wheel force formula, doesn't that change when you drive faster?
And do you maybe know a formula that takes the friction of the train bearings in consideration?


Thanks
 
  • #7
Ah, I see. So if you want your game to be this realistic then forget this hardcode part I said. You have to define units in your game, specifically length, time and mass. Any other unit can be expressed with these three. If you do so, and use realistic values in your game then the equation should also give a good feeling of reality.
Hey, i ran into a problem, the force generated by the second formula seems way to high to me, i use it like this:
Fw = 0.38*(87000*9.81)
Where 0.38 is the wheel coeficeny, 87000 is the train mass, and 9.81 the gravity.
Fr = Fw+Fairdrag
and then (f-Fr)/m = acceleration
But my train goes backwards instead of forwards, the train force(without drag, and wheel drag) is 300000.
All values seem ok to me, so could you tell me what i am doing wrong?
Is it the wheel coeficeny that I have wrong?
BTW. Fairdrag seems ok to me, so i didnt post it.

Thanks
 
  • #8
259
16
I took a good look at your fomulas and I notice that you don't take the speed of the train in consideration with the wheel force formula, doesn't that change when you drive faster?
And do you maybe know a formula that takes the friction of the train bearings in consideration?
Theoretically, the rolling resistance does not depend on the speed. However, a train is much more complicated mechanically than a rolling wheel, there are lots of other components that take part in the total friction. The question would be: is it necessary to take every single component of a train into consideration, or you could get quite similar results with a simple equation too. Maybe that study about braking distances could answer this question (I haven't taken a look at it myself).

There are no formulas for every single case of a phenomenon you can imagine. Formulas tend to describe the very basic behaviors and if you want to describe a more complex system then you have to construct a model based on that fundamental formula.

I would suggest you try the simplest version possible and see if it looks real. If not, you can always make your model more complicated.
 
  • #9
259
16
Hey, i ran into a problem, the force generated by the second formula seems way to high to me, i use it like this:
Fw = 0.38*(87000*9.81)
Where 0.38 is the wheel coeficeny, 87000 is the train mass, and 9.81 the gravity.
Fr = Fw+Fairdrag
and then (f-Fr)/m = acceleration
But my train goes backwards instead of forwards, the train force(without drag, and wheel drag) is 300000.
All values seem ok to me, so could you tell me what i am doing wrong?
Is it the wheel coeficeny that I have wrong?
BTW. Fairdrag seems ok to me, so i didnt post it.

Thanks
Where did you get your numbers from? Are they consistent?
 

Related Threads on How to calculate Train speed with friction? (developing a little experiment game)

Replies
5
Views
753
Replies
10
Views
968
Replies
18
Views
3K
Replies
15
Views
2K
  • Last Post
Replies
10
Views
1K
Replies
3
Views
2K
Replies
5
Views
2K
Top