Gearbox

automotive.gearbox

Lossless five-speed gearbox without inertia. The gear input picks the ratio: below 1.5 first gear, below 2.5 second, and so on up to fifth. Shaft a turns ratio times as fast as shaft b, and shaft b carries ratio times the torque. There is no neutral.

Ports

NameDomainDirection
gearsignalin
arotational
brotational

Parameters

NameUnitDefaultRangeDescription
r113.50 to ∞First gear ratio
r212.10 to ∞Second gear ratio
r311.40 to ∞Third gear ratio
r4110 to ∞Fourth gear ratio
r510.80 to ∞Fifth gear ratio

Variables

NameUnitDescription
ratio1Ratio of the selected gear

Equations

ratio = if gear < 1.5 then r1 else if gear < 2.5 then r2 else if gear < 3.5 then r3 else if gear < 4.5 then r4 else r5
der(a.phi) = ratio * der(b.phi)
b.tau = -ratio * a.tau