Example 2

Example 2#

import micropip
await micropip.install('../../packages/sympy-1.14.dev0-py3-none-any.whl')
#takes a while
%pip install git+https://github.com/BorekSaheli/sympy.git@structure2d

A constant distributed load is applied over the second half of the first member and a second distributed load is applied over first hald of the third member. The structure is supported by a pin support at one end and a roller support at the other end.

import matplotlib.pyplot as plt
from sympy.physics.continuum_mechanics.structure2d import Structure2d
%config InlineBackend.figure_format = 'svg'

E = 3e4
I = 1
A = 1e4
F = 15
s = Structure2d()
s.add_member(x1=0, y1=0, x2=12, y2=5, E=E, I=I, A=A)
s.add_member(x1=12, y1=5, x2=12, y2=2, E=E, I=I, A=A)
s.add_member(x1=12, y1=2, x2=15, y2=2, E=E, I=I, A=A)
s.apply_load(
    start_x=6,
    start_y=2.5,
    value=20,
    global_angle=270,
    order=0,
    end_x=12,
    end_y=5,
)
s.apply_load(
    start_x=12,
    start_y=2,
    value=50,
    global_angle=270,
    order=0,
    end_x=13.5,
    end_y=2,
)
s.apply_load(
    start_x=3,
    start_y=1.25,
    value=100,
    global_angle=s.members[0].angle_deg + 270,
    order=-1,
)
Rv1 = s.apply_support(x=15, y=2, type="roller")
Rv2, Rh2 = s.apply_support(x=0, y=0, type="pin")
s.solve_for_reaction_loads(Rv1, Rv2, Rh2)
s.draw(show_load_values=True, forced_load_size=2) 
../../_images/fb45f858d531797fe0adfe8d1c793a0eaaaa8f9f3309a73b1df7e0ea24f53e43.svg