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
Calendar heatmaps from Pandas time series data

Note: See MarvinT/calmap for the maintained version of the project. That is also the version that gets published to PyPI and it has received several f

Martijn Vermaat 195 Dec 22, 2022
A napari plugin for visualising and interacting with electron cryotomograms.

napari-tomoslice A napari plugin for visualising and interacting with electron cryotomograms. Installation You can install napari-tomoslice via pip: p

3 Jan 03, 2023
China and India Population and GDP Visualization

China and India Population and GDP Visualization Historical Population Comparison between India and China This graph shows the population data of Indi

Nicolas De Mello 10 Oct 27, 2021
An open-source tool for visual and modular block programing in python

PyFlow PyFlow is an open-source tool for modular visual programing in python ! Although for now the tool is in Beta and features are coming in bit by

1.1k Jan 06, 2023
A dashboard built using Plotly-Dash for interactive visualization of Dex-connected individuals across the country.

Dashboard For The DexConnect Platform of Dexterity Global Working prototype submission for internship at Dexterity Global Group. Dashboard for real ti

Yashasvi Misra 2 Jun 15, 2021
Simulation du problème de Monty Hall avec Python et matplotlib

Le problème de Monty Hall C'est un jeu télévisé où il y a trois portes sur le plateau de jeu. Seule une de ces portes cache un trésor. Il n'y a rien d

ETCHART YANG 1 Jan 06, 2022
Browse Dash docsets inside emacs

Helm Dash What's it This package uses Dash docsets inside emacs to browse documentation. Here's an article explaining the basic usage of it. It doesn'

504 Dec 15, 2022
📊 Extensions for Matplotlib

📊 Extensions for Matplotlib

Nico Schlömer 519 Dec 30, 2022
Friday Night Funkin - converts a chart from 4/4 time to 6/8 time, or from regular to swing tempo.

Chart to swing converter As seen in https://twitter.com/i_winxd/status/1462220493558366214 A program written in python that converts a chart from 4/4

5 Dec 23, 2022
A tool for creating SVG timelines from simple JSON input.

A tool for creating SVG timelines from simple JSON input.

Jason Reisman 432 Dec 30, 2022
Create Badges with stats of Scratch User, Project and Studio. Use those badges in Github readmes, etc.

Scratch-Stats-Badge Create customized Badges with stats of Scratch User, Studio or Project. Use those badges in Github readmes, etc. Examples Document

Siddhesh Chavan 5 Aug 28, 2022
Visualization of numerical optimization algorithms

Visualization of numerical optimization algorithms

Zhengxia Zou 46 Dec 01, 2022
Set of matplotlib operations that are not trivial

Matplotlib Snippets This repository contains a set of matplotlib operations that are not trivial. Histograms Histogram with bins adapted to log scale

Raphael Meudec 1 Nov 15, 2021
With Holoviews, your data visualizes itself.

HoloViews Stop plotting your data - annotate your data and let it visualize itself. HoloViews is an open-source Python library designed to make data a

HoloViz 2.3k Jan 02, 2023
Python support for Godot 🐍🐍🐍

Godot Python, because you want Python on Godot ! The goal of this project is to provide Python language support as a scripting module for the Godot ga

Emmanuel Leblond 1.4k Jan 04, 2023
GitHub English Top Charts

Help you discover excellent English projects and get rid of the interference of other spoken language.

kon9chunkit 529 Jan 02, 2023
Generate graphs with NetworkX, natively visualize with D3.js and pywebview

webview_d3 This is some PoC code to render graphs created with NetworkX natively using D3.js and pywebview. The main benifit of this approac

byt3bl33d3r 68 Aug 18, 2022
Visualize your pandas data with one-line code

PandasEcharts 简介 基于pandas和pyecharts的可视化工具 安装 pip 安装 $ pip install pandasecharts 源码安装 $ git clone https://github.com/gamersover/pandasecharts $ cd pand

陈华杰 2 Apr 13, 2022
Python+Numpy+OpenGL: fast, scalable and beautiful scientific visualization

Python+Numpy+OpenGL: fast, scalable and beautiful scientific visualization

Glumpy 1.1k Jan 05, 2023
Investment and risk technologies maintained by Fortitudo Technologies.

Fortitudo Technologies Open Source This package allows you to freely explore open-source implementations of some of our fundamental technologies under

Fortitudo Technologies 11 Dec 14, 2022