Welcome to the World of Modelling and Simulation

What is Modelling?

This blog is all about system dynamics modelling and simulation applied in the engineering field, especially mechanical, electrical, and ...

Mohr's Circle Representation for the Stress Components of a Structure using Matlab

In this tutorial, we are going to solve a fundamental problem in mechanics of materials using the very popular Mohr's circle method. Mohr's circle is a two dimensional (2D) graphical representation of the stress components in a solid material. The following diagram shows a typical 2D element having all the stress components. Here,

𝞼x = Normal stress along x axis
𝞼y = Normal stress along y axis
𝞽xy = Shear stress on the plane
𝞡 = Inclination angle

Showing a 2D element with the stresses.

Now, let's assume the following parameters to represent the stresses by a Mohr's circle with Matlab codes.

𝞼x = Normal stress along x axis = 115 Mpa
𝞼y = Normal stress along y axis = - 50 Mpa
𝞽xy = Shear stress on the plane = 25 Mpa
𝞡 = Inclination angle = 25 Degree

With the above information at hand, we can draw a Mohr's circle to represent those stresses. The following figure shows the Mohr's circle, which is plotted by Matlab codes appended at the end of this blog post.

Showing Mohr's circle for the stress components

Showing stress versus cut plane angles

We can calculate the transformed normal and shear stresses, which  may be expressed as [2, 3],

The maximum principal stress is defined as [2, 3],

The following figure illustrates the maximum normal and shear stresses, along with other nomenclatures on a typical Mohr’s circle

Showing maximum normal and shear stresses along with other nomenclatures on the Mohr’s circle


close all
% Parameters from the question
sigma_x = 115;
sigma_y = -50;
tau_xy = 25;
gridsize = 1000;
% Calling the function "mohrs_circle" defined in another script
[sigma_mohr,tau_mohr,sigma_1,sigma_2,tau_1,tau_2,center_circle,phi] = mohrs_circle(sigma_x,sigma_y,tau_xy,gridsize);
% Plotting the figures
grid on;
axis equal;
xlabel('Normal Stess, MPa');
ylabel('Shear Stress, MPa');
title('Mohr Circle for 2D Stresses');
hold on;
grid on;
xlabel('Cut plane angle (deg)');
ylabel('Stress, MPA');
legend('Normal Stress','Shear Stress')
title('Mohr 2D Circle');

function [sigma_mohr,tau_mohr,sigma_1,sigma_2,tau_1,tau_2,center_circle,phi]=mohrs_circle(sigma_x,sigma_y,tau_xy,gridsize)
% This function implements the calculation of the principal stresses
phi = linspace(0,pi,gridsize); % Defining the range of the angles for plotting
% Applying the formula or expression based on the stress theory
sigma_mohr = (sigma_x+sigma_y)/2+(sigma_x-sigma_y)/2*cos(2*phi)+tau_xy*sin(2*phi);
tau_mohr = -(sigma_x-sigma_y)/2*sin(2*phi)+tau_xy*cos(2*phi);
sigma_1 = (sigma_x+sigma_y)/2-sqrt(((sigma_x-sigma_y)/2)^2+tau_xy^2);
sigma_2 = (sigma_x+sigma_y)/2+sqrt(((sigma_x-sigma_y)/2)^2+tau_xy^2);
tau_2 = -tau_1;
center_circle = (sigma_x+sigma_y)/2;


[1] Saul K. Fenster, Ansel C. Ugural. Advanced Strength and Applied Elasticity, Fourth Edition. Published by Pearson, 2003

[2] Solid Mechanics Part I: An Introduction to Solid Mechanics by ‪Piaras Kelly‬‬

#Matlab   #SolidMechanics   #MechanicsofMaterials #MohrsCircle