Original Post
I'm modelling a clutch in my drivetrain, here's what I have so far: SpinEngine - the rate the engine is turning SpinShaft - the rate the driveshaft/differential is turning clutch - betwen 0 for fully depressed and 1 for fully up GearRatio - ratio for the curren gear DiffRatio - differential ratio Then I started off with:
GearedSpinShaft = SpinShaft * DiffRatio * GearRatio;
TorqueOnEngine = (GearedSpinShaft - SpinEngine) * clutch * 200;
I found this worked but occaisonally things went crazy. I realised that just as wheelspin actually reduces the force a tyre exerts on the ground, a similar slip system should happen here. Using the very simple approximation for force Vs slipRatio from Marco Monster I changed TorqueOnEngine = (GearedSpinShaft - SpinEngine) * clutch * 200; to TorqueOnEngine = max(-50,min(50,GearedSpinShaft - SpinEngine)) * clutch * 200;Ie keep the difference in spin in the range [-50,50]. This makes things much more realistic but not perfect. I wondered if the values 50 & 200 are vastly wrong but can't think of an analytical way to get values. 50 / 2PI ~ 10 rotations per second. 200 is just a 'stiffness constant' for how closely the engine rpm follows the changes to driveshaft rotation. Can I get away modelling the clutch when the clutch is fully up or should I just lock it? I imagine it shouldn't be linearly dependent on clutch in my equation mut some exponential type thing, but making it stiff enough might strain my integrator somewhat...