Example 2

Example 2#

%matplotlib inline
import sympy as sm
from sympy.physics.continuum_mechanics.beam import Beam
E = sm.Symbol('E')
I = sm.Symbol('I')
b = Beam(10, E, I)
b.apply_support(0, type="pin")
b.apply_support(10, type="pin")
b.apply_load(-20, 5, -1)
R_0, R_10 = sm.symbols('R_0, R_10')
b.solve_for_reaction_loads(R_0, R_10)
b.reaction_loads
{R_0: 10, R_10: 10}
b.plot_bending_moment();
../../_images/642524fe1b9cd9e0bd1853d5c5b450f9301472873b3477b0a251e6477a4e0822.png
b.plot_shear_force();
../../_images/cedd8680cc8daec78627780b7366064d398e1f0fc5020c3fd325dc36e5d4ca22.png