Assignment 13.1 & 13

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

Assignment 13.1 & 13.

2
Finite Element Analysis

1/6/2018
Submitted To: Dr. Kamran Afaq
Waqas Ali Shah
16SP-HITEC-ME-MS-006
Scanned by CamScanner
Scanned by CamScanner
Matlab Program
clc;
clear all;
p=1;
E=210e9;
v=0.3;
t=0.025;
L=0.5;
h=0.25;
x1=0;
y1=0;
x2=0.5;
y2=0;
x3=0.5;
y3=0.25;
x4=0;
y4=0.25;
x5=0.25;
y5=0.125;
W=3000e3;
F2x=3000*(t*h)/2;
F3x=3000*(t*h)/2;

k1 = LinearTriangleElementStiffness(E,v,t,x1,y1,x2,y2,x5,y5,p);
k2= LinearTriangleElementStiffness(E,v,t,x5,y5,x2,y2,x3,y3,p);
k3= LinearTriangleElementStiffness(E,v,t,x5,y5,x3,y3,x4,y4,p);
k4= LinearTriangleElementStiffness(E,v,t,x1,y1,x5,y5,x4,y4,p);

K=zeros(10,10);
K = LinearTriangleAssemble(K,k1,1,2,5);
K = LinearTriangleAssemble(K,k2,5,2,3);
K = LinearTriangleAssemble(K,k3,5,3,4);
K = LinearTriangleAssemble(K,k4,1,5,4);

Knew=[K(3:6,3:6) K(3:6,9:10);K(9:10,3:6) K(9:10,9:10)];


Fnew=[F2x; 0; F3x; 0; 0; 0];
Unew=Knew\Fnew;

U=[0; 0; Unew(1:4,1); 0; 0; Unew(5:6,1)]


F=K*U
U1=[U(1:4,1); U(9:10,1)];
U2=[U(9:10,1); U(3:6,1)];
U3=[U(9:10,1); U(5:8,1)];
U4=[U(1:2,1); U(9:10,1); U(7:8,1)];

S1 = LinearTriangleElementStresses(E,v,x1,y1,x2,y2,x5,y5,p,U1)
S2 = LinearTriangleElementStresses(E,v,x5,y5,x2,y2,x3,y3,p,U2)
S3 = LinearTriangleElementStresses(E,v,x5,y5,x3,y3,x4,y4,p,U3)
S4 = LinearTriangleElementStresses(E,v,x1,y1,x5,y5,x4,y4,p,U4)
Results

U = 1.0e-05 * F = 1.0e+03 *

[0 [-9.3750

0 -3.7540

0.6928 9.3750

0.0714 0.0000

0.6928 9.3750

-0.0714 0.0000

0 -9.3750

0 3.7540

0.3271 0.0000

0.0000] -0.0000]

Stress In Each Element

S1 =1.0e+06 * S2 =1.0e+06 *

3.0000 2.9808

0.3003 -0.3051

-0.0096 -0.0000

S3 =1.0e+06 * S4 = 1.0e+06 *

3.0000 3.0192

0.3003 0.9058

0.0096 0.0000
Scanned by CamScanner
Scanned by CamScanner
Matlab Program
clc;
clear all;

p=1;
E=70e9;
v=0.25;
t=0.02;
L=0.3;
h=0.3;

Coordinates
x1=0;
y1=0;
x2=0.3;
y2=0;
x3=0.6;
y3=0;
x4=0.9;
y4=0;
x5=0;
y5=0.3;
x6=0.3;
y6=0.3;
x7=0.6;
y7=0.3;
x8=0.9;
y8=0.3;
x9=0;
y9=0.6;
x10=0.3;
y10=0.6;
x11=0.6;
y11=0.6;
x12=0.9;
y12=0.6;
x13=0;
y13=0.9;
x14=0.3;
y14=0.9;
x15=0.6;
y15=0.9;
x16=0.9;
y16=0.9;

Stiffnesses

k1 = LinearTriangleElementStiffness(E,v,t,x1,y1,x2,y2,x6,y6,p);
k2= LinearTriangleElementStiffness(E,v,t,x1,y1,x6,y6,x5,y5,p);
k3= LinearTriangleElementStiffness(E,v,t,x2,y2,x3,y3,x7,y7,p);
k4= LinearTriangleElementStiffness(E,v,t,x2,y2,x7,y7,x6,y6,p);
k5 = LinearTriangleElementStiffness(E,v,t,x3,y3,x4,y4,x8,y8,p);
k6= LinearTriangleElementStiffness(E,v,t,x3,y3,x8,y8,x7,y7,p);
k7= LinearTriangleElementStiffness(E,v,t,x5,y5,x6,y6,x10,y10,p);
k8= LinearTriangleElementStiffness(E,v,t,x5,y5,x10,y10,x9,y9,p);
k9 = LinearTriangleElementStiffness(E,v,t,x7,y7,x8,y8,x12,y12,p);
k10 = LinearTriangleElementStiffness(E,v,t,x7,y7,x12,y12,x11,y11,p);
k11= LinearTriangleElementStiffness(E,v,t,x9,y9,x10,y10,x14,y14,p);
k12= LinearTriangleElementStiffness(E,v,t,x9,y9,x14,y14,x13,y13,p);
k13 = LinearTriangleElementStiffness(E,v,t,x10,y10,x11,y11,x15,y15,p);
k14= LinearTriangleElementStiffness(E,v,t,x10,y10,x15,y15,x14,y14,p);
k15= LinearTriangleElementStiffness(E,v,t,x11,y11,x12,y12,x16,y16,p);
k16= LinearTriangleElementStiffness(E,v,t,x11,y11,x16,y16,x15,y15,p);

K=zeros(32,32);
K = LinearTriangleAssemble(K,k1,1,2,6);
K = LinearTriangleAssemble(K,k2,1,6,5);
K = LinearTriangleAssemble(K,k3,2,3,7);
K = LinearTriangleAssemble(K,k4,2,7,6);
K = LinearTriangleAssemble(K,k5,3,4,8);
K = LinearTriangleAssemble(K,k6,3,8,7);
K = LinearTriangleAssemble(K,k7,5,6,10);
K = LinearTriangleAssemble(K,k8,5,10,9);
K = LinearTriangleAssemble(K,k9,7,8,12);
K = LinearTriangleAssemble(K,k10,7,12,11);
K = LinearTriangleAssemble(K,k11,9,10,14);
K = LinearTriangleAssemble(K,k12,9,14,13);
K = LinearTriangleAssemble(K,k13,10,11,15);
K = LinearTriangleAssemble(K,k14,10,15,14);
K = LinearTriangleAssemble(K,k15,11,12,16);
K = LinearTriangleAssemble(K,k16,11,16,15);

Knew=[K(3:8,3:8) K(3:8,11:16) K(3:8,19:24) K(3:8,27:32);


K(11:16,3:8) K(11:16,11:16) K(11:16,19:24) K(11:16,27:32);
K(19:24,3:8) K(19:24,11:16) K(19:24,19:24) K(19:24,27:32);
K(27:32,3:8) K(27:32,11:16) K(27:32,19:24) K(27:32,27:32)];
Fnew=[zeros(23,1); -20e3];
Unew=Knew\Fnew;

U=[0; 0; Unew(1:6,1); 0; 0; Unew(7:12,1); 0; 0; Unew(13:18,1); 0; 0;


Unew(19:24,1)]
F=K*U
Results

U = 1.0e-03 * 0

[0 0

0 0.0207

-0.0200 -0.0199

-0.0225 0.0346

-0.0291 -0.0635

-0.0581 0.0356

-0.0305 -0.1167]

-0.0854

-0.0008

-0.0173

-0.0072

-0.0585

-0.0077

-0.0867

0.0001

-0.0176

0.0010

-0.0639

0.0064

-0.0960
F = 1.0e+04 * 0.0910

[1.8805 0.0225

0.1079 0

-0.0000 -0.0000

0.0000 0

0.0000 0.0000

0.0000 -0.0000

0 0

0 -2.1053

0.1337 0.9443

0.9254 -0.0000

-0.0000 0.0000

-0.0000 -0.0000

0 0.0000

-0.0000 -0.0000

-0.0000 -2.0000]

-0.0000

You might also like