gcs
gcs is a Python library for creating generalized cylindrical shells (GCS).
The GCS design space uses eleven continuous parameters to generate trillions of geometrically diverse, manufacturable cylindrical-shell structures. This compact parameterization enables large-scale optimization while capturing the nonlinear buckling, plasticity, and self-contact mechanisms that govern energy absorption. This library is used in our paper:
Kelsey L. Snapp, Benjamin Verdier, Aldair E. Gongora, Samuel Silverman, Adedire D. Adesiji, Elise F. Morgan, Timothy J. Lawton, Emily Whiting, Keith A. Brown
Superlative mechanical energy absorbing efficiency discovered through self-driving lab-human partnership
Nature Communications (2024)
Installation
The package requires Python 3.10 or later and is available on PyPI. Install it with:
pip install gcs-shape
You can then import the package in Python:
import gcs
GCS Design Parameters
GCS are parameterized by 11 values:
| Syntax | Description |
|---|---|
c4_base |
Parameter controlling the size and shape of the base $4$-lobe feature. |
c8_base |
Parameter controlling the size and shape of the base $8$-lobe feature. |
c4_top |
Parameter controlling the size and shape of the top $4$-lobe feature. |
c8_top |
Parameter controlling the size and shape of the top $8$-lobe feature. |
twist_linear |
Rotation (rad) of the top. This creates a linear twist between the base and top. |
twist_amplitude |
Amplitude (rad) of the oscillating twist between the base and top. |
twist_cycles |
Number of cycles of the oscillating twist between the base and top. |
perimeter_ratio |
Ratio between the top and base perimeters. |
height |
Height (mm). |
mass |
Mass (g). |
thickness |
Wall thickness (mm). |
c4 and c8 Relationship
The geometry of each top or bottom face is described by a polar equation whose shape is controlled by the parameters c4 and c8.
This parameterization was adopted from Overvelde and Bertoldi (2014).
twist_linear, twist_amplitude, and twist_cycles Relationship
The parameters twist_linear, twist_amplitude, and twist_cycles control how the cross-section rotates as it is interpolated from the base face to the top face.
twist_linear sets the linear rotation, while twist_amplitude and twist_cycles control the amplitude and frequency of the oscillatory rotation along the height.
Quickstart
import gcs
# Create a generalized cylindrical shell
shape = gcs.GCS(c4_base=0.3,
c8_base=-0.2,
c4_top=0.4,
c8_top=-0.3,
twist_linear=2,
twist_amplitude=0.05,
twist_cycles=3,
perimeter_ratio=1.5,
height=20,
mass=2.1,
thickness=0.48)
# Assert the shape is valid
print(shape.valid)
# Save shape to STL file
gcs.io.save_mesh(file='shape.stl', shape=shape)
Documentation
Documentation is provided in NumPy-style docstrings throughout the codebase.
Docstrings can be viewed interactively with Python's built-in help() function.
For example:
import gcs
help(gcs.GCS)
Contributing
The contribution guidelines can be found in CONTRIBUTING.md.
Maintainers
Citation
@article{Snapp:2024:SuperlativeMechanicalEnergy,
author={Snapp, Kelsey L. and Verdier, Benjamin and Gongora, Aldair E. and Silverman, Samuel and Adesiji, Adedire D. and Morgan, Elise F. and Lawton, Timothy J. and Whiting, Emily and Brown, Keith A.},
title={Superlative mechanical energy absorbing efficiency discovered through self-driving lab-human partnership},
journal={Nature Communications},
year={2024},
month={May},
day={21},
volume={15},
number={1},
pages={4290},
issn={2041-1723},
doi={10.1038/s41467-024-48534-4},
url={https://doi.org/10.1038/s41467-024-48534-4}
}
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gcs_shape-2.0.0.tar.gz.
File metadata
- Download URL: gcs_shape-2.0.0.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0020d0a56d3319d014433346bcb0876008d55c85ad42b3e312dffcec0d707038
|
|
| MD5 |
831e80966e8d0ddbb00910d771968ed9
|
|
| BLAKE2b-256 |
e483cf9c7d56096317e86aeb4d15ce48fd47c1907be57f9a794cd43e4b982d22
|
Provenance
The following attestation bundles were made for gcs_shape-2.0.0.tar.gz:
Publisher:
publish.yml on samsilverman/gcs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gcs_shape-2.0.0.tar.gz -
Subject digest:
0020d0a56d3319d014433346bcb0876008d55c85ad42b3e312dffcec0d707038 - Sigstore transparency entry: 2256242394
- Sigstore integration time:
-
Permalink:
samsilverman/gcs@2365188e14d8f62864dcc5ab3570ea187dd2bde7 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/samsilverman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2365188e14d8f62864dcc5ab3570ea187dd2bde7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gcs_shape-2.0.0-py3-none-any.whl.
File metadata
- Download URL: gcs_shape-2.0.0-py3-none-any.whl
- Upload date:
- Size: 20.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55137439d32b46f27a4902e22511668fa526d16f3d5db84924046be3742af245
|
|
| MD5 |
d114d8f673c51e29bc7d8775350190f9
|
|
| BLAKE2b-256 |
b5fecfa6051727ac6af749c45c8723cf17395f069389007267bf09be6f75d120
|
Provenance
The following attestation bundles were made for gcs_shape-2.0.0-py3-none-any.whl:
Publisher:
publish.yml on samsilverman/gcs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gcs_shape-2.0.0-py3-none-any.whl -
Subject digest:
55137439d32b46f27a4902e22511668fa526d16f3d5db84924046be3742af245 - Sigstore transparency entry: 2256242403
- Sigstore integration time:
-
Permalink:
samsilverman/gcs@2365188e14d8f62864dcc5ab3570ea187dd2bde7 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/samsilverman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2365188e14d8f62864dcc5ab3570ea187dd2bde7 -
Trigger Event:
push
-
Statement type: