-
Notifications
You must be signed in to change notification settings - Fork 115
Description
I am testing the library. In my codes, there are just two standard elements. When I use insert_node() method to insert a new to the second element, the original element will split into two new elements. I can add a point load to the new node. However, the model will can not pass validation. You cannot solve the numerical problem.
I do not know how to fix this error. If I directly define three standard elements with the same properties, the same error will not occur.
from anastruct import SystemElements
structure = SystemElements(EA=15000, EI=5000, mesh=101)
# define elements
structure.add_element(location=[[0,0],[10,4]])
# structure.add_element(location=[[10,4],[10,3]])
structure.add_element(location=[[10,4],[10,0]])
# define support
structure.add_support_hinged(node_id=1)
structure.add_support_hinged(node_id=3)
# define loads
structure.q_load(q=5, element_id=1,direction='element')
structure.point_load(node_id=2, Fx=4, Fy=0)
structure.insert_node(element_id=2,factor=0.25) # insert a node
structure.point_load(node_id=4, Fx=8, Fy=0) # define a point load at the new node
# solve the numerical problem
structure.solve()
Below is the error message:
{
"name": "KeyError",
"message": "2",
"stack": "---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
Cell In[5], line 2
1 # solve the numerical problem
----> 2 structure.solve()