27. Worked Example #3 - Part C

Questions and discussion for this lecture live here. Fire away by hitting Reply below :fire:

Hi Sean
I tried a different approach before watching your video and didn’t get the same result, but I can’t quite see why:
I calculated the displacement and velocity exactly as you did but instead of evaluating next between 11 s and 30 s, I evaluated a new response function u1 (which of course only includes the transient response) between 0 s and 19 s, so that now I can use t=0, which means my function is easier to solve. However, I get a smaller value that you did. Do you think my approach is flawed? If so why? Isn’t solving between 0 and 19 the same of solving between 11 and 30 if the starting boundary conditions at t=0 (or t=11) the same?

Great question - the problem with your approach is that there is a mismatch between the constants you have evaluated (A and B) and your time values. More specifically, you have determined values of A and B by setting t=11. If you want to evaluate the response after 19 seconds (i.e. 30 seconds relative to t=11s) you would need to evaluate A and B with t=0 and use these values in your free vibration response calculation using t=19. Here it is in code to help clarify what I’m saying…you can copy and run this at the bottom of the downloadable solution file…

"""
Determine values of A and B to calculate response RELATIVE to t=11s
"""
time = 0 #(instead of 11)

#Re-evaluate the terms in square brackets with t=0
term_1 = math.e**(-xi*omega_n*time)*omega_d*np.cos(omega_d*time) - np.sin(omega_d*time)*xi*omega_n*math.e**(-xi*omega_n*time)
term_2 = -1*math.e**(-xi*omega_n*time)*omega_d*np.sin(omega_d*time) - np.cos(omega_d*time)*xi*omega_n*math.e**(-xi*omega_n*time)
a = math.e**(-xi*omega_n*time)*np.sin(omega_d*time) 
b = math.e**(-xi*omega_n*time)*np.cos(omega_d*time) 

print('a = {one}'.format(one =round(a,4)))
print('b = {one}'.format(one =round(b,4)))
print('term 1 = {one}'.format(one =round(term_1,3))) 
print('term 2 = {one}'.format(one =round(term_2,3))) 

This gives us,

a = 0.0
b = 1.0
term 1 = 4.628
term 2 = -0.093

Now solve simultaneous equations for A and B…

#Matrix
matrix = np.mat([[a,b],[term_1,term_2]])

#Vector
vector = np.array([[u],[v]])
constants = matrix.I*vector
A = constants[0].item()
B = constants[1].item()
print('A = {one}'.format(one=round(A,3)))
print('B = {one}'.format(one=round(B,3)))

Which gives,

A = -0.004
B = 0.005

Now we use these values of A and B in a free vibration calculation where the time is set to t=19.

#Now evaluate the free vibration response at t=19s
time = 19 #Time instant
a = math.e**(-xi*omega_n*time)*np.sin(omega_d*time) #Term in brackets beside A in equation for u(t) above
b = math.e**(-xi*omega_n*time)*np.cos(omega_d*time) #Term in brackets beside B in equation for u(t) above

u19 = (A*a + B*b).item()
print('The free vibration response at t=19s (relative) is {one} m'.format(one=round(u19,4)))

Giving…

The free vibration response at t=19s (relative) is 0.0008 m

Which matches the solution from the lecture that was based on absolute time rather than the relative time approach shown here.

I hope that helps clear it up - thanks again for the great question.
S

Hi again,
thank you very much, now I get it!