# Bending, Slope,Deflection ,Shear force diagram (plot) for cantilever structure beam in python

from sympy.physics.continuum_mechanics.beam import Beam
from sympy import *
E,I = symbols ('E,I') # E = modulus of elasticity and I = moment of inertia
b = Beam(9,E,I) # 9 represent length of the beam in meter , E and I are defined in previous line
#-12 means 12kN act in downward at a distance of 9m
#-1 represent polynomial order ex = -12(x-9)

#watch the video below for better understanding

b.bc_deflection.append((0,0))
b.bc_slope.append((0,0))
R,M = symbols('R,M')
b.plot_shear_force()
b.plot_bending_moment()
b.plot_slope(subs ={E:20E9 , I : 3.25E-6})
b.plot_deflection(subs ={E:20E9 , I : 3.25E-6})