Differential

Differential

From BeamNG

A differential (device name "differential") is a device in the powertrain which distributes input torque to 2 outputs, while allowing those two outputs to have different speeds. Nearly all cars use a differential to direct power to the driven wheels.

Types (diffType)

The differential device has several types available, to simulate the different common differential types in the real world.

"open" differentials distribute nearly equal torque (except for small frictional effects) to each output, while allowing a difference in outputs speeds. This type can be used to replicate the standard differential on a car.

"lsd" differentials induce cross torque between outputs dependent on how much input torque is applied. This type can be used to replicate "clutch limited slip" or "gear limited slip" differentials.

"viscous" differentials induce a cross torque between outputs dependent on the relative speeds of the outputs. This type can be used to replicate "viscous limited slip" differentials

"locked" differentials enforce that both outputs maintain the same angle, leading to complete bias of torque from one side to the other depending on traction level. In reality it is not really working as a differential at all but as a very stiff spring between the two outputs. This type can be used to simulate "spool" or "welded" differentials.

Jbeam Properties

Name Type Optional Default Value Description
diffType string false na Possible values: "open", "lsd", "viscous", "locked". See "Types" above. Additionally, type can be defined with multiple types as follows: "type":["open,"locked"] this allows toggling of differential type. Note: This is a specific "sub-type" of the device, not the device type, which is still "differential"
gearRatio number true 1 This represents the ring and pinion or final drive ratio of the gear set that usually accompanies a differential. The gear ratio applies to the input torque/speed before reaching the differential to be split to the outputs.
friction number true 0 This is a value of torque (Nm) applied as friction to the differential input, and between the outputs.
diffTorqueSplit number true 0.5 This is the initial torque split between outputs. 0.5 means equal torque to each output. Limited slip differential types will still allow torque bias (cross torque) to change beyond this value.
lsdPreload number true 50 Specific to "lsd" type. Sets the initial locking cross torque.
lsdLockCoef number true 0.2 Specific to "lsd" type. Sets the rate of cross torque increase as a proportion of positive input torque. With a value of 0.2, 1000Nm of input torque will create up to (200Nm + lsdPreload) cross torque. Used to control lsd behavior during engine acceleration. 0.5 is a practical maximum value for a realistic differential, going beyond this may cause lurching and shuddering.
lsdRevLockCoef number true =lsdLockCoef Specific to "lsd" type. Sets the rate of cross torque increase as a proportion of input torque, but for negative input torque only. With a value of 0.2, 1000Nm of input torque will create up to (200Nm + lsdPreload) of cross torque. Used to control lsd behavior during engine braking. 0.5 is a practical maximum value for a realistic differential, going beyond this may cause lurching and shuddering.
viscousCoef number true 5 Specific to "viscous" type. This determines how much cross torque is created as a function of speed difference in the outputs. A value of 5 will create 5Nm of cross torque per rad/s speed difference.
viscousTorque number true =viscousCoef*10 Specific to "viscous" type. This determines the cap on cross torque in Nm. If the speed difference keeps growing, the differential will stop increasing cross torque once reaching the cap. This cap is necessary for stability, but should be set high enough to not become a problem in use.
lockTorque number true 500 Specific to "locked" type. This determines the cap on cross torque in Nm. If the angle difference keeps growing, the differential will stop increasing cross torque once reaching the cap, and the outputs will be allowed to slip. This cap is necessary for stability, but should be set high enough to not become a problem in use.
lockSpring number true =lockTorque Specific to "locked" type. This determines the how stiff the connection between outputs is. This value replicates the springiness of the axle shafts that tend to cause wheels to hop or shudder when steering. The higher the lockSpring, the more rigid the connection, but too high will cause instability. Heavier wheels and torque reaction nodes allow higher values. As a guide, the D-series pickup uses a lockSpring of 20000, and the semi uses a lockSpring of 5000000!
lockDamp number true =lockSpring/1000 Specific to "locked" type. This adds some small damping between the outputs of the differential. It is best to leave this undefined in jbeam and use the default value, which should work fine for almost any vehicle, but it is there if you know what you are doing. Too high or too low can worsen stability.

Examples

Open Diff

Here is an example of an open differential with a gear ratio of 3, 15Nm of friction, and a torque split of 0.6, meaning 60% of the torque goes to output 1, 40% goes to output 2.

"powertrain" : [
        ["type", "name", "inputName", "inputIndex"]
        //rear diff
        ["differential", "myDifferential", "myDriveshaft", 1, {"diffType":"open", "diffTorqueSplit":0.6, "gearRatio":3.0, "friction":15}]
],

Clutch Limited Slip Diff

Here is an example of a limited slip differential. To simulate a clutch type differential, a moderate preload torque is required, with weaker locking coefficients. This example is commonly referred to as "1.5 way" because it locks half as strong under reverse torque compared to forward torque.

"powertrain" : [
        ["type", "name", "inputName", "inputIndex"]
        //rear diff
        ["differential", "myDifferential", "myDriveshaft", 1, {"diffType":"lsd", "lsdPreload":150, "lsdLockCoef":0.25, "lsdRevLockCoef":0.125, "gearRatio": 4.10, "friction":15}]
],

Gear Limited Slip Diff

Here is an example of a gear type limited slip differential. These differentials have little to no preload torque but very high locking rate when input torque is applied.

"powertrain" : [
        ["type", "name", "inputName", "inputIndex"]
        //rear diff
        ["differential", "myDifferential", "myDriveshaft", 1, {"diffType":"lsd", "lsdPreload":10, "lsdLockCoef":0.4, "lsdRevLockCoef":0.4, "gearRatio": 3.0, "friction":15}]
],

Viscous Limited Slip Diff

Here is an example of a viscous limited slip diffferential.

"powertrain" : [
        ["type", "name", "inputName", "inputIndex"]
        //rear diff
        ["differential", "myDifferential", "myDriveshaft", 1, {"diffType":"viscous", "viscousCoef":25, "viscousTorque":500, "gearRatio": 3.0, "friction":15}]
],

Locked Differential

Here is an example of a "locked", "spool" or "welded" differential.

"powertrain" : [
        ["type", "name", "inputName", "inputIndex"]
        //rear diff
        ["differential", "myDifferential", "myDriveshaft", 1, {"diffType":"locked", "lockTorque":10000, "gearRatio":3.0, "friction":15}]
],

Selectable Locked Differential

Here is an example of a differential which can toggle between open and locked diffType. Remember to define the properties needed for each diffType.

"powertrain" : [
        ["type", "name", "inputName", "inputIndex"]
        //rear diff
        ["differential", "myDifferential", "myDriveshaft", 1, {"diffType":["open","locked"], "lockTorque":10000, "gearRatio":3.0, "friction":15}]
],