0% found this document useful (0 votes)
243 views12 pages

Fea Assignment 2

The document describes a finite element analysis assignment to analyze stresses in a 2D truss subjected to plane forces. The truss is modeled in MATLAB and ANSYS software. Element stiffness matrices are generated and assembled into a global stiffness matrix to solve for displacements and stresses. Results show the displacements at nodes, support reactions, and stresses in each truss element. Validation of the MATLAB solution is performed using ANSYS.

Uploaded by

Misbah Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
243 views12 pages

Fea Assignment 2

The document describes a finite element analysis assignment to analyze stresses in a 2D truss subjected to plane forces. The truss is modeled in MATLAB and ANSYS software. Element stiffness matrices are generated and assembled into a global stiffness matrix to solve for displacements and stresses. Results show the displacements at nodes, support reactions, and stresses in each truss element. Validation of the MATLAB solution is performed using ANSYS.

Uploaded by

Misbah Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Finite Element Analysis 2017-18

Assignment No.2
Title: Computer program for stress analysis of 2-D truss subjected to plane forces.

Aim: To perform displacement and stress analysis for the given 2D truss using MATLAB and
analytical expressions.

Problem Description:

For the Truss shown in Figure No.1 find the displacement of nodes, support reactions and
elemental stresses. Assume young modulus for truss material, E=210GPa and cross section
of each member is, A= 10*10^4 mm2. Also, solve the above truss problem using ANSYS to
validate the results.

`
Figure 1.1: 2D truss
Node Nos. x-coordinate (m) Y-coordinate (m)
1 0 0
2 1500 0
3 3000 0
4 2250 1250
5 750 1250

PES MCOE, Pune | Department of Mechanical Engineering 1


Finite Element Analysis 2017-18

MATLAB Program for 2-D Truss


%7-member truss practical assignment%
clc;
clear all;

E = 210*10^3;
A = 10*10^4;

L1 = ElementLength(0,0,1500,0)
L2 = ElementLength(1500,0,3000,0)
L3 = ElementLength(3000,0,2250,1250)
L4 = ElementLength(2250,1250,1500,0)
L5 = ElementLength(2250,1250,750,1250)
L6 = ElementLength(750,1250,1500,0)
L7 = ElementLength(750,1250,0,0)

theta1 = 0;
theta2 = 0;
theta3 = pi-tan(1250/750);
theta4 = tan(1250/750);
theta5 = 0;
theta6 = pi -tan(1250/750);
theta7 = tan(1250/750);

%Element Stiffness Matrices


K1 = ElementStiffness(E,A,L1,theta1)
K2 = ElementStiffness(E,A,L2,theta2)
K3 = ElementStiffness(E,A,L3,theta3)
K4 = ElementStiffness(E,A,L4,theta4)
K5 = ElementStiffness(E,A,L5,theta5)
K6 = ElementStiffness(E,A,L6,theta6)
K7 = ElementStiffness(E,A,L7,theta7)

kk1=zeros(10,10);
kk2=zeros(10,10);
kk3=zeros(10,10);
kk4=zeros(10,10);
kk5=zeros(10,10);
kk6=zeros(10,10);
kk7=zeros(10,10);

x=1;
kk1=make10by10(x,K1);
x=2;
kk2=make10by10(x,K2);
x=3;
kk3=make10by10(x,K3);
x=4;
kk4=make10by10(x,K4);
x=5;
kk5=make10by10(x,K5);
x=6;
kk6=make10by10(x,K6);
x=7;
kk7=make10by10(x,K7);

Kg=kk1+kk2+kk3+kk4+kk5+kk6+kk7

PES MCOE, Pune | Department of Mechanical Engineering 2


Finite Element Analysis 2017-18

% Boundary Conditions
Kr=[Kg(3,3) Kg(3,4) Kg(3,5) Kg(3,7) Kg(3,8) Kg(3,9) Kg(3,10);
Kg(4,3) Kg(4,4) Kg(4,5) Kg(4,7) Kg(4,8) Kg(4,9) Kg(4,10);
Kg(5,3) Kg(5,4) Kg(5,5) Kg(5,7) Kg(5,8) Kg(5,9) Kg(5,10);
Kg(7,3) Kg(7,4) Kg(7,5) Kg(7,7) Kg(7,8) Kg(7,9) Kg(7,10);
Kg(8,3) Kg(8,4) Kg(8,5) Kg(8,7) Kg(8,8) Kg(8,9) Kg(8,10);
Kg(9,3) Kg(9,4) Kg(9,5) Kg(9,7) Kg(9,8) Kg(9,9) Kg(9,10);
Kg(10,3) Kg(10,4) Kg(10,5) Kg(10,7) Kg(10,8) Kg(10,9) Kg(10,10)]

%Force Vector
F=[0;-8000;0;0;-5000;0;-10000];

%Displacement Vector
u=Kr\F

%Global Displacement Vector


U=[0;0;u(1,1);u(2,1);u(3,1);0;u(4,1);u(5,1);u(6,1);u(7,1)]

%Support Reaction
F=Kg*U
%Local Displacement Vectors
u1=U(1:4);
u2=U(3:6);
u3=U(5:8);
u4=[U(3,1);U(4,1);U(7,1);U(8,1)];
u5=U(7:10);
u6=[U(3,1);U(4,1);U(9,1);U(10,1)];
u7=[U(1,1);U(2,1);U(9,1);U(10,1)];

%Element Stresses
sigma1=ElementStress(E,L1,theta1,u1)
sigma2=ElementStress(E,L2,theta2,u2)
sigma3=ElementStress(E,L3,theta3,u3)
sigma4=ElementStress(E,L3,theta4,u4)
sigma5=ElementStress(E,L4,theta5,u5)
sigma6=ElementStress(E,L5,theta6,u6)
sigma7=ElementStress(E,L7,theta7,u7)

%Functions%
1. Element length
function [y] = ElementLength(x1,y1,x2,y2)
y = sqrt((x2-x1)^2+(y2-y1)^2);
end

2. Element stiffness
function [y] = ElementStiffness(E,A,L,theta)
c = cos(theta);
s = sin(theta);
y = ((E*A)/L)*[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];
end

PES MCOE, Pune | Department of Mechanical Engineering 3


Finite Element Analysis 2017-18

3. Makek10by10
function [y] = make10by10(x,K)
if (x==1)
i=1;j=2;m=3;n=4;
else
if (x==2)
i=3;j=4;m=5;n=6;
else
if (x==3)
i=5;j=6;m=7;n=8;
else
if (x==4)
i=3;j=4;m=7;n=8;
else
if (x==5)
i=7;j=8;m=9;n=10;
else
if (x==6)
i=3;j=4;m=9;n=10;
else
i=1;j=2;m=9;n=10;
end
end
end
end
end
end
kk=zeros(10,10);
kk(i,i)=K(1,1);
kk(i,j)=K(1,2);
kk(i,m)=K(1,3);
kk(i,n)=K(1,4);
kk(j,i)=K(2,1);
kk(j,j)=K(2,2);
kk(j,m)=K(2,3);
kk(j,n)=K(2,4);
kk(m,i)=K(3,1);
kk(m,j)=K(3,2);
kk(m,m)=K(3,3);
kk(m,n)=K(3,4);
kk(n,i)=K(4,1);
kk(n,j)=K(4,2);
kk(n,m)=K(4,3);
kk(n,n)=K(4,4);
y=kk;
end

4. Element Stress
function [y] = ElementStress(E,L,theta,u)
C=cos(theta);
S=sin(theta);
y=(E/L)*[-C -S C S]*u;
end

PES MCOE, Pune | Department of Mechanical Engineering 4


Finite Element Analysis 2017-18

OUTPUT
E = 2.1000e+11
A = 1.0000e-03
L1 = 1500
L2 = 1500
L3 = 1.4577e+03
L4 = 1.4577e+03
L5 = 1500
L6 = 1.4577e+03
L7 = 1.4577e+03

K1 =

14000000 0 -14000000 0

0 0 0 0

-14000000 0 14000000 0

0 0 0 0

K2 =

14000000 0 -14000000 0

0 0 0 0

-14000000 0 14000000 0

0 0 0 0

K3 = 1.0e+06 *

4.5499 6.6966 -4.5499 -6.6966

6.6966 9.8559 -6.6966 -9.8559

-4.5499 -6.6966 4.5499 6.6966

-6.6966 -9.8559 6.6966 9.8559

K4 = 1.0e+06 *

4.5499 -6.6966 -4.5499 6.6966

-6.6966 9.8559 6.6966 -9.8559

-4.5499 6.6966 4.5499 -6.6966

6.6966 -9.8559 -6.6966 9.8559

PES MCOE, Pune | Department of Mechanical Engineering 5


Finite Element Analysis 2017-18

K5 =

14000000 0 -14000000 0

0 0 0 0

-14000000 0 14000000 0

0 0 0 0

K6 = 1.0e+06 *

4.5499 6.6966 -4.5499 -6.6966

6.6966 9.8559 -6.6966 -9.8559

-4.5499 -6.6966 4.5499 6.6966

-6.6966 -9.8559 6.6966 9.8559

K7 = 1.0e+06 *

4.5499 -6.6966 -4.5499 6.6966

-6.6966 9.8559 6.6966 -9.8559

-4.5499 6.6966 4.5499 -6.6966

6.6966 -9.8559 -6.6966 9.8559

Kg = 1.0e+07 *

1.8550 -0.6697 -1.4000 0 0 0 0 0 -0.4550 0.6697

-0.6697 0.9856 0 0 0 0 0 0 0.6697 -0.9856

-1.4000 0 3.7100 -0.0000 -1.4000 0 -0.4550 0.6697 -0.4550 -0.6697

0 0 -0.0000 1.9712 0 0 0.6697 -0.9856 -0.6697 -0.9856

0 0 -1.4000 0 1.8550 0.6697 -0.4550 -0.6697 0 0

0 0 0 0 0.6697 0.9856 -0.6697 -0.9856 0 0

0 0 -0.4550 0.6697 -0.4550 -0.6697 2.3100 -0.0000 -1.4000 0

0 0 0.6697 -0.9856 -0.6697 -0.9856 -0.0000 1.9712 0 0

-0.4550 0.6697 -0.4550 -0.6697 0 0 -1.4000 0 2.3100 -0.0000

0.6697 -0.9856 -0.6697 -0.9856 0 0 0 0 -0.0000 1.9712

PES MCOE, Pune | Department of Mechanical Engineering 6


Finite Element Analysis 2017-18

Kr = 1.0e+07 *

3.7100 -0.0000 -1.4000 -0.4550 0.6697 -0.4550 -0.6697

-0.0000 1.9712 0 0.6697 -0.9856 -0.6697 -0.9856

-1.4000 0 1.8550 -0.4550 -0.6697 0 0

-0.4550 0.6697 -0.4550 2.3100 -0.0000 -1.4000 0

0.6697 -0.9856 -0.6697 -0.0000 1.9712 0 0

-0.4550 -0.6697 0 -1.4000 0 2.3100 -0.0000

-0.6697 -0.9856 0 0 0 -0.0000 1.9712

u=

-0.0006

-0.0025

-0.0011

-0.0002

-0.0017

-0.0010

-0.0019

U=

-0.0006

-0.0025

-0.0011

-0.0002

-0.0017

-0.0010

-0.0019

PES MCOE, Pune | Department of Mechanical Engineering 7


Finite Element Analysis 2017-18

F = 1.0e+04 *

-0.0000

1.2750

0.0000

-0.8000

1.0250

-0.5000

0.0000

-1.0000

sigma1 = -0.0866

sigma2 = -0.0696

sigma3 = -0.1239

sigma4 = 0.0635

sigma5 = -0.1084

sigma6 = 0.0323

sigma7 = -0.1541

PES MCOE, Pune | Department of Mechanical Engineering 8


Finite Element Analysis 2017-18

ANSYS REPORT
1. Modeling:-
a. Generation of Key points:
Preprocessor>Modeling>Create>Key points>In active CS.
Sr.No. Key point No. Co-ordinates (x,y)
1 1 (0,0)
2 2 (1500,0)
3 3 (3000,0)
4 4 (2250,1250)
5 5 (750,1250)

b. Create Lines:
Preprocessor>Modeling>Create>Lines>Straight Line>In active CS.

2.Assign the Element:


Preprocessor>Element type>Add /Edit /Delete>Link
Element assigned :-3D finitstn 180

3.Apply the real Constants:


Preprocessor>Real Constants>Add /Edit /Delete
Cross Sectional Area = 10*10^4 mm2

4. Apply Material Properties:


Preprocessor>Material Properties>Material models>Structural>Linear>Isotropic
Young’s Modulus = 210 GPa
Poisson’s Ratio = 0.3

5. Meshing:
Preprocessor>Meshing>Mesh>Line>Select the Lines>Mesh>OK.

1
ELEMENTS

MAR 14 2018
10:43:40

Y
Z X

Fig. 1.2:Generation of Elements

PES MCOE, Pune | Department of Mechanical Engineering 9


Finite Element Analysis 2017-18

B) Solver:-In this step the solution type and loads are defined.

a. Give solution type:


Solution>Analysis type>New Analysis>Static>OK.

b. Define Loads (Boundary Conditions):


1. Apply Displacement:
Solution> Define Loads> Apply>Structural>Displacement>All DOF= 0 on Node
no.1 (because they are fixed).
2. Apply Load:
Solution>Define Loads>Apply>Structural>Force/Moment→Force = -10000 N on
node no. 5, -8000 on node 2 and -5000 on node 4.

1
E-N
U
F
MAR 14 2018
09:44:47

Y
Z X

Fig. 1.3 Applying the Boundary Conditions

c. Solve the FEA Model:


Solution – Solve – Current LS.

C)Post processing:-In the post processing step the Deflection and stress plot are taken
and also the reaction values are taken.

Go to General Postproc>Read results>Last set.

a. Nodal displacement values plot:


PRINT U NODAL SOLUTION PER NODE

***** POST1 NODAL DEGREE OF FREEDOM LISTING *****

LOAD STEP= 0 SUBSTEP= 1


TIME= 1.0000 LOAD CASE= 0

THE FOLLOWING DEGREE OF FREEDOM RESULTS ARE IN THE GLOBAL COORDINATE SYSTEM

NODE UX UY UZ USUM
1 0.0000 0.0000 0.0000 0.0000
2 0.54643E-03-0.21576E-02 0.0000 0.22257E-02
3 0.98571E-03 0.0000 0.0000 0.98571E-03
4 0.18750E-03-0.14466E-02 0.0000 0.14587E-02
5 0.85179E-03-0.17147E-02 0.0000 0.19147E-02
MAXIMUM ABSOLUTE VALUES
NODE 3 2 0 2
VALUE 0.98571E-03-0.21576E-02 0.0000 0.22257E-02

PES MCOE, Pune | Department of Mechanical Engineering 10


Finite Element Analysis 2017-18

b. Support Reactions:

PRINT REACTION SOLUTIONS PER NODE

***** POST1 TOTAL REACTION SOLUTION LISTING *****

LOAD STEP= 0 SUBSTEP= 1


TIME= 1.0000 LOAD CASE= 0

THE FOLLOWING X,Y,Z SOLUTIONS ARE IN THE GLOBAL COORDINATE SYSTEM

NODE FX FY FZ
1 -0.18190E-11 12750. 0.0000
3 10250.

TOTAL VALUES
VALUE -0.18190E-11 23000. 0.0000

c. Elemental stresses:
PRINT ELEMENT TABLE ITEMS PER ELEMENT

***** POST1 ELEMENT TABLE LISTING *****

STAT CURRENT
ELEM LS1
1 0.76500E-01
2 0.61500E-01
3 -0.11953
4 0.61225E-01
5 -0.93000E-01
6 0.32070E-01
7 -0.14869

MINIMUM VALUES
ELEM 7
VALUE -0.14869

MAXIMUM VALUES
ELEM 1
VALUE 0.76500E-01

PES MCOE, Pune | Department of Mechanical Engineering 11


Finite Element Analysis 2017-18

Conclusion:-

Result Matlab Ansys


Nodal Displacement Ux Uy Ux Uy
Element 1 0.0000000 0.0000000 0.0000 0.0000
Element 2 0.0005464 0.0021576 -0.0006 -0.0025
Element 3 0.0009857 0.0000000 -0.0011 0.0000
Element 4 0.0001875 0.0014466 -0.0002 -0.0019
Element 5 0.0008517 0.0017147 -0.0010 -0.0017

Element stress Sigma Sigma


0.07650 -0.0866
0.06150 -0.0696
-0.11953 -0.1239
0.06122 0.0635
-0.09300 -0.1084
0.03207 0.0323
-0.14869 -0.1541

Support Reaction Rx Ry Rx Ry
Node 1 0 12750 -0.18190E-11 12750
Node 3 0 10250 0 10250

PES MCOE, Pune | Department of Mechanical Engineering 12

You might also like