Guest User

Untitled

a guest
Jan 16th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 1.08 KB | None | 0 0
  1. clc
  2. clear all
  3. close all
  4. dt = pi/1000;
  5. theta=(0 : dt : 2*pi);
  6. Nu=0.3;
  7. f1=cos(theta/2).*(1-sin(theta/2).*sin((3*theta)/2));
  8. f11=cos((theta+dt)/2).*(1-sin((theta+dt)/2).*sin((3*(theta+dt))/2));
  9. f2=cos(theta/2).*(1+sin(theta/2).*sin((3*theta)/2));
  10. f22=cos((theta+dt)/2).*(1+sin((theta+dt)/2).*sin((3*(theta+dt))/2));
  11. f3=cos(theta/2).*sin(theta/2).*cos((3*theta)/2);
  12. f33=cos((theta+dt)/2).*sin((theta+dt)/2).*cos((3*(theta+dt))/2);
  13. r_pstress=(f1-f2).^2+f2.^2+f1.^2+6.*(f3.^2);
  14. r_pstress1=(f11-f22).^2+f22.^2+f11.^2+6.*(f33.^2);
  15. r_pstrain=(f1-f2).^2+(f2-Nu.*(f1+f2)).^2+(f1-Nu.*(f1+f2)).^2+6.*(f3.^2);
  16. r_pstrain1=(f11-f22).^2+(f22-Nu.*(f11+f22)).^2+(f11-Nu.*(f11+f22)).^2+6.*(f33.^2);
  17. polar(theta,r_pstress);
  18. hold on
  19. polar(theta,r_pstrain);
  20. hold off
  21.  
  22. area_pstress = 0;                                      
  23. for theta = 0 : dt : (2*pi)-dt         
  24.     area_pstress = area_pstress + (0.5 * r_pstress[theta/dt+1] * r_pstress1[theta/dt+1] * sin(dt));
  25. end
  26.  
  27. area_pstrain = 0;                                          
  28. for theta = 0 : dt : (2*pi)-dt         
  29.     area_pstrain = area_pstrain + (0.5 * r_pstrain[theta/dt+1] * r_pstrain1[theta/dt+1] * sin(dt));
  30. end
Add Comment
Please, Sign In to add comment