Skip to main content

gcs

Report a Bug Request a Feature Read the Paper

MacOS Build Status Ubuntu Build Status Windows Build Status

Teaser

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

c4 & c8 relationship

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.

twist relationship

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

gcs_shape-2.0.0.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gcs_shape-2.0.0-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

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

Hashes for gcs_shape-2.0.0.tar.gz
Algorithm Hash digest
SHA256 0020d0a56d3319d014433346bcb0876008d55c85ad42b3e312dffcec0d707038
MD5 831e80966e8d0ddbb00910d771968ed9
BLAKE2b-256 e483cf9c7d56096317e86aeb4d15ce48fd47c1907be57f9a794cd43e4b982d22

See more details on using hashes here.

Provenance

The following attestation bundles were made for gcs_shape-2.0.0.tar.gz:

Publisher: publish.yml on samsilverman/gcs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for gcs_shape-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 55137439d32b46f27a4902e22511668fa526d16f3d5db84924046be3742af245
MD5 d114d8f673c51e29bc7d8775350190f9
BLAKE2b-256 b5fecfa6051727ac6af749c45c8723cf17395f069389007267bf09be6f75d120

See more details on using hashes here.

Provenance

The following attestation bundles were made for gcs_shape-2.0.0-py3-none-any.whl:

Publisher: publish.yml on samsilverman/gcs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 files

1.3.0

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.0

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page