Exercises#
Chapter 2: Stress and Tensors
Learning outcomes #
At the end of this session you should be able to:
Interpret different components of 3D Cauchy stress tensor.
Decompose a rank 2 tensor into symmetric and anti-symmetric components
Determine state of stress on given plane
Transform rank 2 tensor to a new basis.
Table of Contents
Types of content#
Settings for notebook#
# Import packages for notebook here
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
Do not alter this cell. LaTeX commands for frequently used terms.
Stress#
Cauchy stress tensor#
Stress (force per unit area) in a body is the response to forces acting on the body. It is a (2nd-order) tensor quantity as it depends on direction in two ways: the direction of the force acting on a plane and the direction of the normal to the plane on which the force acts.
Stress is defined as positive if the force is in the same direction as the outward normal (tension); negative if it acts in the opposite direction (compression).
The stress tensor can be written as a square matrix \(\tensor{\sigma} = \sigma_{ij}\) and has algebraic properties similar to those of matrices.
In 3D the stress tensor has nine components; in 2D it has four.
The first index of the stress component is the orientation (outward normal direction) of the plane; the second is the orientation of the force.
The diagonal terms are normal stresses the off-diagonal terms are shear stresses.
Traction#
If we are interested in the force (per unit area) acting at a point in the body on a given plane, the dot product of the transpose of the stress tensor with a unit vector \(\nhat\) gives the traction \(\vector{t}\) (effective force per unit area) acting on the plane normal to the unit vector.
For example, the traction in the \(x_1\) direction (\(\nhat = \ex = (1, 0, 0)^T\)) is given by:
If we are interested in the component of this vector in a particular direction, we can do the dot product of another unit vector in the direction of interest \(\vector{\hat{p}}\) with the traction vector \(\vector{t}\).
For example, going back to our traction in the \(x_1\) direction \(\vector{t}_1\), the component of this in the \(\ex\) direction is:
or
and the component in the \(\ey\) direction is:
or
Normal and shear stress#
We can also think of the traction vector \(\vector{t}\) as comprising a normal component \(\vector{t}_n\) and a shear component \(\vector{t}_s\). In 3D, the total shear component will be the vector sum of the two shear components orthogonal to the normal component.
Exercise 1#
Given a stress tensor (units MPa) at a point in a body:
(a) Find the normal stresses on the coordinate planes through the point with normal in \(\ex\) and \(\ez\) direction.
(b) Find the total shear stresses on the two planes from (a).
(c) Find the traction on a plane through the point with normal in the direction of \(2\ex + 2\ey + \ez\).
Exercise 2#
Consider that at a point in a continuum the stress state is such that \(\sigma_{11} =1\) MPa and \(\sigma_{22} =-1\) MPa and all other stress components \(\sigma_{ij}=0\).
(a) Show that the only plane on which the stress vector is zero, is the plane with normal in the \(\ez\) direction.
(b) Give three planes on which no normal stress is acting.
Transforming stress to a new orthonormal basis#
In the lecture we showed that by resolving forces acting on an aribtrary plane and maintaining the force balance, we can define the normal and shear stress on the plane.
For a 2D stress state, we saw that for a plane with an outward normal oriented at an angle of \(\phi\) clockwise (\(-\phi\) anti-clockwise) from the \(x_2\) axis, the normal \(\sigma_{nn}\) and shear stress \(\sigma_{ns}\) components are given by:
and
We could also have found this result by: (1) calculating the traction vector on the plane with normal \(\nhat\) in the direction \(\phi\) degrees clockwise from the \(x_2\) axis: \(\nhat = (\sin\phi, \cos\phi)\):
Then (2) resolving the traction in the directions normal to the surface normal:
and parallel to the surface normal \(\vector{\hat{s}} = (\cos\phi, -\sin\phi)\):
Importantly, this is equivalent to the tensor transformation that describes solid body rotation to a new orthonomal basis \(\{\ex', \ey'\}\):
where the columns of \(\matrix{A}^T\) are formed by the new basis vectors \(\{\ex', \ey'\}\):
Or, if the components of \(\matrix{A}\) are written as \(\alpha_{ij}\), then \(\alpha_{ij} = \ehat_i'\cdot\ehat_j\).
Thus, we have:
Exercise 3#
For the following state of stress (in MPa):
in a rectangular Cartesian coordinate system \(\left\{ \ex, \ey, \ez \right\}\), find \(\sigma_{11}'\), \(\sigma_{21}'\) and \(\sigma_{33}'\) on a new basis \(\left\{\ex', \ey', \ez'\right\}\) obtained by rotating about the \(\ez\) axis by 90\(^\circ\), such that \(\ex'=\ey\).
Special stress components#
Stress invariants#
Recall that stress is a tensor quantity and as such is the same regardless of coordinate system.
The matrix formed of the tensor components, however, will depend on the coordinate frame.
There are important measures of the stress tensor that are independent of the coordinate frame. These are called invariants, which can be expressed in different ways. Here are example definitions (more are given in the lecture notes):
Extra: Principal stresses#
As the stress tensor is a real-valued, symmetric second-order tensor (i.e., square, symmetric matrix), it can be diagonalized.
This means a coordinate frame can be found, such that only the diagonal elements (normal stresses) remain.
For the stress tensor, these elements, \(\sigma_1\), \(\sigma_2\), \(\sigma_3\) are called the principal stresses.
Finding the principal stresses, and the corresponding principal directions (vectors), is equivalent to solving the eigenvalue problem for the stress tensor.
We seek \(\lambda\) that satisfies:
to find the eigenvalues and then to find the eigenvectors \(\x\) we seek non-trivial solutions to:
As the stress tensor is symmetric, the eigenvectors will be orthogonal so the principal stress directions can form an orthonormal basis. If the principal stress directions are known, then finding the principal stresses can be cast as a change of orthonormal basis:
where the columns of linear transformation matrix \(\matrix{A}^T\) are the normalised principal stress directions \(\xhat_1\), \(\xhat_2\) and \(\xhat_3\).
When cast in this way, it should be apparent that the largest normal stress acting at a point is the largest (most negative) principal stress and the smallest (most positive) normal stress is the smallest principal stress.
Aside: In 2D, we can confirm this by considering the normal stress on a plane with a normal at an angle \(\phi\) clockwise from the second principal direction:
which can be rewritten as:
From this we see that, for \(\sigma_1 > \sigma_2\), \(\sigma_{nn}\) is smallest (equal to \(\sigma_2\)) when \(\phi=0\), and largest (equal to \(\sigma_1\)) when \(\phi=90\) and in between for \(0 < \phi < 90\).
Note: If \(\sigma_1\) is largest and \(\sigma_3\) smallest principal stress, then the maximum shear stress is given by:
The maximum shear stress is important for modelling permanent deformation (plastic yielding).
Exercise 4#
The code below shows how we can compute the components of the stress tensor in a rotated reference frame, given the tensor components in the standard basis and a rotation angle.
The code also plots the rotated coordinate system and confirms that the stress invariants are the same in the original and rotated frame.
Use this cell to investigate how the stress tensor components change as you rotate the coordinate frame. For the starting case:
what do you notice happens at approximately 58 degrees rotation?
# Print floats to only 2 d.p.
np.set_printoptions(precision=2, suppress=True)
# Define a stress tensor and print (remember that the stress tensor should be symmetric)
mS = np.array([[2., 1.],
[1., 3.]])
assert np.allclose(mS,mS.T), "The stress tensor should be symmetric S = S^T"
print("\n The stress tensor in the standard coordinate basis:")
print(mS)
# Define a unit square for plotting rotation
mX = np.array([[-1,-1],
[-1, 1],
[ 1, 1],
[ 1,-1],
[-1,-1]]).T
# Define the rotation angle (positive anti-clockwise):
theta_deg = 10.
theta = np.deg2rad(theta_deg)
print("\n The rotation angle of the coordinate basis:")
print(theta_deg)
# Define the transformation matrices A and A^T (the latter has the new basis as columns)
mA = np.array([[np.cos(theta), np.sin(theta)],
[-np.sin(theta), np.cos(theta)]])
# Deform the coordinate frame
mXp = mA.T @ mX
# Compute components of stress tensor in the rotated coordinate system
mSp = mA @ mS @ mA.T
print("\n The stress tensor in the rotated coordinate basis:")
print(mSp)
print("\n The basis vectors of the rotated coordinate system:")
print(mA.T)
# Stress invariants
print("\n The first and third invariants of the stress tensor (original and rotated):")
print("I_1 = %2.1f, %2.1f" % (np.trace(mS), np.trace(mSp)))
print("I_3 = %2.1f, %2.1f" % (np.linalg.det(mS), np.linalg.det(mSp)))
# The second invariant I_2 = minor(S) is left for you to code up.
# You could write a function to do this in terms of the components of the matrix
# or the determinants of the minor matrices of S as given in the lecture notes. . .
plt.subplot(aspect='equal')
plt.plot(mX[0,:], mX[1,:], 'ko-', lw=2)
plt.plot(mXp[0,:], mXp[1,:], 'ro-', lw=2)
plt.xlim(-2,2); plt.ylim(-2,2)
plt.axhline(0, color='k'); plt.axvline(0, color='k')
plt.plot([-3*mA.T[1,0],3*mA.T[1,0]],[3*mA.T[1,1],-3*mA.T[1,1]], 'r')
plt.plot([-3*mA.T[0,0],3*mA.T[0,0]],[-3*mA.T[1,0],3*mA.T[1,0]], 'r')
plt.grid()
The stress tensor in the standard coordinate basis:
[[2. 1.]
[1. 3.]]
The rotation angle of the coordinate basis:
10.0
The stress tensor in the rotated coordinate basis:
[[2.37 1.11]
[1.11 2.63]]
The basis vectors of the rotated coordinate system:
[[ 0.98 -0.17]
[ 0.17 0.98]]
The first and third invariants of the stress tensor (original and rotated):
I_1 = 5.0, 5.0
I_3 = 5.0, 5.0
Can you extend this code in the following ways?
To calculate the second invariant of the stress tensor
To calculate the deviatoric stress tensor and show its rotation (see Sec 3.3)
To consider the 3D stress tensor and rotate it in 3D!
Exercise 5#
Finding the principal stresses of a tensor is very easy with python at our fingertips. The cell below shows how to calculate the principal stresses and directions for the stress tensor we considered above.
What do you notice about the solution you get compared with what happened when you rotated the stress tensor by different amounts in Exercise 5?
Can you extend this to find the principal stresses and directions for a 3D stress tensor?
# Print floats to only 2 d.p.
np.set_printoptions(precision=2, suppress=True)
# Define a stress tensor
mS = np.array([[2., 1.],
[1., 3.]])
# Find the principal stresses and directions by solving the eigenvalue problem
[sigma1, sigma2], [x1, x2] = np.linalg.eig(mS)
# Print the principal stresses and maximum shear stress
print("Principal stress %2.2f in direction:" % sigma1, x1)
print("Principal stress %2.2f in direction:" % sigma2, x2)
print("Maximum shear stress is %2.2f " % (np.abs(sigma1-sigma2)/2))
Principal stress 1.38 in direction: [-0.85 -0.53]
Principal stress 3.62 in direction: [ 0.53 -0.85]
Maximum shear stress is 1.12
Deviatoric stress and invariants#
For any stress state \(\tensor{\sigma}\) we can define a deviatoric stress \(\tensor{\sigma}'\) as:
where \(\sigma_{kk} = \sigma_{11} + \sigma_{22} + \sigma_{33}\) is the first invariant (trace) of the stress tensor \(\tensor{\sigma}\). Note that here we use \('\) (prime) to denote the deviatoric stress, not to be confused with stress in a different orthonormal basis.
The invariants of the deviatoric stress tensor are:
The second invariant of the deviatoric stress tensor \(J_2\) can be written in several different forms (see lecture notes) and is used as a measure of deviatoric stress magnitude in models of plastic deformation.
Exercise 6#
Given the definition of deviatoric stress \(\tensor{\sigma}'\) as:
where \(\sigma_{kk}\) is the first invariant (trace) of the stress tensor \(\tensor{\sigma}\).
(a) Show that the first invariant of \(\tensor{\sigma}'\) is zero.
(b) Evaluate \(\tensor{\sigma}'\) for the stress tensor (in kPa):
(c) Show that the principal directions of \(\tensor{\sigma}\) coincide with those of the deviatoric stress tensor \(\tensor{\sigma}'\).