# Shaft torsional stress and twist # Scope: Uniform solid circular shaft elastic twist. # Status: illustrative worked example; engineering review pending. # Inputs are example values. Checks are editable example requirements, not standards. torque = 10 N*m in 0..20 diameter = 15 mm in 10..30 length = 300 mm in 100..1000 shearModulus = 79 GPa polar := pi*diameter^4/32 [mm^4] stress := torque*diameter/(2*polar) [MPa] twist := torque*length/(shearModulus*polar) [rad] radius := diameter/2 [mm] center := length/2 [mm] twistAt(x: mm) := twist*x/length [rad] part shaft "Shaft": cylinder radius, length at center, 0 mm, 0 mm rot 0 deg, 90 deg, 0 deg check twist budget: twist <= 1 deg scenario alternative: torque = 8 N*m