Showing:

0

189

3mos ago

7

0

GPL-3.0

# anaStruct 2D Frames and Trusses

Analyse 2D Frames and trusses for slender structures. Determine the bending moments, shear forces, axial forces and displacements.

## Installation

For the actively developed version:

``````\$ pip install git+https://github.com/ritchie46/anaStruct.git
``````

Or for a release:

``````\$ pip install anastruct
``````

Documentation

## Includes

• trusses ✔️
• beams ✔️
• moment lines ✔️
• axial force lines ✔️
• shear force lines ✔️
• displacement lines ✔️
• hinged supports ✔️
• fixed supports ✔️
• spring supports ✔️
• q-load in elements direction ✔️
• point loads in global x, y directions on nodes ✔️
• q-loads in global y direction ✔️
• hinged elements ✔️
• rotational springs ✔️
• non-linear nodes ✔️
• geometrical non linearity ✔️
• generic type of section - rectangle and circle ✔️
• EU, US, UK steel section database ✔️

## Examples

``````from anastruct import SystemElements
import numpy as np

ss = SystemElements()
element_type = 'truss'

# Create 2 towers
width = 6
span = 30
k = 5e3

# create triangles
y = np.arange(1, 10) * np.pi
x = np.cos(y) * width * 0.5
x -= x.min()

for length in [0, span]:
x_left_column = np.ones(y[::2].shape) * x.min() + length
x_right_column = np.ones(y[::2].shape[0] + 1) * x.max() + length

node_id=ss.find_node_id(vertex=[x_left_column[0], y[0]]),
translation=2,
k=k)
node_id=ss.find_node_id(vertex=[x_right_column[0], y[0]]),
translation=2,
k=k)

ss.add_element_grid([0, width, span, span + width], np.ones(4) * y.max(), EI=10e3)

# Add stability elements at the bottom.
ss.add_truss_element([[span, y.min()], [span + width, y.min()]])

for el in ss.element_map.values():
# apply wind load on elements that are vertical
if np.isclose(np.sin(el.ai), 1):
q=1,
element_id=el.id,
direction='x'
)

ss.show_structure()
ss.solve()
ss.show_displacement(factor=2)
ss.show_bending_moment()

``````

``````from anastruct import SystemElements

ss = SystemElements(EA=15000, EI=5000)

# Add beams to the system.

# Add a fixed support at node 1.

# Add a rotational spring support at node 4.

# Solve
ss.solve()

# Get visual results.
ss.show_structure()
ss.show_reaction_force()
ss.show_axial_force()
ss.show_shear_force()
ss.show_bending_moment()
ss.show_displacement()
``````

### Real world use case.

Non linear water accumulation analysis

## Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100