%% A helical compressions spring is to be cycled between 150 lbf and
%300 lbf with a 1 in stroke. The number of cycles is low, so fatigue is not
%an issue. The coil must fit in a 2.1 in. diameter hole with a o.1 in
%clearance all the way around the spring. Use unpeened oil tempered wire
%with squared and ground ends.
%DETERMINE A SUITABLE WIRE DIAMETER, USING A SPRING INDEX OF C = 7.
clear allsyms d D N_aD_od = 1.9; %outer diameter of coil
C = 7;eqn1 = (D_od-d)/d == C;solve(eqn1,d)%DETERMINE A SUITABLE MEAN COIL DIAMETER
eqn2 = D/d == C;solve(eqn2,D)%DETERMINE NECESSARY SPRING CONSTANT
f_max = 300;f_min = 150;delta_f = f_max-f_min;delta_x = 1;k = delta_f/delta_x %spring constant
%dETERMINE SUITABLE NUMBER OF COILS
G = 11.2*10^6; %Constant from table...look at 10_5 example
eqn3 = (d^4*G)/(8*D^3*N_a) == k;solve(eqn3,N_a)N_t = N_a+2%DETERMINE NECESSARY FREE LENGTH SO THAT IF THE SPRING WERE COMPRESSED TO
%ITS SOLID LENGTH, THERE WOULD BE NO YIELDING
L_s = (N_t+1)*dA = 147 %from table 10-4
m = 0.187 %from table 10-4S_ut = (A)/(d^m)x = 0.5 %From table 10-6
S_sy = x*S_utk_B = (4*C+2)/(4*C-3) %
F_s = (pi*d^3*S_sy)/(8*k_B*D) %Force of the spring in pounds
L_o = F_s/k+L_s %Maximum length, can be less than this though
MATLAB: How to get the solve function to display values instead of solutions containing other variables
solve
Best Answer