Hi everyone.
I'm working on a vehicle (more specifically: cars) simulation in Unity3D with a complete drivetrain system of engine, gearbox, differential, and wheels as separate components. Each component will update itself with the torque passing through the system. More specifically:
The torque starts from the engine initially, then through the clutch and gearbox to the differential, where the torque is splinted appropriately to two sides (either active wheels or axle differentials). The wheels update themselves and pass the force to the rigidbody. The feedback torque from the wheels is then passed through the system back the the engine in the next step to determine engine torque for this next step.
Currently my system is at early step where the engine never stall, the clutch is permanently locked. So the engineRPM is a simple (wheelLeftRPM + wheelRightRPM) * 0.5f.
I'm trying to simulate the open differential by splitting the torque 50-50 to both active wheels simply: wheelLeftTorque = wheelRightTorque = engineTorque * gear * 0.5f.
This works OK when the torque comes from the engine. But in the case where the torque comes from one of the active wheel or outside, for example, when the car is jacked up and one wheel got spun when the engine is not running. In this case, the other wheel will spin the other way.
I've watched some videos about open diff to be able to understand this. When one wheel is spinning and the diff case is held static, the spider gear that sits in between the side gears of two wheel axle, would spin (because the sun gear that the spider gear is connected to is held static, so it can only spin on its own axis). This rotation of the spider gear transfer rotation of one side gear to the other, making the other wheel spins the other way.
Mathematically, since wheelSpeedLeft + wheelSpeedRight = 2.0f * CageSpeed, when CageSpeed is 0, then wheelSpeedLeft and wheelSpeedRight must have opposite sign, which illustrates the opposite rotations of the wheels.
However, that's in term of speed and power flow. Since I'm working with torque, I don't know how the flow of torque going from one wheel to the other in this case. What is the amount of torque that goes from one wheel to the other? How should I model or come up with a formula that covers both cases when torque comes from the engine or from one side, or rather, fully cover the full flow of torque in the diff? The final answer that I need is the amount of torque that will flow to each wheel.
Thank you very much.