Example 12#
%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(15, E, I)
r0 = b.apply_support(0, type='pin')
r10 = b.apply_support(10, type='pin')
r15, m15 = b.apply_support(15, type='fixed')
b.apply_rotation_hinge(5)
b.apply_load(-10, 5, -1)
b.apply_load(-5, 10, 0, 15)
b.solve_for_reaction_loads(r0, r10, r15, m15)
b.plot_bending_moment();
