Skip to main content

Truss Solver for Python.

PyPI version shields.io Binder Open In Colab Documentation Status License: GPL v3 Made with love in Graz (Austria) codecov DOI Codestyle black

TrussPy is a 3D Truss-Solver written in Py-thon which is capable of material and geometric nonlinearities. It uses an object-oriented approach to structure the code in meaningful classes, attributes and methods. TrussPy contains both multistep functionality (multiple loadcase analysis with sequenced external forces) and an adaptive method to control incremental stepwidths. A simple post-processing inside TrussPy is directly available via Matplotlib. Model Plots whether in undeformed or deformed configuration with optional contour plots on element forces are easy to show. They may also be generated for a series of increments and saved as a GIF Movie. Last but not least History (a.k.a. x-y) Plots for a series of increments or Path Plots along a given node path may be generated for nodal properties (displacements, forces) or global quantities like the Load-Proportionality-Factor (LPF).

Official Documentation: http://trusspy.readthedocs.io/

Installation

Use pip to install TrussPy

pip install trusspy

Example

import trusspy as tp

M = tp.Model()

# create nodes
with M.Nodes as MN:
    MN.add_node(1, (0, 0, 0))
    MN.add_node(2, (1, 0, 0))

# create element
with M.Elements as ME:
    ME.add_element(1, [1, 2])
    ME.assign_material("all", [1])
    ME.assign_geometry("all", [1])

# create displacement (U) boundary conditions
with M.Boundaries as MB:
    MB.add_bound_U(1, (0, 0, 0))
    MB.add_bound_U(2, (1, 0, 0))

# create external forces
with M.ExtForces as MF:
    MF.add_force(2, (1, 0, 0))

# build model, run, show results
M.build()
M.run()

# plot results of last increment
M.plot_model(inc=-1, contour="force")

Online Notebook

Try TrussPy without installation in an Interactive Online Notebook.

Changelog

All notable changes to this project will be documented in this file. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

License

TrussPy - Truss Solver for Python (C) 2023 Andreas Dutzler, Graz (Austria).

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Metadata

Release files for trusspy 3.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for trusspy 3.0.1
File Size Uploaded
trusspy-3.0.1.tar.gz 65.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for trusspy 3.0.1
File Interpreter ABI Platform
trusspy-3.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 122.0 kB

Release files / trusspy-3.0.1.tar.gz

Download URL trusspy-3.0.1.tar.gz
Size 65.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0312579fddd9698f3591bce1a1d0531f37bbb566328f10efeb750940de2ef8ab
BLAKE2b-256 checksum
How to use checksums
aacb97b19b596d57a459351ac7a5075b39dd1f69da83989e429859d629d96f25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / trusspy-3.0.1-py3-none-any.whl

Download URL trusspy-3.0.1-py3-none-any.whl
Size 56.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a627b19331d052a99f27899ea39c229240ceb483c7562db4bd5c381471fd914
BLAKE2b-256 checksum
How to use checksums
7664ab6ae731560376ce495f7ec15fc2736b8583c5e2bc15264e73138954bddf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

3.0.1 This release

2 release files

3.0.0

2 release files

2.0.0

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page