How can I get the solve function to display values instead of solutions containing other variables?
이전 댓글 표시
%% 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 all
syms d D N_a
D_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)*d
A = 147 %from table 10-4
m = 0.187 %from table 10-4
S_ut = (A)/(d^m)
x = 0.5 %From table 10-6
S_sy = x*S_ut
k_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
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



