Mismatch on geometrical non linear code coming from you guide
Hi, the following code is kept from your
Collection of examples of 2D structural analysis in Python with anaStruct framework
Open Source project by Ritchie Vink - https://github.com/ritchie46/anaStruct
but some errors arise. May I know the reason? Thanks in advance
nolin.py
from anastruct import SystemElements
ss = SystemElements(EA=15000, EI=5000)
ss.add_element(location=[[0, 0], [0, 5]])
ss.add_element(location=[[0, 5], [5, 5]])
ss.add_element(location=[[5, 5], [5, 0]])
ss.add_support_hinged(node_id=1)
ss.add_support_hinged(node_id=4)
ss.q_load(element_id=2, q=-10)
a = ss.solve(geometrical_non_linear=True, discretize_kwargs=dict(n=20))
print(*a)
ss.show_structure()
#EOF: nolin.py
'''
C:\Training>python nolin.py
Traceback (most recent call last):
File "nolin.py", line 11, in
solver.py", line 140, in geometrically_non_linear
buckling_system.discretize(**discretize_kwargs)
File "C:\Users\Alfabeta\AppData\Local\Programs\Python\Python38\lib\site-packages\anastruct\fem\system.py", line 1
505, in discretize
ss.q_load(
File "C:\Users\Alfabeta\AppData\Local\Programs\Python\Python38\lib\site-packages\anastruct\fem\system.py", line 9
24, in q_load
self.plotter.max_q, max(abs(q[i][0]), abs(q[i][1]))
TypeError: bad operand type for abs(): 'list'
'''