UI explaination: Orange bar is engine RPM, pink bar is clutch rotation RPM(in the middle). On the right, green is throttle, red is brake, and blue is the clutch. At the bottom right, current potential engine output is written in newton meters.
I created a vehicle simulation that realistically simulates how a car engine, clutch, transmission and drivetrain works.
In my simulation, the engine has a flywheel which 'stores inertia' that rotates as torque is applied to it.
(This is not the graph for the actual curves I used)
For cars with combustion engines, the amount of torque it can produce varies based on how fast the crankshaft is rotating, normally measured in RPM. I have coded a torque curve that takes it multiple data points, to simulate the actual output of a real combustion engine. And when no power is applied, there is an engine braking force. Upon hitting the rev limiter, power is cut.
Next is the gearbox, which uses real world values. The gearbox changes how much speed and torque the wheels will receive, low gear giving more torque while the engine has to spin quicker, while high gear allows a slower engine rotation for faster rotation of the wheels, and lower torque output.
And to connect the gearbox to the engine, comes the clutch.
In my simulation, clutch will automatically engage and disengage based on movement of the car, to try to prevent car from stalling, working somewhat like a automatic single/dual clutch gearbox. When the clutch is pressed in 50%, only half the engine power goes through to the wheels, spinning the engine faster than the clutch is rotating, which in reality would produce heat (I did not simulate clutch heating as there's no data on it, no games except Live for Speed actually simulates clutch temperature).
Next comes the brakes with a fixed brake torque output, with brake bias setting so the front brakes are stronger than the rear like in reality.
And lastly the anti-roll bar. It "connects" the left and right wheels so when the right suspension is compressed, a certain amount of force is transferred to the left wheels, so that the car doesn't roll over on a simple turn.
Comments