Stress: Normal#

In this example we compute the normal stress in a simple rectangular cross-section subjected to an axial force.
The normal stress is defined as:
\[\sigma = \frac{N}{A}\]

where

  • \(N\) is the applied normal force,

  • \(A\) is the cross-sectional area.

You can find the example as an executable Python file here.

Import Modules#

We start by importing the required classes for defining the Stress object.

[1]:
from sstatics.core.preprocessing import CrossSection
from sstatics.core.preprocessing.geometry.objects import Polygon
from sstatics.core.postprocessing import CrossSectionStress

Create Cross-Section#

We start by creating a basic rectangle with a width of 10 units and a height of 40 units. This geometry is passed into the CrossSection class, which provides access to several geometric properties including area, centroid, and boundary values.

[2]:
# 1. Create a simple rectangular cross-section (width 10, height 40)
rect = Polygon(points=[(0, 0), (10, 0), (10, 40), (0, 40), (0, 0)])
cs = CrossSection(geometry=[rect])

Create Stress-Object#

Using the previously defined cross-section, we create an instance of CrossSectionStress.
This object provides methods for evaluating stresses resulting from axial forces, shear forces, and bending moments.
[3]:
stress = CrossSectionStress(cs)

Specify the Applied Load#

For this basic example, we assume a normal force of:

\(N = 1000\)

acting axially on the cross-section. No bending or shear is considered here.

[4]:
N = 1000

Calculate normal stress#

The normal stress is obtained by evaluating:

\[\sigma = \frac{N}{A}\]
The library performs this calculation internally using the geometric properties of the cross-section.
Finally, we print the computed area, the applied force, and the resulting stress value.
[5]:
sigma = stress.normal_stress(n=N)

print("=== Normal Stress Example ===")
print(f"Cross-section area A     = {cs.area:.3f}")
print(f"Applied normal force N    = {N}")
print(f"Normal stress sigma = N/A = {sigma:.6f}")
=== Normal Stress Example ===
Cross-section area A     = 400.000
Applied normal force N    = 1000
Normal stress sigma = N/A = 2.500000