clear all; a1=load('acc'); d1=load('disp'); p1=load('pwp'); s1=load('stress1'); e1=load('strain1'); s5=load('stress5'); e5=load('strain5'); s9=load('stress9'); e9=load('strain9'); fs=[0.5, 0.2, 4, 6]; accMul = 78.74; % 78.74 in/s^2 = 2 m/s^2 %integration point 1 p-q po=(s1(:,2)+s1(:,3)+s1(:,4))/3; for i=1:size(s1,1) qo(i)=(s1(i,2)-s1(i,3))^2 + (s1(i,3)-s1(i,4))^2 +(s1(i,2)-s1(i,4))^2 + 6.0* s1(i,5)^2; qo(i)=sign(s1(i,5))*1/3.0*qo(i)^0.5; end figure(1); close 1; figure(1); %integration point 1 stress-strain subplot(2,1,1), plot(e1(:,4),s1(:,5),'r'); title ('shear stress \tau_x_y VS. shear strain \epsilon_x_y at 32.8 ft depth'); xLabel('Shear strain \epsilon_x_y'); yLabel('Shear stress \tau_x_y (psi)'); subplot(2,1,2), plot(-po,s1(:,5),'r'); title ('shear stress \tau_x_y VS. confinement at 32.8 ft depth'); xLabel('confinement p (psi)'); yLabel('Shear stress \tau_x_y (psi)'); set(gcf,'paperposition',fs); saveas(gcf,'SS_PQ_10m','jpg'); %integration point 5 p-q po=(s5(:,2)+s5(:,3)+s5(:,4))/3; for i=1:size(s5,1) qo(i)=(s5(i,2)-s5(i,3))^2 + (s5(i,3)-s5(i,4))^2 +(s5(i,2)-s5(i,4))^2 + 6.0* s5(i,5)^2; qo(i)=sign(s5(i,5))*1/3.0*qo(i)^0.5; end figure(5); close 5; figure(5); %integration point 5 stress-strain subplot(2,1,1), plot(e5(:,4),s5(:,5),'r'); title ('shear stress \tau_x_y VS. shear strain \epsilon_x_y at 19.7 ft depth'); xLabel('Shear strain \epsilon_x_y'); yLabel('Shear stress \tau_x_y (psi)'); subplot(2,1,2), plot(-po,s5(:,5),'r'); title ('shear stress \tau_x_y VS. confinement at 19.7 ft depth'); xLabel('confinement p (psi)'); yLabel('Shear stress \tau_x_y (psi)'); set(gcf,'paperposition',fs); saveas(gcf,'SS_PQ_6m','jpg'); %integration point 9 p-q po=(s9(:,2)+s9(:,3)+s9(:,4))/3; for i=1:size(s1,1) qo(i)=(s9(i,2)-s9(i,3))^2 + (s9(i,3)-s9(i,4))^2 +(s9(i,2)-s9(i,4))^2 + 6.0* s9(i,5)^2; qo(i)=sign(s9(i,5))*1/3.0*qo(i)^0.5; end figure(6); close 6; figure(6); %integration point 9 stress-strain subplot(2,1,1), plot(e9(:,4),s9(:,5),'r'); title ('shear stress \tau_x_y VS. shear strain \epsilon_x_y at 6.6 ft depth'); xLabel('Shear strain \epsilon_x_y'); yLabel('Shear stress \tau_x_y (psi)'); subplot(2,1,2), plot(-po,s9(:,5),'r'); title ('shear stress \tau_x_y VS. confinement at 6.6 ft depth'); xLabel('confinement p (psi)'); yLabel('Shear stress \tau_x_y (psi)'); set(gcf,'paperposition',fs); saveas(gcf,'SS_PQ_2m','jpg'); figure(2); close 2; figure(2); %node 3 displacement relative to node 1 subplot(2,1,1),a=plot(d1(:,1),d1(:,8),'r'); hold on subplot(2,1,1),b=plot(d1(:,1),d1(:,14),'g'); hold on subplot(2,1,1),c=plot(d1(:,1),d1(:,22),'b'); title ('Lateral displacement wrt base'); xLabel('Time (s)'); yLabel('Displacement (in)'); legend([a,b,c],'26.2 ft depth','13.1 ft depth', 'Surface',2) set(gcf,'paperposition',fs); saveas(gcf,'Disp','jpg'); s=accMul*sin(0:pi/50:20*pi); s=[s';zeros(3000,1)]; s1=interp1(0:0.01:40,s,a1(:,1)); figure(3); close 3; figure(3); %node acceleration subplot(3,1,1),a=plot(a1(:,1),(s1+a1(:,22)),'r'); legend(a,'at surface',4); title ('Lateral acceleration'); xLabel('Time (s)'); yLabel('Acceleration (in/s^2)'); subplot(3,1,2),a=plot(a1(:,1),(s1+a1(:,14)),'r'); legend(a,'13.1 ft depth',4); xLabel('Time (s)'); yLabel('Acceleration (in/s^2)'); subplot(3,1,3),a=plot(a1(:,1),(s1+a1(:,8)),'r'); legend(a,'26.2 ft depth',4); xLabel('Time (s)'); yLabel('Acceleration (in/s^2)'); set(gcf,'paperposition',fs); saveas(gcf,'Acc','jpg'); figure(4); close 4; figure(4); subplot(3,1,1),a=plot(p1(:,1),p1(:,11),'r'); legend(a,'3.28 depth',4); title ('Pore pressure'); xLabel('Time (s)'); yLabel('Pore pressure (psi)'); subplot(3,1,2),a=plot(p1(:,1),p1(:,7),'r'); legend(a,'16.4 ft depth',4); xLabel('Time (s)'); yLabel('Pressure (psi)'); subplot(3,1,3),a=plot(p1(:,1),p1(:,2),'r'); legend(a,'32.8 ft depth',4); xLabel('Time (s)'); yLabel('Pressure (psi)'); set(gcf,'paperposition',fs); saveas(gcf,'EPWP','jpg');