Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

UNIVERSIDAD NACIONAL DE INGENIERÍA

FACULTAD DE INGENIERÍA MECÁNICA

2DA PRÁCTICA DE LABORATORIO


ARMADURAS EN 2D
ELABORADO POR:
INCHICAQUI GONZALES DANIEL E.
20172656F
CURSO:

CÁLCULO POR ELEMENTOS FINITOS


MC516H

LIMA – PERÚ

2021
CÁLCULO POR ELEMENTOS FINITOS (MC516)

1. DIAGRAMA DE FLUJO DEL PROGRAMA

INICIO

INGRESAR LOS DATOS DE ENTRADA COMO E = 210 GPa,


ATRANSVERSAL = 3000 mm2

CÁLCULO DE l Y m
𝒙𝟐 − 𝒙𝟏 𝒚𝟐 − 𝒚𝟏
𝒍= 𝒚𝒎=
𝒍𝒆 𝒍𝒆

𝒍𝒆 = √(𝒙𝟐 − 𝒙𝟏 )𝟐 + (𝒚𝟐 − 𝒚𝟏 )𝟐

CÁLCULO DE LA MATRIZ DE RIGIDEZ (K)


𝒍𝟐 𝒍𝒎 −𝒍𝟐 −𝒍𝒎
𝑬𝒆 × 𝑨𝒆 𝒎𝟐 −𝒍𝒎 −𝒎𝟐 ]
𝑲= × [ 𝒍𝒎𝟐
𝑳𝒆 −𝒍 −𝒍𝒎 𝒍𝟐 𝒍𝒎
−𝒍𝒎 −𝒎𝟐 𝒍𝒎 𝒎𝟐

CALCULO DE ESFUERZOS
𝑬𝒆
𝝈= × [−𝒍 −𝒎 𝒍 𝒎] × 𝒒
𝑳𝒆

2
CÁLCULO POR ELEMENTOS FINITOS (MC516)

CALCULO DE REACCIONES EN LOS SOPORTES


𝑹=𝑲×𝑸−𝑭

IMPRESIÓN DE RESULTADOS

FIN

3
CÁLCULO POR ELEMENTOS FINITOS (MC516)

2. DIGITACIÓN Y EJECUCIÓN (MATLAB)


trusses2D.m

%clear memory
clc

%E: modulus of elasticity


%A: area of cross section
%L: length of bar

E= 210*(10^3); %MPa
A= 3000; %mm^2
EA= E*A;

%generation of coordinates and connectivities


elementNodes= [1 2;1 3;2 3;2 4;3 4;3 5;4 5;4 6;5 6;5 7;6
7];
nodeCoordinates= [0 0;1800 3118;3600 0;5400 3118;7200
0;9000 3118;10800 0];
numberElements= size(elementNodes,1);
numberNodes= size(nodeCoordinates,1);
xx= nodeCoordinates(:,1);
yy= nodeCoordinates(:,2);

%for structure
%displacements: displacement vector
%force: force vector
%stiffness: stiffness matrix
GDof= 2*numberNodes;
U= zeros(GDof,1);
force=zeros(GDof,1);

%applied load at node 2


force(2)= -280000; %N
force(6)= -210000; %N
force(10)= -280000; %N
force(14)= -360000; %N

%computation of the system stiffness matrix


[stiffness]=...
formStiffness2Dtruss(GDof, numberElements,...
elementNodes, numberNodes, nodeCoordinates, xx, yy,
EA);

%boundary conditions and solution


prescribedDof = [1 2 14]';

4
CÁLCULO POR ELEMENTOS FINITOS (MC516)

%solution
displacements = solution(GDof, prescribedDof, stiffness,
force);
us= 1:2:2*numberNodes-1;
vs= 2:2:2*numberNodes;

%drawing displacements

figure
L=xx(2)-xx(1);
%L= node(2,1) - node(1,1);
XX= displacements(us);
YY= displacements(vs);
dispNorm= max(sqrt(XX.^2+YY.^2));
scaleFact=2*dispNorm;
clf
hold on
drawingMesh(nodeCoordinates+scaleFact*[XX
YY],elementNodes);
drawingMesh(nodeCoordinates, elementNodes);

%output displacements/reactions
outputDisplacementsReactions(displacements,
stiffness,...
GDof, prescribedDof)

%stresses at elements
stresses2Dtruss(numberElements, elementNodes,...
xx, yy, displacements, E)

formStiffness2Dtruss.m
function[stiffness]=...
formStiffness2Dtruss(GDof, numberElements,...
elementNodes,numberNodes, nodeCoordinates,...
xx, yy, EA)

stiffness= zeros(GDof);

%computation of the system stiffness matrix


for e= 1:numberElements
%elementDof: element degrees of freedom (Dof)
indice= elementNodes(e,:);
elementDof= [indice(1)*2-1 indice(1)*2 indice(2)*2-1
indice(2)*2];
xa= xx(indice(2))-xx(indice(1));
ya= yy(indice(2))-yy(indice(1));
length_element= sqrt(xa*xa+ya*ya);

5
CÁLCULO POR ELEMENTOS FINITOS (MC516)

C= xa/length_element;
S= ya/length_element;
k1= EA/length_element*...
[C*C C*S -C*C -C*S; C*S S*S -C*S -S*S;
-C*C -C*S C*C C*S; -C*S -S*S C*S S*S];
stiffness(elementDof, elementDof)=...
stiffness(elementDof, elementDof)+k1;
end

stresses2Dtruss.m

function stresses2Dtruss(numberElements, elementNodes,


xx, yy, displacements, E)
%stresses at elements
for e=1:numberElements
indice= elementNodes(e,:);
elementDof= [indice(1)*2-1 indice(1)*2 indice(2)*2-1
indice(2)*2];
xa= xx(indice(2))-xx(indice(1));
ya= yy(indice(2))-yy(indice(1));
length_element= sqrt(xa*xa+ya*ya);
C= xa/length_element;
S= ya/length_element;
sigma(e)= E/length_element*...
[-C -S C S]*displacements(elementDof);
end
disp('stresses')
sigma'

solution.m
function displacements = solution(GDof,...
prescribedDof, stiffness, force)
activeDof = setdiff([1:GDof]',...
[prescribedDof]);
U = stiffness(activeDof, activeDof)\force(activeDof);
displacements = zeros(GDof,1);
displacements(activeDof) = U;

6
CÁLCULO POR ELEMENTOS FINITOS (MC516)

drawingMesh.m
function drawingMesh(nodes, elementNodes)
%plot(nodes(:,1),nodes(:,2),''')
Rang= size(elementNodes);
for i=1:Rang
pointX1=nodes(elementNodes(i,1),1);
pointY1=nodes(elementNodes(i,2),1);
pointX2=nodes(elementNodes(i,1),2);
pointY2=nodes(elementNodes(i,2),2);
plot([pointX1 pointY1], [pointX2 pointY2], 'K-O');
end

outputDisplacementsReactions.m

function outputDisplacementsReactions...
(displacements, stiffness, GDof, prescribedDof)
%output of displacements and reactions in
%tabular form
%GDof: total number of degress of freedom of
%the problem
%displacements
disp('Displacements')
%displacements = displacements1
jj= 1:GDof; format
[jj' displacements]
%reactions
F= stiffness*displacements;
reactions= F(prescribedDof);
disp('reactions')
[prescribedDof (10^-3)*reactions]

7
CÁLCULO POR ELEMENTOS FINITOS (MC516)

8
CÁLCULO POR ELEMENTOS FINITOS (MC516)

3. CONCLUSIONES

A. El diseño de la armadura 2D fue sencillo de realizar en en programa

Ansys, pero complejo de modelar en Matlab.

B. No es posible calcular los esfuerzos mediante Ansys pero si es

posible en Matlab.

C. los valores de las reacciones difieren entre Ansys y Matlab.

D. El desplazamiento del nodo R coincide entre los cálculos hechos por

Matlab y Ansys.

E. El proceso de la creación del código en Matlab fue demasiado

complejo ya que requería hacer herencia entre funciones.

F. El libro ‘MATLAB Codes for Finite Element Analysis’ fue de gran

ayuda para realizar el código en Matlab.

9
CÁLCULO POR ELEMENTOS FINITOS (MC516)

4. DESARROLLO EN ANSYS – STRUCTURAL

10
CÁLCULO POR ELEMENTOS FINITOS (MC516)

11
CÁLCULO POR ELEMENTOS FINITOS (MC516)

12
CÁLCULO POR ELEMENTOS FINITOS (MC516)

5. COMPARACIÓN DE RESULTADOS, DESDE MATLAB Y


ANSYS

5.1. ESFUERZOS EN CADA BARRA

ESFUERZO
BARRA
σ (N/mm2)
1 -89.8078
2 44.9006
3 89.8078
4 -89.8012
5 -8.9808
6 94.2912
7 8.9808
8 -98.7813
9 98.7886
10 49.3906
11 -98.7886

5.2. DISTANCIA QUE SE DESPLAZA EL NODO R

13
CÁLCULO POR ELEMENTOS FINITOS (MC516)

5.3. REACCIÓN EN LOS APOYOS

Las reacciones estan


en KN

14

You might also like