How can I simulate a car's acceleration using torque and RPM?

Click For Summary
SUMMARY

The discussion focuses on simulating a car's acceleration using torque and RPM, emphasizing the need for accurate physics modeling. Key concepts include the relationship between torque, horsepower, and acceleration, with the formula for horsepower being (torque * RPM) / 5,252. The conversation highlights the importance of input parameters such as drag coefficient, mass, and control parameters like gas and brake pedals. Participants suggest organizing data and utilizing Newton's laws of motion to develop a comprehensive simulation model.

PREREQUISITES
  • Understanding of Newton's laws of motion
  • Familiarity with torque and horsepower calculations
  • Knowledge of car dynamics including mass and drag coefficient
  • Basic programming skills for simulation implementation
NEXT STEPS
  • Research formulas for calculating wind resistance and its impact on vehicle speed
  • Learn about vehicle dynamics and how to model acceleration in simulations
  • Explore programming techniques for real-time physics simulations
  • Study the effects of different tire diameters on torque and force calculations
USEFUL FOR

Automotive engineers, game developers, and physics enthusiasts interested in creating realistic vehicle simulations and understanding car dynamics.

tarik666
Messages
2
Reaction score
0
Hey guys I need a bit of help with car physics type thing. I am trying to create a simulation of a car moving in a straight line. I have been searching the internet for two days but have not been able to find much.

I want the user to input the cars torque and then on a little simulation the user presses up and it does exactly what a car would do if you pressed down on the accelerator.

I need some help thou. What I have figured out lately is things live
velocity
acceleration
mass
momentum
torque
rpm
horsepower
force
energy
air resistance
friction

but I want to completely simulate a car on a road with air resistance. I have tried and tried but my figures are not. I need some formulas like how to convert the energy into speed and how to convert horspe power into energy.
I have a formula for converting torque and rpm into horsepower but I have no idea how to convert torque into rpm. Any help would be appriciated. Thanks
 
Physics news on Phys.org
I think you would benefit from first creating an organizational strategy. In particular, you should first separate the types of data which you are working with. Some data will exist as input parameters; things like the car's horsepower, torque, red-line parameter, drag coefficient, etc. You can build up sets of input parameters corresponding to different cars, and so on.

Next, isolate the parameters which are known as "control" parameters. These are things like the gas-pedal, break-pedal, and so on, which the actual driver of the car controls; these are somewhat similar to the inputs mentioned above, but they are still a separate category.

Finally, you want to set up your other parameters as functions of the input and control parameters. Then, the simulation basically must accomplish the task of computing these other unknowns.

You will certainly be able to find expressions and information to construct a model. I'm sorry but it is asking quite a lot for someone to provide all of these expressions for you. If you made a more specific inquiry, I'm sure people would be able to furnish you with some help. However, your main resources for this endeavor should be books. Look up some books on car mechanics, or automobile engineering, and so on, and you should be in good shape.
 
This is asking a lot, and the equations should be easy to find (mostly it's Newton's laws of motion), but a few things:

Torque doesn't get converted into RPM.
Horsepower doesn't get converted into energy (you can multiply by time to get energy, but I don't know why you'd need it anyway).
horsepower is rpm times torque
Torque times the diameter of the tires gives you the force. acceleration is force/mass
For a car, wind resistance (force) is drag coefficient times velocity squared

You'll need a bunch of assumptions and givens, like drag coefficient, friction loss in the car's transmission, mass, the car's torque curve (perhaps in table form), physical dimensions, etc.
 
I did some reading up and studying here is what I have so far.
Firstly I set some variables

brake=0;
global.speedy=0
global.force=0;
global.velocity=0;
acceleration=0;
mass=1000;
momentum=0;

Then in the game loop here is what I did

also one thing.
Once I have figured out wind resistance force how do I apply it to the car?
Cause the wind resistance force is larger than the cars force at the moment it I just say
speed-=resistance

acceleration=global.force/mass
global.velocity=global.velocity+mass*acceleration
momentum=global.velocity*mass

speed.y-=brake
speed.y+=acceleration
y-=speedy

global.speedy=acceleration/30*3600

and the above is to figure out the speed at which the car is moving. I don't quite know the forumula.

Anyways, a few questions what role does momentum play
what is torque and rpm, i know the formula to find horse power using them
(torque*rpm)/5,252 = horsepower.

so when the driver pushed full pedal down he applys what to the car, more torque, more energy I don't know?

At the moment in my code I just say if key_press up
{
apply more force
}

and finally brakes. How should I do brakes?
thanks for the help so far:D
 
Last edited:

Similar threads

  • · Replies 17 ·
Replies
17
Views
950
  • · Replies 95 ·
4
Replies
95
Views
7K
  • · Replies 15 ·
Replies
15
Views
5K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 60 ·
3
Replies
60
Views
6K
  • · Replies 9 ·
Replies
9
Views
1K
  • · Replies 10 ·
Replies
10
Views
751
  • · Replies 13 ·
Replies
13
Views
2K