0% found this document useful (0 votes)
40 views2 pages

MATLAB - L27&L28: Experiment: 1 AIM

This MATLAB code calculates and visualizes the eigen values of the stress matrix for a simply supported beam with variable cross-section. It defines the stress components as functions of position, forms the 2x2 stress matrix, and calculates its eigen values to obtain the principal stresses at each point using a for loop. The principal stresses are then plotted as contour plots to show their variation along the beam.

Uploaded by

vidit
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)
40 views2 pages

MATLAB - L27&L28: Experiment: 1 AIM

This MATLAB code calculates and visualizes the eigen values of the stress matrix for a simply supported beam with variable cross-section. It defines the stress components as functions of position, forms the 2x2 stress matrix, and calculates its eigen values to obtain the principal stresses at each point using a for loop. The principal stresses are then plotted as contour plots to show their variation along the beam.

Uploaded by

vidit
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/ 2

MATLAB -L27&L28

NAME: S ARJUN AARAAMUDHAN


REG NO: 16BME0707

EXPERIMENT : 1

AIM
Calculating and visualising the Eigen values of stress matrix for simply supported beam.

PROBLEM STATEMENT
Find the principal stress for a two dimensional simply supported beam by finding the eigen values for the
stress matrix with variable components.

MATHEMATICAL BACKGROUND
The principal stresses are the eigen values of the stress matrix.
• The 2x2 stress matrix is given by S=
• the principal stress at the point will be the eigen values of stress matrix S

MATLAB CODE
clc
clf
c=0.25;L=10;p=5;
x=[0:0.1:L];y=[-c:0.01:c];
[X,Y]=meshgrid(x,y);
sx=-(3/(4*c^3))*(L-X).*Y;
sy=zeros(length(y),length(x));
txy=-(3/(8*c^3))*(c^2-Y.^2);
for i=0:length(y)
for j=1:length(x)
s=[sx(i,j),txy(i,j);txy(i,j),sy(i,j)];
p=eig(s);
s1(i,j)=p(2);
s2(i,j)=p(1);
end
end
figure(1)
contour(X,Y,s1,[0.01,0.05,0.1,0.5,1,3,5,7,9,11])
title('First Principal Stress Countours, s1')
axis tight
figure(2)
contour(X,Y,s2,[-0,01,-0,05,-0,1,-0.5,-1,-3,-5,-7,-9,-11])
axis tight
title('Second Principal Stress Countours, s2')
OUTPUT

You might also like