https://github.com/jorgepz/cablenets
A Python Module For Structural Cable Nets Analysis
https://github.com/jorgepz/cablenets
convex-optimization structural-engineering
Last synced: 8 months ago
JSON representation
A Python Module For Structural Cable Nets Analysis
- Host: GitHub
- URL: https://github.com/jorgepz/cablenets
- Owner: jorgepz
- License: mit
- Created: 2024-06-01T21:29:35.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-08T14:49:29.000Z (10 months ago)
- Last Synced: 2025-04-08T15:45:19.869Z (10 months ago)
- Topics: convex-optimization, structural-engineering
- Language: Python
- Homepage:
- Size: 251 KB
- Stars: 14
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cablenets: A Python Module for Structural Cable Nets Analysis
[](https://codecov.io/gh/jorgepz/cablenets)

[](https://github.com/jorgepz/cablenets/releases)
_cablenets_ is a tiny python module for solving structural cable nets analysis problems using [Convex Optimization](https://en.wikipedia.org/wiki/Convex_optimization) formulations, in particular [CVXOPT](https://cvxopt.org/) Python library.
The solver implements optimization formulations presented in [this paper](https://doi.org/10.1016/S0020-7683(03)00215-4) and [this book](https://www.routledge.com/Nonsmooth-Mechanics-and-Convex-Optimization/Kanno/p/book/9781420094237) by Yoshihiro Kanno.

## Installing :crossed_fingers:
You can install `cablenets` and its dependencies using `pip` with this command:
```
pip install git+https://github.com/jorgepz/cablenets.git#egg=cablenets
```
You may need to use `pipx` instead of `pip`.
## Using :muscle:
Include the `import cablenets` in your code. By now the interface consists in two functions: `solve` and `plot`. You are encouraged to explore the examples folder to see how to use `cablenets`.
The function `solve` receives numpy arrays with: the reference nodes coordinates, a connectivity matrix (see examples), the young moduli, the cross-section areas, a matrix with the imposed-deformed positions of certain nodes and a matrix with the applied forces.
```python
nodes_def, normal_forces = solve( nodes, connec, youngs, areas, disp_mat, fext_mat )
```
The output consists in: the matrix of the deformed nodes and a vector with the normal forces of the elements.
The function `plot` receives the nodes, the connectivity, the deformed positions of the nodes and the normal forces.
```python
plot( nodes, connec, nodes_def, normal_forces )
```
## Connecting :call_me_hand:
Email: jorgepz _AT_ fing edu uy
## Contributing :handshake:
Contributions are welcome. Open an issue and let's discuss there. The [JOSS authorship guidelines](https://joss.readthedocs.io/en/latest/submitting.html#authorship) are considered as a starting point.