Finite element analysis of 2D structures
Project description
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
Read the docs!
Questions
Got a question? Please ask on gitter.
Includes
- trusses :heavy_check_mark:
- beams :heavy_check_mark:
- moment lines :heavy_check_mark:
- axial force lines :heavy_check_mark:
- shear force lines :heavy_check_mark:
- displacement lines :heavy_check_mark:
- hinged supports :heavy_check_mark:
- fixed supports :heavy_check_mark:
- spring supports :heavy_check_mark:
- q-load in elements direction :heavy_check_mark:
- point loads in global x, y directions on nodes :heavy_check_mark:
- dead load :heavy_check_mark:
- q-loads in global y direction :heavy_check_mark:
- hinged elements :heavy_check_mark:
- rotational springs :heavy_check_mark:
- non-linear nodes :heavy_check_mark:
- geometrical non linearity :heavy_check_mark:
- load cases and load combinations :heavy_check_mark:
- generic type of section - rectangle and circle :heavy_check_mark:
- EU, US, UK steel section database :heavy_check_mark:
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
# add triangles
ss.add_element_grid(x + length, y, element_type=element_type)
# add vertical elements
ss.add_element_grid(x_left_column, y[::2], element_type=element_type)
ss.add_element_grid(x_right_column, np.r_[y[0], y[1::2], y[-1]], element_type=element_type)
ss.add_support_spring(
node_id=ss.find_node_id(vertex=[x_left_column[0], y[0]]),
translation=2,
k=k)
ss.add_support_spring(
node_id=ss.find_node_id(vertex=[x_right_column[0], y[0]]),
translation=2,
k=k)
# add top girder
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([[0, y.min()], [width, y.min()]])
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):
ss.q_load(
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.
ss.add_element(location=[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 support at node 4.
ss.add_support_spring(node_id=4, translation=3, k=4000)
# Add loads.
ss.point_load(Fx=30, node_id=2)
ss.q_load(q=-10, element_id=2)
# 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file anastruct-1.6.1.tar.gz
.
File metadata
- Download URL: anastruct-1.6.1.tar.gz
- Upload date:
- Size: 541.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0d1627013f4a8bd12994d9500f7c7ea2aa894f596c6047b88cc3a3ae35906c8 |
|
MD5 | 3be42c545ca47fb7c0250c895ea834aa |
|
BLAKE2b-256 | 6258e9eb441cd699808b323b6863c823b52a671b5e411bd66f7dd8681af03b77 |
File details
Details for the file anastruct-1.6.1-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: anastruct-1.6.1-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 611.1 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00c1142ccb73f39f51f17010ccc371e68d03e797dffd75a921c53a897cceadc6 |
|
MD5 | fc78b24c0779cb128f1e0e30e4803fb8 |
|
BLAKE2b-256 | abcc228936bfaf9133395ff29a06267ec365441e6e401b6f9199ff10fb0c1980 |
File details
Details for the file anastruct-1.6.1-cp312-cp312-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: anastruct-1.6.1-cp312-cp312-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 798.0 kB
- Tags: CPython 3.12, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2017e777e248a33e375b56069c4b2213bd4cb68352a4e1e2bf1e97a78577679 |
|
MD5 | 1f0b585e27aaff84395f74dc462bf961 |
|
BLAKE2b-256 | f9b3b89d10fbcc6f5b0d9f9e836f742d009a37c6f9c301c1432e4bb03c296b52 |
File details
Details for the file anastruct-1.6.1-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: anastruct-1.6.1-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 800.3 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0ef231496da738055480d1b1657319f42f083089bbdc9bf55483fc356451244 |
|
MD5 | 461bd13ae82f1168610b16764fcf3d29 |
|
BLAKE2b-256 | e813304b3d84b5075d04f545d9c9db868950fe39a185f064881a982efae5e292 |
File details
Details for the file anastruct-1.6.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: anastruct-1.6.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 798.5 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1bc4683e7d159152805f91ddf1ee106e3f01d991a08e5a72a6da984bdeacf73 |
|
MD5 | e7f5d0e750b1376e4c4aed15326224ec |
|
BLAKE2b-256 | 4728348f045b2fe35731a30d9df6ccea95f0afd15de372cac987f1c350d2e16b |
File details
Details for the file anastruct-1.6.1-cp312-cp312-macosx_11_0_arm64.whl
.
File metadata
- Download URL: anastruct-1.6.1-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 608.3 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d3c03d9aa29bd3588a85be80150de09531345be521acb20e4c7d42354d9c60e |
|
MD5 | 279a2e090ebf4e384d55ff8f06c1c3ca |
|
BLAKE2b-256 | 61f10e52b56e9787431af806aeef6d555086d91a3012e33525fb4377a6905e80 |
File details
Details for the file anastruct-1.6.1-cp312-cp312-macosx_10_13_x86_64.whl
.
File metadata
- Download URL: anastruct-1.6.1-cp312-cp312-macosx_10_13_x86_64.whl
- Upload date:
- Size: 608.8 kB
- Tags: CPython 3.12, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 020c77d83eeeeeacde50ffd1afa0d8cf0f0612723de73b541d02f9a4f2495c73 |
|
MD5 | 8563ebd154aba825c71aac05ebe8bd70 |
|
BLAKE2b-256 | 990f50c57510e4a419aca778b4bddffe26e2ce5c5e22aeacba784d382d246fe5 |
File details
Details for the file anastruct-1.6.1-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: anastruct-1.6.1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 610.9 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf32b85c9ee9671f97d4ca2496ae087161e485e05321ea32bef3bc6084c8227e |
|
MD5 | 8779ad32497ebb20514973ff1f025bca |
|
BLAKE2b-256 | 9bd7d0c25afcf76464abef38d86145af24c24897797de742da9d1b3980fa9f80 |
File details
Details for the file anastruct-1.6.1-cp311-cp311-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: anastruct-1.6.1-cp311-cp311-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 794.8 kB
- Tags: CPython 3.11, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae3249aba8aac03b602b2bd884f12fa7046bf6aa3788d4eb82ec1469bf9fde09 |
|
MD5 | 312a9025640a923d31f6eb67ae25138d |
|
BLAKE2b-256 | b4b56f48636e7834310c97d7ad61ec09728ebfaa7b20f00e9ee7829f1636b0a0 |
File details
Details for the file anastruct-1.6.1-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: anastruct-1.6.1-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 792.7 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e135f20c6be066d609ca5449281c936e20d9cce81eba25b1b8b28ef8a7255d1c |
|
MD5 | e3ff160fe12c6edfc175203d54d9f6ba |
|
BLAKE2b-256 | f93e1935c7f77d8994d654b1796a93626f4541e9c58e33210b9ef4c7bcde9bfe |
File details
Details for the file anastruct-1.6.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: anastruct-1.6.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 790.9 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7073f22801ca26a6728cc1d14612a1bcf71d7ed39febf7fd1237e93ce37352e8 |
|
MD5 | 12aefbd26834f0e00644512db1f07430 |
|
BLAKE2b-256 | 9ac7af81582c00aa44439af240a6c94ade91aa3a5e8d4ff2572feea90a4f2f6f |
File details
Details for the file anastruct-1.6.1-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: anastruct-1.6.1-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 608.3 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35c89c9005de23d3ded51fb722703bce2bcfec60afe1ea40bc1053e656f45158 |
|
MD5 | 7b0e3e49865b1dc9a5159ba177de222c |
|
BLAKE2b-256 | cd53dbb8882d47c1885669b8fdce520b0bd2afacc131ceecc96e5fd41f90876a |
File details
Details for the file anastruct-1.6.1-cp311-cp311-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: anastruct-1.6.1-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 608.6 kB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 445836a53817252a827c28f9fef4386372801b9f59185e4c8ffa9f53af7edbc6 |
|
MD5 | 8ac29f6a2b96d8783df53067e931cba2 |
|
BLAKE2b-256 | f72e93de6c547a313790e5461d88d0052c935aba970d0c716bbc27fe18e9fa25 |
File details
Details for the file anastruct-1.6.1-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: anastruct-1.6.1-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 610.8 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8468e381d09653f918248a2856bcf9d22d7fe8b35e2291dddad8843f4db1d00 |
|
MD5 | 943a3087618361b4bd888756b21861d7 |
|
BLAKE2b-256 | f6ac8156383c5c720169514d55f5ed1d1a3a4582a9dc744fb42b69987b445c60 |
File details
Details for the file anastruct-1.6.1-cp310-cp310-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: anastruct-1.6.1-cp310-cp310-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 767.7 kB
- Tags: CPython 3.10, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e985d6148caf74d64f3c0cb56dfa01bbbbedd486cbb5df6d9adb52b9662d8270 |
|
MD5 | 69a01a3d4b07d1bd6df3ceb535b79fb9 |
|
BLAKE2b-256 | 2801cdef3f31d625daf36689839a3683f7283e5752c04786e5e05a9219b4f1c4 |
File details
Details for the file anastruct-1.6.1-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: anastruct-1.6.1-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 765.3 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 701e9e6faac0d38a472da87201db9c8891dafc6adba685dd2f2b6c97ae84833e |
|
MD5 | e4e8c58a36475cba737a3d083c4353d2 |
|
BLAKE2b-256 | 33c520eb940064223f7441c623ec3467dd8d424cab4d99e0499e4527d6ebb061 |
File details
Details for the file anastruct-1.6.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: anastruct-1.6.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 763.3 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 952b203f8022d1a287d642130155ce0ca9bade7ca141835b2e1acce7faf05a69 |
|
MD5 | ebfc0e5321361b1befc9117858e1599b |
|
BLAKE2b-256 | 221bd96f811fa69d0ec3655af333b7d400f35228892bd6243246fac8cf5bd52b |
File details
Details for the file anastruct-1.6.1-cp310-cp310-macosx_11_0_arm64.whl
.
File metadata
- Download URL: anastruct-1.6.1-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 608.5 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54af8b6834aab8a0d480273a9567f941d32196999ee2407dd51dc230f88b556f |
|
MD5 | 6b655cab96874bd9dafad08d38f7bab9 |
|
BLAKE2b-256 | 3f8d1dbdbd35c449103d7e0f69f87b272efc53c4b8f37a03cdc38230234a7730 |
File details
Details for the file anastruct-1.6.1-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: anastruct-1.6.1-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 608.9 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48d78564eb588b9dfe3d756e78cd8c5722af52674dc257ffdb367c12e3b0d0fa |
|
MD5 | b8d5eb6def29a172a57aa5864328e552 |
|
BLAKE2b-256 | 3e671ccf95e927ee5db2129d04de6ab25c4ac7edb1494bf17841039441ae4cb8 |