3D and 2D Truss structural analysis


Keywords
python, truss, civil, engineering, structural, analysis, architecture, civil-engineering, deep-learning, generate-truss-data, genetic-algorithm, graph-deep-learning, optimization, python3, pytorch, pytorch-geometric, slientruss3d, structural-analysis, structural-engineering, structure-optimization, truss-analysis, truss-optimization, truss-solver
License
MIT
Install
pip install slientruss3d==2.0.3

Documentation

slientruss3d : Python for stable truss analysis and optimization tool

Python Version GitHub release Downloads_Week Downloads_Day License


Description

slientruss3d is a python package which can solve the resistances, internal forces and joint dispalcements in a stable 2D or 3D truss by direct stiffness method. And also can do truss optimization by Genetic Algorithm (GA) and generate truss data conveniencely.

This repo is writen by :

Taiwan                                          (臺灣)
Department of Civil Engineering                 (土木工程學系)
National Yang Ming Chiao Tung University (NYCU) (國立陽明交通大學)
Shih-Chi Cheng                                  (鄭適其)

Show

Content

  1. Installaltion
  2. Quick start
  3. Combine with JSON
  4. Plot your truss
  5. Truss optimization
  6. Generate truss data automatically

Install

First, check your python version:

Python must >= 3.9.7

Second, download the slientruss3d package:

pip install slientruss3d 

Time consuming

The following are time consuming tests for doing structural analysis for each truss (Each testing runs for 30 times and takes average !).

  • 6-bar truss   : 0.00037(s)
  • 10-bar truss  : 0.00050(s)
  • 25-bar truss  : 0.00126(s)
  • 47-bar truss  : 0.00253(s)
  • 72-bar truss  : 0.00323(s)
  • 120-bar truss : 0.00557(s)
  • 942-bar truss : 0.05253(s)

Testing on :

CPU: Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
RAM: 8GB DDR4 * 2

Update log

New feature in v1.3.x update !

After slientruss3d 1.3.x, you can use slientruss3d.generate module to generate truss data automatically. For now, only simple cube-like truss can be generated by slientruss3d, but I think this is still a helpful way for anyone who suffers from lake of truss data.

More details are in Generate truss data automatically

ShowCube

New feature in v1.2.x update !

After slientruss3d v1.2.x, you could use slientruss3d.ga module to do member type selection optimization conveniencely with Genetic Algorithm (GA)! Just simply define the topology of the truss and what member types you want to use, and then you could start the optimization.

More details are in Truss optimization

Besides GA, there are some new useful methods in the Truss object:

class Truss:

    ...

    # Check whether all internal forces are in allowable range or not:
    def IsInternalStressAllowed(self, limit, isGetSumViolation=False) -> tuple[bool, dict | float]: 
        ...

    # Check whether all internal displacements are in allowable range or not:
    def IsDisplacementAllowed(self, limit, isGetSumViolation=False) -> tuple[bool, dict | float]:
        ...

Enjoy 😎 !