Example 4#
%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
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(8, E, I)
r0, m0 = b.apply_support(0, type='fixed')
r8 = b.apply_support(8, type='pin')
b.apply_rotation_hinge(5)
b.apply_load(-10, 5, -1)
b.solve_for_reaction_loads(r0, m0, r8)
b.plot_bending_moment();
