Advertisement
Guest User

Untitled

a guest
May 7th, 2014
3,176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. setsimenv
  2.  
  3. AllFileNames={'NGA_no_1107_KAK000.AT2','NGA_no_1107_KAK090.AT2','NGA_no_1111_NIS000.AT2','NGA_no_1111_NIS090.AT2','NGA_no_1116_SHI000.AT2','NGA_no_1116_SHI090.AT2','NGA_no_1119_TAZ000.AT2','NGA_no_1119_TAZ090.AT2','NGA_no_1120_TAK000.AT2','NGA_no_1120_TAK090.AT2'};
  4.  
  5.  
  6. for n=1:length(AllFileNames);
  7. % add your file name here to get the motion
  8. FILENAME=AllFileNames{n}; %modified
  9.  
  10. %ground acceleration in m/sec^2
  11. DIRNAME='./GroundMotions/'; %directory the groundmotion is saved
  12. LOADFILENAME=[DIRNAME FILENAME]; %change to .VT2 for ground velocity and .DT2 for ground displacement
  13. [Ag,dt]= read_peer_data(LOADFILENAME);
  14. tv = (0:dt:(length(Ag)-1)*dt)'; %Time interested in the analysis
  15. fig = figure; hh = plot(tv, Ag, 'color', [0.6 0.6 0.6]);grid on;
  16. set(hh, 'linewidth', 2); ylabel('g'); xlabel('time,sec');
  17.  
  18. % scale the motion you select above
  19. % get a normalized spectra
  20. T1 = 1.08; % natural period 1 sec
  21. beta = 0.05; % dampign ratio 5%
  22. quake = [tv, -Ag * g];
  23. [Sa_T1, Sd_T1] = Spectra(T1, beta, quake, g);
  24. DBE_Sa = 0.66; % the DBE spectral demand
  25.  
  26. ga_scale = DBE_Sa / Sa_T1; % calcuate ga_scale such as at T1,Sa(T1)= 1.0 g
  27.  
  28. sAg = ga_scale * Ag * g; % the scaled motion
  29. quake = [tv, -sAg];
  30. % define a set of periods
  31. Tn = 0.02:0.02:2.5;
  32. [Sa_Tn{n}, Sd_Tn{n}] = Spectra(Tn, beta, quake, g); %Modified
  33. end
  34.  
  35. %%%%%%%%%%%%% the design spectra %%%%%%%%%%%%%
  36. Ss_m = 2.11;
  37. S1_m = 1.08;
  38. fig = Design_Spectra(Ss_m, S1_m, 'MCE');
  39.  
  40. Ss_d = 1.19;
  41. S1_d = 0.66;
  42. Design_Spectra(Ss_d, S1_d, 'DBE', fig);
  43.  
  44. figure(fig); plot(Tn, Sa_Tn{n}, 'k', 'linewidth', 2);
  45. hold on; plot([T1 T1 Tn(1)], [0 Sa_T1, Sa_T1] * ga_scale, 'g-.', 'linewidth', 3);
  46.  
  47. legend(['NEHRP-MCE: Ss =', num2str(Ss_m), ', S1 = ', num2str(S1_m)],...
  48. ['NEHRP-DBE: Ss =', num2str(Ss_d), ', S1 = ', num2str(S1_d)], 'Response spectra', 'DBE Sa(T1=1.08)'); grid on;
  49. xlabel('Tn, sec'); ylabel('Sa(Tn), g');
  50. set(gca, 'xlim', [Tn(1) 3], 'ylim', [0 5]);
  51. title('acceleration design/response spectra')
  52.  
  53. figure; plot(Tn, Sd_Tn{n}, 'k', 'linewidth', 2);
  54. hold on; plot([T1 T1 Tn(1)], [0 Sd_T1, Sd_T1] * ga_scale, 'g-.', 'linewidth', 3);
  55.  
  56. legend('Response spectra', 'DBE Sd(T1=1.08)'); grid on;
  57. xlabel('Tn, sec'); ylabel('Sd(Tn), inch');
  58. set(gca, 'xlim', [Tn(1) 3]);
  59. title('displacement response spectra')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement