tau_principal

PURPOSE ^

TAU_PRINCIPAL - compute principal component of stress tensor

SYNOPSIS ^

function [f,g,h,i]=tau_principal(tau_xx,tau_yy,tau_xy)

DESCRIPTION ^

TAU_PRINCIPAL - compute principal component of stress tensor

   Usage:
      [f,g,h,i]=tau_principal(tau_xx,tau_yy,tau_xy)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [f,g,h,i]=tau_principal(tau_xx,tau_yy,tau_xy)
0002 %TAU_PRINCIPAL - compute principal component of stress tensor
0003 %
0004 %   Usage:
0005 %      [f,g,h,i]=tau_principal(tau_xx,tau_yy,tau_xy)
0006 
0007 nel=length(tau_xx);
0008 tau_xx=tau_xx/(10^5);
0009 tau_yy=tau_yy/(10^5);
0010 tau_xy=tau_xy/(10^5);
0011 
0012 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%determination of principal components of stress tensor%%%%%%%%%%%%
0013 teta1=zeros(nel,1);
0014 teta2=zeros(nel,1);
0015 ind=find((tau_xx-tau_yy)~=0);
0016 teta1(ind)=1/2*atan(tau_xy(ind)./(tau_xx(ind)-tau_yy(ind)));
0017 ind=find((tau_xx-tau_yy)==0);
0018 teta1(ind)=pi/2;
0019 teta2=teta1+pi/2;
0020 
0021 tmp1=tau_xx.*cos(teta1).^2+tau_yy.*sin(teta1).^2+2*tau_xy.*sin(teta1).*cos(teta1);
0022 tmp2=tau_xx.*cos(teta2).^2+tau_yy.*sin(teta2).^2+2*tau_xy.*sin(teta2).*cos(teta2);
0023 
0024 a=tmp1<=tmp2;
0025 b=tmp1>=tmp2;
0026 tau_1=tmp1.*b+a.*tmp2;
0027 tau_2=tmp1.*a+b.*tmp2;
0028 
0029 teta1_pp=teta1.*b+a.*teta2;
0030 teta2_pp=teta1.*a+b.*teta2;
0031 %teta1_pp=mod(teta1_pp,2*pi);
0032 %teta2_pp=mod(teta2_pp,2*pi);
0033 f=tau_1;
0034 g=tau_2;
0035 h=teta1_pp;
0036 i=teta2_pp;
0037

Generated on Sun 29-Mar-2009 20:22:55 by m2html © 2003