0
$\begingroup$

Trying to build a simplified physics simulation for cars, along the lines of "Car Physics" by Marco Monster. I'm stuck at straight line acceleration. I don't know if I understand the processes correctly or not:

I'm using engine torque, gear ratio and throttle input to calculate the "potential drive torque" on the axle. From this, I directly calculate the angular acceleration of the drive wheels. Then I compare the actual speed of the vehicle with the angular velocity of the wheels to get the longitudinal slip ratio. If too much power is used, the result indicates that the tyre is spinning by a certain amount. And here's where my confusion starts. I then use the spin ratio and the load on the drive wheels to get the final drive force.

Am I correctly using the spin ratio curve by plugging in the spin ratio and using the resulting force directly as the final drive force?

This feels wrong, over time there's a discrepancy between the angular velocity of the wheel (calculated from engine torque) and the car's speed (calculated indirectly from load on the wheel, the only input that was carried over from the engine calculation before is the spin ratio). The difference between the two speed values gets larger as long as I accelerate.

Edit: Adding my current pseudo-code

var engineTorque = getEngineTorque(engineRpm, throttleInput)
var loadOnRearWheels = getLoadOnRearWheels(...)
var maxTireTraction = frictionCoefficient * loadOnRearWheels
var potDriveTorque = engineTorque * gearRatio
var potDriveForce = potDriveTorque / wheelRadius

var driveWheelAngularAcceleration = potDriveTorque / rearAxleInertia
driveWheelAngularVelocity += driveWheelAngularAcceleration * dt
driveWheelRpm = driveWheelAngularVelocity * 2 * PI
var slipRatio = getSlipRatio(driveWheelRpm, wheelRadius, speed)
var driveForce = getForceFromSlipRatio(slipRatio, loadOnRearWheels)

var totalForce = driveForce - resistanceForces - brakeForce
speed += dt * totalForce / mass
$\endgroup$
2
$\begingroup$

You need to convert the torque at the axle into force against the ground through the tire (Force = torque/radius). Then F=ma for the entire mass of the car (plus if you want to be precise the rotational mass of the wheels, but this will be only a fraction of the mass of the car).

Tire slip would be based on total force from the wheel versus friction available to keep the wheel from spinning. Friction = coefficient of friction times weight according to pure theory; real life shows that the width of the tires also matters. If the car is accelerating, the friction available to rear real drive wheels goes up due to weight transfer to the rear wheels, and goes down for front wheel drive wheels for the same reason. A car in a turn has less available friction for acceleration due to the lateral force due to centripetal acceleration (force of turning). A car at speed using aerodynamic devices to increase downforce will have more friction avaialble to prevent tire slip both during acceleration and cornering. F1 cars are the best example of this and is why they look like they corner on rails.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Would you mind going more into detail about the actual calculation of the tire slip? Should I use the full force from the wheel as long as it's lower than the max. tire traction, and cap it at that value? And if the force on the wheel is greater than the friction force, I compare wheel and car speed to get the slip ratio? Or does this slip calculation replace the one from the article, or how do those two calculations fit together? I updated my original question with pseudo code of the logic I currently have. $\endgroup$ – Paco1 Jul 7 at 21:50
  • $\begingroup$ If you need to understand how the car will move under wheelslip conditions, you will have to change to kinetic friction & re-calc the forces in play. The biggest issue is that the max friction is a vector force combining both side to side & fore/aft forces. $\endgroup$ – Tiger Guy Jul 8 at 20:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.