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 ω): peak surface shear stress per segment (τ = T (D/2) / J, J = π (D⁴ - d⁴)/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/√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
r0001solid shaft closed form (Timoshenko/Gere): d=50 mm, L=1 m, T=1000 N m, G=80 GPa → τ=16T/(π d³)=40.744 MPa, φ=TL/(GJ)=0.020372 rad, k=GJ/L, Tresca SF=(Sy/2)/τ; rel 10⁻⁹ (exact arithmetic)passed
peak_shear_stress_MPa40.7437 ± 4.1 × 10⁻⁸40.7437lockedunder 0.01 % of the tolerance usedsegments.0.J_mm4= 613592.315154, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagetotal_twist_rad0.0203718 ± 2 × 10⁻¹¹0.0203718lockedunder 0.01 % of the tolerance usedtotal_twist_deg1.16722 ± 1.2 × 10⁻⁹1.16722lockedunder 0.01 % of the tolerance usedtorsional_stiffness_Nm_per_rad49087.4 ± 4.9 × 10⁻⁵49087.4lockedunder 0.01 % of the tolerance usedmin_safety_factor3.06796 ± 3.1 × 10⁻⁹3.06796lockedunder 0.01 % of the tolerance usedall_ok= truetruelockedexact matchr0002hollow shaft closed form: D=60, d=40 mm, L=500 mm, T=2000 N m, G=79.3 GPa → J=π(D⁴-d⁴)/32, τ=16TD/(π(D⁴-d⁴))=58.765 MPa at the outer surface, φ=TL/(GJ); rel 10⁻⁹passed
segments.0.J_mm4= 1021017.612417, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagepeak_shear_stress_MPa58.7649 ± 5.9 × 10⁻⁸58.7649lockedunder 0.01 % of the tolerance usedtotal_twist_rad0.0123508 ± 1.2 × 10⁻¹¹0.0123508lockedunder 0.01 % of the tolerance usedtorsional_stiffness_Nm_per_rad161933 ± 0.00016161933lockedunder 0.01 % of the tolerance usedr0003power and speed P = T ω: 100 kW at 1500 rpm → T = 10⁵/(50 π) = 636.62 N m; solid d=40 mm, L=800 mm, G=80 GPa → τ=50.661 MPa, φ=0.025330 rad; rel 10⁻⁹passed
torque_Nm636.62 ± 6.4 × 10⁻⁷636.62lockedunder 0.01 % of the tolerance usedpower_kW100 ± 10⁻⁷100lockedunder 0.01 % of the tolerance usedpeak_shear_stress_MPa50.6606 ± 5.1 × 10⁻⁸50.6606lockedunder 0.01 % of the tolerance usedtotal_twist_rad0.0253303 ± 2.5 × 10⁻¹¹0.0253303lockedunder 0.01 % of the tolerance usedr0004stepped 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/(π 45³)=67.068 MPa in B; rel 10⁻⁹passed
segments.0.twist_rad= 0.002358, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagesegments.1.twist_rad= 0.009936, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagesegments.2.twist_rad= 0.003745, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagesegments.0.shear_stress_MPa= 18.862808, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagesegments.2.shear_stress_MPa= 37.448222, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagetotal_twist_rad0.0160386 ± 1.6 × 10⁻¹¹0.0160386lockedunder 0.01 % of the tolerance usedtotal_twist_deg0.918946 ± 9.2 × 10⁻¹⁰0.918946lockedunder 0.01 % of the tolerance usedtorsional_stiffness_Nm_per_rad49879.5 ± 5 × 10⁻⁵49879.5lockedunder 0.01 % of the tolerance usedpeak_shear_stress_MPa67.0678 ± 6.7 × 10⁻⁸67.0678lockedunder 0.01 % of the tolerance usedcritical_segment= BBlockedexact matchtotal_length_mm900 ± 9 × 10⁻¹⁰900locked0.013 % of the tolerance usedr0005von Mises shear yield
tau_y= Sy/√(3): d=30 mm, T=300 N m, Sy=350 MPa → τ=56.588 MPa, SF=3.5709 < required 4 so the verdict fails; rel 10⁻⁹passedshear_yield_MPa202.073 ± 2 × 10⁻⁷202.073lockedunder 0.01 % of the tolerance usedpeak_shear_stress_MPa56.5884 ± 5.7 × 10⁻⁸56.5884lockedunder 0.01 % of the tolerance usedmin_safety_factor3.57092 ± 3.6 × 10⁻⁹3.57092lockedunder 0.01 % of the tolerance usedall_ok= falsefalselockedexact match
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
| Name | Unit | Default | Meaning |
|---|---|---|---|
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). | |
load | torque | torque: use torque_Nm. power: torque = power_kW / ω from speed_rpm. | |
torque_Nm | N m | 1000 | Transmitted torque (load 'torque'). |
power_kW | kW | 100 | Transmitted power (load 'power'). |
speed_rpm | rpm | 1500 | Shaft speed; sets torque in 'power' mode, reported power in 'torque' mode. |
shear_modulus_GPa | GPa | 80 | Shear modulus G of the shaft material (steel about 80). |
yield_strength_MPa | MPa | 250 | Tensile yield strength Sy of the material. |
criterion | tresca | Shear yield: tresca tau_y = Sy/2, von_mises tau_y = Sy/√(3). | |
required_safety_factor | 1 | 2 |
Readings
| Name | Unit | Meaning |
|---|---|---|
load | ||
torque_Nm | N m | |
power_kW | kW | |
speed_rpm | rpm | |
shear_modulus_GPa | GPa | |
criterion | ||
shear_yield_MPa | MPa | |
peak_shear_stress_MPa | MPa | |
critical_segment | ||
total_twist_rad | rad | |
total_twist_deg | deg | |
total_length_mm | mm | |
torsional_stiffness_Nm_per_rad | N m/rad | |
min_safety_factor | 1 | |
required_safety_factor | 1 | |
all_ok | ||
warnings | ||
segment_count | 1 | |
segments | per 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.