Example 8

Example 8#

%pip install sympy==1.12.1
# This is a workaround for the fact that micropip does not support git URLs, to make it work in the online book.
import micropip
await micropip.install('../packages/sympy-1.14.dev0-py3-none-any.whl')
#takes a while
%matplotlib inline
import sympy as sm
from sympy.physics.continuum_mechanics.beam import Beam
import matplotlib.pyplot as plt
E = sm.Symbol('E')
I = sm.Symbol('I')
b = Beam(7, E, I)
r0, m0 = b.apply_support(0, type='fixed')
r4 = b.apply_support(4, type='pin')
r7 = b.apply_support(7, type='pin')
b.apply_rotation_hinge(2)
b.apply_rotation_hinge(5)
b.apply_load(-5, 0, 0, 2)
b.apply_load(-10, 6, -1)
b.solve_for_reaction_loads(r0, m0, r4, r7)
b.plot_bending_moment();
../../../_images/68c09ae009a4c8785bc6374094962fb9f496149b915d8cab3ed885d1c6306f28.png