Skip to main content

A topological optimization library for python 3

Project description

tooppy

tooppy is a powerful topological optimization library for python 3.

In principle, tooppy is capable of handling topology optimization problems in any dimension, not just the usual 2D and 3D cases.

Install

pip install tooppy

Features

2D

In this example, we seek a structure with both ends fixed (vertically fixed, horizontally slidable), and a vertical force applied at the center as the load. See tests\test_2d.py.

result_2d

3D

This example is the 3D version of the one above, with the structure fixed at the four corners (slidable) and a load applied at the center. See tests\test_3d.py.

result_3d_0

Multiple Loads

tooppy supports solving for structures that are robust under multiple load conditions. The following example designs a structure with 4 fixed corners, where the center may be subjected to loads in the X, Y, and Z directions, requiring robustness under all three load conditions. Note that, since there may be horizontal loads, the previously used slidable supports can no longer be applied. All supports here are fully fixed. See tests\test_3d_multiload.py.

result_3d_1

Requiring the structure to be robust under various load conditions often leads to relatively moderate designs.

Mask

Another powerful feature of tooppy is the mask. Users can specify certain regions where material placement is prohibited. This is particularly useful when the part is in a constrained environment or needs to fit with other parts in space. The regions are specified using a boolean array.

This example has the same configuration as the first 3D example, except that material cannot be placed within the specified four cylindrical regions. See tests\test_3d_mask.py.

result_3d_2

Element Stiffness Matrix Cache

The element stiffness matrix is automatically cached inelement_stiffness_matrices/ on the first time you solve a problem by default. In subsequent calculations, this matrix will be automatically loaded to save time. When you use new materials (with new Young's modulus E or Poisson's ratio nu), or calculate problems in different dimensions, the matrix needs to be recalculated.

You can disable this behavior by using the skip_calculating_element_stiffness_matrix_if_exists=False option. You can also use the element_stiffness_matrix_file_dir option to specify the location where the matrix is stored or to be stored.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tooppy-1.0.0.tar.gz (15.5 kB view hashes)

Uploaded Source

Built Distribution

tooppy-1.0.0-py3-none-any.whl (13.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page