Calculating Friction & Air Resistance for a Train Game

Click For Summary
SUMMARY

This discussion focuses on calculating friction and air resistance for a train simulation game. Key equations mentioned include the air resistance formula: F_D = C_D (1/2) ρ v² A and the rolling resistance formula: F = C_{rr} N. Participants emphasize the importance of defining units in the game and suggest using realistic values for better accuracy. Additionally, they recommend researching drag coefficients and typical train performance metrics to enhance realism in the simulation.

PREREQUISITES
  • Understanding of basic physics principles, specifically forces and motion.
  • Familiarity with the equations for air resistance and rolling resistance.
  • Knowledge of unit definitions in physics, including length, time, and mass.
  • Experience with game development concepts, particularly in simulating physical systems.
NEXT STEPS
  • Research drag coefficients specific to trains to improve simulation accuracy.
  • Learn about the SUVAT equations for motion to enhance the physics model.
  • Explore train driving manuals for typical values of acceleration and braking distances.
  • Investigate the effects of speed on rolling resistance and other friction components in train mechanics.
USEFUL FOR

Game developers, physics enthusiasts, and anyone interested in creating realistic train simulation experiences will benefit from this discussion.

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