- #1
MrMaxus
- 3
- 0
Hi,
I'm trying to program a sort of small car simulator, but I have a problem.
I managed to calculate the force on the car, acceleration, speed, air ressistance etc...
My theory:
We've got a car at a certain speed (v) and I calculate the RPM:
Now I calculate the torque:
Also I calculate the engine power (Watt) from horsepower.
Then I am able to calculate the force on the car:
Remarks:
1. it doesn't work when speed = 0
2. it's better to work with a torque and power function because they aren't the same at different engine speeds (max power at certain RPM), but how do you create/calculate such a function. Or can this only be made by testing the engine to get the values?
example of one:
http://www.electroprivod.ru/theory/2-8.gif
I'm from Belgium so please use the SI units!
I'm trying to program a sort of small car simulator, but I have a problem.
I managed to calculate the force on the car, acceleration, speed, air ressistance etc...
My theory:
We've got a car at a certain speed (v) and I calculate the RPM:
Code:
rpm = ( v * gear-ratio * current gear ratio ) / ( 2pi * tyre_radius) * 60
Now I calculate the torque:
Also I calculate the engine power (Watt) from horsepower.
Code:
torque = ( horsepower * 745.69987158227022 ) / ( 2pi * (rpm / 60 ) )
Then I am able to calculate the force on the car:
Code:
F = ( torque * final_gear_ratio * current_gear_ratio) / tyre_radius
Remarks:
1. it doesn't work when speed = 0
2. it's better to work with a torque and power function because they aren't the same at different engine speeds (max power at certain RPM), but how do you create/calculate such a function. Or can this only be made by testing the engine to get the values?
example of one:
http://www.electroprivod.ru/theory/2-8.gif
I'm from Belgium so please use the SI units!