A simple python script using Numpy and Matplotlib library to plot a Mohr's Circle when given a two-dimensional state of stress.

Overview

Mohr's Circle Calculator

This is a really small personal project done for Department of Civil Engineering, Delhi Technological University (formerly, Delhi College of Engineering) for a course in Mechanics of Solid (Course Code - CE202).

It is a simple program using Python, NumPy and Matplotlibwhich helps a user to plot Mohr's Cirle when given the two-dimensional state of stress.


Documentation

Introduction

In Mechanics, the mechanics of deformable bodies is termed as Strength of Materials, Mechanics of Materials, or in its more advanced form, as Solid Mechanics. Mechanics of Materials deals with stresses, in their simple one-dimensional states, or at a slightly advanced level, a two-dimensional state of stress; a general three-dimensional state of stress is also possible, and involves advanced mathematical methods for its analysis.

A two-dimensional state of stress is characterized by a two-dimensional geometry with two axes, x and y. Stress components are typically represented by their rectangular components, σx, σy and τxy, which are shown in figure below. Here, the stresses σx and σy are the normal stress components and τxy is the shear stress component. The figure below shows an elemental area, with the rectangular components of stress being labeled.

Rectangular Stress Components

If the axes x and y get transformed, then, these stress components also get transformed accordingly, and the equations for their transformation are given below, where θ is the angle by which the elemental area is rotated.

Stress Transformation

There exists a certain angle of the transformed axes for which the stress components are maximum, and the corresponding stress components are termed as the Principal Stresses, σ1 and σ2. These Principal Stresses can be computed by the following formulae. The formula for the angle θp at which these Principal Stresses occur is also given below. Principal Stresses play an important part in the Theories of Failure characterizing engineering materials. The shear stress also takes on a maximum value τmax at its corresponding angle.

Principal Stress Formulae

The Principal Stresses have a nice graphical representation, first devised by Otto Mohr, and this is called as Mohr's Circle. Mohr's Circle is drawn with the normal stress components being represented on the x-axis and the shear stress component on the y-axis. Figure shows a typical Mohr's Circle for a two-dimensional state of stress. It can be noted that the horizontal axis represents the normal stress σ and the vertical axis (pointing downwards in the positive direction) represents the shear stress τ. Every point on the Mohr's Circle represents a transformed state of stress depending on the angle of orientation θ of the area element.

Mohr's Circle

The objective of this program is to draw the Mohr's Circle on the screen, given the rectangular components of stress.

Features of the Program

This program allows the user to specify the three rectangular stress components in a two-dimensional state of stress, σx, σy and τxy and the angle (in degrees) of plane's axis from x-axis; and view the corresponding values of the Principal Stresses and angles, and the maximum shear stress, and also view the Mohr's Circle.

Overview of the Code

Important Variables - The rectangular stress components given as input are stored in three variables σx, σy and τxy. The principal stresses are stored as σ1 and σ2, and the maximum shear stress as τmax. The direction of planes at which principal stresses σ1 and σ2 occur are stored in φ1 and φ2 respectively. The direction of plane at which maximum shear stress τmax occurs is stored in α. The radius of Mohr's Circle is stored in the variable R and the angle of the plane's axis from the x-axis is stored in the variable w. The average stress which acts at the centre of Mohr's circle is stored in the variable σavg.

Outline - drawMohrsCircle(): The program has only this function. This function is used to compute all the values and print them on the screen. It takes user values for rectangular stress components σx, σy and τxy as well as the angle of plane's axis from the x-axis; w. It then performs mathematical operations on all those values based on some pre-defined formulae. It then uses the both the user defined values as well as computed values to plot the Mohr's Circle using the Matplotlib's Pyplot module.

Owner
Agyeya Mishra
Engineering undergrad, open source contributor & programming enthusiast
Agyeya Mishra
Standardized plots and visualizations in Python

Standardized plots and visualizations in Python pltviz is a Python package for standardized visualization. Routine and novel plotting approaches are f

Andrew Tavis McAllister 0 Jul 09, 2022
metedraw is a project mainly for data visualization projects of Atmospheric Science, Marine Science, Environmental Science or other majors

It is mainly for data visualization projects of Atmospheric Science, Marine Science, Environmental Science or other majors.

Nephele 11 Jul 05, 2022
A workshop on data visualization in Python with notebooks and exercises for following along.

Beyond the Basics: Data Visualization in Python The human brain excels at finding patterns in visual representations, which is why data visualizations

Stefanie Molin 162 Dec 05, 2022
A GUI for Pandas DataFrames

About Demo Installation Usage Features More Info About PandasGUI is a GUI for viewing, plotting and analyzing Pandas DataFrames. Demo Installation Ins

Adam Rose 2.8k Dec 24, 2022
PyFlow is a general purpose visual scripting framework for python

PyFlow is a general purpose visual scripting framework for python. State Base structure of program implemented, such things as packages disco

1.8k Jan 07, 2023
Collection of data visualizing projects through Tableau, Data Wrapper, and Power BI

Data-Visualization-Projects Collection of data visualizing projects through Tableau, Data Wrapper, and Power BI Indigenous-Brands-Social-Movements Pyt

Jinwoo(Roy) Yoon 1 Feb 05, 2022
Eulera Dashboard is an easy and intuitive way to get a quick feel of what’s happening on the world’s market.

an easy and intuitive way to get a quick feel of what’s happening on the world’s market ! Eulera dashboard is a tool allows you to monitor historical

Salah Eddine LABIAD 4 Nov 25, 2022
Plotly Dash Command Line Tools - Easily create and deploy Plotly Dash projects from templates

🛠️ dash-tools - Create and Deploy Plotly Dash Apps from Command Line | | | | | Create a templated multi-page Plotly Dash app with CLI in less than 7

Andrew Hossack 50 Dec 30, 2022
A set of useful perceptually uniform colormaps for plotting scientific data

Colorcet: Collection of perceptually uniform colormaps Build Status Coverage Latest dev release Latest release Docs What is it? Colorcet is a collecti

HoloViz 590 Dec 31, 2022
Visualizations for machine learning datasets

Introduction The facets project contains two visualizations for understanding and analyzing machine learning datasets: Facets Overview and Facets Dive

PAIR code 7.1k Jan 07, 2023
Make your BSC transaction simple.

bsc_trade_history Make your BSC transaction simple. 中文ReadMe Background: inspired by debank ,Practice my hands on this small project Blog:Crypto-BscTr

foolisheddy 7 Jul 06, 2022
Scientific Visualization: Python + Matplotlib

An open access book on scientific visualization using python and matplotlib

Nicolas P. Rougier 8.6k Dec 31, 2022
📊 Charts with pure python

A zero-dependency python package that prints basic charts to a Jupyter output Charts supported: Bar graphs Scatter plots Histograms 🍑 📊 👏 Examples

Max Humber 54 Oct 04, 2022
An animation engine for explanatory math videos

Powered By: An animation engine for explanatory math videos Hi there, I'm Zheer 👋 I'm a Software Engineer and student!! 🌱 I’m currently learning eve

Zaheer ud Din Faiz 2 Nov 04, 2021
A comprehensive tutorial for plotting focal mechanism

Focal_Mechanisms_Demo A comprehensive tutorial for plotting focal mechanism "beach-balls" using the PyGMT package for Python. (Resulting map of this d

3 Dec 13, 2022
Python implementation of the Density Line Chart by Moritz & Fisher.

PyDLC - Density Line Charts with Python Python implementation of the Density Line Chart (Moritz & Fisher, 2018) to visualize large collections of time

Charles L. Bérubé 10 Jan 06, 2023
A Simple Flask-Plotly Example for NTU 110-1 DSSI Class

A Simple Flask-Plotly Example for NTU 110-1 DSSI Class Live Demo Prerequisites We will use Flask and Ploty to build a Flask application. If you haven'

Ting Ni Wu 1 Dec 11, 2021
Small U-Net for vehicle detection

Small U-Net for vehicle detection Vivek Yadav, PhD Overview In this repository , we will go over using U-net for detecting vehicles in a video stream

Vivek Yadav 91 Nov 03, 2022
Generating interfaces(CLI, Qt GUI, Dash web app) from a Python function.

oneFace is a Python library for automatically generating multiple interfaces(CLI, GUI, WebGUI) from a callable Python object. oneFace is an easy way t

NaNg 31 Oct 21, 2022
Here are my graphs for hw_02

Let's Have A Look At Some Graphs! Graph 1: State Mentions in Congressperson's Tweets on 10/01/2017 The graph below uses this data set to demonstrate h

7 Sep 02, 2022