Calculating Friction & Air Resistance for a Train Game

Click For Summary

Discussion Overview

The discussion revolves around calculating friction and air resistance for a train simulation game. Participants explore the relevant physics equations and concepts, including air resistance, rolling resistance, and the implications of using these equations in a game environment.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant asks how to calculate the friction of train wheels and air resistance at a given speed, expressing a desire for realistic physics in their game.
  • Another participant provides the equations for air resistance and rolling resistance, emphasizing the need for experimental determination of coefficients like the drag coefficient and rolling resistance coefficient.
  • Some participants suggest that hardcoding values might reduce realism, advocating for the definition of units and realistic values to maintain fidelity in the simulation.
  • A participant mentions the potential benefit of consulting a 'Train Driving Manual' for typical values related to acceleration and braking, suggesting that these could enhance the realism of the simulation.
  • Concerns are raised about the applicability of the rolling resistance formula, with one participant questioning whether it should account for speed, while another notes that rolling resistance theoretically does not depend on speed.
  • One participant expresses confusion over the calculations leading to unexpected backward motion of the train, seeking clarification on the wheel coefficient and its impact on the results.
  • Another participant acknowledges the complexity of train mechanics and suggests that while a simple equation might suffice, it may not capture all necessary components of friction.

Areas of Agreement / Disagreement

Participants express differing views on the best approach to implementing physics in the game, with some advocating for hardcoding values and others emphasizing the importance of using realistic equations and measurements. The discussion remains unresolved regarding the optimal method for achieving realism in the simulation.

Contextual Notes

There are limitations in the discussion regarding the assumptions made about the coefficients and the complexity of train mechanics. The applicability of the rolling resistance formula in relation to speed is also not fully resolved.

Tim Leijten
Messages
28
Reaction score
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)!
 
Physics news on Phys.org
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   Reactions: Tim Leijten
Robin04 said:
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
 
Tim Leijten said:
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.
 
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   Reactions: Robin04
Robin04 said:
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
 
Robin04 said:
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
 
Tim Leijten said:
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.
 
Tim Leijten said:
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?
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 95 ·
4
Replies
95
Views
7K
  • · Replies 22 ·
Replies
22
Views
5K
  • · Replies 26 ·
Replies
26
Views
5K
  • · Replies 77 ·
3
Replies
77
Views
6K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 7 ·
Replies
7
Views
5K
  • · Replies 13 ·
Replies
13
Views
2K