Estudio estructural y micro-estructural de la influencia ...
ANÁLISIS ESTRUCTURAL-LENGUAJE DE PROGRAMACIÓN MATLAB.pdf
-
Upload
leninsotoquispe -
Category
Documents
-
view
217 -
download
0
Transcript of ANÁLISIS ESTRUCTURAL-LENGUAJE DE PROGRAMACIÓN MATLAB.pdf
-
8/15/2019 ANÁLISIS ESTRUCTURAL-LENGUAJE DE PROGRAMACIÓN MATLAB.pdf
1/6
LENGUAJE DE PROGRAMACIÓN MATLAB
(CÁLCULO DE ESFUERZO CORTANTE Y ESRFUERZO POR FLEXIÓN PARA VIGA DE
SECCIÓN T CON PARÁMETROS DEFINIDOS)
CODIFICACIÓN
clear,clc, clf fprintf(' ************ BIENVENIDOS AL PROGRAMA ************\n') fprintf('\n') % %Ecuaciones de la Fuerza Cortante y Momento Flector. syms x mx1=2.07*x-0.6*x^2; vx1=2.07-1.2*x; mx2=-0.6*x^2+4.38*x-4.65;
vx2=-1.2*x+4.38; %
%centro de gravedad de la seccion y momento de inercia. mc= [0 0.2 0.2 0.5 0.5 -0.3,-0.3,0;0,0,0.6,0.6,0.8,0.8,0.6,0.6]';
[area,ygp,Ixx]=area_yg(mc);
%hallamos las area parciales y su respectivo Yg. A1=[0,0.8,0.2714]; for i=1:10
A1=[A1;[0.8*i/50,0.8,0.2714-i/100]];
end A1=[A1;[0.16,0.2,0.1714]]; % A2=[0.1,0.2,0.2786]; for i=1:25
A2=[A2;[0.2*(0.5-i/50),0.2,ygp-0.25+i/100]]; end % map=[A1;A2]; [na ma]=size(map);
%Hallamos los esfuerzos en los puntos deseados. fprintf('Desea hallar los esfuerzos en un punto de la viga: \n')
fprintf('Opción 1): SI\n') fprintf('Opción 2): NO\n') opc=input('Ingrese opción 1) o 2): '); disp(' ') if opc==1
k=''; while isempty(k)==1
di=input('Ingrese distancia(m): '); if di>11
fprintf('Longitud fuera de rango \n')
-
8/15/2019 ANÁLISIS ESTRUCTURAL-LENGUAJE DE PROGRAMACIÓN MATLAB.pdf
2/6
continue; end if di12
et(i,2)=0.8-(i-3)*0.02-0.1; en(i,1)=mto*(ygp-et(i,2))/Ixx;
end en(:,2)=et(:,2); end %GRAFICAMOS LOS ESFUERZO CORTANTE. disp(' ') disp('LOS VALORES DEL ESFUERZO CORTANTE') disp(et) clf; subplot(1,2,1) %plot(et(:,1),et(:,2),'ob') grid on; hold on; plot([0,0],[0,0.8],'blue','linewidth',3)
% hold on; plot(et(:,1),et(:,2),'black','linewidth',2); hold on; dix=max(et(:,1))-min(et(:,1)); axis([-0.05*dix+min(et(:,1)), max(et(:,1))+0.05*dix, -0.1, 0.9]); title('ESFUERZO CORTANTE','color','b') axis square %GRAFICO DE ESFUERZO NORMAL disp(' ')
-
8/15/2019 ANÁLISIS ESTRUCTURAL-LENGUAJE DE PROGRAMACIÓN MATLAB.pdf
3/6
disp('LOS VALORES DEL ESFUERZO NORMAL') disp(en) subplot(1,2,2) plot([0,0],[0,0.8],'blue','linewidth',3) grid on; hold on; plot(en(:,1),en(:,2),'black','linewidth',2); dix=max(en(:,1))-min(en(:,1)); axis([-0.05*dix+min(en(:,1))-0.01, max(en(:,1))+0.05*dix+0.01, -0.1,
0.9]); hold on; plot([0,en(end,1)],[0,0], 'black','linewidth',2); plot([0,en(1,1)],[0.8,0.8], 'black','linewidth',2); title('ESFUERZO NORMAL','color','b') axis square % fprintf('\n') k=input('Press enter para seguir, otra tecla para salir:');
end elseif opc==2 end
FUNCION PARA CALCULAR EL YG Y ÁREA POR COORDENADAS.
function [area,yg,Ixx]=area_yg(M) xc=M(:,1); yc=M(:,2); xc=[xc;xc(1,1)]; yc=[yc;yc(1,1)]; n=length(xc); % c=1; ar=0; yg=0; xg=0; ix=0; iy=0; while c
-
8/15/2019 ANÁLISIS ESTRUCTURAL-LENGUAJE DE PROGRAMACIÓN MATLAB.pdf
4/6
APLICACIÓN DATOS DE ENTRADA: los datos de input se limitan a valores:
a) Longitud de viga y carga: los valores corresponden a la sumadel apellido y nombre, respectivamente, de uno de losintegrantes del grupo (elegido por sorteo).
= 5 = 6
= 6
∴ = 11 = 0.2 × 6 = 1.2 /
b) Base de viga: = 0.8 c) Altura de viga: ℎ = 0.8 d) Espesor de sección de viga = 0.2
e)
La distancia a hallar oscila entre 0 11
************ BIENVENIDOS AL PROGRAMA ************
Desea hallar los esfuerzos en un punto de la viga:Opción 1): SIOpción 2): NOIngrese opción 1) o 2): 1
Ingrese distancia (m):0.2
DATOS DE SALIDA
LOS VALORES DEL ESFUERZO CORTANTE0 0.8000
0.6334 0.78001.2183 0.76001.7548 0.74002.2428 0.72002.6823 0.70003.0734 0.6800
3.4161 0.66003.7102 0.64003.9559 0.62004.1532 0.6000
16.6126 0.600016.8767 0.500016.7815 0.480016.6396 0.4600
-
8/15/2019 ANÁLISIS ESTRUCTURAL-LENGUAJE DE PROGRAMACIÓN MATLAB.pdf
5/6
16.4492 0.440016.2104 0.420015.9231 0.400015.5873 0.380015.2031 0.3600
14.7704 0.340014.2892 0.320013.7596 0.300013.1815 0.280012.5550 0.260011.8800 0.240011.1565 0.220010.3846 0.20009.5642 0.18008.6954 0.16007.7781 0.1400
6.8123 0.12005.7981 0.10004.7354 0.08003.6242 0.06002.4646 0.04001.2565 0.0200
0 -0.0000
LOS VALORES DEL ESFUERZO NORMAL-7.0082 0.8000
-6.4918 0.7800-5.9754 0.7600-5.4590 0.7400-4.9426 0.7200-4.4262 0.7000-3.9098 0.6800-3.3934 0.6600-2.8770 0.6400-2.3607 0.6200-1.8443 0.6000-1.8443 0.6000
0.7377 0.50001.2541 0.48001.7705 0.46002.2869 0.44002.8033 0.42003.3197 0.40003.8361 0.38004.3525 0.3600
-
8/15/2019 ANÁLISIS ESTRUCTURAL-LENGUAJE DE PROGRAMACIÓN MATLAB.pdf
6/6
4.8689 0.34005.3852 0.32005.9016 0.30006.4180 0.28006.9344 0.2600
7.4508 0.24007.9672 0.22008.4836 0.20009.0000 0.18009.5164 0.1600
10.0328 0.140010.5492 0.120011.0656 0.100011.5820 0.080012.0984 0.060012.6148 0.0400
13.1311 0.020013.6475 -0.0000
0 2 4 6 8 10 12 14 16-0.1
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
ESFUERZO CORTANTE
-5 0 5 10-0.1
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
ESFUERZO NORMAL