Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About the driveline basics...
05-24-2011, 05:19 PM,
#1
About the driveline basics...
So i'm a bit confused learning the whole driveline code in Vdrift

I'm not sure how the clutch is working in vdrift, but as i can see it sure is working. So could some one tell me if i got it right or what am i missing, since im trying to understand the basics of a driveline in vdrift (obviously).

As i understand in Vdrift there are two engine components?
One that is calculated from the wheels witch gives us the abiltyto drive the car
and other that is freely running, ie if the clutch is unlocked.

Well this seems quite understanding and real but how does vdrift exactly get the engine speed so that the clutch torque function works?
Okay well, i'l try to quicly write the code in a sort of minimalistic way to keep it super simple, and tell me what have i missed out?

Code:
// The overal transmission ratio (gear ratio + final drive ratio)
  ratio = GearRatio[gear] * FinalDriveRatio;

  // Here I'm doing a quick blocked differential
  driveshaft_speed = (LWheelAvel + RWheelAvel)/2;

  // Clutch speed, actually this is the transmission angularvelo...
  clutch_speed = driveshaft_speed * ratio;

  // Crankshaft Speed, is actually the engine angular velocity
  // And this is what confuses me, it's not related to wheels
  // But it works some how as good as Clutch Speed + sliping
  crankshaft_speed = averageAngularVelo;    

  // This is where the vdrifts clutch sliping magic happens
  // It thakes in both sides (engine & transmission) and
  // is modifyed by clutch position.    
  engine_drag = CalcClutchTorque(crankshaft_speed,clutch_speed);

  // engine.ComputeForces();
  // This is where the torque calculation is done
  // I'll Keep it simple for easyer reading
  engineTorque = CalcEngineTorque(RPM)* throttle;        
  engineFrictionTorque = CalcEngineFriction(RPM);    

  // ApplyClutchTorque(engine_drag, clutch_speed)
  // (From Vdrift: apply forces on the engine due to drag from the clutch)
  // I'm not sure why it thakes in clutch_speed...
  if ( transmission.GetGear() == 0 )
       clutchTorque= 0.0 ;
  else
       clutchTorque= engine_drag;

  // Total Engine Torque (motor torque - friction torque - clutch torque)
  // To clear this up, engine total torque Is cranckshaft torque
  engineTotalTorque = engineTorque+engineFrictionTorque-clutchTorque;
  crankshaftTorque = engineTotalTorque;

  // CalculateDriveTorque(drive_torque, engine_drag)
  // Now i'm getting the torque back to the wheels throught transmission
  transmissionTorque=engine_drag * ratio;
  // Since i'm using blocked differential, both wheels
  // get the same torque split to two
  driveshaftTorque=(transmissionTorque / 2) * FinalDriveRatio;

  // And now the final torque is added to the wheels...

Now what confuses me is that, looking at this code, it looks like the engine_drag is transfered to the wheels normally but i stil dont understand where does the difference come in between cranckshaft & driveshaft speed?
Could some one tell me what am i missing?
I have been learing car physics for years now and i always get to the point where i simply dont understand how the clutch works...

It's logical that when the clutch is Locked the engine speed = driveshaft speed, but if the clutch is sliping & unlocked, then i understand the engine has it's own speed mostly a simple timestep calculation, but torque transfer is the question.

Thanks for your time, and i hope some one can explaint me how it's done in vdrift, so i could finally understand it.
Reply


Messages In This Thread
About the driveline basics... - by smr597 - 05-24-2011, 05:19 PM
[No subject] - by NaN - 05-24-2011, 07:20 PM
[No subject] - by NaN - 05-24-2011, 07:46 PM
[No subject] - by smr597 - 05-25-2011, 03:30 AM
[No subject] - by smr597 - 05-26-2011, 01:26 PM
[No subject] - by joevenzon_phpbb2_import3 - 05-26-2011, 09:42 PM
[No subject] - by joevenzon_phpbb2_import3 - 05-26-2011, 10:08 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)