This release is a pre-release and may not be stable for production use.
TopOpt — Topology Optimization in Python
A Python Library for Topology Optimization
Warning: this library is in early stages of development and consequently the API may change to better improve usability.
Topology optimization is a form of structure optimization where the design variable is the topology of the structure. Topological changes are achieved by optimizing the material distribution within a given design space.
TopOpt is a python library for topology optimization. TopOpt contains common design problems (e.g. minimum compliance) solved using advanced methods (e.g. Method of Moving Asymptotes (MMA)). Using TopOpt we can optimize the classic Messerschmitt–Bölkow–Blohm (MBB) beam in a few lines of code:
import numpy
from topopt.boundary_conditions import MBBBeamBoundaryConditions
from topopt.problems import ComplianceProblem
from topopt.solvers import TopOptSolver
from topopt.filters import DensityBasedFilter
from topopt.guis import GUI
nelx, nely = 180, 60 # Number of elements in the x and y
volfrac = 0.4 # Volume fraction for constraints
penal = 3.0 # Penalty for SIMP
rmin = 5.4 # Filter radius
# Initial solution
x = volfrac * numpy.ones(nely * nelx, dtype=float)
# Boundary conditions defining the loads and fixed points
bc = MBBBeamBoundaryConditions(nelx, nely)
# Problem to optimize given objective and constraints
problem = ComplianceProblem(bc, penal)
gui = GUI(problem, "Topology Optimization Example")
topopt_filter = DensityBasedFilter(nelx, nely, rmin)
solver = TopOptSolver(problem, volfrac, topopt_filter, gui)
x_opt = solver.optimize(x)
input("Press enter...")
Output:
Development Status
TopOpt is in early stages of development and only features a limited set of finite element mesh options, optimization problems, and solvers. The following is a list of current and future features of TopOpt:
Meshes
- 2D regular grid
- 2D general mesh
- triangle mesh
- quadrilateral mesh
- 3D regular grid
- 3D general mesh
- tetrahedron mesh
- hexahedron mesh
Problems
- compliance
- linear elasticity
- non-linear elasticity
- stress
- thermal conductivity
- fluid flow
Solvers
- optimality criterion
- Method of Moving Asymptotes (MMA)
- genetic algorithms
Metadata
Release files for topopt 0.0.1a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| topopt-0.0.1a1.tar.gz | 19.6 kB | Without provenance | Details for topopt-0.0.1a1.tar.gz |
Release files / topopt-0.0.1a1.tar.gz
| Download URL | topopt-0.0.1a1.tar.gz |
|---|---|
| Size | 19.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1d5745c353bee69a3f4b359f5a5e2c5c654e9ab60fbdb553baf2f8e30b1c65e3
|
|
BLAKE2b-256 checksum How to use checksums |
28e6b58bd21ec780ef0c4fcb31da04e300cf00e5854c20c01b980bf112a109b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6
|
Security for topopt 0.0.1a1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.