Python 1D FEM Example 3

March 12, 2017 by Ritchie Vink

fem

Python 1D FEM Example 3.

Simple code example for anaStruct.

view

# if using ipython notebook
%matplotlib inline

from anastruct.fem.system import SystemElements

# Create a new system object.
ss = SystemElements(EA=15000, EI=5000)

# Add beams to the system.
ss.add_element(location=[[0, 0], [0, 5]])
ss.add_element(location=[[0, 5], [5, 5]])
ss.add_element(location=[[5, 5], [5, 0]])

# Add a fixed support at node 1.
ss.add_support_fixed(node_id=1)

# Add a rotational spring at node 4.
ss.add_support_spring(node_id=4, translation=3, k=4000)

# Add loads.
ss.point_load(Fx=30, node_id=2)
ss.q_load(q=-10, element_id=2)

ss.show_structure()
ss.solve()

structure

ss.show_reaction_force()

ss.show_axial_force()

ss.show_shear_force()

ss.show_bending_moment()

ss.show_displacement()

(c) 2020 Ritchie Vink.