Changing the stiffness
length, and we will discretize each one of them with the same number of springs.
Determine the stiffness matrix for this problem, using the variables above, and the provided function get_stiffness. Store the stiffness matrix in the variable Kmix.
n = 30, # number of springs for each slinky
N = 2^(n), # Total number of springs
Ls = 20, # (cm), Total Length of the slinky
Ks1 = 700, # (N)/(C)m Stiffness for the first half of the slinky
Ks2 = 200, # ((N)/(c)m), Stiffness for the second half of the slinky
M1 = 150 # (grams) Mass for the first half of the slinky
M2 = 70 # (grams) Mass for the second half of the slinky
k1 = ks1^n, # each individual spring stiffness for the first half of the slinky
k2 = ks2^n, # each individual spring stiffness for the second half of the slinky
1 = L(s)/(N), # each individual spring length
g = 9.81*10^(2) # ((m)/(s^2)) Gravitational constant
# force vector due to gravity
fmix = np.append(force(M1/(n+1), g, n), get_force(M2/(n+1), g, n))
***
# grade (do not delete this line)
2) Changing the stiffness
We could combine two slinkys made of different materials and/or different geometries; that is, we -glue one to the end of the other. Assume we are connecting two slinkys of the same length, and we will discretize each one of them with the same number of springs.
Complete the code snippet below, to repeat the analysis for a mass-spring system with non-uniform stiffness values. We provide the following input variables
Determine the stiffness matrix for this problem, using the variables above, and the provided function get_stiffness. Store the stiffness matrix in the variable Kmix.
n = 30 N = 2*n Ls = 20 Ks1 = 760 Ks2 = 200 M1 = 159 M2 = 76
# number of springs for each slinky
# cm) #(N/cm) #(N/cm) #(grams) #(grams)
Total Length of the slinky Stiffness for the first half of the slinky Stiffness for the second half of the slinky Mass for the first half of the slinky Mass for the second half of the slinky
k1 = Ks1*n # each individual spring stiffness for the first half of the slinky k2 = Ks2*n # each individual spring stiffness for the second half of the slinky
1 = Ls/N
# each individual spring length
g = 9.81*16^2 # (m/s^2) Gravitational constant
# force vector due to gravity fmix = np.append(get_force(M1/n+1), g, n), get_force(M2/n+1), g, n))
...
]: # grade (do not delete this line)