Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Engine and wheel inertia
07-19-2009, 03:20 PM,
#10
 
stan.distortion Wrote:
Quote:So, you're saying that with the lower spring rates the cars behave more realistically (including body roll)?
Made a big difference here, after a bit of messing around 45000 front and 35000 rear for the C7 seems about right so nearer 60% than 30%

Sounds like a good change. Do you have a sourceforge account? I could give you access to the data repo, if you want to check in your changes. I don't think anyone is actively tuning the cars at the moment (speak up if you are).

Quote:Probably a horrendous bodge but changing cardynamics.cpp@43 seems to sort out the engine inertia thing

I looked into this more and you're right, there is a bug where the engine inertia isn't taken into account when in-gear. Your change is very nearly right, but I don't think it's quite right; the way you have it, I'm not sure the engine gets the proper drag from the wheels. This change to carclutch.h gives the correct behavior:
Code:
T GetTorque ( T n_engine_speed, T n_drive_speed )
        {
            engine_speed = n_engine_speed;
            drive_speed = n_drive_speed;
            
            T normal_force = clutch_position * max_pressure * area;
        
            /*if (std::abs (engine_speed - drive_speed) < threshold * normal_force)// || clutch_position >= 1.0)
            {
                engaged = true;
                last_torque = 0.0;
                return 0.0;
            }
            else*/
                engaged = false;
        
            T force = sliding_friction * normal_force;
            if (engine_speed < drive_speed)
                force = -force;
        
            //compute torque by applying force at the radius
            last_torque = force * radius;
            return force * radius;
        }
However, the fix above causes the engine RPMs to jitter a bit around the fixed value because the clutch friction is always over correcting slightly. It's hardly noticeable but bugs me a bit so I'm going to see if I can't come up with something fancier (maybe preventing the clutch friction from over-correcting, or maybe adding the engine inertia to the inertia of the drive wheels when in-gear).

Quote:Quick question, where does the wheel mass get applied to the momentum?
I have tried messing around with the mass and inertia and a wheel mass of 35 and inertia of 2.5 gives something similar to a mass of 15 and inertia of 6 but I can't find where the mass effects momentum or inertia.
cheers

The tire rotational-inertia parameter (from the .car file) sets the wheel's inertia (in the code). The wheel's mass parameter isn't used for the wheel's inertia. If you're adjusting the wheel mass and it's causing different behavior, I don't understand how either... although of course a higher mass wheel will make the car weigh more and so it'll get very slightly more grip.
Reply


Messages In This Thread
Engine and wheel inertia - by stan.distortion - 07-16-2009, 02:32 PM
[No subject] - by stan.distortion - 07-16-2009, 06:26 PM
[No subject] - by stan.distortion - 07-17-2009, 01:01 PM
[No subject] - by joevenzon_phpbb2_import3 - 07-17-2009, 06:40 PM
[No subject] - by joevenzon_phpbb2_import3 - 07-17-2009, 07:00 PM
[No subject] - by joevenzon_phpbb2_import3 - 07-17-2009, 07:02 PM
[No subject] - by stan.distortion - 07-18-2009, 09:30 AM
[No subject] - by joevenzon_phpbb2_import3 - 07-18-2009, 08:12 PM
[No subject] - by stan.distortion - 07-19-2009, 09:12 AM
[No subject] - by joevenzon_phpbb2_import3 - 07-19-2009, 03:20 PM
[No subject] - by stan.distortion - 07-19-2009, 04:21 PM
[No subject] - by stan.distortion - 07-19-2009, 05:03 PM
[No subject] - by joevenzon_phpbb2_import3 - 07-19-2009, 11:20 PM
[No subject] - by stan.distortion - 07-21-2009, 04:05 PM
[No subject] - by stan.distortion - 07-22-2009, 04:47 PM
[No subject] - by stan.distortion - 07-22-2009, 08:53 PM
[No subject] - by joevenzon_phpbb2_import3 - 07-22-2009, 10:26 PM
[No subject] - by stan.distortion - 07-23-2009, 02:33 AM
[No subject] - by stan.distortion - 07-23-2009, 04:39 AM
[No subject] - by joevenzon_phpbb2_import3 - 07-27-2009, 12:24 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)