Skip to main content

A lightweight, flexible Python library for topology optimization built on top of Scikit Libraries

Project description

PyPI version License: Apache-2.0 DOI status Python Version PyPI Downloads CI CI

🧠 Scikit Topt

A lightweight, flexible Python library for topology optimization built on top of Scikit Libraries

Documentation

Scikit-Topt Documentation

Examples and Features

Example 1 : Single Load Condition

Optimization Process Pull-Down-0 Optimization Process Pull-Down-1

Example 2 : Multiple Load Condition

multi-load-condition multi-load-condition-distribution

Example 3 : Heat Conduction

heat-conduction heat-conduction

Progress Report

multi-load-condition-progress

Features

To contribute to the open-source community and education—which I’ve always benefited from—I decided to start this project.

The currently supported features are as follows:

  • Coding with Python
  • easy installation with pip/poetry
  • Implement FEA on unstructured mesh using scikit-fem
  • Structural Analysis / Heat Conduction Analysis
  • Topology optimization using the density method and its optimization algorithm
    • Optimality Criteria (OC) Method
    • (Log-Space) Modified OC Method
  • able to handle multiple force condition
  • High-performance computation using sparse matrices with Scipy and PyAMG
  • has a function to monitor the transition of parameters.

SetUp

You can install Scikit-Topt either via pip or Poetry.

Supported Python Versions

Scikit-Topt supports Python 3.10–3.13:

  • 3.10–3.12 — fully supported and tested
  • 3.13 — core topology optimization works normally,
    but VTK-based features (VTU export & image rendering using PyVista)
    are temporarily unavailable because VTK/PyVista do not yet provide wheels
    for Python 3.13.

You can still run the full optimization workflow on Python 3.13;
only visualization-related features are restricted.

Choose one of the following methods:

Using pip

pip install scikit-topt

Using poetry

poetry add scikit-topt

Optional: Enable off-screen rendering

If you want to visualize the optimized density distribution with mesh as an image, you need to enable off-screen rendering using a virtual display.

On Debian/Ubuntu:

sudo apt install xvfb libgl1-mesa-glx

CentOS / RHL

sudo yum install xvfb libgl1-mesa-glx

Usage

See examples in example directory and README.md. README for Usage Examples

Algorithm for Optimization

Optimization Algorithms and Techniques are briefly summarized here.
Optimization Algorithms and Techniques

Contributing

We are happy to welcome any contributions to the library. You can contribute in various ways:

  • Reporting bugs, opening pull requests, or starting discussions via GitHub Issues
  • Writing new examples
  • Improving the tests
  • Enhancing the documentation or code readability doc

By contributing code to Scikit-Topt, you agree to release it under the Apache 2.0 License.

Acknowledgements

Standing on the shoulders of proverbial giants

This software does not exist in a vacuum. Scikit-Topt is standing on the shoulders of proverbial giants. In particular, I want to thank the following projects for constituting the technical backbone of the project:

  • Scipy
  • Scikit-fem
  • PyAMG
  • Numba
  • MeshIO
  • Matplotlib
  • PyVista
  • Topology Optimization Community

📖 Citation

If you use Scikit Topt in your research or software, please cite it as:

@misc{Scikit-Topt2025,
  author       = {Watanabe, Kohei},
  title        = {Scikit-Topt: A Python Library for Algorithm Development in Topology Optimization},
  year         = {2025},
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.15441499},
  url          = {https://doi.org/10.5281/zenodo.15441499},
  note         = {Version 0.3.8}
}

ToDo

  • Set break point from the optimization loop
  • Add A feature to assign tags to nodes and cells
  • Add Level Set
  • Add other optimizers
    • Evolutionary Algorithms
    • MMA
  • Add Multiple BC Conditions
  • Add Unit Test

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

scikit_topt-0.3.8.tar.gz (80.6 kB view details)

Uploaded Source

Built Distribution

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

scikit_topt-0.3.8-py3-none-any.whl (94.5 kB view details)

Uploaded Python 3

File details

Details for the file scikit_topt-0.3.8.tar.gz.

File metadata

  • Download URL: scikit_topt-0.3.8.tar.gz
  • Upload date:
  • Size: 80.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.14 Linux/6.11.0-1018-azure

File hashes

Hashes for scikit_topt-0.3.8.tar.gz
Algorithm Hash digest
SHA256 1205afb790d1f6dd684befe541c9cf5d096061080f1d64b80b539b2f40e95298
MD5 a5ad72314d844bd1848cffc76a6d9257
BLAKE2b-256 abe5bfbca40585b7aca481497869240ba5b9a2e1d26604f9e923a5ddef02e73f

See more details on using hashes here.

File details

Details for the file scikit_topt-0.3.8-py3-none-any.whl.

File metadata

  • Download URL: scikit_topt-0.3.8-py3-none-any.whl
  • Upload date:
  • Size: 94.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.14 Linux/6.11.0-1018-azure

File hashes

Hashes for scikit_topt-0.3.8-py3-none-any.whl
Algorithm Hash digest
SHA256 b34d9bbf1c221e606577cd675d951c157c728ba8d357c65af6c84c65591897d9
MD5 00cbc13749fdd3292b29659c620fb9ba
BLAKE2b-256 2c7e46cae74b16f26f8027b931a4565acd2e9bca077f50dc62c5604213d73fda

See more details on using hashes here.

Supported by

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