Class DifferentialSolver
- Namespace
- LibreRally.Vehicle.Physics
- Assembly
- LibreRally.dll
Stateless differential torque-split calculations.
Torque path: engine → clutch → gearbox → center diff → front/rear diff → wheels.
Each differential splits its input torque to two outputs based on wheel speed difference and the configured DifferentialType.
All methods are static and allocation-free for performance with 50+ vehicles.
Reference: Milliken & Milliken, "Race Car Vehicle Dynamics", Chapter 6.
public static class DifferentialSolver
- Inheritance
-
DifferentialSolver
- Inherited Members
Methods
SplitTorque(in DifferentialConfig, float, float, float, float, float, out float, out float)
Splits inputTorque into two output torques while respecting
the available traction capacity of each output shaft.
public static void SplitTorque(in DifferentialConfig config, float inputTorque, float omegaLeft, float omegaRight, float tractionLimitLeft, float tractionLimitRight, out float torqueLeft, out float torqueRight)
Parameters
configDifferentialConfigDifferential configuration.
inputTorquefloatTotal torque entering the differential (N·m).
omegaLeftfloatAngular velocity of the left output shaft (rad/s).
omegaRightfloatAngular velocity of the right output shaft (rad/s).
tractionLimitLeftfloatMaximum transmissible torque magnitude on the left output (N·m).
tractionLimitRightfloatMaximum transmissible torque magnitude on the right output (N·m).
torqueLeftfloatOutput: torque delivered to the left shaft (N·m).
torqueRightfloatOutput: torque delivered to the right shaft (N·m).
SplitTorque(in DifferentialConfig, float, float, float, out float, out float)
Splits inputTorque into two output torques based on the
differential configuration and the angular velocities of the two output shafts.
public static void SplitTorque(in DifferentialConfig config, float inputTorque, float omegaLeft, float omegaRight, out float torqueLeft, out float torqueRight)
Parameters
configDifferentialConfigDifferential configuration.
inputTorquefloatTotal torque entering the differential (N·m).
omegaLeftfloatAngular velocity of the left output shaft (rad/s).
omegaRightfloatAngular velocity of the right output shaft (rad/s).
torqueLeftfloatOutput: torque delivered to the left shaft (N·m).
torqueRightfloatOutput: torque delivered to the right shaft (N·m).