This is a comprehensive question about Mohr's circle, which is a graphical method for analyzing stress states. I'll provide a detailed explanation with both theory and a practical example.
Let me construct a complete guide that includes:
- Theoretical background
- Step-by-step construction of Mohr's circle
- Mathematical calculations
- A worked example with diagrams
- Code to visualize it
Let me work with a general 2D plane stress state and then give a specific example.
For a 2D stress state, we have:
- σx (normal stress in x-direction)
- σy (normal stress in y-direction)
- τxy (shear stress)
I'll provide:
- Theory and formulas
- Manual step-by-step construction
- Python code with visualization
- Complete worked example
Mohr's Circle: Complete Guide with Examples
1. THEORY & KEY FORMULAS
Given Stress State (2D)
σx, σy, τxy
Principal Stresses
σ₁, σ₂ = (σx + σy)/2 ± √[((σx - σy)/2)² + τxy²]
Center of circle: C = (σx + σy)/2
Radius: R = √[((σx - σy)/2)² + τxy²]
Maximum Shear Stress
τmax = R = √[((σx - σy)/2)² + τxy²]
Orientation of Principal Planes
tan(2θp) = 2τxy / (σx - σy)
θp1 (associated with σ₁)
θp2 = θp1 + 90°
2. STEP-BY-STEP CONSTRUCTION
STEP 1: Plot stress points
• Point A: (σx, τxy)
• Point B: (σy, -τxy)
STEP 2: Find center
• C = midpoint of A and B
• C: ((σx + σy)/2, 0)
STEP 3: Calculate radius
• R = |AC| = √[((σx - σy)/2)² + τxy²]
STEP 4: Draw circle
• Center at C
• Radius = R
STEP 5: Read values
• σ₁, σ₂ at intersections with σ-axis
• τmax at top of circle
3. PYTHON IMPLEMENTATION
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Circle
class MohrsCircle:
def __init__(self, sigma_x, sigma_y, tau_xy):
"""
Initialize with stress components
Parameters:
-----------
sigma_x : float
Normal stress in x-direction (MPa)
sigma_y : float
Normal stress in y-direction (MPa)
tau_xy : float
Shear stress (MPa)
"""
self.sigma_x = sigma_x
self.sigma_y = sigma_y
self.tau_xy = tau_xy
def calculate_principal_stresses(self):
"""Calculate principal stresses"""
avg_stress = (self.sigma_x + self.sigma_y) / 2
radius = np.sqrt(((self.sigma_x - self.sigma_y) / 2)**2 +
self.tau_xy**2)
self.sigma_1 = avg_stress + radius # Maximum
self.sigma_2 = avg_stress - radius # Minimum
self.center = avg_stress
self.radius = radius
return self.sigma_1, self.sigma_2
def calculate_max_shear_stress(self):
"""Calculate maximum shear stress"""
self.tau_max = self.radius
return self.tau_max
def calculate_principal_plane_angles(self):
"""Calculate orientation of principal planes"""
# Angle for sigma_1
if self.sigma_x != self.sigma_y:
angle_2theta = np.degrees(np.arctan2(2 * self.tau_xy,
self.sigma_x - self.sigma_y))
self.theta_p1 = angle_2theta / 2
self.theta_p2 = self.theta_p1 + 90
else:
self.theta_p1 = 0
self.theta_p2 = 90
return self.theta_p1, self.theta_p2
def plot_mohrs_circle(self, figsize=(12, 5)):
"""Plot Mohr's circle and stress element"""
# Calculate all values
self.calculate_principal_stresses()
self.calculate_max_shear_stress()
self.calculate_principal_plane_angles()
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=figsize)
# ===== LEFT PLOT: Mohr's Circle =====
ax1.set_aspect('equal')
# Draw circle
circle = Circle((self.center, 0), self.radius,
fill=False, edgecolor='blue', linewidth=2)
ax1.add_patch(circle)
# Plot points
point_A = (self.sigma_x, self.tau_xy)
point_B = (self.sigma_y, -self.tau_xy)
ax1.plot(*point_A, 'ro', markersize=8, label='Initial state A (σx, τxy)')
ax1.plot(*point_B, 'go', markersize=8, label='Initial state B (σy, -τxy)')
# Principal stresses
ax1.plot(self.sigma_1, 0, 'b*', markersize=15, label=f'σ₁ = {self.sigma_1:.2f}')
ax1.plot(self.sigma_2, 0, 'b*', markersize=15, label=f'σ₂ = {self.sigma_2:.2f}')
# Center
ax1.plot(self.center, 0, 'ko', markersize=6)
ax1.text(self.center, -self.radius*0.15, f'C({self.center:.2f}, 0)',
ha='center', fontsize=9)
# Maximum shear stress
ax1.plot(self.center, self.tau_max, 'r^', markersize=10,
label=f'τmax = {self.tau_max:.2f}')
ax1.plot(self.center, -self.tau_max, 'r^', markersize=10)
# Draw radius line
angle_to_A = np.arctan2(self.tau_xy, self.sigma_x - self.center)
ax1.plot([self.center, point_A[0]], [0, point_A[1]],
'k--', linewidth=1, alpha=0.5)
# Axes
ax1.axhline(y=0, color='k', linewidth=0.8)
ax1.axvline(x=0, color='k', linewidth=0.8)
ax1.grid(True, alpha=0.3)
# Labels and limits
margin = self.radius * 0.3
ax1.set_xlim(self.center - self.radius - margin,
self.center + self.radius + margin)
ax1.set_ylim(-self.radius - margin, self.radius + margin)
ax1.set_xlabel('Normal Stress σ (MPa)', fontsize=11, fontweight='bold')
ax1.set_ylabel('Shear Stress τ (MPa)', fontsize=11, fontweight='bold')
ax1.set_title("Mohr's Circle", fontsize=12, fontweight='bold')
ax1.legend(loc='upper right', fontsize=9)
ax1.grid(True, alpha=0.3, linestyle='--')
# ===== RIGHT PLOT: Stress Element =====
ax2.set_aspect('equal')
ax2.set_xlim(-2, 2)
ax2.set_ylim(-2, 2)
# Draw original stress element
element_size = 1
rect = plt.Rectangle((-element_size/2, -element_size/2),
element_size, element_size,
fill=False, edgecolor='red', linewidth=2)
ax2.add_patch(rect)
# Add stress arrows for original element
arrow_scale = 0.3
# σx arrows
ax2.arrow(element_size/2, 0, arrow_scale*np.sign(self.sigma_x), 0,
head_width=0.15, head_length=0.1, fc='red', ec='red')
ax2.arrow(-element_size/2, 0, -arrow_scale*np.sign(self.sigma_x), 0,
head_width=0.15, head_length=0.1, fc='red', ec='red')
# σy arrows
ax2.arrow(0, element_size/2, 0, arrow_scale*np.sign(self.sigma_y),
head_width=0.15, head_length=0.1, fc='green', ec='green')
ax2.arrow(0, -element_size/2, 0, -arrow_scale*np.sign(self.sigma_y),
head_width=0.15, head_length=0.1, fc='green', ec='green')
# τxy arrows (shear)
ax2.arrow(element_size/2, element_size/2, 0.1*np.sign(self.tau_xy), 0.1*np.sign(self.tau_xy),
head_width=0.1, head_length=0.08, fc='blue', ec='blue', alpha=0.7)
# Labels
ax2.text(element_size/2 + 0.3, 0.1, f'σx={self.sigma_x}', fontsize=10, color='red')
ax2.text(-0.1, element_size/2 + 0.3, f'σy={self.sigma_y}', fontsize=10, color='green')
ax2.text(0.3, 0.5, f'τ={self.tau_xy}', fontsize=9, color='blue')
ax2.text(-1.5, -1.8, f'Principal Stresses:\nσ₁ = {self.sigma_1:.2f} MPa\nσ₂ = {self.sigma_2:.2f} MPa',
fontsize=10, bbox=dict(boxstyle='round', facecolor='wheat', alpha=0.8))
ax2.text(-1.5, -0.8, f'Orientation:\nθp1 = {self.theta_p1:.2f}°\nθp2 = {self.theta_p2:.2f}°',
fontsize=10, bbox=dict(boxstyle='round', facecolor='lightblue', alpha=0.8))
ax2.text(-1.5, 0.2, f'Maximum Shear:\nτmax = {self.tau_max:.2f} MPa',
fontsize=10, bbox=dict(boxstyle='round', facecolor='lightcoral', alpha=0.8))
ax2.set_title('Stress Element', fontsize=12, fontweight='bold')
ax2.axis('off')
plt.tight_layout()
return fig
def print_results(self):
"""Print detailed results"""
print("="*60)
print("MOHR'S CIRCLE ANALYSIS - RESULTS SUMMARY")
print("="*60)
print(f"\nINITIAL STRESS STATE:")
print(f" σx = {self.sigma_x:8.2f} MPa")
print(f" σy = {self.sigma_y:8.2f} MPa")
print(f" τxy = {self.tau_xy:8.2f} MPa")
print(f"\nMOHR'S CIRCLE PARAMETERS:")
print(f" Center (C) = {self.center:8.2f} MPa")
print(f" Radius (R) = {self.radius:8.2f} MPa")
print(f"\nPRINCIPAL STRESSES:")
print(f" σ₁ (Maximum) = {self.sigma_1:8.2f} MPa")
print(f" σ₂ (Minimum) = {self.sigma_2:8.2f} MPa")
print(f"\nMAXIMUM SHEAR STRESS:")
print(f" τmax = {self.tau_max:8.2f} MPa")
print(f"\nORIENTATION OF PRINCIPAL PLANES:")
print(f" θp1 (for σ₁) = {self.theta_p1:8.2f}° (from x-axis)")
print(f" θp2 (for σ₂) = {self.theta_p2:8.2f}° (from x-axis)")
# Intermediate stresses
avg_stress = (self.sigma_1 + self.sigma_2) / 2
print(f"\nVERIFICATION:")
print(f" (σ₁ + σ₂)/2 = {avg_stress:8.2f} MPa (should equal C)")
print(f" (σ₁ - σ₂)/2 = {(self.sigma_1 - self.sigma_2)/2:8.2f} MPa (should equal R)")
print("="*60)
# ===== EXAMPLE 1: Biaxial Stress =====
print("\n" + "="*60)
print("EXAMPLE 1: BIAXIAL STRESS STATE")
print("="*60)
sigma_x = 80 # MPa
sigma_y = 20 # MPa
tau_xy = 40 # MPa
mohr = MohrsCircle(sigma_x, sigma_y, tau_xy)
mohr.calculate_principal_stresses()
mohr.calculate_max_shear_stress()
mohr.calculate_principal_plane_angles()
mohr.print_results()
mohr.plot_mohrs_circle()
plt.show()
# ===== EXAMPLE 2: Pure Shear =====
print("\n" + "="*60)
print("EXAMPLE 2: PURE SHEAR STATE")
print("="*60)
sigma_x = 0
sigma_y = 0
tau_xy = 50
mohr2 = MohrsCircle(sigma_x, sigma_y, tau_xy)
mohr2.calculate_principal_stresses()
mohr2.calculate_max_shear_stress()
mohr2.calculate_principal_plane_angles()
mohr2.print_results()
mohr2.plot_mohrs_circle()
plt.show()
# ===== EXAMPLE 3: Uniaxial Tension =====
print("\n" + "="*60)
print("EXAMPLE 3: UNIAXIAL TENSION")
print("="*60)
sigma_x = 100
sigma_y = 0
tau_xy = 0
mohr3 = MohrsCircle(sigma_x, sigma_y, tau_xy)
mohr3.calculate_principal_stresses()
mohr3.calculate_max_shear_stress()
mohr3.calculate_principal_plane_angles()
mohr3.print_results()
mohr3.plot_mohrs_circle()
plt.show()
4. DETAILED WORKED EXAMPLE
Given Data:
σx = 80 MPa
σy = 20 MPa
τxy = 40 MPa
Step 1: Calculate Center & Radius
Center = (σx + σy)/2 = (80 + 20)/2 = 50 MPa
Radius = √[((σx - σy)/2)² + τxy²]
= √[((80 - 20)/2)² + 40²]
= √[(30)² + (40)²]
= √[900 + 1600]
= √2500
= 50 MPa
Step 2: Principal Stresses
σ₁ = Center + Radius = 50 + 50 = 100 MPa (Maximum)
σ₂ = Center - Radius = 50 - 50 = 0 MPa (Minimum)
Step 3: Maximum Shear Stress
τmax = Radius = 50 MPa
Step 4: Orientation Angles
tan(2θp) = 2τxy / (σx - σy)
= 2(40) / (80 - 20)
= 80 / 60
= 1.333
2θp = arctan(1.333) = 53.13°
θp1 = 26.57° (for σ₁)
θp2 = 116.57° (for σ₂)
5. GRAPHICAL VISUALIZATION
τ (MPa)
|
50 | ●← (τmax point)
| /|\
| / | \
| / | \
| / C \
0 |●----+----●---- σ (MPa)
-50 | \ | /
| \ | /
| \|/
-50| ●← (τmax point)
|
0 50 100
Points and Values:
A (80, 40) - Initial point
B (20, -40) - Rotated point
C (50, 0) - Center
σ₁ = 100 MPa (right)
σ₂ = 0 MPa (left)
τmax = 50 MPa (top/bottom)
6. KEY RELATIONSHIPS
┌─────────────────────────────────────────┐
│ Important Formulas for 2D Stress │
├─────────────────────────────────────────┤
│ σave = (σx + σy)/2 │
│ R = √[((σx-σy)/2)² + τxy²] │
│ σ₁ = σave + R │
│ σ₂ = σave - R │
│ σ₁ + σ₂ = σx + σy (Invariant!) │
│ τmax = (σ₁ - σ₂)/2 = R │
│ tan(2θp) = 2τxy/(σx - σy) │
└─────────────────────────────────────────┘
7. SPECIAL CASES
| Case | σx | σy | τxy | σ₁ | σ₂ | τmax |
|---|
| Uniaxial Tension | P | 0 | 0 | P | 0 | P/2 |
| Pure Shear | 0 | 0 | τ | τ | -τ | τ |
| Biaxial Tension | P | P | 0 | P | P | 0 |
| Biaxial Stress | P | -P | 0 | P | -P | P |
This comprehensive guide covers the complete Mohr's Circle analysis with both theory and practical implementation!