Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.5%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: MSKang-KOR
  • License: gpl-3.0
  • Language: Python
  • Default Branch: main
  • Size: 1.34 MB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 2 years ago · Last pushed over 2 years ago
Metadata Files
Readme License Citation

README.md

anaStruct 2D Frames and Trusses

Python tests Documentation Status

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!

Documentation

Questions

Got a question? Please ask on gitter.

Includes

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

Examples

```python 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]: xleftcolumn = np.ones(y[::2].shape) * x.min() + length xrightcolumn = 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.addelementgrid([0, width, span, span + width], np.ones(4) * y.max(), EI=10e3)

Add stability elements at the bottom.

ss.addtrusselement([[0, y.min()], [width, y.min()]]) ss.addtrusselement([[span, y.min()], [span + width, y.min()]])

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

ss.showstructure() ss.solve() ss.showdisplacement(factor=2) ss.showbendingmoment()

```

```python from anastruct import SystemElements

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

Add beams to the system.

ss.addelement(location=[0, 5]) ss.addelement(location=[[0, 5], [5, 5]]) ss.add_element(location=[[5, 5], [5, 0]])

Add a fixed support at node 1.

ss.addsupportfixed(node_id=1)

Add a rotational spring support at node 4.

ss.addsupportspring(node_id=4, translation=3, k=4000)

Add loads.

ss.pointload(Fx=30, nodeid=2) ss.qload(q=-10, elementid=2)

Solve

ss.solve()

Get visual results.

ss.showstructure() ss.showreactionforce() ss.showaxialforce() ss.showshearforce() ss.showbendingmoment() ss.showdisplacement() ```

Real world use case.

Non linear water accumulation analysis

Owner

  • Login: MSKang-KOR
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Vink"
  given-names: "Ritchie"
  email: ritchie46@gmail.com
title: "anaStruct 2D Frames and Trusses"
type: software
version: 1.0.0
doi: 10.5281/zenodo.1234
date-released: 2016-08-08
repository-code: "https://github.com/ritchie46/anaStruct"
url: "https://anastruct.readthedocs.io/"

GitHub Events

Total
Last Year

Dependencies

dev_requirements.txt pypi
  • matplotlib ==3.7.2 development
  • numpy ==1.25.2 development
  • scipy ==1.11.2 development
plot_requirements.txt pypi
  • matplotlib >=3.0
pyproject.toml pypi
requirements.txt pypi
  • numpy >=1.15
  • scipy >=1.1.0
requirements_docs.txt pypi
  • matplotlib *
  • scipy *
  • sphinx_autodoc_typehints *
test_requirements.txt pypi
  • black ==23.7.0 test
  • mypy ==1.5.1 test
  • pylint ==2.17.5 test
  • pytest ==7.4.1 test
  • pytest-describe ==2.1.0 test
  • pytest-pspec ==0.0.4 test
  • pytest-raises ==0.11 test