---
jupytext:
    formats: md:myst
    text_representation:
        extension: .md
        format_name: myst
kernelspec:
    display_name: Python 3 (ipykernel)
    language: python
    name: python3
---



# Stress and strain

**Book: Sections 1.3 to 1.5.**

## The concept of stress


```{note}
*Three* different definitions for the stress $\sigma$ are being used here:

* The **mean (normal) stress** in a
bar is defined as: $\displaystyle \sigma =
\frac{\text{normal force}}{\text{cross-sectional area}}.$
<br>
<br>
* The **(normal) stress intensity** on a small part $\Delta A$ of the cross-sectional area: $\displaystyle \sigma =
{\Delta F}/{\Delta A}.$
<br>
<br>
* The local **(normal) stress** in a point: 
$\displaystyle \sigma = \lim_{\Delta A \rightarrow 0} {\Delta F}/{\Delta A} $.
```

```{figure-md} L3-fig1
<img src="Media/L3_Media/L3-fig1.svg" width="600px">

Homogenous normal stress distribution
```


If the (normal) stress in every point of the cross-section is the same everywhere, and thus equal to the mean (normal) stress, we say that we have a **homogeneous (normal) stress distribution**. This is shown in {numref}`L3-fig1` above.

Even in a tensile bar the normal stress distribution is usually inhomogeneous because of end effects. However, at a position sufficiently far from the ends the normal stress distribution can be considered homogeneous if the material itself is homogeneous (Saint-Venant's principal).

**Unit of stress**: $\text{N}/\text{m}^2$ of
$\text{Pa}$ (pascal). Often in megapascal MPa ($10^6$ Pa) or
 $\text{MN} / \text{m} ^ 2$.

The **mean shear stress** $\tau$ is defined as the total shear force $F$ divided by the area $A$ it is acting on (see Figure 1.15).
For the local shear stress $\tau$ on an infinitesimally small plane
in a point, we have again $\displaystyle \tau = \lim_{\Delta A \rightarrow 0} {\Delta F}/{\Delta A}$. {numref}`L3-fig2` Below shows how shear stress can be visualised on a body. These shear stresses are always tangetial towards the surface.


```{figure-md} L3-fig2
<img src="Media/L3_Media/L3-fig2.svg" width="500px">

Shear stress on surface of body
```

In general, we can define nine different stress components on an infinitesimally small rectangular box at a point $P$: three normal stress components $\sigma_1$, $\sigma_2$ and $\sigma_3$ (see {numref}`L3-fig3`) and six shear stress components $\tau_{12}$, $\tau_{21}$, $\tau_{13}$, $\tau_{31}$, $\tau_{23}$ and $\tau_{32}$. Here, $\tau_{ij}$ with $i=1,2$ or $3$ and $j=1,2$ or $3$ in a $x_1$, $x_2$, $x_3$-coordinate system, are defined as the infinitesimal shear face
$F_\text{s}$ in $x_j$-direction divided by the infinitesimally small area normal to the $x_i$-axis. The nine stress components are depicted in the figure below:

```{figure-md} L3-fig3
<img src="Media/L3_Media/L3-fig3.svg" width="500px">

Nine stress components visualised on a cube.
```

## Stress concentrations

Near circular holes and notches in bars, beams and plates or at sudden changes in cross-sectional area, the local stress
will strongly deviate from the mean stress. The ratio between the maximum stress $\sigma_\text{max}$ and the mean stress $\sigma_\text{mean}$ is called the **stress concentration factor** $K$: 

$$
K = \frac{\sigma_\text{max}}{\sigma_\text{mean}}.
$$ (eq1-L3)

The values of $K$ for different cases have been tabulated in handbooks (for example by Peterson). {numref}`L3-fig4` below shows an example of stress concentration for a cicular hole relative towards a large plate.


```{figure-md} L3-fig4
<img src="Media/L3_Media/L3-fig4.svg" width="500px">

A circular hole in a relatively large plate the factor $K$ tends to the value 3.
```


Every material has a maximum possible tensile stress, the **ultimate tensile strength**. In order for a structure to not collapse, the local stress in each point of a structure must be smaller than the ultimate tensile strength. Moreover, a **factor of safety**$>1$ will be used to define an even lower **allowable stress**:

$$
     \text{factor of safety} = \frac{\text{ultimate tensile stress}}{\text{allowable stress}}.
$$ (eq2-L3)

Section 1.3.4. in the book give a discussion for an appropriate factor of safety. Below in figures {numref}`L3-fig5` and {numref}`L3-fig6`  other examples are given of how stress differ based on shape configuration.

```{figure-md} L3-fig5
<img src="Media/L3_Media/L3-fig5.svg" width="450px">

Stress concentration on rectangle with or without narrow slit.
```

```{figure-md} L3-fig6
<img src="Media/L3_Media/L3-fig6.svg" width="800px">

Stress cincetration with Circle in rectangle or on boundary. 
```



## The concept of strain

The concept of strain is used to quantify the (local) deformation of the material. Several definitions are possible and some common ones are defined here. Note, that whatever definition is used, strain is always dimensionless.


```{figure-md} L3-fig7
<img src="Media/L3_Media/L3-fig7.svg" width="350px">

Rectangular prism within relation towards Equation {eq}`eq3-L3`. 
```

{numref}`L3-fig7` shows an example of **engineering strain**, for linear elastic material behaviour the **engineering strain** [^1] or just **strain** is mostly used, defined by:

$$ e = \frac{\Delta L}{L_0} = \frac{L-L_0}{L_0}. $$ (eq3-L3)

Note, that $e>0$ for extension and $e<0$ for compression. For elastic deformation of metals we usually have  $|e| < 0{,}001$ or $|e| < 0{,}1\%$. 

For elastic deformation of rubbers, strains will be much larger than for metals and instead of $e$ the **extension ratio** $\lambda$ is commonly used, defined as

$$\lambda = \frac{L}{L_0} = 1+ e. $$ (eq4-L3)

For plastic deformation (irreversible deformation) it is common to use the concept of **natural strain**, defined as:

$$ \displaystyle \varepsilon = \sum\Delta\varepsilon = \int_{L_0}^L
\frac{dL}{L} = \ln{(\frac{L}{L_0})} = \ln{(1+e)} = \ln{\lambda}. $$  (eq5-L3)

A measure for the deformation in shear (see Figure 1.23) is the **shear strain** defined as $\gamma = \tan(\phi)$. For small deformation we have $\gamma= \tan(\phi) \approx \phi$ ($\phi$ in radians). An example is given in {numref}`L3-fig8` below.


```{figure-md} L3-fig8
<img src="Media/L3_Media/L3-fig8.svg" width="400px">

Shear strain on a rectangular prism.
```


[^1]: In the book $e$ is called *engineer's strain*, but the term *engineering strain* is much more common.

## The tensile test

When concidering tensile test some important concepts need to be looked examined. A typical tensile test configuration can be seen in {numref}`L3-fig9`

```{figure-md} L3-fig9
<img src="Media/L3_Media/L3-fig9.svg" width="250px">

Tensile testing on dog-bone specimen. Clear necking can be seen on the right figure just before breaking.
```

- The **yield point**; beyond this point in the stress-strain curve 
permanent deformation can be detected after removing the load.
- The **yield strain** and **yield stress** are the values of the strain and stress at the yield point,
respectively.
- **Brittle** (opposed to **ductile**) material behaviour: small 
(opposed to large) plastic (permanent) deformation at fracture.
- **Strong** (opposed to **weak**) material: high (opposed to low)
ultimate strength.
- **Stiff** (opposed to **compliant**) material: a steep
(opposed to flat) line in the elastic regime of the stress-strain curve.
The **material stiffness** in the lineair elastic regime is characterised by the
**modulus of elasticity** or **Young's modulus** $E$, which is the ratio $\sigma/e$.

```{figure-md} L3-fig10
<img src="Media/L3_Media/L3-fig10.svg" width="700px">

Stress strain curves.
```


Note, that the concepts of **hard** and **soft** are not applicable to the tensile test (see material science courses).

Below two videos can be seen where either work-hardened copper in the first video or annealed copper in the second video are put under tensile testing.


```{code-cell} ipython3
:tags: ["remove-input"]

from IPython.display import Video, display, HTML

# Generate the video’s HTML representation
video_html = Video("_static/Embedded/L3_video1.mp4", embed=True, width=600)._repr_html_()

# Display the video wrapped in a centered div
display(HTML(f'<div style="text-align: center;">{video_html}</div>'))

```

```{code-cell} ipython3
:tags: ["remove-input"]

from IPython.display import Video, display, HTML

# Generate the video’s HTML representation
video_html = Video("_static/Embedded/L3_video2.mp4", embed=True, width=600)._repr_html_()

# Display the video wrapped in a centered div
display(HTML(f'<div style="text-align: center;">{video_html}</div>'))

```

## The required equations for solving a problem in mechanics

The required equations for solving a mechanics problem for deformable bodies under static conditions
can be divided into three categories:

1. Equilibrium of forces and moments.
1. The relations between strains and displacements (compatibility relations).
1. The stress-strain relation of materials, also called constitutive behaviour.

For **statically determinate problems** only the first category is needed.

## Additional Videos

The two videos below by The Efficient Engineer give another perpsective on an introduction to stress and strain and towards understanding Material Strength, Ductility and Toughness. These videos are non mandatory and are purely to give a different persective on the topic.

<div class="video-wrapper">
  <iframe width="560" height="315" 
    src="https://www.youtube.com/embed/aQf6Q8t1FQE" 
    frameborder="0" 
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" 
    allowfullscreen>
  </iframe>
</div>

<br> <!-- Optional: Add some space between videos -->

<div class="video-wrapper">
  <iframe width="560" height="315" 
    src="https://www.youtube.com/embed/WSRqJdT2COE" 
    frameborder="0" 
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" 
    allowfullscreen>
  </iframe>
</div>


## Quiz
### Question 1
```{code-cell} ipython3
:tags: ["remove-input"]

import json
from jupyterquiz import display_quiz

with open("Quizzes/L3_quizzes/q1.json", "r", encoding="utf-8") as f:
    questions = json.load(f)

display_quiz(questions, shuffle_answers=True)
```
### Question 2
```{code-cell} ipython3
:tags: ["remove-input"]

import json
from jupyterquiz import display_quiz

with open("Quizzes/L3_quizzes/q2.json", "r", encoding="utf-8") as f:
    questions = json.load(f)

display_quiz(questions, shuffle_answers=True)
```
### Question 3

```{figure-md} L3-figQ3
<img src="Media/Quizzes/L3_quiz/quiz3c.png" width="500px">

Figure for question below.
```

```{code-cell} ipython3
:tags: ["remove-input"]
:label: L1-q3-code 

import json
from jupyterquiz import display_quiz

with open("Quizzes/L3_quizzes/q3.json", "r", encoding="utf-8") as f:
    questions = json.load(f)

display_quiz(questions, shuffle_answers=True)
```
### Question 4

```{code-cell} ipython3
:tags: ["remove-input"]
:label: L1-q3-code 

import json
from jupyterquiz import display_quiz

with open("Quizzes/L3_quizzes/q4.json", "r", encoding="utf-8") as f:
    questions = json.load(f)

display_quiz(questions, shuffle_answers=True)
```
### Question 5

```{figure-md} L3-figQ5 
<img src="Media/Quizzes/L3_quiz/quiz3a.PNG" width="600px">

Figure for question below.
```

```{code-cell} ipython3
:tags: ["remove-input"]
:label: L1-q3-code 

import json
from jupyterquiz import display_quiz

with open("Quizzes/L3_quizzes/q5.json", "r", encoding="utf-8") as f:
    questions = json.load(f)

display_quiz(questions, shuffle_answers=True)
```
### Question 6


```{code-cell} ipython3
:tags: ["remove-input"]
:label: L1-q3-code 

import json
from jupyterquiz import display_quiz

with open("Quizzes/L3_quizzes/q6.json", "r", encoding="utf-8") as f:
    questions = json.load(f)

display_quiz(questions, shuffle_answers=True)
```
### Question 7

```{figure-md} L3-figQ7
<img src="Media/Quizzes/L3_quiz/quiz3b.png" width="450px">

Figure for question below.
```

```{code-cell} ipython3
:tags: ["remove-input"]
:label: L1-q3-code 

import json
from jupyterquiz import display_quiz

with open("Quizzes/L3_quizzes/q7.json", "r", encoding="utf-8") as f:
    questions = json.load(f)

display_quiz(questions, shuffle_answers=True)
```
### Question 8

```{figure-md} L3-figQ8
<img src="Media/Quizzes/L3_quiz/quiz3d.PNG" width="600px">

Figure for question below.
```

```{code-cell} ipython3
:tags: ["remove-input"]
:label: L1-q3-code 

import json
from jupyterquiz import display_quiz

with open("Quizzes/L3_quizzes/q8.json", "r", encoding="utf-8") as f:
    questions = json.load(f)

display_quiz(questions, shuffle_answers=True)
```

### Question 9

```{figure-md} L3-figQ9
<img src="Media/Quizzes/L3_quiz/quiz3e.PNG" width="600px">

Figure for question below.
```



```{code-cell} ipython3
:tags: ["remove-input"]
:label: L1-q3-code 

import json
from jupyterquiz import display_quiz

with open("Quizzes/L3_quizzes/q9.json", "r", encoding="utf-8") as f:
    questions = json.load(f)

display_quiz(questions, shuffle_answers=True)
```

### Question 10

```{figure-md} L3-figQ10
<img src="Media/Quizzes/L3_quiz/quiz3f-1.png" width="600px">

Figure for question below.
```

```{code-cell} ipython3
:tags: ["remove-input"]
:label: L1-q3-code 

import json
from jupyterquiz import display_quiz

with open("Quizzes/L3_quizzes/q10.json", "r", encoding="utf-8") as f:
    questions = json.load(f)

display_quiz(questions, shuffle_answers=True)
```