import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-8.1 Page No.160\n');
Dm=0.625; ##[in] Mean diameter of spring
F=35.; ##[lb] Load
K=1.25; ##[] Wahl factor for Dm/Dw=6.25 (figure 8.8)
Q=190000.; ##[lb/in^2] Expected ultimate strength
LF=0.263; ##[] Loading factor
Dw=(K*8.*F*Dm/(LF*math.pi*Q))**(1/2.846); ##[in] Wire diameter
print'%s %.2f %s '%('\n The wire diameter of spring is ',Dw,' in.');
##Use U.S Steel 12-gage wire: Dw=0.105 in.
import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-8.2 Page No.163\n');
Dw=0.105; ##[in] Wire diameter
Dm=0.620; ##[in] Mean diameter of spring
F=35.; ##[lb] Load
G=11.85*10**6; ##[lb/in^2] Shear modulus of elasticity
Delta=0.5; ##[in] Deflection
Na=Delta*G*Dw**4./(8.*F*Dm**3); ##[] Number of active coils
Nat=Na+2.; ##[] Total number of coils
Lf=2.; ##[in] Free length of spring
P=(Lf-2.*Dw)/Nat; ##[in] Pitch (Table 8.1)
print'%s %.2f %s '%('\n Pitch is ',P,' in.');
k=G*Dw**4./(8.*Dm**3*Na); ##[lb/in] Spring rate
print'%s %.2f %s '%('\n Spring rate is ',k,' lb/in.');
print'%s %.2f %s '%('\n The total number of coils necessary to meet design criteria are .',Nat,'');
##Note: The deviation of answer from the answer given in the book is due to round off error.(In the book values are rounded while in scilab actual values are taken)
##Note: The deviation of answer from the answer given in the book is due to round off error.(In the book values are rounded while in scilab actual values are taken)
import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-8.3 Page No.165\n');
Lf=2.; ##[in] Free length of spring
Dm=0.620; ##[in] Mean diameter of spring
R=Lf/Dm; ##[] Free lengtth to mean diameter ratio
print'%s %.2f %s '%('\n The ratio of the free length of spring to mean diameter of spring is .',R,'');
print(' From Figure 8.9 for squared and ground ends, this is a stable spring.');
import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-8.4 Page No.165\n');
F=35.; ##[lb] Load
k=73.3; ##[lb/in] Spring rate
x=F/k; ##[in] Deflection
print'%s %.2f %s '%('\n The deflection in the spring would be ',x,' in.');
import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-8.5 Page No.166\n');
b=12.; ##[in] Width of plate
h=1.; ##[in] Thickness of plate
L=72.; ##[in] Length of plate
I=b*h**3/12.; ##[in^4] Moment of inertia
Delta=4.; ##[in] Deflection
E=10*10**6; ##[lb/in^2] Modulus of elasticity
F=3.*Delta*E*I/L**3; ##[lb] Force
print'%s %.2f %s '%('\n The force at this point is ',F,' lb.');
k=F/Delta; ##[lb/in] Stiffness
print'%s %.2f %s '%('\n stiffness is ',k,' lb/in.');
##Note: The deviation of answer from the answer given in the book is due to round off error.(In the book values are rounded while in scilab actual values are taken)
##Note: The deviation of answer from the answer given in the book is due to round off error.(In the book values are rounded while in scilab actual values are taken)
import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-8.6 Page No.167\n');
F=322.; ##[lb] Force
Delta=4.; ##[in] Deflection
U=F*Delta/2.; ##[in*lb] Energy
print'%s %.2f %s '%('\n The energy from the 4-inch deflection was ',U,' lb*in.');