Shaft static safety

The static load on a solid shaft at a certain circular cross-section comprises a torque, T, and orthogonal bending moment components, Mx, My. The shaft's (tensile) strength is given.
This script computes via ( 11) the safety factor at the cross-section if the diameter is given, or conversely calculates the diameter required to provide a given safety factor.
Empty boxes default to zero.
 
Nm
shaft cross-section Nm
 
         strength MPa

  distortion energy
  maximum shear stress
  modified Mohr (brittle)

        diameter mm

        safety