%================================================================ % (c) Jerome Peter Lynch, (all rights reserved) % University of Michigan % October 2009 % % This program implements a Newmark solution to Problem 2 % in Homework #5. In particular, the Newmark Linear % Acceleration method (gamma = 1/2, beta = 1/6) %================================================================ %============% % PROBLEM #1 % %============% %Establish Structural Properties %=============================== m = 1; % in kips-s^2/in k = 100; % in kips/in c = 0.05*2*sqrt(k*m); % in kips-s/in wn = sqrt(k/m); % in rad/sec Tn = 2*pi/wn; % in sec fn = wn/(2*pi); % in Hz %First Setup Applied Loading %=========================== load('elcentro.mat') dt = dt; t = t; f = -m*Ag*386.4; % Note, the vectors Ag (in terms of g), t (in terms of seconds), and % dt (in terms of seconds) are loaded by incovation of this function. %Apply Newmark Method %==================== gamma = 1/2; beta = 1/6; [X,Xd,Xdd,t] = newmark(m,c,k,f,dt,gamma,beta,0,0); % You need to write a function "newmark.m" that is called right here. % The API for the function is provided in a second file. %Plot Response %============= figure subplot(3,1,1) plot(t,X,'-'); xlabel('Time (sec)'); ylabel('Displacement (in)'); title('Response of the Water Tower to El Centro 1940 (NS) Ground Motion') subplot(3,1,2) plot(t,Xd,'-'); xlabel('Time (sec)'); ylabel('Velocity (in/s)'); subplot(3,1,3) plot(t,Xdd,'-'); xlabel('Time (sec)'); ylabel('Acceleration (in/s^2)'); %============% % PROBLEM #2 % %============% %%%%%PROGRAM HERE