Skip to content

Design Calculations

Modified the pre-existing Bash script to input our values, added small snippet to print the intersection of the two lines.

# Measured distances and masses
M=1.35903 # large mass
m=0.72692 # small mass
Mbar=2.90 # mass of bar (with small and large masses removed)
D=0.9986 # distance between knife-edge pivot points
L=1.52  # length of bar
g = 9.799 # value of g in Newport News

# Distance calculations
#
# The distance between the knife edge pivot and the lower edge of the large mass is 1.35 cm
# The radius of the large mass is 4.7523 cm
# The radius of the small mass is 3.5 cm
RM = 0.0475
Rm = 0.035
offset = 0.0135
l1=D/2.0+RM+offset

# Find the value of x that satisfies the equation above

diff = 1.0E+99
olddiff = 1.0E+99
l2 = []
xpos = []
t1 = []
t2 = []
for i in range(1000):
    l2.append(D/2.0+Rm+(i/1000.0)*.12)
    xpos.append((l2[i]-offset-D/2-Rm)*100) # distance from the small mass to the knife-edge, in cm.
    x=(M*l1-m*l2[i])/(M+m+Mbar)
    h2=D/2.0+x
    h1=D/2.0-x
    lhs=h1*h2;
    Icm=1.0/12.0*Mbar*L*L+Mbar*x*x+M*(l1-x)*(l1-x)+m*(l2[i]+x)*(l2[i]+x)+1/2.0*m*Rm**2 + 1.0/2*M*RM**2
    rhs=Icm/(M+m+Mbar)
    diff = lhs-rhs
    if (np.abs(diff)<olddiff):
        olddiff=diff
        index=i
    t1.append(2*np.pi*np.sqrt((h1*h1+rhs)/(g*h1)))
    t2.append(2*np.pi*np.sqrt((h2*h2+rhs)/(g*h2)))
    
#print (l2,t1,t2)
t1 = np.array(t1)
t2 = np.array(t2)

diff = t1 - t2
index = np.where(np.diff(np.sign(diff)))[0]
print(index)
print(xpos[index[0]])  # Assumes 1 intersection.
    
plt.plot(xpos,t1,label='Small Mass Down')
plt.plot(xpos,t2,label='Small Mass Up')
#plt.yscale("log")
plt.legend()
plt.xlabel('Distance from Small Mass to Knife Edge (cm)')
plt.ylabel('Period (s)')
plt.show()
Edited by Joshua Luzier