Let's talk about new engine model (engine.ini)

Discussion in 'Car Modding' started by jtbo, Aug 9, 2012.

  1. jtbo

    jtbo Registered

    Joined:
    Jan 12, 2012
    Messages:
    1,668
    Likes Received:
    48
    With Clio mod ISI gave use new engine model, so engine.ini is now bit different, I try to put here some things that I know, but please correct me if I have got something wrong and also don't be afraid to say if your opinion differs from something as more views give always better perspective.

    EngineInertia is being discussed in inertia topic, so I left that out from my writeup, also I omitted some very clear things, maybe forgot some things, took me more than hour to type so errors will be there, I'm sure of it.

    This is very crude engine file, where most parameters are way off, it is Clio file, with torque curve and few other parameters fiddled with, but mostly clio settings.
    Code:
    // Pontiac 400 ram air automatic
    // Torque: 555 NM @ 3200 RPM, Power: 250 (325 Gross) horsepower @ 4800 RPM 
    ReferenceConditions=(101325,1.225,0.068)
    RPMBase=(    0, -23.0, -23, 0.15, 1)
    VolumeFract=(0, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000)
    MixtureFract=(1)
    RPMBase=(  250, -20.5, -7, 0.05, 1)
    VolumeFract=(0, 0.985, 0.986, 0.988, 0.988, 0.991, 0.993, 0.995, 0.996, 0.997, 0.998, 0.999, 0.999, 0.999, 1.000, 1.000)
    MixtureFract=(1)
    RPMBase=(  500, -19.5, 123, 0.02, 1)
    VolumeFract=(0, 0.824, 0.874, 0.908, 0.930, 0.946, 0.960, 0.968, 0.976, 0.983, 0.988, 0.992, 0.995, 0.997, 0.999, 1.000)
    MixtureFract=(1)
    RPMBase=(  750, -19.9, 282, 0.00, 1)
    VolumeFract=(0, 0.684, 0.772, 0.832, 0.874, 0.903, 0.927, 0.943, 0.956, 0.968, 0.979, 0.985, 0.991, 0.994, 0.997, 1.000)
    MixtureFract=(1)
    RPMBase=( 1000, -20.4, 330, 0.0, 1)
    VolumeFract=(0, 0.564, 0.679, 0.762, 0.821, 0.862, 0.895, 0.917, 0.937, 0.954, 0.969, 0.979, 0.987, 0.992, 0.996, 1.000)
    MixtureFract=(1)
    RPMBase=( 1250, -20.9, 355, 0.0, 1)
    VolumeFract=(0, 0.461, 0.596, 0.696, 0.771, 0.822, 0.864, 0.893, 0.918, 0.940, 0.960, 0.972, 0.983, 0.989, 0.995, 1.000)
    MixtureFract=(1)
    RPMBase=( 1500, -21.5, 383, 0.0, 1)
    VolumeFract=(0, 0.374, 0.521, 0.635, 0.723, 0.783, 0.834, 0.868, 0.899, 0.927, 0.950, 0.966, 0.979, 0.986, 0.994, 1.000)
    MixtureFract=(1)
    RPMBase=( 1750, -22.2, 390, 0.0, 1)
    VolumeFract=(0, 0.301, 0.453, 0.578, 0.678, 0.746, 0.805, 0.845, 0.881, 0.913, 0.941, 0.959, 0.974, 0.984, 0.993, 1.000)
    MixtureFract=(1)
    RPMBase=( 2000, -22.8, 396, 0.00, 1)
    VolumeFract=(0, 0.239, 0.392, 0.525, 0.634, 0.710, 0.776, 0.821, 0.863, 0.900, 0.931, 0.953, 0.970, 0.981, 0.992, 1.000)
    MixtureFract=(1)
    RPMBase=( 2250, -23.6, 404.6, 0.00, 1)
    VolumeFract=(0, 0.188, 0.338, 0.476, 0.593, 0.676, 0.748, 0.799, 0.845, 0.886, 0.922, 0.946, 0.966, 0.978, 0.990, 1.000)
    MixtureFract=(1)
    RPMBase=( 2500, -24.3, 413.5, 0.00, 1)
    VolumeFract=(0, 0.147, 0.290, 0.431, 0.554, 0.643, 0.721, 0.777, 0.827, 0.873, 0.913, 0.940, 0.962, 0.976, 0.989, 1.000)
    MixtureFract=(1)
    RPMBase=( 2750, -25.2, 417, 0.00, 1)
    VolumeFract=(0, 0.114, 0.247, 0.389, 0.517, 0.611, 0.695, 0.755, 0.810, 0.860, 0.904, 0.934, 0.958, 0.973, 0.988, 1.000)
    MixtureFract=(1)
    RPMBase=( 3000, -26.0, 421.5, 0, 1)
    VolumeFract=(0, 0.087, 0.210, 0.350, 0.482, 0.580, 0.670, 0.734, 0.793, 0.847, 0.895, 0.927, 0.954, 0.970, 0.987, 1.000)
    MixtureFract=(1)
    RPMBase=( 3250, -26.9, 428.8, 0, 1)
    VolumeFract=(0, 0.067, 0.177, 0.314, 0.448, 0.551, 0.645, 0.713, 0.777, 0.835, 0.886, 0.921, 0.950, 0.968, 0.986, 1.000)
    MixtureFract=(1)
    RPMBase=( 3500, -27.8, 427.4, 0, 1)
    VolumeFract=(0, 0.051, 0.148, 0.281, 0.417, 0.523, 0.621, 0.692, 0.760, 0.822, 0.877, 0.915, 0.946, 0.965, 0.984, 1.000)
    MixtureFract=(1)
    RPMBase=( 3750, -28.7, 417.4, 0, 1)
    VolumeFract=(0, 0.040, 0.123, 0.251, 0.387, 0.496, 0.598, 0.673, 0.744, 0.810, 0.868, 0.909, 0.942, 0.963, 0.983, 1.000)
    MixtureFract=(1)
    RPMBase=( 4000, -29.7, 404.5, 0, 1)
    VolumeFract=(0, 0.032, 0.102, 0.224, 0.359, 0.469, 0.575, 0.653, 0.728, 0.798, 0.860, 0.902, 0.938, 0.960, 0.982, 1.000)
    MixtureFract=(1)
    RPMBase=( 4250, -30.7, 398, 0, 1)
    VolumeFract=(0, 0.028, 0.085, 0.198, 0.332, 0.444, 0.553, 0.634, 0.712, 0.785, 0.851, 0.896, 0.934, 0.958, 0.981, 1.000)
    MixtureFract=(1)
    RPMBase=( 4500, -31.8, 387.7, 0, 1)
    VolumeFract=(0, 0.026, 0.072, 0.175, 0.307, 0.420, 0.532, 0.616, 0.697, 0.774, 0.842, 0.890, 0.930, 0.955, 0.980, 1.000)
    MixtureFract=(1)
    RPMBase=( 4750, -32.8, 375.3, 0, 1)
    VolumeFract=(0, 0.025, 0.064, 0.154, 0.283, 0.398, 0.511, 0.597, 0.682, 0.762, 0.834, 0.884, 0.926, 0.952, 0.979, 1.000)
    MixtureFract=(1)
    RPMBase=( 5000, -33.9, 354.2, 0, 1)
    VolumeFract=(0, 0.024, 0.062, 0.135, 0.261, 0.375, 0.491, 0.580, 0.667, 0.750, 0.825, 0.878, 0.923, 0.950, 0.977, 1.000)
    MixtureFract=(1)
    RPMBase=( 5250, -35.0, 330.5, 0, 1)
    VolumeFract=(0, 0.023, 0.060, 0.118, 0.240, 0.354, 0.471, 0.562, 0.652, 0.738, 0.817, 0.872, 0.919, 0.947, 0.976, 1.000)
    MixtureFract=(1)
    RPMBase=( 5500, -36.2, 250.8, 0, 1)
    VolumeFract=(0, 0.022, 0.058, 0.108, 0.221, 0.334, 0.453, 0.545, 0.638, 0.727, 0.809, 0.866, 0.915, 0.945, 0.975, 1.000)
    MixtureFract=(1)
    RPMBase=( 5750, -37.3, 208.6, 0, 1)
    VolumeFract=(0, 0.021, 0.056, 0.100, 0.202, 0.315, 0.434, 0.529, 0.624, 0.716, 0.800, 0.860, 0.911, 0.942, 0.974, 1.000)
    MixtureFract=(1)
    RPMBase=( 6000, -38.5, 167.2, 0, 1)
    VolumeFract=(0, 0.020, 0.054, 0.095, 0.185, 0.297, 0.417, 0.513, 0.610, 0.705, 0.792, 0.854, 0.907, 0.940, 0.973, 1.000)
    MixtureFract=(1)
    RPMBase=( 6250, -39.7, 120.5, 0, 1)
    VolumeFract=(0, 0.019, 0.053, 0.092, 0.169, 0.279, 0.399, 0.497, 0.597, 0.694, 0.784, 0.848, 0.903, 0.937, 0.972, 1.000)
    MixtureFract=(1)
    RPMBase=( 6500, -41.0, 83.6, 0, 1)
    VolumeFract=(0, 0.018, 0.052, 0.090, 0.154, 0.262, 0.383, 0.482, 0.583, 0.683, 0.776, 0.842, 0.899, 0.935, 0.970, 1.000)
    MixtureFract=(1)
    RPMBase=( 6750, -42.2, 50.8, 0, 1)
    VolumeFract=(0, 0.017, 0.051, 0.088, 0.140, 0.246, 0.367, 0.467, 0.570, 0.672, 0.768, 0.836, 0.895, 0.932, 0.969, 1.000)
    MixtureFract=(1)
    RPMBase=( 7000, -43.5, 30.5, 0, 1)
    VolumeFract=(0, 0.016, 0.050, 0.086, 0.133, 0.231, 0.351, 0.452, 0.557, 0.661, 0.760, 0.831, 0.892, 0.930, 0.968, 1.000)
    MixtureFract=(1)
    RPMBase=( 7250, -44.8, 10.5, 0, 1)
    VolumeFract=(0, 0.015, 0.049, 0.085, 0.129, 0.220, 0.336, 0.438, 0.544, 0.651, 0.752, 0.825, 0.888, 0.927, 0.967, 1.000)
    MixtureFract=(1)
    RPMBase=( 7500, -46.2, 5.5, 0, 1)
    VolumeFract=(0, 0.014, 0.048, 0.084, 0.126, 0.210, 0.321, 0.424, 0.532, 0.641, 0.744, 0.819, 0.884, 0.925, 0.966, 1.000)
    MixtureFract=(1)
    RPMBase=( 7750, -47.5, 5, 0, 1)
    VolumeFract=(0, 0.013, 0.047, 0.083, 0.124, 0.205, 0.307, 0.410, 0.520, 0.630, 0.736, 0.813, 0.880, 0.922, 0.965, 1.000)
    MixtureFract=(1)
    RPMBase=( 8000, -48.9, 5, 0, 1)
    VolumeFract=(0, 0.012, 0.046, 0.082, 0.122, 0.202, 0.294, 0.397, 0.507, 0.620, 0.729, 0.808, 0.876, 0.920, 0.964, 1.000)
    MixtureFract=(1)
    RPMBase=( 8250, -50.3, 5.5, 0, 1)
    VolumeFract=(0, 0.011, 0.045, 0.081, 0.121, 0.200, 0.281, 0.384, 0.496, 0.610, 0.721, 0.802, 0.873, 0.917, 0.962, 1.000)
    MixtureFract=(1)
    RPMBase=( 8500, -51.7, 5, 0, 1)
    VolumeFract=(0, 0.010, 0.044, 0.080, 0.120, 0.198, 0.268, 0.371, 0.484, 0.601, 0.714, 0.797, 0.869, 0.915, 0.961, 1.000)
    MixtureFract=(1)
    RPMBase=( 8750, -53.1, 5, 0, 1)
    VolumeFract=(0, 0.009, 0.043, 0.079, 0.119, 0.196, 0.256, 0.359, 0.473, 0.591, 0.706, 0.791, 0.865, 0.912, 0.960, 1.000)
    MixtureFract=(1)
    RPMBase=( 9000, -54.6, 5, 0, 1)
    VolumeFract=(0, 0.008, 0.042, 0.078, 0.118, 0.194, 0.244, 0.347, 0.461, 0.581, 0.699, 0.785, 0.862, 0.910, 0.959, 1.000)
    MixtureFract=(1)
    RPMBase=( 9250, -56.1, 5, 0, 1)
    VolumeFract=(0, 0.007, 0.041, 0.077, 0.117, 0.193, 0.232, 0.335, 0.450, 0.572, 0.691, 0.780, 0.858, 0.907, 0.958, 1.000)
    MixtureFract=(1)
    RPMBase=( 9500, -57.5, 5, 0, 1)
    VolumeFract=(0, 0.006, 0.040, 0.076, 0.116, 0.192, 0.221, 0.324, 0.440, 0.562, 0.684, 0.774, 0.854, 0.905, 0.957, 1.000)
    MixtureFract=(1)
    RPMBase=( 9750, -60, 5.5, 0, 1)
    VolumeFract=(0, 0.005, 0.039, 0.075, 0.115, 0.191, 0.211, 0.312, 0.429, 0.553, 0.677, 0.769, 0.850, 0.902, 0.956, 1.000)
    MixtureFract=(1)
    RPMBase=(10000, -67, 5, 0, 1)
    VolumeFract=(0, 0.004, 0.038, 0.074, 0.114, 0.190, 0.200, 0.302, 0.419, 0.544, 0.669, 0.763, 0.847, 0.900, 0.954, 1.000)
    MixtureFract=(1)
    FuelConsumption=9.631e-05          // affected by throttle position and engine speed
    FuelEstimate=1.010                 // fudge factor for differences between vehicle types (used for lap estimates and AI pit scheduling)
    FuelDensity=0.74 // kg/liter
    FuelAirMixtureTable=(0.0, 0.1) // start and step size of fuel/air ratio (normalized relative to reference mixture) for following table:
    FuelAirMixtureEffects=(0.00, 0.00) // torque multiplier, exhaust gas temperature multiplier
    FuelAirMixtureEffects=(0.10, 0.11)
    FuelAirMixtureEffects=(0.20, 0.22)
    FuelAirMixtureEffects=(0.30, 0.33)
    FuelAirMixtureEffects=(0.40, 0.44)
    FuelAirMixtureEffects=(0.50, 0.55)
    FuelAirMixtureEffects=(0.60, 0.66)
    FuelAirMixtureEffects=(0.70, 0.77)
    FuelAirMixtureEffects=(0.80, 0.88)
    FuelAirMixtureEffects=(0.89, 0.99)
    FuelAirMixtureEffects=(0.98, 1.00)
    FuelAirMixtureEffects=(1.00, 0.97)
    FuelAirMixtureEffects=(0.97, 0.90)
    FuelAirMixtureEffects=(0.85, 0.80)
    FuelAirMixtureEffects=(0.65, 0.60)
    FuelAirMixtureEffects=(0.40, 0.40)
    FuelAirMixtureEffects=(0.10, 0.10)
    FuelAirMixtureEffects=(0.00, 0.00)
    EngineInertia=0.29000                // rotational inertia of engine components
    IdleRPMLogic=(700, 800)          // auto-clutch logic
    LaunchEfficiency=0.000             // efficiency (0.0-1.0) of launch control, or 0.0 if N/A
    LaunchRPMLogic=(820, 1000)        // holds RPM in this range before launch (used for AI even if launch control is N/A!)
    RevLimitRange=(7500, 100, 1)
    RevLimitSetting=0
    RevLimitAvailable=1                // whether to use a rev limit (if 0, you still must have a "rev limit", just make it 40000 or so, and make sure to change [CONTROLS]->UpshiftAlgorithm to fix shifting points)
    RevLimitLogic=0                    // RPM range around current setting where *soft* rev limiter operates (either this or RevLimitTime should probably be zero)
    RevLimitHardTime=0.03               // Hard rev-limiter ignition cut time (either this or RevLimitLogic should probably be zero)
    EngineMapRange=(0, 1, 1)           // 0 = most driveable, max = most power (low gears only) (unimplemented)
    EngineMapSetting=0
    EngineBrakingMapRange=(0, 0.001, 1) // input throttle is ranged from minimum to 100%, with the minimum = setting * step * RPM,
    EngineBrakingMapSetting=0          // i.e. if you want 10% throttle at 6000 RPM, set the middle number to 10/6000 = 0.00167
    OptimumOilTemp=101.0               // degrees Celsius at which engine operates optimally
    CombustionHeat=40.0                // degrees Celsius added per liter of fuel burned
    EngineSpeedHeat=9.062e-04           // heat added linearly with engine speed
    OilMinimumCooling=7.500e-07         // heat dissipated without oil/water transfer
    OilWaterHeatTransfer=(0.49620, 7.925e-05) // heat transfer from oil to water (base, w/ engine speed)
    WaterMinimumCooling=0       // base heat dissipated without velocity
    RadiatorCooling=(0.00100, 1.000e-08) // cooling rate with velocity (base, per setting)
    LifetimeEngineRPM=(6500,180)       // (base engine speed for lifetime, range where lifetime is halved)
    LifetimeOilTemp=(107.0,2.50)       // (base oil temp for lifetime, range where lifetime is halved)
    LifetimeAvg=15000                  // average lifetime in seconds
    LifetimeVar=8500                  // lifetime random variance
    EngineEmission=(0.20000, 0.6000, -2.5000)   // where flames and smoke are emitted (relative to ref frame at rear axle)
    EngineSound=(0.20, 0.60, -2.50)    // where engine sound is emitted (relative to ref frame at rear axle)
    SpeedLimiter=0                     // whether there is a pitlane speed limiter
    OnboardStarter=1                   // whether vehicle restarts when stalled
    StarterTiming=(1.40, 0.0, 0.0)      // average and variable cranking time, then blend with starting sound
    RamCenter=(0.00, 0.50,-3.00)       // location of ram air intake
    RamDraftMult=10.0                  // multiplier for effect that draft has on ram air velocity
    RamPressure=(1e-5,1e-5,1.5e-5,2e-5)         // speed (m/s) to ambient pressure mult, speed squared (m/s)^2 to ambient pressure mult
    
    RPMBase=( 500, -19.5, 123, 0.02, 1)
    This has following format (RPM, backtorque, torque, amount of minimum throttle opening, I do not know what you are)

    Of course amount of minimum throttle opening is just my imagination, adjusting that made my motor to idle close to 600rpm instead revving like mad without touching the throttle.

    Backtorque is engine braking, old page from free sim "Racer" had some data from this, it was considered to be linear and formula for engine braking I know is RPM/60*Coefficient. For coefficient something like 0.74, but that would need much more research.

    Now for this particular engine file, I have not bothered with calculating back torque, because of I'm using this engine with fake automatic transmission, I can't use proper inertia or engine braking, also those values are not yet tuned at all, so if numbers look odd, that is the reason.

    Torque is Nm and in SI definition of Nm which is different from SAE gross numbers. With old HP and Tq. numbers I have used 20-23% reduction to end up close to what numbers would be, but there is no exact conversion available, it varies a bit between engines, waterpums etc take different amount of power etc.

    MixtureFract=(1), no information, I guess it is to do with these:
    FuelAirMixtureTable=(0.0, 0.1) // start and step size of fuel/air ratio (normalized relative to reference mixture) for following table:
    FuelAirMixtureEffects=(0.00, 0.00) // torque multiplier, exhaust gas temperature multiplier

    I haven't yet experimented with those, but someway it allows adjusting power based on fuel air mixture, for future turbo model exhaust gas multiplier might be important.

    In real cars more air will be mixed into cylinder than fuel, some air:fuel ratios that I have been told during the years, note that these are not absolutes and can vary between engines a bit, not much though:
    12:1 maximum power for NA engine
    8:1 maximum power for old tech 2l 8-valve 4-cylinder Volvo turbo engine with IC and 'truck' turbo.
    14.7:1 optimal for power/consumption, early catalysators required mixture to be very closely to this for them to work and not get broken.
    Lean mixture engines can get somewhere 17:1, maybe more today?
    Generally low throttle situations allow use of leaner mixture, how much, depends from engine, temperatures etc.
    Too lean mixture gives you pinging and destroys motor, don't know if this is modeled in rfactor.
    Too rich and it just won't go, might kill spark plugs.

    But so far I don't know what extend this mixture modeling reaches and I haven't put thought of how much it affects to power, so that is something need to be learnt and put up here.

    Mixture table is probably throttle position depended, but how it relates to what is known from real world mixture effect is again something that needs to be learnt.

    IdleRPMLogic=(700, 800) // auto-clutch logic
    Lowest allowed rpm, when autoclutch disengages, 800 rpm which autoclutch should engage.
    I have issues with this one, with this new engine model low throttle gives me redline rpm before car moves, flooring throttle engages clutch earlier but still several thousand rpm. Like if there would be 2nd autoclutch that is trying to prevent engine stalling. With amount of torque this engine puts out, anything above 1500 is burnout rpm.
    So, I guess there is more to be learned from this one too now with new engine model.
    With old engine model this also was used for idle rpm from my memory, but with new one you don't set idle speed with this anymore I believe.

    LaunchEfficiency=0.000 // efficiency (0.0-1.0) of launch control, or 0.0 if N/A
    LaunchRPMLogic=(820, 1000) // holds RPM in this range before launch (used for AI even if launch control is N/A!)
    With brains of AI they really don't need too much rpm, with 1967 tires it might be enough challenge for AI to launch from idle rpm. Don't know what to add, comments are quite good, don't know much anything about launch control systems, I used to have one in one of my cars, it was just silly code in ECU that cut spark when rpm did rise too fast, speed of rise was bit faster than speed car could accelerate on 1st gear, can't see how even such could be implemented with launch efficiency parameter.

    Rev limiter, not all cars have one, hard to find data which rpm rev limiter activates, but bit after red color starts in rpm gauge is good guess if no other information can be found.
    Format is RPM, adjustment step, number of adjustments
    RevLimitRange=(7500, 100, 1)

    This sets default setting for rpm limiter
    RevLimitSetting=0

    Is there rev limiter or is there not, quite simple, also comments point out important bit, AI cars use upshift algorithm, as well as automatic shifting.
    RevLimitAvailable=1 // whether to use a rev limit (if 0, you still must have a "rev limit", just make it 40000 or so, and make sure to change [CONTROLS]->UpshiftAlgorithm to fix shifting points)

    RevLimitLogic=0 // RPM range around current setting where *soft* rev limiter operates (either this or RevLimitTime should probably be zero)

    Difference between them is that RevLimitLogic just stops rpm from rising more, while hardtime shuts off engine for given time when rpm limiter set rpm is met. For example, 4 cylinder engine has 4 sparks for one revolution of engine, at 6000 rpm there are 400 sparks for each second (6000 / 60 to get rpm/s = 100 * 4 = 400 as there was 4 sparks per rpm) time between sparks is 1s / 400 = 0.0025s How many sparks or how many crank rotations is your rpm limiter active, multiply 0.0025s for that and you get time how long at that 6000rpm engine spark is cut off. Or if you know time it can be put directly, also one can tune it by ear or evaluate how much rpm's are dropped before spark is returned, so is it ta.ta.ta.ta or something different. For many best method is to watch video car hitting limiter and do same thing that was done in video and then adjust time.
    RevLimitHardTime=0.03 // Hard rev-limiter ignition cut time (either this or RevLimitLogic should probably be zero)
    I don't really know if rfactor counts sparks, but for other car I had data from spark and rpm limiter so I figured out that complicated method for it.

    This is unimplemented, but when it is activated it is something usable, there are many aftermarket boxes for cars that do this, use is twofold, tires can't offer enough grip for all the power and on other hand gearboxes can't handle all the torque at low gears. Modern european turbo diesels with automatic transmissions have been using this for quite some time.
    EngineMapRange=(0, 1, 1) // 0 = most driveable, max = most power (low gears only) (unimplemented)
    EngineMapSetting=0

    This affects engine braking, idle bypass/circuit is certain percentage of main throttle butterfly(s) size and I would think that would give one ratio for this calculation, also throttle butterfly is usually set not to close quite fully as there is very slight opening left, which adds to that % how much flow there is with throttle off.
    EngineBrakingMapRange=(0, 0.001, 1) // input throttle is ranged from minimum to 100%, with the minimum = setting * step * RPM,
    EngineBrakingMapSetting=0 // i.e. if you want 10% throttle at 6000 RPM, set the middle number to 10/6000 = 0.00167

    OptimumOilTemp=101.0 // degrees Celsius at which engine operates optimally

    This section is how engine cools down, I'm pretty sure that many of these have some kind of formula how to calculate them, but I haven't been able to find such and my limited understanding of engineering stuff is not helping.
    Numbers here are partly defaults, but for engine cooling I have attempted to create engine that you really can't push while stationary, it should overheat, also when driving temps should be somewhat real life like. rFactor does not have thermostat, so you get constantly maximum flow of water trough radiator, which makes cooling unnaturally good at some situations, ie. low speed, stationary, when there is less heat, engine cools colder than it would with thermostat, but there is lot to be done with these values until I have them how I like them.
    CombustionHeat=40.0 // degrees Celsius added per liter of fuel burned
    EngineSpeedHeat=9.062e-04 // heat added linearly with engine speed
    OilMinimumCooling=7.500e-07 // heat dissipated without oil/water transfer
    OilWaterHeatTransfer=(0.49620, 7.925e-05) // heat transfer from oil to water (base, w/ engine speed)

    When car is stationary, heat is not removed at all with this setting of 0, but in reality there is some heat removed by radiating by engine block, radiator, hoses, also fan creates bit of air flow, some cars have e-fan, but that is not supported by rFactor, this should be something low, bit lower than real dissipation of heat to compensate lack of thermostat.
    WaterMinimumCooling=0 // base heat dissipated without velocity
    RadiatorCooling=(0.00100, 1.000e-08) // cooling rate with velocity (base, per setting)

    These settings affect engine life, still WIP, but I prefer to have engine that has certain rpm, which after it is broken quite easily as that is what will happen, especially with old engines, if there is rev limiter it is usually set so that you should not be able to reach rpm which after engine gets bad real fast.
    LifetimeEngineRPM=(6500,180) // (base engine speed for lifetime, range where lifetime is halved)

    Oli has viscosity, it changes with temperature, oil gets thinner with temp and if it gets too thin it does not protect parts from wearing, hence optimum temp. Also cold oil is thick, it does not reach everywhere as well and engine wears out. What kind of oil you are using, is perhaps what affects this setting more than anything else.
    LifetimeOilTemp=(107.0,2.50) // (base oil temp for lifetime, range where lifetime is halved)

    How long engine can run, I believe this is when everything is optimal. There are two problems that needs to be balanced, engine's tolerance of abuse and long races, in my opinion this can't be set to how long engine really lasts in real life, but more of just lasting longest races while still making possible to set engine damage by other parameters so that you can't abuse engine more than you can in reality. It has no meaning if engine can't last 1 000 000 miles in my opinion as nobody is able to drive that long anyway and there are more important aspects as how to use engine in realistic way in sim racing, but of course there are other point of views and other ways to set these parameters, currently these are WIP with my engine file ~4hours and +/- ~2hours, but I will probably change that.
    LifetimeAvg=15000 // average lifetime in seconds
    LifetimeVar=8500 // lifetime random variance

    This is SFX thing, which would need much more attention, even with ISI mods, if I have understood this setting correctly. Idea would be to have starter sound and then blend it to engine sound in such manner that it would be smooth, this requires something from startup sound too, many startup sounds include lot of revving right after startup, you really can't blend such smoothly to constant idle, I have had idea of record just starter sound without revving and see if I can make that to work. I can't understand variable starting time here as samples are fixed length, if you add variation it will be much more challenging to blend it properly to idling. Timing should be so that when starter stops engine runs, requires lot of tinkering to get it right.
    StarterTiming=(1.40, 0.0, 0.0) // average and variable cranking time, then blend with starting sound

    Ram Air, this is from rTrainer from my memory, I need to adjust this a lot and need to find some method to find out how to calculate this, but basically it is wind to air intake, which creates slight pressure to intake and in theory increases power. In practice it can make up for pressure drop that has been caused by air filter and tubing. I made ram air for one car and it did make throttle response at low throttle bit more sensitive. My theory is that when opening bit of throttle at low throttle situation there was pressure drop between filter and throttle butterfly, which ram air was able to fill. Anyway it is not poor man's turbo, you don't get much more horsepower with it if any. Don't know if formula car like rtrainer can benefit more from it as ram air is right next to intake, but effect should be very small numbers to have it realistic. More research is needed for proper formulas.
    RamCenter=(0.00, 0.50,-3.00) // location of ram air intake
    RamDraftMult=10.0 // multiplier for effect that draft has on ram air velocity
    RamPressure=(1e-5,1e-5,1.5e-5,2e-5) // speed (m/s) to ambient pressure mult, speed squared (m/s)^2 to ambient pressure mult

    Then I have issue with this new engine model, this works fine for me, but when I send file to Johannes in his computer throttle is floored all the time, no any logical reason or difference found out so far that could be causing that, so I'm bit puzzled if that is a bug or bug in my engine file?
     
    1 person likes this.
  2. Tuttle

    Tuttle Technical Art Director - Env Lead

    Joined:
    Feb 14, 2012
    Messages:
    2,480
    Likes Received:
    775
    I guess could be better to wait for some official documentation by ISI ( 2025? :) )...especially because this stuff is still in a WIP stage...
     
    Pauli Partanen likes this.
  3. jtbo

    jtbo Registered

    Joined:
    Jan 12, 2012
    Messages:
    1,668
    Likes Received:
    48
    We can reverse engineer this, I'm sure of it :D

    New engine model seems to be much more drivable than old one, or then it is just placebo, but now that I have used it for a while, I can't go back to old :p

    Anyway when more is found here is now single place for new findings so everyone can benefit from what is known, later when some solid understanding has been written to threads they hopefully get pulled to wiki.

    edit:
    ReferenceConditions=(101325,1.225,0.068)
    I did stare this and was thinking that numbers do look awfully familiar from somewhere, 1.225 is for example standard air density at +15C and sealevel, standard air pressure is 101325 Pa, can't remember what 0.068 was but it was one of those.
    However increasing air pressure made my car run worse instead of having twice the power :D
     
    Last edited by a moderator: Aug 9, 2012
  4. Tuttle

    Tuttle Technical Art Director - Env Lead

    Joined:
    Feb 14, 2012
    Messages:
    2,480
    Likes Received:
    775
    Maybe is 1psi unit (converted to atmospheres)? :confused:

    1psi=0.06804 atm
     
  5. Knut Omdal Tveito

    Knut Omdal Tveito Registered

    Joined:
    Mar 16, 2012
    Messages:
    47
    Likes Received:
    3
    I think its the reference fuel/air ratio 1/14.7=0.068027

    FuelAirMixtureTable=(0.0, 0.1) // start and step size of fuel/air ratio (normalized relative to reference mixture) for following table:
    FuelAirMixtureEffects=(0.00, 0.00) (fuel-air=0.0*0.06804)
    FuelAirMixtureEffects=(0.10, 0.11) (fuel-air=0.1*0.06804)
    FuelAirMixtureEffects=(0.20, 0.22) (fuel-air=0.2*0.06804)
    FuelAirMixtureEffects=(0.30, 0.33) (fuel-air=0.3*0.06804)
    FuelAirMixtureEffects=(0.40, 0.44) (fuel-air=0.4*0.06804)
    FuelAirMixtureEffects=(0.50, 0.55) (fuel-air=0.5*0.06804)
    FuelAirMixtureEffects=(0.60, 0.66) (fuel-air=0.6*0.06804)
    FuelAirMixtureEffects=(0.70, 0.77) (fuel-air=0.7*0.06804)
    FuelAirMixtureEffects=(0.80, 0.88) (fuel-air=0.8*0.06804)
    FuelAirMixtureEffects=(0.89, 0.99) (fuel-air=0.9*0.06804)
    FuelAirMixtureEffects=(0.98, 1.00) (fuel-air=1.0*0.06804)



    As for the VolumeFract=, I would guess its a torque multiplier for throttle pedal input (you can see it becomes more choked at higher rpm.
    Torque=backtorque(rpm)+(torque(rpm)-backtorque(rpm))*VolumeFract(throttle_input)

    Will have to tested with MOTEC of course.
     
    Last edited by a moderator: Aug 9, 2012
  6. Tuttle

    Tuttle Technical Art Director - Env Lead

    Joined:
    Feb 14, 2012
    Messages:
    2,480
    Likes Received:
    775
    Yeah. I think you're right. Pretty interesting stuff...

    Can you explain how to obtain (and what is it) the VolumeFract section after the RPMBase?
     
    Last edited by a moderator: Aug 9, 2012
  7. Knut Omdal Tveito

    Knut Omdal Tveito Registered

    Joined:
    Mar 16, 2012
    Messages:
    47
    Likes Received:
    3
    I have a cfd code for engines where I adjust the throttle position and rpm and read the torque value. Other than that it is hard to obtain real data as most dyno charts is at wide-open throttle (WOT) and not at varying throttle




    For the Ram effect the maximum theoretical increase in pressure would be the stagnation pressure:
    p_stagnation=p_ref+0.5*density*V^2
    ,where V is the velocity of the car relative to the ambient air (wind) [m/s]

    Comparing to the rFactor coefficient:
    RamPressure=(0.0,0.000003) // speed (m/s) to ambient pressure mult, speed squared (m/s)^2 to ambient pressure mult

    I would guess its like this:
    p=p_ref*(1.0+RamPressure1*V+RamPressure2*V^2)

    For the stagnation we would get:
    RamPressure2=0.5*density/p_ref=0.5*1.225/101325=6.0e-6 (This is the maximum effect possible)
    For Clio:
    RamPressure2=3.0e-6 (half of stagnation value)
     
    Last edited by a moderator: Aug 10, 2012
  8. jtbo

    jtbo Registered

    Joined:
    Jan 12, 2012
    Messages:
    1,668
    Likes Received:
    48
  9. Tuttle

    Tuttle Technical Art Director - Env Lead

    Joined:
    Feb 14, 2012
    Messages:
    2,480
    Likes Received:
    775
    @ jtbo

    I guess you mixed two different paramaters; the RamPressure with the RamEffects.

    From Clios:

    RamPressure=(0.0,0.000003) // speed (m/s) to ambient pressure mult, speed squared (m/s)^2 to ambient pressure mult

    From rTrainer:

    RamEffects=(1.6e-5,1.8e-5,2.0e-5,2.3e-5) // torque % increase per m/s, power % increase per m/s and RPM, fuel increase per m/s, engine wear increase per m/s
     
  10. Tuttle

    Tuttle Technical Art Director - Env Lead

    Joined:
    Feb 14, 2012
    Messages:
    2,480
    Likes Received:
    775
    ..a light in the dark. Thanks...:)

    I was thinking if those formulas are suitable for 26mm air intake restrictors as well.
     
  11. jtbo

    jtbo Registered

    Joined:
    Jan 12, 2012
    Messages:
    1,668
    Likes Received:
    48
    Could very well be so, I did just throw ram air parameters (all that I found) there one day and planned to look more into them some time, but I can't really feel anything if they are or are not there, effect is so small as it should be or at least that is what I think.

    Knut indeed brings light to dark with ways to calculate things, thanks again :)

    For radiator cooling I believe same formulas work as with brake cooling, but material need to be changed, brass with older cars, aluminium with newer cars I believe, but certainly some amount of tuning is needed as without some realworld limitations cooling might become too good.

    Also I have experience that water temp can be warm and nice, but oil still being cold (under normal level), but in rfactor such probably never happens.
     
  12. dv8r

    dv8r Registered

    Joined:
    Oct 13, 2010
    Messages:
    55
    Likes Received:
    0
    As of Build107 - I can see EngineBoostRange=(0, 1, 5) is adjustable in Dev mod, but not in game mode. Im guessing there is something related to this new engine model that has not be finalised. Im trying to get an incar fuel/air mixture setting working. Any ideas on the correct method with this new model?
     
  13. jtbo

    jtbo Registered

    Joined:
    Jan 12, 2012
    Messages:
    1,668
    Likes Received:
    48
    I have this fueling map from my car, now if I want to get that data into rF2 I'm completely lost what to do?
    [​IMG]

    Then I have datalogs, with thousands of entries like this:
    Code:
    Time	SecL	RPM	MAP	TP	O2	MAT	CLT	Engine	Gego	Gair	Gwarm	Gbaro	Gammae	TPSacc	Gve	PW	Gve2	PW2	DutyCycle1	DutyCycle2	Spark Angle	X GForce	Y GForce
    267.919	110	13	51	0	0.843	-9.4	77.2	1	100	126	100	100	126	100	47	3.2	50	3.2	6.9	6.9	9	-6.07	-6.61
    
    There is free software that plots those logs to graphs:
    View attachment 4032

    Also if I beat my brain enough I can probably recall lot of other stuff from 2005 when I did convert my carb equipped car to programmable fuel injection, so I have specs of all parts and maybe we could use this information somehow to make some information available what is needed and how to convert real data to rF2 data regarding engine file?

    As whole car is currently in rF2 some testing can be even done, I have attempted to create it as close to real specs as I can, so it could work as testbed perhaps?
     
  14. Tuttle

    Tuttle Technical Art Director - Env Lead

    Joined:
    Feb 14, 2012
    Messages:
    2,480
    Likes Received:
    775
    Actually we don't need the Volumetric Efficiency but the Target Throttle Plate (throttle position to fraction of reference fuel/air mixture ratio). I guess you can fetch the TTP from the ECU...
     
    Last edited by a moderator: Sep 23, 2012
  15. jtbo

    jtbo Registered

    Joined:
    Jan 12, 2012
    Messages:
    1,668
    Likes Received:
    48
    My brain is failing me miserably today, maybe I have to think it overnight, anyway I find this bit puzzling:
    Code:
    FuelAirMixtureTable=(0.0, 0.1) // start and step size of fuel/air ratio (normalized relative to reference mixture) for following table:
    FuelAirMixtureEffects=(0.00, 0.00) // torque multiplier, exhaust gas temperature multiplier
    FuelAirMixtureEffects=(0.10, 0.11)
    FuelAirMixtureEffects=(0.20, 0.22)
    FuelAirMixtureEffects=(0.30, 0.33)
    FuelAirMixtureEffects=(0.40, 0.44)
    FuelAirMixtureEffects=(0.50, 0.55)
    FuelAirMixtureEffects=(0.60, 0.66)
    FuelAirMixtureEffects=(0.70, 0.77)
    FuelAirMixtureEffects=(0.80, 0.88)
    FuelAirMixtureEffects=(0.89, 0.99)
    FuelAirMixtureEffects=(0.98, 1.00)
    FuelAirMixtureEffects=(1.00, 0.97)
    FuelAirMixtureEffects=(0.97, 0.90)
    FuelAirMixtureEffects=(0.85, 0.80)
    FuelAirMixtureEffects=(0.65, 0.60)
    FuelAirMixtureEffects=(0.40, 0.40)
    FuelAirMixtureEffects=(0.10, 0.10)
    FuelAirMixtureEffects=(0.00, 0.00)
    If step size is 0.1, then 10th should be 1.0, but after that it starts to decrease, throttle plate position goes over fully open?
    If there would be only 10, then 5th would be 50% open throttle plate, but it is not like so.

    rpm range? There are more entries for rpm than there are these entries, but max torque rpm at WOT had max VE, well usually, my table was not fully tuned. Also throttle opening and manifold pressure are not linear, it works bit differently and I don't know how that is taken consideration, maybe that is volume fraction? That is what it looks like to me instead of being direct torque multiplier. In dev mode I can see map value too and I think it corresponds to those?

    Anyway, just some random thoughts for now, I need to study more of this to understand how to get that target throttle plate etc.
     
  16. Tuttle

    Tuttle Technical Art Director - Env Lead

    Joined:
    Feb 14, 2012
    Messages:
    2,480
    Likes Received:
    775
    First of all..take my words as not written in stones...but this is what I've understood and seems to work properly with my actual project...

    First group define the Throttle Plate map, the second list define the Fuel Mixture Map relative to reference mixture.

    So, looking at the ECU side, you've the Accelerator Map and the Fuel Correction Map.

    The first row (FuelAirMixtureTable) is setting up the fuel/air ratio relative to the reference mixture. The mixture is described as a list of torque multipliers and gas temp multi. You can create as many of those lines as you want and each line is just a step based on the first MixtureTable. So, thanks to this table and the Mixture list - you can define the available torque for different mixtures. In the future we'll be able to choose fuel mixtures from the garage but for now you don't have to fight to much with those lines...:)

    So EG;

    FuelAirMixtureTable=(0.0, 0.1) // start and step size of fuel/air ratio (normalized relative to reference mixture) for following table:
    FuelAirMixtureEffects=(0.00, 0.00) // torque multiplier, exhaust gas temperature multiplier. You can define as many of these as you want. Each one is a 'step' from the above table variable. So this basically defines how the power is influenced depending on mapping. We don't yet have proper fuel mappings / adjustments in-game, but eventually you'll be able to choose fuel mixtures in car or in garage.
    FuelAirMixtureEffects=(0.10, 0.11)
    FuelAirMixtureEffects=(0.20, 0.22)
    ---etc---

    The Volume Fraction and Mixture Faction are just references points for the torque curve. I think you can go for 1 for both values.

    You should create a table with different throttle plates for different throttle pedal angles @ rpms. Basically your car needs different throttle valve response (in air ---> fuel mixture) for different throttle pedal angles at different RPMs to get a proper power management at different rpms.

    Those 16 values (each one from 0 to 1 = Throttle Plate from closed to opened) are linked to 16 Throttle Pedal Position (accelerator), from zero throttle to full throttle.

    EG:

    RPMBase=(6000.0, -38.5, 237.8, 0, 1)
    VolumeFract=(0, 0.020, 0.054, 0.095, 0.185, 0.297, 0.417, 0.513, 0.610, 0.705, 0.792, 0.854, 0.907, 0.940, 0.973, 1.000)

    That line mean you have, at 6000 RPM, 0 valve opening (100% closed) for zero throttle and 1 for full throttle (100% opened). Intermediate values defines the curve of air/fuel mixture for different accelerator inputs so I guess you can call it as a normalized available torque curve (you specify values only from 0 to 1).

    If you don't get those values from your ECU you can use some average standard curves or use some basic formulas to create a TTP map using your engine data.

    This table maps the relationship between the throttle pedal (column index) and throttle plate by rpm (row index). The throttle plate is opened less at low rpm for smoothness.

    [​IMG]
     
    Last edited by a moderator: Sep 23, 2012
    1 person likes this.
  17. jtbo

    jtbo Registered

    Joined:
    Jan 12, 2012
    Messages:
    1,668
    Likes Received:
    48
    I think where confusion comes from.

    My ECU has map sensor, actual throttle plate opening has little meaning and tps is used mostly to get data of WOT or idle, also speed of change has meaning, but actual opening has not so much as MAP sensor reads pressure inside the manifold.

    Throttle plate opening changes manifold pressure and manifold pressure varies for given throttle opening depending from rpm. At low throttle it is easier to reach 100kpa so throttle is not needed to be opened fully to get enough air to keep manifold pressure at 100kpa.

    That then causes that opening throttle more has not much effect.

    With VolumeFract it looks like I can make that happen, throttle pedal and throttle plate acts 1:1 in my car, afaik, but pressure change varies still at different rpm.

    All acceleration enrichments are then triggered by rate of change, in map or tps.

    I think that I can get map for certain throttle opening and rpm from logs, which I then should be able to use for VolumeFract.

    FuelAirMixtureEffects=(0.10, 0.11) first one is torque multiplier, read or written? Does exhaust gas multiplier get chosen by fraction of torque there? If written, then it multiplies torque, based on step, but where from engine knows which step to choose?

    As with clio, engine torque increases step by step, until after 10th step it starts to decrease, which is bit odd, why it decreases?
     
  18. dandar

    dandar Registered

    Joined:
    Aug 12, 2012
    Messages:
    274
    Likes Received:
    15
    I think that the FuelAirMixtureEffects definition is to drawn a curve like it was with the old "RPMTorque", so it's a posibility that this curve is attached to the torque/power curve (in a different resolution because steps are not linear with RPMBase definitions).
    So in every engine after passing the peak torque RPM (in clio @5500) the engine starts to loose torque, and this is why you see the curve to come down.

    In resume, if FuelAirMixtureEffects works as a curve then the value is selected based on the engine RPMs (from RPMBase). That's how gas multiplier is choosen.
     
  19. Tuttle

    Tuttle Technical Art Director - Env Lead

    Joined:
    Feb 14, 2012
    Messages:
    2,480
    Likes Received:
    775
    Bit of confusion...:)

    If jtbo was talking about the fuelairmixture list than yes it is the torque available (normalized with multipliers) influenced on mapping...so basically it defines a curve linked to the reference max torque curve. They're NOT different mappings..they're THE MAPPING.

    I was thinking he was talking about the ECU...
     
    Last edited by a moderator: Sep 24, 2012
  20. jtbo

    jtbo Registered

    Joined:
    Jan 12, 2012
    Messages:
    1,668
    Likes Received:
    48
    I'm soon confused what I was talking about... :)

    Anyway, I now understood it like this.

    Each line of FuelAirMixtureEffects= is fraction of rpm range, so as Clio has 40 rpm entries and there are 18 entries in FuelAirMixtureEffects= list, then one line is 1/18th of whole rpm range, which is 555.5... rpm because max rpm is 10 000.

    Also as 1.0 torque multiplier on that list is at 11th line (not 10th as I miscalculated previously) it mean 11 * 555.5 which gives ~6100rpm, but as 1st line is 0 it does not matter so we must calculate 10 * 555.5 which is then that maximum rpm for torque.

    So when bit dim guy like me wants to use new engine model, he must make sure that step size and number of lines on that list is such that maximum torque line happens to be at correct rpm when doing that math.

    Step size then should be such that when step size is multiplied by number of lines where maximum torque is, it should result 1.0

    From torque curve one can then see maximum torque, which is 1.0 and for other lines one need to calculate rpm for each line and look from torque curve what kind of fraction from max torque that torque for given rpm is.

    Then exhaust temp multiplier is needed to be set so that for rpm that has maximum egt it is 1.0 and again same way fractions for other rpm lines, however I don't know my exhaust temps, so I need to be creative.

    For NA engines I guess it is bit unneeded to have torque multiplier on that FuelAirMixtureEffects= listing as it could be read from torque curve so only EGT multiplier would be needed, but with turbos I think it would be impossible to implement that way as boost affects also to amount of torque, not only throttle position and rpm.

    Has anyone tested adding more entries for volumefract entries? It has 16 so it is 1/16 of pedal position that makes change, doubling that would have finer resolution, but is it needed, does code interpolate/smooth/adjust that so that it is not like with steps from one parameter to another?

    Thanks again and feel free to kick if I understood it wrong way, again :eek:
     

Share This Page