Table of Contents

Class TyreModel

Namespace
LibreRally.Vehicle.Physics
Assembly
LibreRally.dll

Slip-based tyre physics model combining brush tyre theory with Pacejka-like force curves.

Slip ratio (longitudinal): κ = (ω·R − Vx) / max(|Vx|, ε) where ω = wheel angular velocity, R = tyre radius, Vx = longitudinal velocity.

Slip angle (lateral): α = atan(Vy / |Vx|) where Vy = lateral velocity at the contact patch.

Forces are computed using a simplified Pacejka "Magic Formula": F = D · sin(C · atan(B·x − E·(B·x − atan(B·x)))) with load-sensitive peak factor D = µ·Fz and appropriate stiffness B.

Key references:

  • Pacejka, "Tire and Vehicle Dynamics", 3rd Ed., Chapters 3–4.
  • Brush tyre model: Milliken & Milliken, "Race Car Vehicle Dynamics", §2.5.
  • Rally high-slip: Abdulrahim, "Measurement and Analysis of Rally Car Dynamics at High Attitude Angles", SAE 2007.

Designed for struct-based per-wheel state (TyreState) to avoid per-frame heap allocations when simulating 50+ vehicles.

public sealed class TyreModel
Inheritance
TyreModel
Inherited Members

Constructors

TyreModel(float)

Initializes a tyre model for a wheel radius.

public TyreModel(float radius)

Parameters

radius float

Unloaded tyre radius in metres.

Properties

ActiveMode

Selects the active tyre force model.

  • Auto — default blended brush+Pacejka behaviour.
  • BrushOnly — bypass Pacejka; use only contact-patch brush forces.
  • PacejkaOnly — bypass brush transients; use only Magic Formula forces.

Changed at runtime via the physics calibration overlay.

public TyreModelMode ActiveMode { get; set; }

Property Value

TyreModelMode

AligningTorqueFxMomentArm

Effective longitudinal-force moment arm (m) used for the s * Fx-style aligning-torque term. This only contributes while the tyre is already generating meaningful lateral force.

public float AligningTorqueFxMomentArm { get; set; }

Property Value

float

AligningTorqueResidualFactor

Small residual aligning-torque fraction retained after the pneumatic trail has largely collapsed. This captures the non-trail remainder of Mz near the limit without dominating low-slip steering feel.

public float AligningTorqueResidualFactor { get; set; }

Property Value

float

AmbientTemperature

Ambient temperature (°C).

public float AmbientTemperature { get; set; }

Property Value

float

BeamNgFullLoadFrictionCoefficient

BeamNG-style asymptotic full-load friction coefficient, when provided by JBeam tyre metadata.

public float? BeamNgFullLoadFrictionCoefficient { get; set; }

Property Value

float?

BeamNgLoadSensitivitySlope

BeamNG-style exponential load-sensitivity slope (1/N), when provided by JBeam tyre metadata.

public float? BeamNgLoadSensitivitySlope { get; set; }

Property Value

float?

BeamNgNoLoadFrictionCoefficient

BeamNG-style zero-load friction coefficient, when provided by JBeam tyre metadata.

public float? BeamNgNoLoadFrictionCoefficient { get; set; }

Property Value

float?

CamberThrustCoefficient

Camber thrust coefficient (N per rad of camber per N of Fz).

public float CamberThrustCoefficient { get; set; }

Property Value

float

CarcassShearCoefficient

Scaling factor for free-rolling carcass shear resistance. The carcass shear contribution arises from the difference between tread-element speed (Ω·r) and road speed (Ω·rₑ) as the tread compresses through the contact patch. Reference: "A simple model for tyre deformation", The Contact Patch, §Free rolling, Eq. 8.

public float CarcassShearCoefficient { get; set; }

Property Value

float

CarcassStiffness

Gets or sets the carcass stiffness multiplier, where 1.0 is the baseline tyre-body compliance. Increasing this value reduces transient delay before forces build at the contact patch. Decreasing this value allows more carcass deformation and slower transient response.

public float CarcassStiffness { get; set; }

Property Value

float

CombinedSlipCoupling

Combined-slip weighting stiffness for the MF-style Gxα/Gyκ reduction functions. Higher values make cross-slip reduce the other force channel sooner.

public float CombinedSlipCoupling { get; set; }

Property Value

float

CombinedSlipExponent

Combined-slip weighting shape factor for the MF-style Gxα/Gyκ reduction functions. Values near 1 are gentle; values near 2 collapse force capacity more aggressively at high cross-slip.

public float CombinedSlipExponent { get; set; }

Property Value

float

ContactAreaGripExponent

Gets or sets the exponent used for contact-patch-area grip scaling. Larger values make grip more sensitive to contact-patch area changes under load. Smaller values keep grip closer to the baseline friction curve.

public float ContactAreaGripExponent { get; set; }

Property Value

float

ContactPatchDamping

Lateral contact-patch damping (N·s/m).

public float ContactPatchDamping { get; set; }

Property Value

float

ContactPatchLength

Obsolete alias for ContactPatchLengthScale retained for backward compatibility. This value is a dimensionless scale factor, not an absolute length in metres.

[Obsolete("ContactPatchLength is a dimensionless scale factor. Use ContactPatchLengthScale instead.")]
public float ContactPatchLength { get; set; }

Property Value

float

ContactPatchLengthScale

Contact patch length scale factor (dimensionless) applied to the theoretical rectangular footprint length computed from load, pressure, and width: length ≈ normalLoad / (pressure × width). Values above 1.0 lengthen the effective patch for extra compliance; values below 1.0 shorten it. Reference: The Contact Patch, "The contact patch"; Pacejka §3.2.

public float ContactPatchLengthScale { get; set; }

Property Value

float

ContactPatchStiffness

Brush stiffness calibration (N/m at 220 kPa and 205 mm width). The effective brush stiffness scales from the pressure-membrane estimate pressure × width.

public float ContactPatchStiffness { get; set; }

Property Value

float

CoolingRate

Cooling rate to ambient (W/°C).

public float CoolingRate { get; set; }

Property Value

float

CoreCoolingRate

Cooling rate from core/carcass to ambient (W/°C).

public float CoreCoolingRate { get; set; }

Property Value

float

CoreThermalMass

Thermal mass of the tyre core/carcass (J/°C). Higher = slower but more persistent heat storage.

public float CoreThermalMass { get; set; }

Property Value

float

FrictionEllipseRatio

Ratio of lateral grip limit to longitudinal grip limit. 1.0 gives an equal-grip friction circle; values below 1.0 produce a friction ellipse.

public float FrictionEllipseRatio { get; set; }

Property Value

float

GripTemperatureSurfaceWeight

Blend of surface and core temperatures used for grip calculations (0 = core only, 1 = surface only).

public float GripTemperatureSurfaceWeight { get; set; }

Property Value

float

HighSlipForceRetention

Fraction of peak lateral force retained at extreme slip angles (30–40°+). Rally tyres maintain ~60–70% of peak force at large slip to allow controlled drifts. Reference: Abdulrahim, "Measurement and Analysis of Rally Car Dynamics at High Attitude Angles".

public float HighSlipForceRetention { get; set; }

Property Value

float

HighSlipTransitionEnd

Slip angle (rad) at which the rally high-slip retention curve is fully active. ~40° by default.

public float HighSlipTransitionEnd { get; set; }

Property Value

float

HighSlipTransitionStart

Slip angle (rad) at which the rally high-slip retention curve begins blending. Below this angle the standard Pacejka curve applies fully. ~15° by default. Adjust per surface type or tyre compound for different drift-entry behaviour.

public float HighSlipTransitionStart { get; set; }

Property Value

float

HubRadius

BeamNG-derived hub radius hint (m) used to refine wheel inertia estimation when explicit inertia is unavailable.

public float? HubRadius { get; set; }

Property Value

float?

HubWidth

BeamNG-derived hub width hint (m) used to refine wheel inertia estimation when explicit inertia is unavailable.

public float? HubWidth { get; set; }

Property Value

float?

LateralB

Lateral stiffness factor B.

public float LateralB { get; set; }

Property Value

float

LateralC

Lateral shape factor C. Typically 1.1–1.4 for passenger/rally tyres.

public float LateralC { get; set; }

Property Value

float

LateralCamberCurvatureSensitivity

Camber sensitivity applied to the lateral pure-slip curvature factor. Higher values reshape the lateral force falloff more strongly under camber.

public float LateralCamberCurvatureSensitivity { get; set; }

Property Value

float

LateralCamberStiffnessSensitivity

Camber sensitivity applied to the lateral pure-slip stiffness factor. Higher values make cambered tyres build lateral force more aggressively.

public float LateralCamberStiffnessSensitivity { get; set; }

Property Value

float

LateralE

Lateral curvature factor E.

public float LateralE { get; set; }

Property Value

float

LateralLoadStiffnessSensitivity

Load sensitivity applied to the lateral pure-slip stiffness factor. Higher values make the cornering-stiffness ramp respond more strongly to load.

public float LateralLoadStiffnessSensitivity { get; set; }

Property Value

float

LateralSurfaceRelaxationSensitivity

Surface-coupling sensitivity for lateral relaxation length. Higher values make loose/low-grip surfaces build lateral force more slowly.

public float LateralSurfaceRelaxationSensitivity { get; set; }

Property Value

float

LoadSensitivity

Load sensitivity exponent for the tyre's non-linear grip response to vertical load.

µ_effective = µ_peak × (Fz / Fz_ref)^(-LoadSensitivity)

Higher values make grip fall away faster as load rises. Typical range 0.0–0.20; 0.15 is a representative road-tyre value.

public float LoadSensitivity { get; set; }

Property Value

float

LongitudinalB

Longitudinal stiffness factor B (cornering stiffness / peak force).

public float LongitudinalB { get; set; }

Property Value

float

LongitudinalC

Longitudinal shape factor C. Typically 1.5–1.8 for combined slip models.

public float LongitudinalC { get; set; }

Property Value

float

LongitudinalE

Longitudinal curvature factor E. Negative values extend the curve past the peak.

public float LongitudinalE { get; set; }

Property Value

float

LongitudinalLoadStiffnessSensitivity

Load sensitivity applied to the longitudinal pure-slip stiffness factor. Higher values make Fx build up more sharply as vertical load rises.

public float LongitudinalLoadStiffnessSensitivity { get; set; }

Property Value

float

LongitudinalRelaxationLength

Baseline longitudinal relaxation length (m) for the brush tyre transient model. Typically shorter than lateral because the tyre carcass is stiffer in the rolling direction. The effective value is further scaled by surface and local force-curve slope. Default 0.28 m. Reference: Pacejka §5.4; brush model braking transient.

public float LongitudinalRelaxationLength { get; set; }

Property Value

float

LongitudinalSurfaceRelaxationSensitivity

Surface-coupling sensitivity for longitudinal relaxation length. Higher values make loose/low-grip surfaces delay drive/brake force buildup more strongly.

public float LongitudinalSurfaceRelaxationSensitivity { get; set; }

Property Value

float

OptimalTemperature

Optimal tyre temperature for peak grip (°C).

public float OptimalTemperature { get; set; }

Property Value

float

OverturningCamberFactor

Additional camber sensitivity for the overturning couple. Higher values make cambered tyres generate more wheel-axis roll moment.

public float OverturningCamberFactor { get; set; }

Property Value

float

OverturningCoupleFactor

Scale factor for the tyre overturning couple Mx. Higher values increase the wheel-axis roll moment generated by lateral load and camber.

public float OverturningCoupleFactor { get; set; }

Property Value

float

PeakFrictionCoefficient

Peak friction coefficient on reference surface (tarmac).

public float PeakFrictionCoefficient { get; set; }

Property Value

float

PneumaticTrail

Pneumatic trail at zero slip (m). Mz = trail × Fy. Decreases with slip angle.

public float PneumaticTrail { get; set; }

Property Value

float

Radius

Unloaded tyre radius (m).

public float Radius { get; }

Property Value

float

ReferenceLoad

Reference vertical load for µ rating (N).

public float ReferenceLoad { get; set; }

Property Value

float

RelaxationLength

Baseline lateral relaxation length (m) for the brush tyre transient model. The effective value is further scaled by loose-surface modifiers and the local force-curve slope.

public float RelaxationLength { get; set; }

Property Value

float

RoadHeatTransferRate

Road-contact heat transfer rate from tread surface (W/°C).

public float RoadHeatTransferRate { get; set; }

Property Value

float

RollingResistanceCoefficient

Base rolling-resistance coefficient (dimensionless). Typical 0.01–0.015 for tarmac tyres.

public float RollingResistanceCoefficient { get; set; }

Property Value

float

RollingResistanceMomentFactor

Scale factor for the rolling-resistance moment My. Higher values increase the axle-axis moment that resists wheel rotation.

public float RollingResistanceMomentFactor { get; set; }

Property Value

float

RollingResistanceMomentFxFactor

Coupling between longitudinal tyre force and rolling-resistance moment. Higher values make drive/brake force overlap contribute more strongly to My.

public float RollingResistanceMomentFxFactor { get; set; }

Property Value

float

SidewallStiffness

Gets or sets the sidewall stiffness multiplier, where 1.0 is the baseline response. Increasing this value sharpens turn-in by building lateral force more quickly. Decreasing this value makes the tyre feel softer and slower to respond.

public float SidewallStiffness { get; set; }

Property Value

float

StandingWaveCriticalSpeed

Approximate carcass wave speed (m/s) above which standing-wave losses grow rapidly. Lower values increase high-speed rolling resistance sooner.

public float StandingWaveCriticalSpeed { get; set; }

Property Value

float

StandingWaveResistanceGain

Gain applied to the standing-wave rolling-resistance rise. Effective rolling resistance scales as 1 + gain × (speed / criticalSpeed)².

public float StandingWaveResistanceGain { get; set; }

Property Value

float

SurfaceToCoreConductance

Conductance from tread surface to core (W/°C).

public float SurfaceToCoreConductance { get; set; }

Property Value

float

TemperatureWindow

Temperature window width (°C). Grip falls off outside [optimal ± window].

public float TemperatureWindow { get; set; }

Property Value

float

ThermalMass

Thermal mass of the tyre surface (J/°C). Higher = slower temp change.

public float ThermalMass { get; set; }

Property Value

float

TyrePressure

Gets or sets the tyre inflation pressure in kilopascals. Higher values increase carcass stiffness and reduce the effective contact-patch size. Lower values increase compliance and usually improve low-speed grip.

public float TyrePressure { get; set; }

Property Value

float

VerticalStiffness

Baseline vertical stiffness of the tyre carcass (N/m) at the 220 kPa reference pressure. Used to estimate loaded-radius deflection and therefore effective rolling radius. Higher values reduce loaded deflection and slip generated by carcass compression.

public float VerticalStiffness { get; set; }

Property Value

float

WaterCoolingGain

Additional road heat-transfer gain per metre of water depth (1/m).

public float WaterCoolingGain { get; set; }

Property Value

float

WearRate

Wear rate: tread life lost per unit of slip energy (1 / J).

public float WearRate { get; set; }

Property Value

float

WheelInertia

Wheel rotational inertia (kg·m²). Governs spin-up/spin-down response. Typical values: 1.2–1.8 kg·m² for rally wheels. When set to 0 (default), inertia is estimated from normal load and radius.

angularAccel = appliedTorque / WheelInertia

Reference: Milliken, RCVD §2.3, wheel inertia.

public float WheelInertia { get; set; }

Property Value

float

WheelOffset

BeamNG-derived wheel offset hint (m). Carried through for wheel-geometry-aware physics work.

public float? WheelOffset { get; set; }

Property Value

float?

Width

Tyre width (m), used for contact patch size estimation.

public float Width { get; set; }

Property Value

float

WornGripFraction

Minimum grip multiplier when tyre is completely worn (fraction of peak).

public float WornGripFraction { get; set; }

Property Value

float

Methods

Update(ref TyreState, float, float, float, float, float, float, in SurfaceProperties, float, out float, out float, out float)

Computes all tyre forces and torques for one wheel for one physics step.

Outputs:

  • longitudinalForce: Fx along wheel heading (N). Positive = forward.
  • lateralForce: Fy perpendicular to heading (N). Positive = rightward.
  • selfAligningTorque: Mz about the vertical axis (N·m). Opposes steering.
public void Update(ref TyreState state, float longitudinalVelocity, float lateralVelocity, float normalLoad, float driveTorque, float brakeTorque, float camberAngle, in SurfaceProperties surface, float dt, out float longitudinalForce, out float lateralForce, out float selfAligningTorque)

Parameters

state TyreState

Per-wheel mutable state (angular velocity, temperature, wear, deflection).

longitudinalVelocity float

Forward velocity at the contact patch (m/s).

lateralVelocity float

Lateral velocity at the contact patch (m/s). Positive = rightward.

normalLoad float

Vertical load on the tyre (N). Must be > 0 for contact.

driveTorque float

Torque applied to the wheel from the drivetrain (N·m).

brakeTorque float

Braking torque magnitude (N·m). Always opposes rotation.

camberAngle float

Camber angle (rad). Positive = top of wheel tilted outward.

surface SurfaceProperties

Surface material properties affecting grip.

dt float

Physics timestep (s).

longitudinalForce float

Output: longitudinal force (N).

lateralForce float

Output: lateral force (N).

selfAligningTorque float

Output: self-aligning torque (N·m).

Update(ref TyreState, float, float, float, float, float, float, in SurfaceProperties, float, out float, out float, out float, out float, out float)

Computes all tyre forces and moments for one wheel for one physics step.

public void Update(ref TyreState state, float longitudinalVelocity, float lateralVelocity, float normalLoad, float driveTorque, float brakeTorque, float camberAngle, in SurfaceProperties surface, float dt, out float longitudinalForce, out float lateralForce, out float selfAligningTorque, out float overturningCouple, out float rollingResistanceMoment)

Parameters

state TyreState

Per-wheel mutable state (angular velocity, temperature, wear, deflection).

longitudinalVelocity float

Forward velocity at the contact patch (m/s).

lateralVelocity float

Lateral velocity at the contact patch (m/s). Positive = rightward.

normalLoad float

Vertical load on the tyre (N). Must be > 0 for contact.

driveTorque float

Torque applied to the wheel from the drivetrain (N·m).

brakeTorque float

Braking torque magnitude (N·m). Always opposes rotation.

camberAngle float

Camber angle (rad). Positive = top of wheel tilted outward.

surface SurfaceProperties

Surface material properties affecting grip.

dt float

Physics timestep (s).

longitudinalForce float

Output: longitudinal force (N).

lateralForce float

Output: lateral force (N).

selfAligningTorque float

Output: self-aligning torque (N·m).

overturningCouple float

Output: overturning couple Mx about the wheel longitudinal axis (N·m).

rollingResistanceMoment float

Output: rolling-resistance moment My about the wheel lateral axis (N·m).