Calculating Friction & Air Resistance for a Train Game

In summary: The Maths could be very straightforward. The SUVAT equations are simple and easy to code. All you need is some typical values for 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
  • #1
Tim Leijten
28
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
  • #2
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
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
 
  • #4
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.
 
  • #5
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
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
 
  • #7
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
 
  • #8
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.
 
  • #9
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?
 

1. How is friction calculated in a train game?

Friction is calculated by multiplying the coefficient of friction (a constant value that depends on the materials in contact) by the normal force (the force perpendicular to the surface).

2. What is the difference between static and kinetic friction?

Static friction is the force that must be overcome to set an object in motion, while kinetic friction is the force that opposes the motion of an object that is already in motion.

3. How does air resistance affect the movement of a train in a game?

Air resistance (also known as drag) is a force that acts opposite to the direction of motion and can slow down the train. It increases with speed and surface area, so a train with a larger surface area will experience more air resistance than a smaller one.

4. What factors can affect the coefficient of friction in a train game?

The coefficient of friction can be affected by the types of materials in contact, surface roughness, temperature, and the presence of lubricants. In a train game, the coefficient of friction can also be adjusted to make the game more challenging or realistic.

5. How can I minimize air resistance in a train game?

To minimize air resistance, you can reduce the train's surface area by streamlining its shape. You can also decrease its speed or use materials that are more aerodynamic. In addition, you can reduce the air density or use a vacuum to eliminate air resistance completely.

Similar threads

Replies
22
Views
2K
Replies
26
Views
3K
  • Introductory Physics Homework Help
Replies
4
Views
921
  • Engineering and Comp Sci Homework Help
Replies
8
Views
1K
  • Introductory Physics Homework Help
Replies
3
Views
958
  • Mechanics
Replies
7
Views
4K
Replies
66
Views
3K
Replies
8
Views
1K
Replies
7
Views
3K
Back
Top