Invntr
Source

All instruments

torsion_shaft

Round shaft in torsion, solid or hollow, stepped in segments carrying one torque in series. From torque, or from power and speed (P = T omega): peak surface shear stress per segment (tau = T (D/2) / J, J = pi (D^4 - d^4)/32), twist per segment (T L / (G J)) and total, torsional stiffness (series), and the safety factor against shear yield (Tresca Sy/2 or von Mises Sy/sqrt 3). Elastic, uniform torque; step fillets only through a user-given kt.

Field
Mechanics, CAD and finite elements
Version
0.1.0
Runs as
Compiled (Rust)
Typical run
0.05 s

Compiled from source: run sh packs/install.sh once before admitting it.

Known answers it must pass

Admission replaytorsion_shaft 0.1.0 · files a0f614b2a04a…b964
  1. r0001solid shaft closed form (Timoshenko/Gere): d=50 mm, L=1 m, T=1000 N m, G=80 GPa -> tau=16T/(pi d^3)=40.744 MPa, phi=TL/(GJ)=0.020372 rad, k=GJ/L, Tresca SF=(Sy/2)/tau; rel 1e-9 (exact arithmetic)passed

    peak_shear_stress_MPa40.7437 ± 4.1e-0840.7437lockedunder 0.01 % of the tolerance used
    segments.0.J_mm4{"value": 613592.3151542564, "rel_tol": 1e-09}
    total_twist_rad0.0203718 ± 2e-110.0203718lockedunder 0.01 % of the tolerance used
    total_twist_deg1.16722 ± 1.2e-091.16722lockedunder 0.01 % of the tolerance used
    torsional_stiffness_Nm_per_rad49087.4 ± 4.9e-0549087.4lockedunder 0.01 % of the tolerance used
    min_safety_factor3.06796 ± 3.1e-093.06796lockedunder 0.01 % of the tolerance used
    all_ok= truetruelockedexact match
  2. r0002hollow shaft closed form: D=60, d=40 mm, L=500 mm, T=2000 N m, G=79.3 GPa -> J=pi(D^4-d^4)/32, tau=16TD/(pi(D^4-d^4))=58.765 MPa at the outer surface, phi=TL/(GJ); rel 1e-9passed

    segments.0.J_mm4{"value": 1021017.6124166828, "rel_tol": 1e-09}
    peak_shear_stress_MPa58.7649 ± 5.9e-0858.7649lockedunder 0.01 % of the tolerance used
    total_twist_rad0.0123508 ± 1.2e-110.0123508lockedunder 0.01 % of the tolerance used
    torsional_stiffness_Nm_per_rad161933 ± 0.00016161933lockedunder 0.01 % of the tolerance used
  3. r0003power and speed P = T omega: 100 kW at 1500 rpm -> T = 1e5/(50 pi) = 636.62 N m; solid d=40 mm, L=800 mm, G=80 GPa -> tau=50.661 MPa, phi=0.025330 rad; rel 1e-9passed

    torque_Nm636.62 ± 6.4e-07636.62lockedunder 0.01 % of the tolerance used
    power_kW100 ± 1e-07100lockedunder 0.01 % of the tolerance used
    peak_shear_stress_MPa50.6606 ± 5.1e-0850.6606lockedunder 0.01 % of the tolerance used
    total_twist_rad0.0253303 ± 2.5e-110.0253303lockedunder 0.01 % of the tolerance used
  4. r0004stepped shaft, segments in series (twists add, 1/k = sum L/(GJ)): T=800 N m, G=80 GPa; A 300 mm x D60, B 400 mm x D45 with kt=1.5, C 200 mm x D50 bore 30 -> total 0.016039 rad, k=49880 N m/rad, peak 1.5*16T/(pi 45^3)=67.068 MPa in B; rel 1e-9passed

    segments.0.twist_rad{"value": 0.00235785100876882, "rel_tol": 1e-09}
    segments.1.twist_rad{"value": 0.009935964744770666, "rel_tol": 1e-09}
    segments.2.twist_rad{"value": 0.0037448221903975377, "rel_tol": 1e-09}
    segments.0.shear_stress_MPa{"value": 18.86280807015056, "rel_tol": 1e-09}
    segments.2.shear_stress_MPa{"value": 37.44822190397538, "rel_tol": 1e-09}
    total_twist_rad0.0160386 ± 1.6e-110.0160386lockedunder 0.01 % of the tolerance used
    total_twist_deg0.918946 ± 9.2e-100.918946lockedunder 0.01 % of the tolerance used
    torsional_stiffness_Nm_per_rad49879.5 ± 5e-0549879.5lockedunder 0.01 % of the tolerance used
    peak_shear_stress_MPa67.0678 ± 6.7e-0867.0678lockedunder 0.01 % of the tolerance used
    critical_segment= BBlockedexact match
    total_length_mm900 ± 9e-10900locked0.013 % of the tolerance used
  5. r0005von Mises shear yield tau_y = Sy/sqrt(3): d=30 mm, T=300 N m, Sy=350 MPa -> tau=56.588 MPa, SF=3.5709 < required 4 so the verdict fails; rel 1e-9passed

    shear_yield_MPa202.073 ± 2e-07202.073lockedunder 0.01 % of the tolerance used
    peak_shear_stress_MPa56.5884 ± 5.7e-0856.5884lockedunder 0.01 % of the tolerance used
    min_safety_factor3.57092 ± 3.6e-093.57092lockedunder 0.01 % of the tolerance used
    all_ok= falsefalselockedexact match
5 of 5 cases passed · sandbox macos-seatbeltrecorded from the kernel in a fresh lab

Each line is one reading the kernel checked. The bright band is the tolerance; the needle is the value the instrument actually returned when it was admitted. A needle near the centre line used little of its tolerance.

Inputs

NameUnitDefaultMeaning
segments[{"name": "S1", "length_mm": 1000, "outer_diameter_mm": 50, "inner_diameter_mm": 0, "kt": 1}]Shaft segments end to end, all carrying the same torque. Each: name, length_mm, outer_diameter_mm, inner_diameter_mm (0 or left out = solid), kt (stress concentration factor on the nominal stress, default 1).
loadtorquetorque: use torque_Nm. power: torque = power_kW / omega from speed_rpm.
torque_NmN m1000Transmitted torque (load 'torque').
power_kWkW100Transmitted power (load 'power').
speed_rpmrpm1500Shaft speed; sets torque in 'power' mode, reported power in 'torque' mode.
shear_modulus_GPaGPa80Shear modulus G of the shaft material (steel about 80).
yield_strength_MPaMPa250Tensile yield strength Sy of the material.
criteriontrescaShear yield: tresca tau_y = Sy/2, von_mises tau_y = Sy/sqrt(3).
required_safety_factor12

Readings

NameUnitMeaning
load
torque_NmN m
power_kWkW
speed_rpmrpm
shear_modulus_GPaGPa
criterion
shear_yield_MPaMPa
peak_shear_stress_MPaMPa
critical_segment
total_twist_radrad
total_twist_degdeg
total_length_mmmm
torsional_stiffness_Nm_per_radN m/rad
min_safety_factor1
required_safety_factor1
all_ok
warnings
segment_count1
segmentsper segment: name, length_mm, outer_diameter_mm, inner_diameter_mm, J_mm4, kt, shear_stress_MPa, twist_rad, twist_deg, twist_per_length_deg_per_m, stiffness_Nm_per_rad, safety_factor
twist_along_shaft.csv
segments.csv

Try the call

Change a value and the command updates. Nothing runs here; paste it into your terminal or give it to your agent.

Terminal
MCP call