%% TORQUE CALC SCRIPT
% Made by Luke Woodcock on May 6, 2023
% Updated by Luke Woodcock on May 6, 2023

% Use this spreadsheet to calculate torque spec in lbf-in for bolts
% Input boltDiameter and tensileStress.. and K if needed

% Resources
% Torque Calculator: https://www.engineeringtoolbox.com/bolt-torque-load-calculator-d_2065.html
% Torque Chart: https://www.engineeringtoolbox.com/us-bolts-torques-d_2055.html
% Proof Load https://www.engineeringtoolbox.com/us-bolts-tensile-proof-load-d_2066.html

% K is nut factor, a coefficient representing a grouping of the 
% assumptions associated with torque measurement into one number.
%
% Typical values for K with mild-steel bolts in range 1/4" to 1":
% normal dry: K = 0.2
% nonplated black finish: K = 0.3
% zinc-plated: K = 0.2
% slightly lubricated: K = 0.18
% cadmium-plated: K = 0.16

% INPUTS
K = 0.18; % Nut factor, see above. ASSUMING LUBRICANT
boltDiameter = 0.25; % nominal bolt diameter, in
tensileStress = 60000; %minimum tensile strength, PSI

% Calculations
boltArea = pi*(boltDiameter/2)^2; % bolt area, in
forceAxial = .70*tensileStress*boltArea; % axial bolt force, lbf
torque = K*boltDiameter*forceAxial;

disp("Torque Spec for " + boltDiameter + " in bolts is " + torque + " in-lbf")