Computer Added Mechanical Design (49325)
Assessment task 3: Group Project
Group Members:
⦁ Vipin Awadke - 12500548
⦁ Vinayaka Nelamangala - 12511679
⦁ Pavan Amarajintala Chandrasekhar - 12129932
⦁ Ruturaj Ashok Khenat - 12637118
⦁ Amrut Patil - 12645848
⦁ Karanvir Singh Buttar - 12129122
⦁ Pankaj Thakur - 12441200
Problem:
Considering cantilever beam with uniformly varying load (UVL) on one half of the beam and uniformly distributed load (UDL) on the other half. Calculating structural forces and structural moments for all the members of the beam using ANSYS or Matlab.
Aim of the project:
Numerical simulation of cantilever beam with uniformly varying load (UVL) and uniformly distributed load (UDL).
Problem Statement:
Reaction forces and moment is to be determined for a cantilever beam shown in figure below:
The problem is solved using static structural analysis in Ansys.
The free body diagram is first simplified as:
Ansys Setup:
Sketch:
The sketch for the above shown free body diagram is drawn in Ansys. The line is split at the points where supports are present and load is applied.
Before proceeding with the setup, it is necessary to give certain cross-section to the sketch. A square cross section of 0.01x0.01m is assumed.
Meshing:
Ansys divides the body in small nodes, to calculate the result.
Boundary Conditions:
Fixtures, supports and loads are applied as given in the problem. The boundary condition is shown in figure blow
Results:
Maximum deflection at the free end is 200m.
Maximum bending moment is near the support up to 40000N-m.
Reaction force at support is 50369N in positive y direction:
The reaction force at fixed end is 29631N.
Bending Moment Plot:
Bending moment is necessary for design of a beam and calculation of slope and deflection of beam.
Shear Force Plot:
MATLAB Code for above problem:
Make Nodes:
function [NodesXY,NodesX,NodesY]=MakeNodes(nelx,nely,EleWidth,EleHight)
% function MakeNodes( ) is used to make nodesPosition
% NodesX: an n-by-1 vector discribing the x coordinates of FE nodes
% NodesY: an n-by-1 vector discribing the y coordinates of FE nodes
EleWidth=1;
EleHight=1;
nelx=8;
nely=4;
[X,Y] = meshgrid(0:EleWidth:nelx,0:EleHight:nely);
NodesX = X(:);
NodesY = Y(:);
FEANodeXY = [NodesX NodesY];
NodesXY = zeros((nelx+1)*(nely+1),2);
for loop_1 = 1:(nelx+1)*(nely+1)
NodesXY(loop_1,:) = [NodesX(loop_1) NodesY(loop_1)];
end
end
Make Elements:
function [EleNodesID,EleNodeCoord]=MakeElements(nelx,nely,NodesXY)
% function MakeElements is used to produce finite elements.
% EleNodesID(1:NumEle, 1:4): stands for node ID that make up each element;
% 4O-----<-----O 3
% | |
% | |
% 1O----->-----O 2
for loop_1 = 1:(nelx+1)*(nely+1)
NodesXY(loop_1,:) = [NodesX(loop_1) NodesY(loop_1)];
end
EleNodeCoord = zeros(nely*nelx,4,2);
EleNodesID = zeros(nely*nelx,4);
m=0;
for elx =1:nelx
for ely =1:nely
m=m+1;
n1 = (nely+1)*(elx-1) + ely;
n2 = (nely+1)*elx + ely;
EleNodeCoord(m,:,1) = [NodesXY(n1,1) NodesXY(n2,1) NodesXY(n2+1,1) NodesXY(n1+1,1)];
EleNodeCoord(m,:,2) = [NodesXY(n1,2) NodesXY(n2,2) NodesXY(n2+1,2) NodesXY(n1+1,2)];
EleNodesID(m,:) = [n1 n2 n2+1 n1+1];
end
end
Element Stiffness Matrix:
function [KE]=EleStiffMatrix(NodesX, NodesY)
E = 1;
nu = 0.3;
KE=zeros(8);
B=zeros(3,8);
for i=1:4
s=[-0.57735, 0.57735,0.57735, -0.57735];
t=[-0.57735, -0.57735,0.57735, 0.57735];
% Jacobian Matrix
R = 1/4.*[ (-1+t(i)) (1-t(i)) (1+t(i)) (-1-t(i)) ; (-1+s(i)) (-1-s(i)) (1+s(i)) (1-s(i)) ];
J = R*[NodesX', NodesY'];
% B matrix
dN = inv(J)*R;
% B matrix
B1 = [dN(1,1) 0 dN(1,2) 0 dN(1,3) 0 dN(1,4) 0 ];
B2 = [0 dN(2,1) 0 dN(2,2) 0 dN(2,3) 0 dN(2,4)];
B3 = [dN(2,1) dN(1,1) dN(2,2) dN(1,2) dN(2,3) dN(1,3) dN(2,4) dN(1,4)];
B = [B1; B2; B3];
%D matrix
D = (E/(1-nu*nu))*[1, nu, 0 ; nu, 1, 0 ; 0, 0, (1-nu)/2];
KE=KE+(B'*D*B)*det(J);
end
end
Finite Element Analysis:
function FEA(nelx,nely)
EleWidth=1;
EleHight=1;
[NodesXY,NodesX,NodesY]=MakeNodes(nelx,nely,EleWidth,EleHight);
[EleNodesID,EleNodeCoord]=MakeElements(nelx,nely,NodesXY);
x(1:nely,1:nelx)=1;
K=sparse(2*(nelx+1)*(nely+1),2*(nelx+1)*(nely+1));
F=sparse(2*(nely+1)*(nelx+1),1);
U=zeros(2*(nely+1)*(nelx+1),1);
loop=0;
for ely=1:nely
for elx=1:nelx
loop=loop+1;
n1=(nely+1)*(elx-1)+ely;
n2=(nely+1)*elx +ely;
edof=[2*n1-1;2*n1;2*n2-1;2*n2;2*n2+1;2*n2+2;2*n1+1;2*n1+2];
CoordX=EleNodeCoord(loop,:,1);
CoordY=EleNodeCoord(loop,:,2);
[KE] = EleStiffMatrix(CoordX,CoordY);
K(edof,edof)=K(edof,edof)+x(ely,elx)*KE;
end
end
F(86,1) = -1; % force
fixeddofs = [1:10]; % fixed degree of freedom
alldofs=[1:2*(nely+1)*(nelx+1)];
freedofs=setdiff(alldofs,fixeddofs);
U(freedofs,:) = K (freedofs,freedofs)\F(freedofs,:);
U(fixeddofs,:)=0;
c=0.;
for ely=1:nely
for elx=1:nelx
n1=(nely+1)*(elx-1)+ely;
n2=(nely+1)*elx +ely;
Ue=U([2*n1-1;2*n1;2*n2-1;2*n2;2*n2+1;2*n2+2;2*n1+1;2*n1+2],1);
c=c+x(ely,elx)*Ue'*KE*Ue;
end
end
disp([' U.: ' sprintf('%6.3f',U) ' compliance.: ' sprintf('%10.4f',c)])
Conclusion:
The primary goal of this project was to calculate structural forces and structural moments for all the members of the beam. The calculated structural forces and structural moments by using Ansys platform, certainly meets the goals of the project by allowing the user to input necessary conditions to get desired output without any manual calculations. Based on obtained maximum values of deflection, shear force and bending moment following conditions can be checked:
⦁ A beam can be designed to meet the serviceability criteria for deflections to prevent crack formation.
⦁ Based on shear values, a beam critical in shear can be designed to prevent shear failure due to excessive shear stresses developed.
⦁ Moments at different points in a beam and its variation along the length can be used to design a beam for adequate reinforcement.
⦁ Also, we intended to do the analysis using MATLAB, but there is some error in our coding and hence we are unable to get the output via Matlab due to less knowledge of coding.