Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- setsimenv
- 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'};
- for n=1:length(AllFileNames);
- % add your file name here to get the motion
- FILENAME=AllFileNames{n}; %modified
- %ground acceleration in m/sec^2
- DIRNAME='./GroundMotions/'; %directory the groundmotion is saved
- LOADFILENAME=[DIRNAME FILENAME]; %change to .VT2 for ground velocity and .DT2 for ground displacement
- [Ag,dt]= read_peer_data(LOADFILENAME);
- tv = (0:dt:(length(Ag)-1)*dt)'; %Time interested in the analysis
- fig = figure; hh = plot(tv, Ag, 'color', [0.6 0.6 0.6]);grid on;
- set(hh, 'linewidth', 2); ylabel('g'); xlabel('time,sec');
- % scale the motion you select above
- % get a normalized spectra
- T1 = 1.08; % natural period 1 sec
- beta = 0.05; % dampign ratio 5%
- quake = [tv, -Ag * g];
- [Sa_T1, Sd_T1] = Spectra(T1, beta, quake, g);
- DBE_Sa = 0.66; % the DBE spectral demand
- ga_scale = DBE_Sa / Sa_T1; % calcuate ga_scale such as at T1,Sa(T1)= 1.0 g
- sAg = ga_scale * Ag * g; % the scaled motion
- quake = [tv, -sAg];
- % define a set of periods
- Tn = 0.02:0.02:2.5;
- [Sa_Tn{n}, Sd_Tn{n}] = Spectra(Tn, beta, quake, g); %Modified
- end
- %%%%%%%%%%%%% the design spectra %%%%%%%%%%%%%
- Ss_m = 2.11;
- S1_m = 1.08;
- fig = Design_Spectra(Ss_m, S1_m, 'MCE');
- Ss_d = 1.19;
- S1_d = 0.66;
- Design_Spectra(Ss_d, S1_d, 'DBE', fig);
- figure(fig); plot(Tn, Sa_Tn{n}, 'k', 'linewidth', 2);
- hold on; plot([T1 T1 Tn(1)], [0 Sa_T1, Sa_T1] * ga_scale, 'g-.', 'linewidth', 3);
- legend(['NEHRP-MCE: Ss =', num2str(Ss_m), ', S1 = ', num2str(S1_m)],...
- ['NEHRP-DBE: Ss =', num2str(Ss_d), ', S1 = ', num2str(S1_d)], 'Response spectra', 'DBE Sa(T1=1.08)'); grid on;
- xlabel('Tn, sec'); ylabel('Sa(Tn), g');
- set(gca, 'xlim', [Tn(1) 3], 'ylim', [0 5]);
- title('acceleration design/response spectra')
- figure; plot(Tn, Sd_Tn{n}, 'k', 'linewidth', 2);
- hold on; plot([T1 T1 Tn(1)], [0 Sd_T1, Sd_T1] * ga_scale, 'g-.', 'linewidth', 3);
- legend('Response spectra', 'DBE Sd(T1=1.08)'); grid on;
- xlabel('Tn, sec'); ylabel('Sd(Tn), inch');
- set(gca, 'xlim', [Tn(1) 3]);
- title('displacement response spectra')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement