Skip to main content

Truss Solver for Python

Project description

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. Input files may be written in Excel or directly in Python. 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
M.plot_model()
M.plot_show()

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/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trusspy-2.0.0.tar.gz (67.0 kB view details)

Uploaded Source

Built Distribution

trusspy-2.0.0-py3-none-any.whl (57.3 kB view details)

Uploaded Python 3

File details

Details for the file trusspy-2.0.0.tar.gz.

File metadata

  • Download URL: trusspy-2.0.0.tar.gz
  • Upload date:
  • Size: 67.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for trusspy-2.0.0.tar.gz
Algorithm Hash digest
SHA256 ba7aa143114d3f99914207214cae158837149fce0d3c8beeac1662db4bcb6910
MD5 0394084722a995a353bc37f447fe3aae
BLAKE2b-256 c8a26e7b513d2ab04df5bd0a384406eab85b80d9c5bf66a5f5d574213be2b88b

See more details on using hashes here.

File details

Details for the file trusspy-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: trusspy-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 57.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for trusspy-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c3b2feccdd9baf032d74fcb68195650a8a3477e8cea75d7b91c7f938d0f2358
MD5 dd2b416e48b4a4340e93730b0a764493
BLAKE2b-256 efc013b19e7df52ac69133a48ec148775ae76d3eb191ce60dc6bd0b9b49f4678

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page