[physics.continuum_mechanics] Wrong plot obtained for shear force diagram

187 views
Skip to first unread message

Abhinav R

unread,
Apr 4, 2023, 4:39:40 AM4/4/23
to sympy
Hello

I was trying out a beam problem and came upon this bug:


Screenshot from 2023-04-04 13-48-55.png
On drawing the beam and plotting the shear force diagram, the result I get is:
simulation.png
Wrong_plot.png

However, the correct plot would have been:
Screenshot from 2023-04-04 13-52-27.png

There are two issues with this, The support reaction are not being calculated correctly, The contribution of force due to the ramp load is wrong.

I have opened an issue relating to the ramp load. I request you to take a look at it and let me know if this is an actual bug in the code.

The code I used to get the Sympy plot results is:
from sympy.physics.continuum_mechanics.beam import Beam
from sympy import symbols

E, I = symbols('E, I')
b = Beam(6, E, I)
b.apply_support(0, "pin")
b.apply_support(3, "roller")

b.apply_load(4, 3, 0, end=6)
b.apply_load(4, 0, 1, end=3)
R_0, R_3 = symbols('R_0, R_3')
b.solve_for_reaction_loads(R_0, R_3)

p = b.draw()
p.show()

b.plot_shear_force()

Thanks and Regards,
Abhinav Cillanki
Reply all
Reply to author
Forward
0 new messages