flo Wrote:new_speed_diff = engine_speed - drive_speed
There is on the one hand the engine speed, calculated from modified euler method in rotatinalframe and on the other hand the driveshaft speed computed "backwards" from the wheel speed over transmission to the clutch. The difference is multiplied with the maximum force at the clutch, which leads to a friction force. But this result is only active if new_speed_diff is between (-1, 1), elsewise the friction force is set to (-max_force) respectively (max_force). So if the current drive_speed is bigger than the engine_speed+1(both forward speed), you get in return -max_force, which in turn is getting positive because of the minus at the total torque.
total_torque = combustion_torque + friction_torque - (-max_force)
(with max_force from clutch)
What I meant in the last post was, you are driving with forward speed, but without use of the throttle at the moment you get something like this.
total_torque = 0 + (-small_friction_value) - (-max_force)
Yes, this is all correct.
Quote:And the engine would accelerate because of the high torque from the clutch, without any use of the throttle.
Yep! That's right. That's how it's supposed to be. If the wheels are moving faster than the engine, the clutch friction will cause the engine to speed up. This happens every time you downshift.
Quote:the clutch.GetTorque function only make sense, if new_speed_diff is really small and engine_speed is bigger than drive_speed
No, I disagree. I think the crucial idea you're missing is that the friction from the clutch is
relative. Any time one side of the clutch is spinning faster than the other side, you'll get friction. Depending on which side is spinning faster determines the sign of the friction. If the engine speed is faster than the driveshaft, the clutch friction will generate torque to slow the engine and speed up the wheels. If the engine speed is slower than the driveshaft, the clutch friction will generate torque to speed up the engine and slow the wheels.