Skip to main content
Ctrl+K
engineeringkit logo engineeringkit logo
  • Subpackages
  • History
  • Examples
  • API
  • Subpackages
  • History
  • Examples
  • API

Section Navigation

  • Examples
    • Beams
    • Energy methods
    • Frames
    • Members
    • Plasticity
    • Stability
    • Stress
    • Trusses
  • Examples
    • Dynamics
    • Machine elements
    • Mechanisms
    • Rotordynamics
    • Transmission
    • Vibration
  • Examples
    • Cycles
    • Exergy
    • Laws
    • Properties
    • Psychrometrics
    • Refrigeration
  • Examples
    • Hydrostatics
    • Measurement
    • Networks
    • Open channels
    • Pipe flow
    • Pumps
    • Similarity
    • Transients
  • Examples
    • Conduction
    • Convection
    • Heat exchangers
    • Phase change
    • Radiation
    • Transient conduction
  • Examples
    • Airfoils
    • Standard atmosphere
    • Boundary layers
    • Circulation
    • Compressible flow
    • Forces and coefficients
    • Performance
    • Finite wings
  • Examples
    • AC circuits
    • DC circuits
    • Networks
    • Power
    • Transients
    • Transmission lines
  • Examples
    • Feedback
    • Frequency response
    • Optimal control and estimation
    • Root locus
    • Sampled-data control
    • Stability
    • State space
    • Time response
  • Examples
    • Filters
    • Fourier analysis
    • Sampling
    • Spectral analysis
    • Wavelets
  • Examples
    • Coding
    • Decibels
    • Detection
    • Information and capacity
    • Modulation
    • Multiplexing
    • Noise
    • Propagation
  • Examples
    • Composites
    • Creep
    • Elasticity
    • Fatigue
    • Fracture
    • Plasticity
    • Yield
  • Examples
    • Growth
    • Lifetimes
    • Maintenance
    • Risk
    • Structural reliability
    • Systems
  • Tutorials
    • A beam from load to fatigue life
    • A feedback loop in the time and frequency domains
    • A power plant from cycle to cooling tower
    • A radio link from antenna to bit errors
  • Exercises
    • Structural engineering exercises
    • Mechanical engineering exercises
    • Thermodynamics exercises
    • Fluid engineering exercises
    • Heat transfer exercises
    • Aerodynamics exercises
    • Electrical engineering exercises
    • Control systems exercises
    • Signal processing exercises
    • Communications exercises
    • Materials exercises
    • Reliability exercises
  • Installation and quickstart
  • Numerical methods and inspectable histories
  • Structural engineering: loads, signs and linear elasticity
  • Mechanical engineering: power, vibration and mechanism geometry
  • Thermodynamics: total versus specific quantities and cycle states
  • Fluid engineering: flow regimes and signed quantities
  • Heat transfer: absolute temperatures and resistance accounting
  • Aerodynamics: incompressible limits and compressible conservation
  • Electrical engineering: passive components and circuit responses
  • Control systems: matrix contracts and numerical stability
  • Signal processing: sampled energy, spectra and quantization
  • Communications: linear ratios, modulation phase and channel scope
  • Materials: elasticity, yield, fatigue, fracture and creep conventions
  • Reliability: distributions, independence and rate units
  • Examples
  • Examples
  • Beams
  • Navier’s beam theory (1826)

Note

Go to the end to download the full example code or to run this example in your browser via JupyterLite.

Navier’s beam theory (1826)#

Navier’s 1826 lectures at the École des ponts et chaussées put beam theory in its modern form: plane sections stay plane, the neutral axis passes through the centroid, the stress is \(\sigma = My/I\) (bending_stress()) and the curvature is \(y'' = M/(EI)\). The example loads a steel beam (SimplySupportedBeam), checks the midspan deflection \(5wL^4/(384EI)\), and checks that the stress profile carries no net force and exactly the applied moment.

import matplotlib.pyplot as plt
import numpy as np
from scipy.integrate import simpson

from engineeringkit.structural_engineering import SimplySupportedBeam, bending_stress, rectangular_second_moment

Shear, moment and deflection#

L, E, w = 6.0, 200e9, 8e3
b, h = 0.10, 0.30
I = rectangular_second_moment(b, h)
result = SimplySupportedBeam(L, E, I).solve_uniform_load(w, n=601)
summary = result.summary()
print(f"max moment {summary['max_abs_moment'] / 1e3:.1f} kN m, midspan deflection {1e3 * summary['max_abs_deflection']:.2f} mm")
assert np.isclose(summary["max_abs_moment"], w * L**2 / 8)
assert np.isclose(summary["max_abs_deflection"], 5 * w * L**4 / (384 * E * I))

fig, axes = result.plot()
for ax, label in zip(axes, ["shear [N]", "moment [N m]", "deflection [m]"]):
    ax.set_ylabel(label)
fig.tight_layout()
plot 02 navier beam
max moment 36.0 kN m, midspan deflection 3.00 mm

The stress across the midspan section#

With y measured downward, a sagging moment puts the bottom in tension.

M = summary["max_abs_moment"]
y = np.linspace(-h / 2, h / 2, 401)
sigma = bending_stress(M, y, I)
net_force = simpson(sigma * b, x=y)
resisting_moment = simpson(sigma * b * y, x=y)
print(f"peak stress {sigma.max() / 1e6:.1f} MPa, net force {net_force:.2e} N, moment {resisting_moment / 1e3:.1f} kN m")
assert abs(net_force) < 1e-6 * M / h
assert np.isclose(resisting_moment, M)

fig, ax = plt.subplots(figsize=(4, 4))
ax.plot(sigma / 1e6, y * 1e3)
ax.axvline(0, color="gray", lw=0.5)
ax.invert_yaxis()
ax.set(xlabel="stress [MPa]", ylabel="depth below neutral axis [mm]", title="Midspan section")
fig.tight_layout()

plt.show()
Midspan section
peak stress 24.0 MPa, net force 0.00e+00 N, moment 36.0 kN m

Total running time of the script: (0 minutes 0.063 seconds)

Launch JupyterLite

Download Jupyter notebook: plot_02_navier_beam.ipynb

Download Python source code: plot_02_navier_beam.py

Download zipped: plot_02_navier_beam.zip

Gallery generated by Sphinx-Gallery

previous

Galileo’s cantilever (1638)

next

Clapeyron’s three-moment equation (1857)

On this page
  • Shear, moment and deflection
  • The stress across the midspan section
Show Source

Created using Sphinx 9.1.0.

Built with the PyData Sphinx Theme 0.22.0.