Sie sind auf Seite 1von 3

% Ingresar los esfuerzos, para mostrar el tensor de esfuerzos

disp('Ingrese el tensor de esfuerzos')

E(1,1)=input('xx = ');
E(1,2)=input('xy = ');
E(1,3)=input('xz = ');
E(2,2)=input('yy = ');
E(2,3)=input('yz = ');
E(3,3)=input('zz = ');

%Se arma el tensor de esfuerzos de esta manera.


TE=[E(1,1) E(1,2) E(1,3);E(1,2) E(2,2) E(2,3);E(1,3) E(2,3) E(3,3)];
disp('El TENSOR DE ESFUERZOS es :')
disp(TE)

I1=E(1,1)+E(2,2)+E(3,3);
I2=-(det([E(1,1) E(1,2); E(1,2) E(2,2)]))-(det([E(1,1) E(1,3); E(1,3) E(3,3)]))-
(det([E(2,2) E(2,3); E(2,3) E(3,3)]));
I3=det([E(1,1) E(1,2) E(1,3);E(1,2) E(2,2) E(2,3);E(1,3) E(2,3) E(3,3)]);
fprintf('I1 = %.3f\n', I1)
fprintf('I2 = %.3f\n', I2)
fprintf('I3 = %.3f\n', I3)

disp('La ecuacion para encontrar los esfuerzos principales es :')


disp('E^3-I1E^2-I2E-I3 ')

ee=[1 -I1 -I2 -I3];


disp('Los ESFUEZOS PRINCIPALES son: ')
EP=sort(roots(ee),'descend');
fprintf('E1 = %.2f\n', EP(1,1))
fprintf('E2 = %.2f\n', EP(2,1))
fprintf('E3 = %.2f\n', EP(3,1))
TP1=TE-diag([EP(1,1) EP(1,1) EP(1,1)]);
TP2=TE-diag([EP(2,1) EP(2,1) EP(2,1)]);
TP3=TE-diag([EP(3,1) EP(3,1) EP(3,1)]);
disp('TENSOR DE ESFUERZO PRINCIPAL 1: ')
disp(TP1)
disp('TENSOR DE ESFUERZO PRINCIPAL 2: ')
disp(TP2)
disp('TENSOR DE ESFUERZO PRINCIPAL 3: ')
disp(TP3)
A1=det([TP1(2,2) TP1(2,3);TP1(3,2) TP1(3,3)]);
A2=det([TP2(2,2) TP2(2,3);TP2(3,2) TP2(3,3)]);
A3=det([TP3(2,2) TP3(2,3);TP3(3,2) TP3(3,3)]);
B1=-1*det([TP1(2,1) TP1(2,3);TP1(3,1) TP1(3,3)]);
B2=-1*det([TP2(2,1) TP2(2,3);TP1(3,1) TP2(3,3)]);
B3=-1*det([TP3(2,1) TP3(2,3);TP1(3,1) TP3(3,3)]);
C1=det([TP1(2,1) TP1(2,2);TP1(3,1) TP1(3,2)]);
C2=det([TP2(2,1) TP2(2,2);TP1(3,1) TP2(3,2)]);
C3=det([TP3(2,1) TP3(2,2);TP1(3,1) TP3(3,2)]);
disp('Calculo de determinantes de acuerdo a la fila 1 de la matriz principal de
esfuerzos: ')
fprintf('A1 = %.3f\n', A1)
fprintf('B1 = %.3f\n', B1)
fprintf('C1 = %.3f\n', C1)

fprintf('A2 = %.3f\n', A2)


fprintf('B2 = %.3f\n', B2)
fprintf('C2 = %.3f\n', C2)

fprintf('A3 = %.3f\n', A3)


fprintf('B3 = %.3f\n', B3)
fprintf('C3 = %.3f\n', C3)

k1=1/sqrt(A1^2+B1^2+C1^2);
k2=1/sqrt(A2^2+B2^2+C2^2);
k3=1/sqrt(A3^2+B3^2+C3^2);

fprintf('k1 = %.8f\n', k1)


fprintf('k2 = %.8f\n', k2)
fprintf('k3 = %.8f\n', k3)

l1=A1*k1;
l2=A2*k2;
l3=A3*k3;

m1=B1*k1;
m2=B2*k2;
m3=B3*k3;

n1=C1*k1;
n2=C2*k2;
n3=C3*k3;

N1=[l1 m1 n1];
N2=[l2 m2 n2];
N3=[l3 m3 n3];

disp('Las DIRECCIONES DE LOS ESFUERZOS PRINCIPALES son: ')


disp(strrep(['N1 = (' sprintf(' %.3f,', N1) ')'], ',)', ')'))
disp(strrep(['N2 = (' sprintf(' %.3f,', N2) ')'], ',)', ')'))
disp(strrep(['N3 = (' sprintf(' %.3f,', N3) ')'], ',)', ')'))
disp('Los ESFUERZOS CORTANTES son: ')

disp('cuando m=0: ')


EPS11=0.5*(EP(1,1)-EP(3,1));
EPS12=-0.5*(EP(1,1)-EP(3,1));
fprintf('EPS1 = +- %.2f\n', EPS11)

disp('cuando l=0: ')


EPS21=0.5*(EP(2,1)-EP(3,1));
EPS22=-0.5*(EP(2,1)-EP(3,1));
fprintf('EPS2 = +- %.2f\n', EPS21)

disp('cuando n=0: ')


EPS31=0.5*(EP(1,1)-EP(2,1));
EPS32=-0.5*(EP(1,1)-EP(2,1));
fprintf('EPS3 = +- %.2f\n', EPS31)

EPS=max([EPS11 EPS12 EPS21 EPS22 EPS31 EPS32]);


disp('El ESFUERZOS CORTANTE MAXIMOS es: ')
fprintf('EPS = %.2f\n', EPS)
disp('Las DIRECCIONES DE LOS ESFUERZOS CORTANTE MAXIMOS son: ')
uP1=(N1+N3)./sqrt(l1^2+m1^2+n1^2+l3^2+m3^2+n3^2);
uP2=(N1-N3)./sqrt(l1^2+m1^2+n1^2+l3^2+m3^2+n3^2);
disp(strrep(['uP1 = (' sprintf(' %.3f,', uP1) ')'], ',)', ')'))
disp(strrep(['uP2 = (' sprintf(' %.3f,', uP2) ')'], ',)', ')'))
%para graficar circulo de mohr 3D
centro1=[(EP(1,1)+EP(2,1))/2 0];
radio1=(EP(1,1)-EP(2,1))/2;
viscircles(centro1,radio1,'EdgeColor','r');
centro2=[(EP(2,1)+EP(3,1))/2 0];
radio2=(EP(2,1)-EP(3,1))/2;
viscircles(centro2,radio2,'EdgeColor','y');
centro3=[(EP(1,1)+EP(3,1))/2 0];
radio3=(EP(1,1)-EP(3,1))/2;
viscircles(centro3,radio3,'EdgeColor','g');

xlabel('Normal Stress, \sigma','fontsize',15);


ylabel('Shear Stess, \tau','fontsize',15)
title('Circulo de Mohr 3D')

text(EP(1,1)*1.01,0,'\sigma_1');
text(EP(2,1)*1.1,0,'\sigma_2');
text(EP(3,1)*1.1,0,'\sigma_3','fontsize',15);

text(centro1(1),radio1*0.9,'\tau_3')
text(centro2(1),radio2*0.9,'\tau_1')
text(centro3(1),radio3*0.9,'\tau_2')
xlabel('Esfuerzo normal, \sigma')
ylabel('Esfuerzo cortante, \tau')
grid on

Das könnte Ihnen auch gefallen