Python 1D FEM Example 3

March 12, 2017

Python 1D FEM Example 3. Simple code example for anaStruct. # 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. ... Read more

Python 1D FEM Example 2

February 12, 2017

Example 2: Truss framework Simple code example for anaStruct. # if using ipython notebook %matplotlib inline import math from anastruct.fem.system import SystemElements # Create a new system object. ss = SystemElements(EA=5000) # Add beams to the system. ss.add_truss_element(location=[[0, 0], [0, 5]]) ss.add_truss_element(location=[[0, 5], [5, 5]]) ss.add_truss_element(location=[[5, 5], [5, 0]]) ss.add_truss_element(location=[[0, 0], [5, 5]], EA=5000 * math.sqrt(2)) # get a visual of the element ID's and the node ID's ss.show_structure() # add hinged supports at node ID 1 and node ID 2 ss. ... Read more

Python 1D FEM Example 1

January 12, 2017

Example 1: Framework Simple code example for anaStruct. # if using ipython notebook %matplotlib inline from anastruct.fem.system import SystemElements # Create a new system object. ss = SystemElements() # Add beams to the system. ss.add_element(location=[[0, 0], [3, 4]], EA=5e9, EI=8000) ss.add_element(location=[[3, 4], [8, 4]], EA=5e9, EI=4000) # get a visual of the element IDs and the node IDs ss.show_structure() # add loads to the element ID 2 ss.q_load(element_id=2, q=-10) # add hinged support to node ID 1 ss. ... Read more

(c) 2017 Ritchie Vink.